WO2020093634A1 - Face recognition-based method, device and terminal for adding image, and storage medium - Google Patents

Face recognition-based method, device and terminal for adding image, and storage medium Download PDF

Info

Publication number
WO2020093634A1
WO2020093634A1 PCT/CN2019/077220 CN2019077220W WO2020093634A1 WO 2020093634 A1 WO2020093634 A1 WO 2020093634A1 CN 2019077220 W CN2019077220 W CN 2019077220W WO 2020093634 A1 WO2020093634 A1 WO 2020093634A1
Authority
WO
WIPO (PCT)
Prior art keywords
similarity
sample library
preset
photo
photos
Prior art date
Application number
PCT/CN2019/077220
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 WO2020093634A1 publication Critical patent/WO2020093634A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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

Definitions

  • the present application relates to the field of biometrics technology, and in particular, to a method for adding photos based on face recognition, a device for adding photos based on face recognition, a terminal device, and a storage medium.
  • the traditional face recognition technology is based on the facial features of the person. For the input face image or video stream: first determine whether there is a face, if there is a face, then further give the position, size and The location information of each major facial organ. Based on this information, the identity features contained in each face are further extracted and compared with known faces to identify the identity of each face.
  • the traditional face recognition technology compares the recognized face with the known face saved by the system, but due to the limitations of the face saved by the system, such as the bangs, fat and thin, and makeup of the recognized face
  • the saved faces are different, so there is a risk that the faces will not be recognized, and I need to find relevant personnel again to take the latest photos.
  • An aspect of an embodiment of the present application provides a method for adding photos based on face recognition.
  • the method includes:
  • the first captured photo is automatically added to the sample library
  • Another aspect of the embodiments of the present application further provides a photo adding device based on face recognition, the device includes:
  • the similarity obtaining module is used to obtain the similarity between the first captured photo and the photos in the sample library
  • the judgment module is used to judge whether the similarity is within a preset similarity threshold
  • a photo adding module configured to automatically add the first captured photo to the sample library when the judgment module determines that the similarity is within the preset similarity threshold
  • the face authentication module is used to perform face authentication and obtain the face authentication result.
  • embodiments of the present application further provide a terminal device, the terminal device includes a processor, and the processor is configured to implement any one of the above-described face recognition-based Steps to add photos.
  • a non-volatile readable storage medium stores computer-readable instructions, which are implemented when executed by a processor. The steps of the photo adding method based on face recognition described in any one of the above.
  • Embodiments of the present application provide a method for adding photos based on face recognition, a device for adding photos based on face recognition, a terminal device, and a storage medium to obtain the similarity between a first captured photo and a sample library photo; and determine whether the similarity is Within a preset similarity threshold; if the similarity is within the preset similarity threshold, automatically add the first captured photo to the sample library; perform face authentication, and obtain the face authentication result.
  • FIG. 1 is a flowchart of a method for adding photos based on face recognition provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • FIG. 3 is an exemplary functional block diagram of the terminal device shown in FIG. 2.
  • FIG. 1 is a flowchart of a method for adding photos based on face recognition provided by an embodiment of the present application.
  • the method for adding photos based on face recognition can be applied to an intelligent terminal equipped with a camera and / or a scanner.
  • the terminal may be a smart watch, a smart phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA) and other smart devices.
  • the terminal may perform data interaction with the server through a wireless network (for example, Bluetooth, WIFI, infrared, etc.).
  • the method for adding photos based on face recognition may include the following steps:
  • the camera that performs face recognition may use a high-definition camera, for example, a camera with no less than 10 million pixels.
  • the similarity may be calculated based on the characteristics of the first captured photo and the characteristics of the sample library photo.
  • the method for obtaining the similarity between the first captured photo and the sample library photo includes: performing face detection on the collected video image to obtain the first captured photo; and collecting the user's face in the first captured photo Information to obtain the user ’s face image; obtain the preset area of the user ’s face image and calculate the image characteristics of the preset area; compare the image characteristics of the preset area of the first captured photo with those of the sample library photos The similarity of the image features of the preset area.
  • the similarity of the image features of the two preset regions can be measured as the similarity by calculating the distance between the image features. For example, the cos distance or the Euclidean distance between the preset region features of two face images can be calculated to measure a Similarity corresponding to facial image features.
  • the similarity between the image feature of the preset area of the first captured photo and the image feature of the preset area of the sample library photo is the similarity of the first captured photo and the sample library photo.
  • the preset area may include one or more of areas such as human eyes, nose, mouth, and edges of human faces.
  • the method for performing face detection may include one or more of a detection algorithm based on face feature points, a detection algorithm based on an entire face image, a detection algorithm based on a template, and an algorithm using neural network for detection,
  • the information detected by the face may include facial feature information, facial curve information, and the like.
  • the recognition algorithm based on neural network includes: collecting a large number of face samples in advance, and training to obtain a deep convolutional neural network for face detection; then the Video image data is input to the face detection deep convolutional neural network to obtain a face feature map, and an area on the face feature map whose overall score exceeds a set threshold is regarded as a face area.
  • the set threshold may be a value obtained by a person skilled in the art based on experience.
  • the first snapshot photos and the sample library photos may be classified and labeled, and the first snapshot photos and the Perform face alignment operations on the photos in the sample library.
  • the face alignment operation may include performing operations such as rotating, zooming in, zooming out, or cutting on the photos in the sample library.
  • the face alignment operation can ensure that stable features are extracted and a better face recognition effect is obtained, so as to remove the influence of face angle on face recognition.
  • the method for determining whether the similarity is within a preset similarity threshold may include: separately calculating the image characteristics of each preset area of the first captured photo and each pre-calculation of the sample library photos Let the average similarity of the image features of the area (ie, calculate the average of the similarity of the image features of each preset area of the first captured photo and the image features of each preset area of the sample library photo, Specifically, the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo may be calculated first, and then the image feature of each preset area The average value of the similarity of.
  • the method for calculating the average similarity is not limited in this embodiment), where the number of the preset areas is greater than one; it is determined whether the average similarity is within the preset similarity Within the threshold; if it is determined that the average similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library. Or, calculate the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo; determine whether the similarity is all within the preset similarity threshold If the judgment result is yes, the first snapshot is automatically added to the sample library.
  • the preset similarity threshold may be flexibly set according to a specific application scenario. For example, a face image feature progress simulation corresponding to multiple photos may be simulated, and finally a threshold is determined as the similarity threshold.
  • a threshold is determined as the similarity threshold.
  • the preset similarity threshold may be a percentage value above 90%, for example, 90% or 92%.
  • the second method that is, whether the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo is within the preset similarity threshold . Then the number of the preset similarity thresholds is consistent with the number of the preset areas (the number is at least 2), the image features of each preset area of the first captured photo and each of the photos of the sample library.
  • the threshold of the similarity of image features of a preset area may be the same. Of course, it can also be set to be different according to the feature distribution. For example, for the preset area being the outer edge of the face, the preset similarity threshold may be smaller, while for the area such as human eye position and human nose position, The preset similarity threshold may be set relatively large.
  • the method before the first captured photo is automatically added to the sample library, the method further includes: outputting a prompt, the content of the prompt includes whether to add the first captured photo to the sample library.
  • the method of prompting may include voice prompting, short message prompting, and the like. It can be understood that if the user's prompt is not received within the preset duration (for example, the preset duration is 10 seconds), the system automatically adds the first captured photo to the sample library. By outputting prompts, the staff can consider whether to update the sample library photos according to the actual situation, making the photo addition system based on face recognition more user-friendly.
  • the method further includes: updating the first captured photo saved in the sample library at a preset time interval; wherein, the updated captured photo
  • the similarity with the sample library photos is not less than the similarity between the first snapshot photos and the sample library photos. It can be understood that a preset time interval is set, and within the preset time interval after the first captured photo is automatically added to the sample library, the sample library does not need to be updated.
  • the sample library may include original photos of the sample library and a preset number of captured photos.
  • the preset time interval and the preset number may be preset by the system, or may be preset by an end user. For example, the preset time interval is 30 days, and the preset number is 2 sheets.
  • the shooting environment may include light brightness, angle of the captured face, and the like.
  • the system automatically updates the captured photos in the sample library during the face recognition process thereafter.
  • the similarity between the snapshot photo used for updating and the original photo in the sample library is not less than the similarity between the snapshot photo (that is, the first snapshot photo) already saved in the sample library and the original photo, and preferably, the There is a large gap between the updated second snapshot photos and the remaining snapshot photos already stored in the sample library.
  • S104 Perform face authentication, and obtain the face authentication result.
  • the face authentication may be 1: N face authentication or 1: 1 face authentication.
  • the face authentication result includes: authentication success and authentication failure.
  • the method for successful authentication includes: when the similarity between the second captured photo and the original photo of the sample library reaches a preset similarity threshold, the face authentication result is obtained as authentication successful, wherein, the first The second snapshot is the one captured after the first snapshot is automatically added to the sample library, and then is used for face authentication again; or, the second snapshot and the first snapshot in the sample library The similarity reaches the preset similarity threshold. That is, if the similarity between the second captured photo and any photo stored in the sample library reaches a preset similarity threshold, it is considered that the authentication is successful.
  • the sampling time of the original photos of the sample library may be earlier, and the difference between the shooting environment and the shooting environment of the live photos during face authentication may also be greater.
  • the original photos of the sample library are relative to the first snapshot Photo recognition accuracy may be low. Therefore, in the actual face authentication process, preferably, the similarity between the second captured photo and the first captured photo in the sample library may be compared. If the similarity reaches a preset similarity threshold, it indicates that the authentication is successful.
  • An embodiment of the present application provides a method for adding photos based on face recognition to obtain the similarity between a first captured photo and a sample library photo; determine whether the similarity is within a preset similarity threshold, and if the judgment result is yes, then Automatically add the first captured photo to the sample library; perform face authentication, and obtain the face authentication result.
  • the embodiment of the present application for the newly captured photos, whether the similarity with the pre-set sample library photos reaches the preset similarity threshold, or the similarity with the captured photos automatically added to the sample library reaches the preset similarity threshold , All believe that face authentication is successful, which can enhance the recognition ability of the entire face recognition system.
  • An embodiment of the present application further provides a terminal device 1, including a memory 10, a processor 30, and computer-readable instructions stored on the memory 10 and executable on the processor 30, which is implemented when the processor 30 executes the program
  • a terminal device 1 including a memory 10, a processor 30, and computer-readable instructions stored on the memory 10 and executable on the processor 30, which is implemented when the processor 30 executes the program
  • the terminal device 1 includes a memory 10 in which a photo adding device 100 based on face recognition is stored.
  • the terminal device 1 may be a terminal with an application display function such as a mobile phone, a tablet computer, a personal digital assistant, or the like.
  • the photo adding device 100 based on face recognition can obtain the similarity between the first captured photo and the sample library photo; determine whether the similarity is within a preset similarity threshold, and if the judgment result is yes, then add the first A snapshot is automatically added to the sample library; face authentication is performed, and the face authentication result is obtained.
  • the terminal device 1 may be a mobile phone.
  • the terminal device 1 may further include a display screen 20 and a processor 30.
  • the memory 10 and the display screen 20 may be electrically connected to the processor 30 respectively.
  • the memory 10 may be different types of storage devices for storing various types of data.
  • it may be the memory and internal memory of the terminal device 1, or a memory card that can be externally connected to the terminal device 1, such as flash memory, SM card (Smart Media Card, smart media card), SD card (Secure Digital Card, secure digital Card) etc.
  • the memory 10 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD) Card, flash memory card (Flash), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • the memory 10 is used to store various types of data, for example, various types of applications (Applications) installed in the terminal device 1, data set and acquired by applying the above-described photo addition method based on face recognition, and other information.
  • the display screen 20 is installed in the terminal device 1 and used for displaying information.
  • the processor 30 is used to execute the method for adding photos based on face recognition and various types of software installed in the terminal device 1, such as an operating system and application display software.
  • the processor 30 includes but is not limited to a processor (Central Processing Unit, CPU), a micro controller unit (Micro Controller Unit, MCU), and other devices for interpreting computer instructions and processing data in computer software.
  • CPU Central Processing Unit
  • MCU Micro Controller Unit
  • the photo adding device 100 based on face recognition may include one or more modules, which are stored in the memory 10 of the terminal device 1 and configured to be configured by one or more processors ( This embodiment is executed by one processor 30) to complete the embodiment of the present application.
  • the photo adding device 100 based on face recognition may include a similarity acquiring module 101, a determining module 102, a photo adding module 103, and a face authentication module 104.
  • the module referred to in the embodiment of the present application may be a program segment that performs a specific function, and is more suitable than a program for describing the execution process of software in a processor.
  • the terminal device 1 may include some or all of the functional modules shown in FIG. 3, and the functions of each module will be specifically described below . It should be noted that the same noun-related nouns and specific explanations in the above embodiments of the method for adding photos based on face recognition can also be applied to the following function introduction to each module. To save space and avoid duplication, I will not repeat them here.
  • the similarity obtaining module 101 can be used to obtain the similarity between the first captured photo and the sample library photo.
  • the judgment module 102 may be used to judge whether the similarity is within a preset similarity threshold.
  • the photo adding module 103 may be used to automatically add the first captured photo to the sample library when the judgment module determines that the similarity is within the preset similarity threshold.
  • the face authentication module 104 can be used to perform face authentication and obtain the face authentication result.
  • Embodiments of the present application also provide a non-volatile readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the face recognition-based Steps to add photos.
  • the photo-adding device 100 / terminal device 1 / computer device integrated module / unit based on face recognition is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile Read the storage medium.
  • the present application can implement all or part of the processes in the methods of the above embodiments, or it can be completed by instructing relevant hardware through computer-readable instructions, which can be stored in a non-volatile
  • the computer-readable instructions when executed by the processor, can implement the steps of the foregoing method embodiments.
  • the computer readable instructions include computer readable instruction codes, and the computer readable instruction codes may be in source code form, object code form, executable file, or some intermediate form, etc.
  • the non-volatile readable storage medium may include: any entity or device capable of carrying the computer-readable instruction code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM , Read-Only Memory), Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media.
  • a recording medium a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM , Read-Only Memory), Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media.
  • the so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
  • the processor 30 is the control center of the photo recognition device 100 / terminal device 1 based on face recognition, using various The interface and the line connect the various parts of the entire photo adding device 100 / terminal device 1 based on face recognition.
  • the memory 10 is used to store the computer-readable instructions and / or modules, and the processor 30 executes or executes the computer-readable instructions and / or modules stored in the memory 10, and the calls are stored in the memory 10
  • the data inside realizes various functions of the photo adding device 100 / terminal device 1 based on face recognition.
  • the memory 10 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required by at least one function (such as a sound playback function, an image playback function, etc.), etc .; Store data (such as audio data, phone book, etc.) created according to the use of mobile phones.
  • the memory 10 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD) Card, flash memory card (Flash), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • a non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD) Card, flash memory card (Flash), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • the disclosed terminal and method may be implemented in other ways.
  • the system implementation described above is only schematic.
  • the division of the module is only a division of logical functions, and there may be other divisions in actual implementation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

A face recognition-based method, device and terminal device for adding an image and a storage medium. The method comprises: acquiring the degree of similarity between a first snapshot image and a sample library image (101); determining whether the degree of similarity is within a preset degree of similarity threshold (102); if the determination result is yes, automatically adding the first snapshot image to the sample library (103); and carrying out face authentication and acquiring a face authentication result (104). By means of the described method, the recognition functions of an entire face recognition system may be improved.

Description

基于人脸识别的照片添加方法、装置、终端及存储介质Photo adding method, device, terminal and storage medium based on face recognition
本申请要求于2018年11月6日提交中国专利局,申请号为201811315455.7发明名称为“基于人脸识别的照片添加方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the China Patent Office on November 6, 2018 with the application number 201811315455.7 and the invention titled "Photo-adding method, device, terminal and storage medium based on face recognition" Incorporated by reference in this application.
技术领域Technical field
本申请涉及生物识别技术领域,尤其涉及一种基于人脸识别的照片添加方法、基于人脸识别的照片添加装置、终端装置以及存储介质。The present application relates to the field of biometrics technology, and in particular, to a method for adding photos based on face recognition, a device for adding photos based on face recognition, a terminal device, and a storage medium.
背景技术Background technique
本部分旨在为权利要求书及具体实施方式中陈述的本申请实施例的实施方式提供背景或上下文。此处的描述不因为包括在本部分中就承认是现有技术。This section is intended to provide background or context for the implementation of the embodiments of the present application set forth in the claims and specific implementations. The description here is not admitted to be prior art because it is included in this section.
传统的人脸识别技术是基于人的脸部特征,对输入的人脸图像或者视频流:首先判断其是否存在人脸,如果存在人脸,则进一步的给出每个脸的位置、大小和各个主要面部器官的位置信息。并依据这些信息,进一步提取每个人脸中所蕴涵的身份特征,并将其与已知的人脸进行对比,从而识别每个人脸的身份。The traditional face recognition technology is based on the facial features of the person. For the input face image or video stream: first determine whether there is a face, if there is a face, then further give the position, size and The location information of each major facial organ. Based on this information, the identity features contained in each face are further extracted and compared with known faces to identify the identity of each face.
传统的人脸识别技术,是将识别出来的人脸与系统保存的已知人脸进行比较,但是由于系统保存的人脸的局限性,比如识别出来的人脸的刘海、胖瘦、妆容等与保存的人脸不一样,那么就有可能会发生识别不出人脸的风险,需要本人重新找相关人员进行拍摄最近照片。The traditional face recognition technology compares the recognized face with the known face saved by the system, but due to the limitations of the face saved by the system, such as the bangs, fat and thin, and makeup of the recognized face The saved faces are different, so there is a risk that the faces will not be recognized, and I need to find relevant personnel again to take the latest photos.
发明内容Summary of the invention
鉴于此,有必要提供一种基于人脸识别的照片添加方法、基于人脸识别的照片添加装置、终端装置以及存储介质,能够提升整个人脸识别系统的识别能力。In view of this, it is necessary to provide a photo addition method based on face recognition, a photo addition device based on face recognition, a terminal device, and a storage medium, which can enhance the recognition capability of the entire face recognition system.
本申请实施例一方面提供一种基于人脸识别的照片添加方法,所述方法包括:An aspect of an embodiment of the present application provides a method for adding photos based on face recognition. The method includes:
获取第一抓拍照片与样本库照片的相似度;Get the similarity between the first snapshot and the photos in the sample library;
判断所述相似度是否在预设相似度阈值内;Determine whether the similarity is within a preset similarity threshold;
若所述相似度在所述预设相似度阈值内,则将所述第一抓拍照片自动加入所述样本库;If the similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library;
进行人脸认证,并获取所述人脸认证结果。Perform face authentication, and obtain the face authentication result.
本申请实施例另一方面还提供一种基于人脸识别的照片添加装置,所述装置包括:Another aspect of the embodiments of the present application further provides a photo adding device based on face recognition, the device includes:
相似度获取模块,用于获取第一抓拍照片与样本库照片的相似度;The similarity obtaining module is used to obtain the similarity between the first captured photo and the photos in the sample library;
判断模块,用于判断所述相似度是否在预设相似度阈值内;The judgment module is used to judge whether the similarity is within a preset similarity threshold;
照片添加模块,用于当所述判断模块确定所述相似度在所述预设相似度阈值内时,将所述第一抓拍照片自动加入所述样本库;A photo adding module, configured to automatically add the first captured photo to the sample library when the judgment module determines that the similarity is within the preset similarity threshold;
人脸认证模块,用于进行人脸认证,并获取所述人脸认证结果。The face authentication module is used to perform face authentication and obtain the face authentication result.
本申请实施例再一方面还提供一种终端装置,所述终端装置包括处理器,所述处理器用于执行存储器中存储的计算机可读指令时实现上述任意一项所述的基于人脸识别的照片添加方法的步骤。In yet another aspect, embodiments of the present application further provide a terminal device, the terminal device includes a processor, and the processor is configured to implement any one of the above-described face recognition-based Steps to add photos.
本申请实施例再一方面还提供一种非易失性可读存储介质,所述非易失性可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述任意一项所述的基于人脸识别的照片添加方法的步骤。According to still another aspect of the embodiments of the present application, a non-volatile readable storage medium is provided. The non-volatile readable storage medium stores computer-readable instructions, which are implemented when executed by a processor. The steps of the photo adding method based on face recognition described in any one of the above.
本申请实施例提供一种基于人脸识别的照片添加方法、基于人脸识别的照片添加装置、终端装置以及存储介质,获取第一抓拍照片与样本库照片的相似度;判断所述相似度是否在预设相似度阈值内;若 所述相似度在所述预设相似度阈值内,则将所述第一抓拍照片自动加入所述样本库;进行人脸认证,并获取所述人脸认证结果。利用本申请实施例,对于新抓拍的照片,不管是与预先设置好的样本库照片相似度达到预设相似度阈值,还是与自动加入到样本库的抓拍照的相似度达到预设相似度阈值,都认为人脸认证成功,因而可以提升整个人脸识别系统的识别能力。Embodiments of the present application provide a method for adding photos based on face recognition, a device for adding photos based on face recognition, a terminal device, and a storage medium to obtain the similarity between a first captured photo and a sample library photo; and determine whether the similarity is Within a preset similarity threshold; if the similarity is within the preset similarity threshold, automatically add the first captured photo to the sample library; perform face authentication, and obtain the face authentication result. Using the embodiment of the present application, for the newly captured photos, whether the similarity with the pre-set sample library photos reaches the preset similarity threshold, or the similarity with the captured photos automatically added to the sample library reaches the preset similarity threshold , All believe that face authentication is successful, which can enhance the recognition ability of the entire face recognition system.
附图说明BRIEF DESCRIPTION
图1为本申请实施例提供的基于人脸识别的照片添加方法的流程图。FIG. 1 is a flowchart of a method for adding photos based on face recognition provided by an embodiment of the present application.
图2为本申请一实施方式的终端装置的结构示意图。2 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
图3为图2所示的终端装置的示例性的功能模块图。FIG. 3 is an exemplary functional block diagram of the terminal device shown in FIG. 2.
具体实施方式detailed description
为了能够更清楚地理解本申请实施例的上述目的、特征和优点,下面结合附图和具体实施方式对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施方式中的特征可以相互组合。In order to understand the above-mentioned objects, features and advantages of the embodiments of the present application more clearly, the present application will be described in detail below with reference to the drawings and specific implementations. It should be noted that, in the case of no conflict, the features in the embodiments of the present application may be combined with each other.
在下面的描述中阐述了很多具体细节以便于充分理解本申请实施例,所描述的实施方式仅仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本申请实施例保护的范围。In the following description, many specific details are set forth in order to fully understand the embodiments of the present application. The described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the embodiments of the present application.
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请实施例的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施方式的目的,不是旨在于限制本申请实施例。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field that belong to the embodiments of the present application. The terminology used in the specification of the present application herein is only for the purpose of describing specific embodiments, and is not intended to limit the embodiments of the present application.
图1为本申请实施例提供的基于人脸识别的照片添加方法的流程图。所述基于人脸识别的照片添加方法可以应用于装置有摄像头和 /或扫描仪的智能终端。所述终端可以是智能手表、智能手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)等智能设备。所述终端可以通过无线网络(例如,蓝牙、WIFI、红外等)与服务器进行数据交互。如图1所示,所述基于人脸识别的照片添加方法可以包括如下步骤:FIG. 1 is a flowchart of a method for adding photos based on face recognition provided by an embodiment of the present application. The method for adding photos based on face recognition can be applied to an intelligent terminal equipped with a camera and / or a scanner. The terminal may be a smart watch, a smart phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA) and other smart devices. The terminal may perform data interaction with the server through a wireless network (for example, Bluetooth, WIFI, infrared, etc.). As shown in FIG. 1, the method for adding photos based on face recognition may include the following steps:
S101:获取第一抓拍照片与样本库照片的相似度。S101: Obtain the similarity between the first captured photo and the photos in the sample library.
本实施方式中,进行人脸识别的摄像头可以采用高清摄像头,例如,采用像素不低于1000万的摄像头。所述相似度可以根据所述第一抓拍照片的特征和所述样本库照片的特征来计算。具体的,所述获取第一抓拍照片与样本库照片的相似度的方法包括:对采集到的视频图像进行人脸检测,获取第一抓拍照片;采集所述第一抓拍照片中的用户人脸信息,得到用户人脸图像;获取用户人脸图像的预设区域,并计算所述预设区域的图像特征;比较所述第一抓拍照片的预设区域的图像特征与所述样本库照片的预设区域的图像特征的相似度。两个预设区域图像特征的相似度可以通过计算所述图像特征之间的距离作为相似度衡量,例如,可以计算两个人脸图像预设区域特征之间的cos距离或者欧氏距离来衡量一对人脸图像特征对应的相似度。所述第一抓拍照片的预设区域的图像特征与所述样本库照片的预设区域图像特征的相似度即为所述第一抓拍照片与样本库照片的相似度。所述预设区域可以包括人眼、鼻子、嘴巴以及人脸边缘等区域中的一个或多个。In this embodiment, the camera that performs face recognition may use a high-definition camera, for example, a camera with no less than 10 million pixels. The similarity may be calculated based on the characteristics of the first captured photo and the characteristics of the sample library photo. Specifically, the method for obtaining the similarity between the first captured photo and the sample library photo includes: performing face detection on the collected video image to obtain the first captured photo; and collecting the user's face in the first captured photo Information to obtain the user ’s face image; obtain the preset area of the user ’s face image and calculate the image characteristics of the preset area; compare the image characteristics of the preset area of the first captured photo with those of the sample library photos The similarity of the image features of the preset area. The similarity of the image features of the two preset regions can be measured as the similarity by calculating the distance between the image features. For example, the cos distance or the Euclidean distance between the preset region features of two face images can be calculated to measure a Similarity corresponding to facial image features. The similarity between the image feature of the preset area of the first captured photo and the image feature of the preset area of the sample library photo is the similarity of the first captured photo and the sample library photo. The preset area may include one or more of areas such as human eyes, nose, mouth, and edges of human faces.
所述进行人脸检测的方法可以包括基于人脸特征点的检测算法、基于整幅人脸图像的检测算法、基于模板的检测算法以及利用神经网络进行检测的算法中的一种或多种,人脸检测到的信息可以包括五官特征信息、面部曲线信息等。以基于神经网络进行识别的算法为例,所述对采集到的视频图像进行人脸检测的方法包括:预先采集大量人脸样本,经过训练得到人脸检测深度卷积神经网络;然后将所述视频图像数据输入所述人脸检测深度卷积神经网络,得到人脸特征图谱,并将所述人脸特征图谱上整体分值超过设定阈值的区域作为人脸所 在区域。所述设定阈值可以为本领域技术人员根据经验所得的值。The method for performing face detection may include one or more of a detection algorithm based on face feature points, a detection algorithm based on an entire face image, a detection algorithm based on a template, and an algorithm using neural network for detection, The information detected by the face may include facial feature information, facial curve information, and the like. Taking the recognition algorithm based on neural network as an example, the method of performing face detection on the collected video images includes: collecting a large number of face samples in advance, and training to obtain a deep convolutional neural network for face detection; then the Video image data is input to the face detection deep convolutional neural network to obtain a face feature map, and an area on the face feature map whose overall score exceeds a set threshold is regarded as a face area. The set threshold may be a value obtained by a person skilled in the art based on experience.
可以理解的是,在所述获取用户人脸图像的预设区域之前,可以对所述第一抓拍照片和所述样本库照片进行分类和标注,还可以对所述第一抓拍照片和所述样本库照片执行人脸对齐操作。所述人脸对齐操作可以包括对样本库照片执行旋转、放大、缩小或剪切等操作。所述人脸对齐操作可保证提取到稳定的特征并取得较好的人脸识别效果,以去除人脸角度对人脸识别带来的影响。It can be understood that, before the preset area of the user's face image is acquired, the first snapshot photos and the sample library photos may be classified and labeled, and the first snapshot photos and the Perform face alignment operations on the photos in the sample library. The face alignment operation may include performing operations such as rotating, zooming in, zooming out, or cutting on the photos in the sample library. The face alignment operation can ensure that stable features are extracted and a better face recognition effect is obtained, so as to remove the influence of face angle on face recognition.
S102:判断所述相似度是否在预设相似度阈值内,若判断结果为是,则进入步骤S103。S102: Determine whether the similarity is within a preset similarity threshold. If the judgment result is yes, proceed to step S103.
本实施方式中,判断所述相似度是否在预设相似度阈值内的方法可以包括:分别计算所述第一抓拍照片的每一预设区域的图像特征与所述样本库照片的每一预设区域的图像特征的平均相似度(也即计算所述第一抓拍照片的每一预设区域的图像特征与所述样本库照片的每一预设区域的图像特征的相似度的平均值,具体的,可以先计算所述第一抓拍照片的每一预设区域的图像特征与所述样本库照片的每一预设区域的图像特征的相似度,再计算每一预设区域的图像特征的相似度的平均值。本实施例中并不对计算所述平均相似度的方法进行限定),其中,所述预设区域的数量大于1个;判断所述平均相似度是否在预设相似度阈值内;若确定所述平均相似度在所述预设相似度阈值内时,则将所述第一抓拍照片自动加入所述样本库。或者,计算所述第一抓拍照片的每一预设区域的图像特征与所述样本库照片的每一预设区域的图像特征的相似度;判断所述相似度是否都在预设相似度阈值内;若判断结果为是,则将所述第一抓拍照片自动加入所述样本库。In this embodiment, the method for determining whether the similarity is within a preset similarity threshold may include: separately calculating the image characteristics of each preset area of the first captured photo and each pre-calculation of the sample library photos Let the average similarity of the image features of the area (ie, calculate the average of the similarity of the image features of each preset area of the first captured photo and the image features of each preset area of the sample library photo, Specifically, the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo may be calculated first, and then the image feature of each preset area The average value of the similarity of. The method for calculating the average similarity is not limited in this embodiment), where the number of the preset areas is greater than one; it is determined whether the average similarity is within the preset similarity Within the threshold; if it is determined that the average similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library. Or, calculate the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo; determine whether the similarity is all within the preset similarity threshold If the judgment result is yes, the first snapshot is automatically added to the sample library.
所述预设相似度阈值可以根据具体的应用场景来灵活设定,例如可以通过多个照片对应的人脸图像特征进度模拟仿真,最后确定一个阈值作为相似度阈值。若按照第一种方法,也即判断所述第一抓拍照片的预设区域图像特征与所述样本库照片的预设区域图像特征的平均相似度是否在预设相似度阈值内,常用的,所述预设相似度阈值可 以为90%以上的一个百分值,例如90%或92%等。若按照第二种方法,也即判断所述第一抓拍照片的每一预设区域图像特征与所述样本库照片的每一预设区域图像特征的相似度是否都在预设相似度阈值内,则所述预设相似度阈值的数量与所述预设区域的数量一致(数量至少为2个),所述第一抓拍照片的每一预设区域图像特征和所述样本库照片的每一预设区域图像特征相似度的阈值可以相同。当然,也可以根据特征分布情况设定为不同,例如,对于预设区域为人脸外边缘来说,其预设相似度阈值可以较小些,而对于人眼位置、人鼻位置等区域,则预设相似度阈值可以设置相对大一些。The preset similarity threshold may be flexibly set according to a specific application scenario. For example, a face image feature progress simulation corresponding to multiple photos may be simulated, and finally a threshold is determined as the similarity threshold. According to the first method, that is, to determine whether the average similarity between the image feature of the preset area of the first captured photo and the image feature of the preset area of the sample library photo is within a preset similarity threshold, it is commonly used, The preset similarity threshold may be a percentage value above 90%, for example, 90% or 92%. According to the second method, that is, whether the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo is within the preset similarity threshold , Then the number of the preset similarity thresholds is consistent with the number of the preset areas (the number is at least 2), the image features of each preset area of the first captured photo and each of the photos of the sample library The threshold of the similarity of image features of a preset area may be the same. Of course, it can also be set to be different according to the feature distribution. For example, for the preset area being the outer edge of the face, the preset similarity threshold may be smaller, while for the area such as human eye position and human nose position, The preset similarity threshold may be set relatively large.
S103:将所述第一抓拍照片自动加入所述样本库。S103: Automatically add the first captured photo to the sample library.
本实施方式中,在将所述第一抓拍照片自动加入所述样本库之前,所述方法还包括:输出提示,所述提示内容包括是否将第一抓拍照片加入到所述样本库。所述提示的方法可以包括语音提示、短信提示等方式。可以理解的是,若在预设时长(例如,预设时长为10秒)内未接收到用户的提示,则系统自动将所述第一抓拍照片添加到样本库中。通过输出提示的方式可以让工作人员根据实际情况考虑是否需要更新样本库照片,使得基于人脸识别的照片添加系统更加人性化。In this embodiment, before the first captured photo is automatically added to the sample library, the method further includes: outputting a prompt, the content of the prompt includes whether to add the first captured photo to the sample library. The method of prompting may include voice prompting, short message prompting, and the like. It can be understood that if the user's prompt is not received within the preset duration (for example, the preset duration is 10 seconds), the system automatically adds the first captured photo to the sample library. By outputting prompts, the staff can consider whether to update the sample library photos according to the actual situation, making the photo addition system based on face recognition more user-friendly.
在将所述第一抓拍照片自动加入所述样本库之后,所述方法还包括:以预设时间间隔更新已保存在所述样本库中的第一抓拍照片;其中,用于更新的抓拍照片与所述样本库照片的相似度不小于所述第一抓拍照片与所述样本库照片的相似度。可以理解的是,设置一个预设时间间隔,在将所述第一抓拍照片自动加入所述样本库之后的预设时间间隔内,所述样本库无需进行更新。所述样本库中可以包括样本库原始照片与预设数量的抓拍照片。所述预设时间间隔、所述预设数量可以是系统预先设置的,也可以是终端用户预先设置的。例如,所述预设时间间隔为30天,所述预设数量为2张。优选的,加入所述样本库中的所述预设数量的抓拍照片的拍摄环境差距较大,所述拍摄环境可以包括光线亮度、拍摄的人脸角度等。若所述抓拍照片自动加入到所述样本库的时间超过预设时间间隔,则在此后的人脸识别过程中, 系统自动更新样本库中的所述抓拍照片。用于更新的抓拍照片与所述样本库原始照片的相似度不小于已经保存在所述样本库中的抓拍照片(也即第一抓拍照片)与原始照片的相似度,且优选的,所述更新的第二抓拍照片与已经保存在所述样本库中的剩余抓拍照片的拍摄环境差距较大。After automatically adding the first captured photo to the sample library, the method further includes: updating the first captured photo saved in the sample library at a preset time interval; wherein, the updated captured photo The similarity with the sample library photos is not less than the similarity between the first snapshot photos and the sample library photos. It can be understood that a preset time interval is set, and within the preset time interval after the first captured photo is automatically added to the sample library, the sample library does not need to be updated. The sample library may include original photos of the sample library and a preset number of captured photos. The preset time interval and the preset number may be preset by the system, or may be preset by an end user. For example, the preset time interval is 30 days, and the preset number is 2 sheets. Preferably, there is a large gap in the shooting environment of the preset number of captured photos added to the sample library, and the shooting environment may include light brightness, angle of the captured face, and the like. If the time when the captured photos are automatically added to the sample library exceeds a preset time interval, the system automatically updates the captured photos in the sample library during the face recognition process thereafter. The similarity between the snapshot photo used for updating and the original photo in the sample library is not less than the similarity between the snapshot photo (that is, the first snapshot photo) already saved in the sample library and the original photo, and preferably, the There is a large gap between the updated second snapshot photos and the remaining snapshot photos already stored in the sample library.
S104:进行人脸认证,并获取所述人脸认证结果。S104: Perform face authentication, and obtain the face authentication result.
本实施方式中,所述人脸认证可以是1:N人脸认证,也可以是1:1人脸认证。所述人脸认证结果包括:认证成功、认证失败。其中,所述认证成功的方法包括:当第二抓拍照片与所述样本库原始照片的相似度达到预设相似度阈值时,获取到所述人脸认证结果为认证成功,其中,所述第二抓拍照片为在所述第一抓拍照片自动加入所述样本库之后,再次进行人脸认证时所抓拍的照片;或者,所述第二抓拍照片与所述样本库中的第一抓拍照片的相似度达到预设相似度阈值。也即,所述第二抓拍照片与保存在样本库中的任一照片的相似度达到预设相似度阈值,都为认证成功。可以理解的是,所述样本库原始照片的采样时间可能较早,其拍摄环境和人脸认证时现场照的拍摄环境差别可能也较大,所述样本库原始照片相对于所述第一抓拍照片的识别精度可能较低。因而在实际人脸认证过程中,优先的,可以比较所述第二抓拍照片与所述样本库中的第一抓拍照片的相似度,若相似度达到预设相似度阈值,则表明认证成功。In this embodiment, the face authentication may be 1: N face authentication or 1: 1 face authentication. The face authentication result includes: authentication success and authentication failure. Wherein, the method for successful authentication includes: when the similarity between the second captured photo and the original photo of the sample library reaches a preset similarity threshold, the face authentication result is obtained as authentication successful, wherein, the first The second snapshot is the one captured after the first snapshot is automatically added to the sample library, and then is used for face authentication again; or, the second snapshot and the first snapshot in the sample library The similarity reaches the preset similarity threshold. That is, if the similarity between the second captured photo and any photo stored in the sample library reaches a preset similarity threshold, it is considered that the authentication is successful. It can be understood that the sampling time of the original photos of the sample library may be earlier, and the difference between the shooting environment and the shooting environment of the live photos during face authentication may also be greater. The original photos of the sample library are relative to the first snapshot Photo recognition accuracy may be low. Therefore, in the actual face authentication process, preferably, the similarity between the second captured photo and the first captured photo in the sample library may be compared. If the similarity reaches a preset similarity threshold, it indicates that the authentication is successful.
本申请实施例提供一种基于人脸识别的照片添加方法,获取第一抓拍照片与样本库照片的相似度;判断所述相似度是否在预设相似度阈值内,若判断结果为是,则将所述第一抓拍照片自动加入所述样本库;进行人脸认证,并获取所述人脸认证结果。利用本申请实施例,对于新抓拍的照片,不管是与预先设置好的样本库照片相似度达到预设相似度阈值,还是与自动加入到样本库的抓拍照的相似度达到预设相似度阈值,都认为人脸认证成功,因而可以提升整个人脸识别系统的识别能力。An embodiment of the present application provides a method for adding photos based on face recognition to obtain the similarity between a first captured photo and a sample library photo; determine whether the similarity is within a preset similarity threshold, and if the judgment result is yes, then Automatically add the first captured photo to the sample library; perform face authentication, and obtain the face authentication result. Using the embodiment of the present application, for the newly captured photos, whether the similarity with the pre-set sample library photos reaches the preset similarity threshold, or the similarity with the captured photos automatically added to the sample library reaches the preset similarity threshold , All believe that face authentication is successful, which can enhance the recognition ability of the entire face recognition system.
以上是对本申请实施例所提供的方法进行的详细描述。根据不同 的需求,所示流程图中方块的执行顺序可以改变,某些方块可以省略。下面对本申请实施例所提供的终端进行描述。The above is a detailed description of the method provided by the embodiments of the present application. According to different requirements, the execution order of the blocks in the flowchart can be changed, and some blocks can be omitted. The terminal provided by the embodiment of the present application will be described below.
本申请实施例还提供一种终端装置1,包括存储器10、处理器30及存储在存储器10上并可在处理器30上运行的计算机可读指令,所述处理器30执行所述程序时实现上述任一实施方式中所述的基于人脸识别的照片添加方法的步骤。An embodiment of the present application further provides a terminal device 1, including a memory 10, a processor 30, and computer-readable instructions stored on the memory 10 and executable on the processor 30, which is implemented when the processor 30 executes the program The steps of the photo adding method based on face recognition described in any of the above embodiments.
图2是本申请一实施方式的终端装置的结构示意图,如图2所示,终端装置1包括存储器10,存储器10中存储有基于人脸识别的照片添加装置100。所述的终端装置1可以是手机、平板电脑、个人数字助理等具有应用显示功能的终端。所述基于人脸识别的照片添加装置100可以获取第一抓拍照片与样本库照片的相似度;判断所述相似度是否在预设相似度阈值内,若判断结果为是,则将所述第一抓拍照片自动加入所述样本库;进行人脸认证,并获取所述人脸认证结果。利用本申请实施例,对于新抓拍的照片,不管是与预先设置好的样本库照片相似度达到预设相似度阈值,还是与自动加入到样本库的抓拍照的相似度达到预设相似度阈值,都认为人脸认证成功,因而可以提升整个人脸识别系统的识别能力。2 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in FIG. 2, the terminal device 1 includes a memory 10 in which a photo adding device 100 based on face recognition is stored. The terminal device 1 may be a terminal with an application display function such as a mobile phone, a tablet computer, a personal digital assistant, or the like. The photo adding device 100 based on face recognition can obtain the similarity between the first captured photo and the sample library photo; determine whether the similarity is within a preset similarity threshold, and if the judgment result is yes, then add the first A snapshot is automatically added to the sample library; face authentication is performed, and the face authentication result is obtained. Using the embodiment of the present application, for the newly captured photos, whether the similarity with the preset sample library photos reaches the preset similarity threshold, or the similarity with the captured photos automatically added to the sample library reaches the preset similarity threshold , All believe that face authentication is successful, which can enhance the recognition ability of the entire face recognition system.
本实施方式中,终端装置1可以为一手机。终端装置1还可以包括显示屏20及处理器30。存储器10、显示屏20可以分别与处理器30电连接。In this embodiment, the terminal device 1 may be a mobile phone. The terminal device 1 may further include a display screen 20 and a processor 30. The memory 10 and the display screen 20 may be electrically connected to the processor 30 respectively.
所述的存储器10可以是不同类型存储设备,用于存储各类数据。例如,可以是终端装置1的存储器、内存,还可以是可外接于该终端装置1的存储卡,如闪存、SM卡(Smart Media Card,智能媒体卡)、SD卡(Secure Digital Card,安全数字卡)等。此外,存储器10可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。存储器10用于存储各类数据,例如,所述终端装置1中安装的各类应用程序 (Applications)、应用上述基于人脸识别的照片添加方法而设置、获取的数据等信息。The memory 10 may be different types of storage devices for storing various types of data. For example, it may be the memory and internal memory of the terminal device 1, or a memory card that can be externally connected to the terminal device 1, such as flash memory, SM card (Smart Media Card, smart media card), SD card (Secure Digital Card, secure digital Card) etc. In addition, the memory 10 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD) Card, flash memory card (Flash), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. The memory 10 is used to store various types of data, for example, various types of applications (Applications) installed in the terminal device 1, data set and acquired by applying the above-described photo addition method based on face recognition, and other information.
显示屏20安装于终端装置1,用于显示信息。The display screen 20 is installed in the terminal device 1 and used for displaying information.
处理器30用于执行所述基于人脸识别的照片添加方法以及所述终端装置1内安装的各类软件,例如操作系统及应用显示软件等。处理器30包含但不限于处理器(Central Processing Unit,CPU)、微控制单元(Micro Controller Unit,MCU)等用于解释计算机指令以及处理计算机软件中的数据的装置。The processor 30 is used to execute the method for adding photos based on face recognition and various types of software installed in the terminal device 1, such as an operating system and application display software. The processor 30 includes but is not limited to a processor (Central Processing Unit, CPU), a micro controller unit (Micro Controller Unit, MCU), and other devices for interpreting computer instructions and processing data in computer software.
所述的基于人脸识别的照片添加装置100可以包括一个或多个的模块,所述一个或多个模块被存储在终端装置1的存储器10中并被配置成由一个或多个处理器(本实施方式为一个处理器30)执行,以完成本申请实施例。例如,参阅图3所示,所述基于人脸识别的照片添加装置100可以包括相似度获取模块101、判断模块102、照片添加模块103、人脸认证模块104。本申请实施例所称的模块可以是完成一特定功能的程序段,比程序更适合于描述软件在处理器中的执行过程。The photo adding device 100 based on face recognition may include one or more modules, which are stored in the memory 10 of the terminal device 1 and configured to be configured by one or more processors ( This embodiment is executed by one processor 30) to complete the embodiment of the present application. For example, referring to FIG. 3, the photo adding device 100 based on face recognition may include a similarity acquiring module 101, a determining module 102, a photo adding module 103, and a face authentication module 104. The module referred to in the embodiment of the present application may be a program segment that performs a specific function, and is more suitable than a program for describing the execution process of software in a processor.
可以理解的是,对应上述基于人脸识别的照片添加方法中的各实施方式,终端装置1可以包括图3中所示的各功能模块中的一部分或全部,各模块的功能将在以下具体介绍。需要说明的是,以上基于人脸识别的照片添加方法的各实施方式中相同的名词相关名词及其具体的解释说明也可以适用于以下对各模块的功能介绍。为节省篇幅及避免重复起见,在此就不再赘述。It can be understood that, corresponding to the above embodiments in the photo adding method based on face recognition, the terminal device 1 may include some or all of the functional modules shown in FIG. 3, and the functions of each module will be specifically described below . It should be noted that the same noun-related nouns and specific explanations in the above embodiments of the method for adding photos based on face recognition can also be applied to the following function introduction to each module. To save space and avoid duplication, I will not repeat them here.
相似度获取模块101可以用于获取第一抓拍照片与样本库照片的相似度。The similarity obtaining module 101 can be used to obtain the similarity between the first captured photo and the sample library photo.
判断模块102可以用于判断所述相似度是否在预设相似度阈值内。The judgment module 102 may be used to judge whether the similarity is within a preset similarity threshold.
照片添加模块103可以用于当所述判断模块确定所述相似度在所述预设相似度阈值内时,将所述第一抓拍照片自动加入所述样本库。The photo adding module 103 may be used to automatically add the first captured photo to the sample library when the judgment module determines that the similarity is within the preset similarity threshold.
人脸认证模块104可以用于进行人脸认证,并获取所述人脸认证 结果。The face authentication module 104 can be used to perform face authentication and obtain the face authentication result.
本申请实施例还提供一种非易失性可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述任一实施方式中的基于人脸识别的照片添加方法的步骤。Embodiments of the present application also provide a non-volatile readable storage medium on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the face recognition-based Steps to add photos.
所述基于人脸识别的照片添加装置100/终端装置1/计算机设备集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性可读取存储介质中。基于这样的理解,本申请实现上述实施方式方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述非易失性可读存储介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。If the photo-adding device 100 / terminal device 1 / computer device integrated module / unit based on face recognition is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile Read the storage medium. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, or it can be completed by instructing relevant hardware through computer-readable instructions, which can be stored in a non-volatile When reading the storage medium, the computer-readable instructions, when executed by the processor, can implement the steps of the foregoing method embodiments. Wherein, the computer readable instructions include computer readable instruction codes, and the computer readable instruction codes may be in source code form, object code form, executable file, or some intermediate form, etc. The non-volatile readable storage medium may include: any entity or device capable of carrying the computer-readable instruction code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM , Read-Only Memory), Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media.
所称处理器30可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器30是所述基于人脸识别的照片添加装置100/终端装置1的控制中心,利用各种接口和线路连接整个基于人脸识别的照片添加装置100/终端装置1的各个部分。The so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor 30 is the control center of the photo recognition device 100 / terminal device 1 based on face recognition, using various The interface and the line connect the various parts of the entire photo adding device 100 / terminal device 1 based on face recognition.
所述存储器10用于存储所述计算机可读指令和/或模块,所述处理器30通过运行或执行存储在所述存储器10内的计算机可读指令 和/或模块,以及调用存储在存储器10内的数据,实现所述基于人脸识别的照片添加装置100/终端装置1的各种功能。所述存储器10可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器10可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 10 is used to store the computer-readable instructions and / or modules, and the processor 30 executes or executes the computer-readable instructions and / or modules stored in the memory 10, and the calls are stored in the memory 10 The data inside realizes various functions of the photo adding device 100 / terminal device 1 based on face recognition. The memory 10 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required by at least one function (such as a sound playback function, an image playback function, etc.), etc .; Store data (such as audio data, phone book, etc.) created according to the use of mobile phones. In addition, the memory 10 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart, Media, Card, SMC), and a secure digital (SD) Card, flash memory card (Flash), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
在本申请所提供的几个具体实施方式中,应该理解到,所揭露的终端和方法,可以通过其它的方式实现。例如,以上所描述的系统实施方式仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several specific embodiments provided in this application, it should be understood that the disclosed terminal and method may be implemented in other ways. For example, the system implementation described above is only schematic. For example, the division of the module is only a division of logical functions, and there may be other divisions in actual implementation.
对于本领域技术人员而言,显然本申请实施例不限于上述示范性实施例的细节,而且在不背离本申请实施例的精神或基本特征的情况下,能够以其他的具体形式实现本申请实施例。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请实施例的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请实施例内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。系统、装置或终端权利要求中陈述的多个单元、模块或装置也可以由同一个单元、模块或装置通过软件或者硬件来实现。It is obvious to a person skilled in the art that the embodiments of the present application are not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the embodiments of the present application example. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-limiting, the scope of the embodiments of the present application is defined by the appended claims rather than the above description, so it is intended to be All changes within the meaning and scope of equivalent requirements of the claims are included in the embodiments of the present application. Any reference signs in the claims should not be considered as limiting the claims involved. Multiple units, modules or devices stated in the system, device or terminal claims may also be implemented by the same unit, module or device through software or hardware.
以上实施方式仅用以说明本申请实施例的技术方案而非限制,尽管参照以上较佳实施方式对本申请实施例进行了详细说明,本领域的普通技术人员应当理解,可以对本申请实施例的技术方案进行修改或等同替换都不应脱离本申请实施例的技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the embodiments of the present application but not to limit them. Although the embodiments of the present application are described in detail with reference to the above preferred embodiments, those of ordinary skill in the art should understand that Modifications or equivalent replacements of the solutions shall not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种基于人脸识别的照片添加方法,其特征在于,所述方法包括:A method for adding photos based on face recognition, characterized in that the method includes:
    获取第一抓拍照片与样本库照片的相似度;Get the similarity between the first snapshot and the photos in the sample library;
    判断所述相似度是否在预设相似度阈值内;Determine whether the similarity is within a preset similarity threshold;
    若所述相似度在所述预设相似度阈值内,则将所述第一抓拍照片自动加入所述样本库;If the similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library;
    进行人脸认证,并获取所述人脸认证结果。Perform face authentication, and obtain the face authentication result.
  2. 根据权利要求1所述的基于人脸识别的照片添加方法,其特征在于,所述获取第一抓拍照片与样本库照片的相似度包括:The method for adding photos based on face recognition according to claim 1, wherein the acquiring the similarity between the first captured photo and the sample library photo includes:
    对采集到的视频图像进行人脸检测,获取所述第一抓拍照片;Performing face detection on the collected video image to obtain the first captured photo;
    检测所述第一抓拍照片中的用户人脸信息,得到用户人脸图像;Detecting the user's face information in the first captured photo to obtain the user's face image;
    获取所述用户人脸图像的预设区域,并计算所述预设区域的图像特征;Acquiring a preset area of the user's face image, and calculating image characteristics of the preset area;
    比较所述第一抓拍照片的预设区域的图像特征与所述样本库照片的预设区域图像特征的相似度。Comparing the similarity between the image features of the preset area of the first captured photo and the image features of the preset area of the sample library photo.
  3. 根据权利要求2所述的基于人脸识别的照片添加方法,其特征在于,所述判断所述相似度是否在预设相似度阈值内包括:The method for adding photos based on face recognition according to claim 2, wherein the determining whether the similarity is within a preset similarity threshold includes:
    分别计算所述第一抓拍照片的每一预设区域的图像特征与所述样本库照片的每一预设区域的图像特征的平均相似度,其中,所述预设区域的数量大于1个;Calculating the average similarity between the image features of each preset area of the first captured photo and the image features of each preset area of the sample library photo, wherein the number of the preset areas is greater than one;
    判断所述平均相似度是否在预设相似度阈值内;Determine whether the average similarity is within a preset similarity threshold;
    若确定所述平均相似度在所述预设相似度阈值内时,则将所述第一抓拍照片自动加入所述样本库。If it is determined that the average similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library.
  4. 根据权利要求2所述的基于人脸识别的照片添加方法,其特征在于,所述判断所述相似度是否在预设相似度阈值内包括:The method for adding photos based on face recognition according to claim 2, wherein the determining whether the similarity is within a preset similarity threshold includes:
    计算所述第一抓拍照片的每一预设区域的图像特征与所述样本 库照片的每一预设区域的图像特征的相似度;Calculating the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo;
    判断所述相似度是否都在预设相似度阈值内;Judging whether the similarities are all within the preset similarity threshold;
    若判断结果为是,则将所述第一抓拍照片自动加入所述样本库。If the judgment result is yes, the first captured photo is automatically added to the sample library.
  5. 根据权利要求3或4所述的基于人脸识别的照片添加方法,其特征在于,在将所述第一抓拍照片自动加入所述样本库之前,所述方法还包括:The method for adding photos based on face recognition according to claim 3 or 4, wherein before the first captured photo is automatically added to the sample library, the method further comprises:
    输出提示,所述提示内容包括是否将第一抓拍照片加入到所述样本库。A prompt is output, and the content of the prompt includes whether to add the first captured photo to the sample library.
  6. 根据权利要求1所述的基于人脸识别的照片添加方法,其特征在于,所述获取所述人脸认证结果包括:The method for adding photos based on face recognition according to claim 1, wherein the obtaining the face authentication result comprises:
    当第二抓拍照片与所述样本库原始照片的相似度达到预设相似度阈值时,获取到所述人脸认证结果为认证成功,其中,所述第二抓拍照片为在所述第一抓拍照片自动加入所述样本库之后,再次进行人脸认证时所抓拍的照片;或者When the similarity between the second captured photo and the original photos of the sample library reaches a preset similarity threshold, the face authentication result is obtained as authentication success, wherein the second captured photo is taken on the first captured photo After the photos are automatically added to the sample library, the photos captured during face authentication again; or
    当第二抓拍照片与所述第一抓拍照片的相似度达到预设相似度阈值时,获取到所述人脸认证结果为认证成功。When the similarity between the second captured photo and the first captured photo reaches a preset similarity threshold, the face authentication result is obtained as authentication success.
  7. 根据权利要求1所述的基于人脸识别的照片添加方法,其特征在于,在将所述第一抓拍照片自动加入所述样本库之后,所述方法还包括:The method for adding photos based on face recognition according to claim 1, wherein after automatically adding the first captured photo to the sample library, the method further comprises:
    以预设时间间隔更新已保存在所述样本库中的第一抓拍照片;其中,用于更新的抓拍照片与所述样本库照片的相似度不小于所述第一抓拍照片与所述样本库照片的相似度。Updating the first snapshot photos stored in the sample library at preset time intervals; wherein the similarity between the snapshot photos for updating and the sample library photos is not less than the first snapshot photos and the sample library The similarity of the photo.
  8. 一种基于人脸识别的照片添加装置,其特征在于,所述装置包括:A photo adding device based on face recognition, characterized in that the device includes:
    相似度获取模块,用于获取第一抓拍照片与样本库照片的相似度;The similarity obtaining module is used to obtain the similarity between the first captured photo and the photos in the sample library;
    判断模块,用于判断所述相似度是否在预设相似度阈值内;The judgment module is used to judge whether the similarity is within a preset similarity threshold;
    照片添加模块,用于当所述判断模块确定所述相似度在所述预设相似度阈值内时,将所述第一抓拍照片自动加入所述样本库;A photo adding module, configured to automatically add the first captured photo to the sample library when the judgment module determines that the similarity is within the preset similarity threshold;
    人脸认证模块,用于进行人脸认证,并获取所述人脸认证结果。The face authentication module is used to perform face authentication and obtain the face authentication result.
  9. 一种终端装置,其特征在于,所述终端装置包括处理器,所述处理器用于执行存储器中存储的计算机可读指令时实现以下步骤:A terminal device is characterized in that the terminal device includes a processor, and the processor is used to execute the following steps when executing computer-readable instructions stored in a memory:
    获取第一抓拍照片与样本库照片的相似度;Get the similarity between the first snapshot and the photos in the sample library;
    判断所述相似度是否在预设相似度阈值内;Determine whether the similarity is within a preset similarity threshold;
    若所述相似度在所述预设相似度阈值内,则将所述第一抓拍照片自动加入所述样本库;If the similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library;
    进行人脸认证,并获取所述人脸认证结果。Perform face authentication, and obtain the face authentication result.
  10. 根据权利要求9所述的终端装置,其特征在于,所述处理器在获取第一抓拍照片与样本库照片的相似度时,执行所述计算机可读指令以实现以下步骤:The terminal device according to claim 9, wherein the processor executes the computer-readable instructions to obtain the following steps when acquiring the similarity between the first captured photo and the sample library photo:
    对采集到的视频图像进行人脸检测,获取所述第一抓拍照片;Performing face detection on the collected video image to obtain the first captured photo;
    检测所述第一抓拍照片中的用户人脸信息,得到用户人脸图像;Detecting the user's face information in the first captured photo to obtain the user's face image;
    获取所述用户人脸图像的预设区域,并计算所述预设区域的图像特征;Acquiring a preset area of the user's face image, and calculating image characteristics of the preset area;
    比较所述第一抓拍照片的预设区域的图像特征与所述样本库照片的预设区域图像特征的相似度。Comparing the similarity between the image features of the preset area of the first captured photo and the image features of the preset area of the sample library photo.
  11. 根据权利要求10所述的终端装置,其特征在于,所述处理器在判断所述相似度是否在预设相似度阈值内时,执行所述计算机可读指令以实现以下步骤:The terminal device according to claim 10, wherein the processor executes the computer-readable instructions to determine the following steps when determining whether the similarity is within a preset similarity threshold:
    分别计算所述第一抓拍照片的每一预设区域的图像特征与所述样本库照片的每一预设区域的图像特征的平均相似度,其中,所述预设区域的数量大于1个;Calculating the average similarity between the image features of each preset area of the first captured photo and the image features of each preset area of the sample library photo, wherein the number of the preset areas is greater than one;
    判断所述平均相似度是否在预设相似度阈值内;Determine whether the average similarity is within a preset similarity threshold;
    若确定所述平均相似度在所述预设相似度阈值内时,则将所述第一抓拍照片自动加入所述样本库。If it is determined that the average similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library.
  12. 根据权利要求10所述的终端装置,其特征在于,所述处理器判断所述相似度是否在预设相似度阈值内时,执行所述计算机可读指令以实现以下步骤:The terminal device according to claim 10, wherein when the processor determines whether the similarity is within a preset similarity threshold, the computer-readable instruction is executed to implement the following steps:
    计算所述第一抓拍照片的每一预设区域的图像特征与所述样本 库照片的每一预设区域的图像特征的相似度;Calculating the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo;
    判断所述相似度是否都在预设相似度阈值内;Judging whether the similarities are all within the preset similarity threshold;
    若判断结果为是,则将所述第一抓拍照片自动加入所述样本库。If the judgment result is yes, the first captured photo is automatically added to the sample library.
  13. 根据权利要求9所述的终端装置,其特征在于,所述处理器在获取所述人脸认证结果时,执行所述计算机可读指令以实现以下步骤:The terminal device according to claim 9, wherein the processor executes the computer-readable instructions to obtain the following steps when acquiring the face authentication result:
    当第二抓拍照片与所述样本库原始照片的相似度达到预设相似度阈值时,获取到所述人脸认证结果为认证成功,其中,所述第二抓拍照片为在所述第一抓拍照片自动加入所述样本库之后,再次进行人脸认证时所抓拍的照片;或者When the similarity between the second captured photo and the original photos of the sample library reaches a preset similarity threshold, the face authentication result is obtained as authentication success, wherein the second captured photo is taken on the first captured photo After the photos are automatically added to the sample library, the photos captured during face authentication again; or
    当第二抓拍照片与所述第一抓拍照片的相似度达到预设相似度阈值时,获取到所述人脸认证结果为认证成功。When the similarity between the second captured photo and the first captured photo reaches a preset similarity threshold, the face authentication result is obtained as authentication success.
  14. 根据权利要求9所述的终端装置,其特征在于,在将所述第一抓拍照片自动加入所述样本库之后,所述处理器执行所述计算机可读指令还用以实现以下步骤:The terminal device according to claim 9, wherein after the first captured photo is automatically added to the sample library, the processor executes the computer-readable instructions to implement the following steps:
    以预设时间间隔更新已保存在所述样本库中的第一抓拍照片;其中,用于更新的抓拍照片与所述样本库照片的相似度不小于所述第一抓拍照片与所述样本库照片的相似度。Updating the first snapshot photos stored in the sample library at preset time intervals; wherein the similarity between the snapshot photos for updating and the sample library photos is not less than the first snapshot photos and the sample library The similarity of the photo.
  15. 一种非易失性可读存储介质,所述非易失性可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现以下步骤:A non-volatile readable storage medium that stores computer-readable instructions, characterized in that, when the computer-readable instructions are executed by a processor, the following steps are implemented:
    获取第一抓拍照片与样本库照片的相似度;Get the similarity between the first snapshot and the photos in the sample library;
    判断所述相似度是否在预设相似度阈值内;Determine whether the similarity is within a preset similarity threshold;
    若所述相似度在所述预设相似度阈值内,则将所述第一抓拍照片自动加入所述样本库;If the similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library;
    进行人脸认证,并获取所述人脸认证结果。Perform face authentication, and obtain the face authentication result.
  16. 根据权利要求15所述的存储介质,其特征在于,所述获取第一抓拍照片与样本库照片的相似度时,所述计算机可读指令被所述处理器执行以实现以下步骤:The storage medium according to claim 15, wherein when acquiring the similarity between the first captured photo and the sample library photo, the computer-readable instructions are executed by the processor to implement the following steps:
    对采集到的视频图像进行人脸检测,获取所述第一抓拍照片;Performing face detection on the collected video image to obtain the first captured photo;
    检测所述第一抓拍照片中的用户人脸信息,得到用户人脸图像;Detecting the user's face information in the first captured photo to obtain the user's face image;
    获取所述用户人脸图像的预设区域,并计算所述预设区域的图像特征;Acquiring a preset area of the user's face image, and calculating image characteristics of the preset area;
    比较所述第一抓拍照片的预设区域的图像特征与所述样本库照片的预设区域图像特征的相似度。Comparing the similarity between the image features of the preset area of the first captured photo and the image features of the preset area of the sample library photo.
  17. 根据权利要求16所述的存储介质,其特征在于,所述判断所述相似度是否在预设相似度阈值内时,所述计算机可读指令被所述处理器执行以实现以下步骤:The storage medium according to claim 16, wherein, when it is determined whether the similarity is within a preset similarity threshold, the computer-readable instructions are executed by the processor to implement the following steps:
    分别计算所述第一抓拍照片的每一预设区域的图像特征与所述样本库照片的每一预设区域的图像特征的平均相似度,其中,所述预设区域的数量大于1个;Calculating the average similarity between the image features of each preset area of the first captured photo and the image features of each preset area of the sample library photo, wherein the number of the preset areas is greater than one;
    判断所述平均相似度是否在预设相似度阈值内;Determine whether the average similarity is within a preset similarity threshold;
    若确定所述平均相似度在所述预设相似度阈值内时,则将所述第一抓拍照片自动加入所述样本库。If it is determined that the average similarity is within the preset similarity threshold, the first captured photo is automatically added to the sample library.
  18. 根据权利要求16所述的存储介质,其特征在于,所述判断所述相似度是否在预设相似度阈值内时,所述计算机可读指令被所述处理器执行以实现以下步骤:The storage medium according to claim 16, wherein, when it is determined whether the similarity is within a preset similarity threshold, the computer-readable instructions are executed by the processor to implement the following steps:
    计算所述第一抓拍照片的每一预设区域的图像特征与所述样本库照片的每一预设区域的图像特征的相似度;Calculating the similarity between the image feature of each preset area of the first captured photo and the image feature of each preset area of the sample library photo;
    判断所述相似度是否都在预设相似度阈值内;Judging whether the similarities are all within the preset similarity threshold;
    若判断结果为是,则将所述第一抓拍照片自动加入所述样本库。If the judgment result is yes, the first captured photo is automatically added to the sample library.
  19. 根据权利要求16所述的存储介质,其特征在于,所述获取所述人脸认证结果时,所述计算机可读指令被所述处理器执行以实现以下步骤:The storage medium according to claim 16, wherein, when acquiring the face authentication result, the computer-readable instructions are executed by the processor to implement the following steps:
    当第二抓拍照片与所述样本库原始照片的相似度达到预设相似度阈值时,获取到所述人脸认证结果为认证成功,其中,所述第二抓拍照片为在所述第一抓拍照片自动加入所述样本库之后,再次进行人脸认证时所抓拍的照片;或者When the similarity between the second captured photo and the original photos of the sample library reaches a preset similarity threshold, the face authentication result is obtained as authentication success, wherein the second captured photo is taken on the first captured photo After the photos are automatically added to the sample library, the photos captured during face authentication again; or
    当第二抓拍照片与所述第一抓拍照片的相似度达到预设相似度阈值时,获取到所述人脸认证结果为认证成功。When the similarity between the second captured photo and the first captured photo reaches a preset similarity threshold, the face authentication result is obtained as authentication success.
  20. 根据权利要求15所述的存储介质,其特征在于,在将所述第一抓拍照片自动加入所述样本库之后,所述计算机可读指令被所述处理器执行还用以实现以下步骤:The storage medium according to claim 15, wherein after the first captured photo is automatically added to the sample library, the computer-readable instructions are executed by the processor to implement the following steps:
    以预设时间间隔更新已保存在所述样本库中的第一抓拍照片;其中,用于更新的抓拍照片与所述样本库照片的相似度不小于所述第一抓拍照片与所述样本库照片的相似度。Updating the first snapshot photos stored in the sample library at preset time intervals; wherein the similarity between the snapshot photos for updating and the sample library photos is not less than the first snapshot photos and the sample library The similarity of the photo.
PCT/CN2019/077220 2018-11-06 2019-03-06 Face recognition-based method, device and terminal for adding image, and storage medium WO2020093634A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811315455.7 2018-11-06
CN201811315455.7A CN109598203A (en) 2018-11-06 2018-11-06 Photo adding method, device, terminal and storage medium based on recognition of face

Publications (1)

Publication Number Publication Date
WO2020093634A1 true WO2020093634A1 (en) 2020-05-14

Family

ID=65958419

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077220 WO2020093634A1 (en) 2018-11-06 2019-03-06 Face recognition-based method, device and terminal for adding image, and storage medium

Country Status (2)

Country Link
CN (1) CN109598203A (en)
WO (1) WO2020093634A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111814551A (en) * 2020-06-06 2020-10-23 中信百信银行股份有限公司 Human face recognition method, device and equipment based on small program and storage medium
CN112148908A (en) * 2020-10-23 2020-12-29 北京百度网讯科技有限公司 Image database updating method and device, electronic equipment and medium
CN112597803A (en) * 2020-11-26 2021-04-02 深圳泰首智能技术有限公司 Face recognition method, device and system and electronic equipment
CN112633749A (en) * 2020-12-31 2021-04-09 河南橡树智能科技有限公司 Staff working time counting method, system and medium based on face recognition
CN113283305A (en) * 2021-04-29 2021-08-20 百度在线网络技术(北京)有限公司 Face recognition method and device, electronic equipment and computer readable storage medium
CN114398606A (en) * 2021-10-09 2022-04-26 武汉烽火信息集成技术有限公司 Block chain-based face verification method, equipment and computer-readable storage medium
CN116597552A (en) * 2023-07-19 2023-08-15 青岛大数华创科技有限公司 Face recognition authorization management system for biological sample warehouse-in and warehouse-out

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110348315B (en) * 2019-06-14 2021-10-19 深圳英飞拓科技股份有限公司 Method and device for dynamically updating human face feature base and human face snapshot system
CN110516597A (en) * 2019-08-27 2019-11-29 睿云联(厦门)网络通讯技术有限公司 Off-line learning method, system, equipment and the storage medium of lifting feature resolution
CN111368622B (en) * 2019-10-18 2024-01-12 杭州海康威视系统技术有限公司 Personnel identification method and device and storage medium
CN111310580A (en) * 2020-01-19 2020-06-19 四川联众竞达科技有限公司 Face recognition method under non-matching state
CN111723678A (en) * 2020-05-27 2020-09-29 上海瀛之杰汽车信息技术有限公司 Human face passenger flow identification method, device, equipment and medium suitable for multi-person scene
CN112101215A (en) * 2020-09-15 2020-12-18 Oppo广东移动通信有限公司 Face input method, terminal equipment and computer readable storage medium
CN114529961A (en) * 2020-11-23 2022-05-24 比亚迪股份有限公司 Face image updating method, storage medium, electronic device and vehicle
CN113688784B (en) * 2021-09-10 2024-05-14 平安医疗健康管理股份有限公司 Face recognition-based medical insurance card embezzlement risk recognition method and related equipment thereof
CN114463803A (en) * 2021-12-24 2022-05-10 南京熊猫电子股份有限公司 Face feature aggregation analysis self-learning method and system based on multiple algorithms

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663444A (en) * 2012-03-26 2012-09-12 广州商景网络科技有限公司 Method for preventing account number from being stolen and system thereof
CN104537336A (en) * 2014-12-17 2015-04-22 厦门立林科技有限公司 Face identification method and system with self-learning function
US20170262695A1 (en) * 2016-03-09 2017-09-14 International Business Machines Corporation Face detection, representation, and recognition
CN107506559A (en) * 2017-09-08 2017-12-22 廖海斌 Star's face shaping based on human face similarity degree analysis, which is made up, recommends method and apparatus
CN107563336A (en) * 2017-09-07 2018-01-09 廖海斌 Human face similarity degree analysis method, the device and system of game are matched for famous person
CN107590212A (en) * 2017-08-29 2018-01-16 深圳英飞拓科技股份有限公司 The Input System and method of a kind of face picture

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930822A (en) * 2016-05-11 2016-09-07 北京格灵深瞳信息技术有限公司 Human face snapshot method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663444A (en) * 2012-03-26 2012-09-12 广州商景网络科技有限公司 Method for preventing account number from being stolen and system thereof
CN104537336A (en) * 2014-12-17 2015-04-22 厦门立林科技有限公司 Face identification method and system with self-learning function
US20170262695A1 (en) * 2016-03-09 2017-09-14 International Business Machines Corporation Face detection, representation, and recognition
CN107590212A (en) * 2017-08-29 2018-01-16 深圳英飞拓科技股份有限公司 The Input System and method of a kind of face picture
CN107563336A (en) * 2017-09-07 2018-01-09 廖海斌 Human face similarity degree analysis method, the device and system of game are matched for famous person
CN107506559A (en) * 2017-09-08 2017-12-22 廖海斌 Star's face shaping based on human face similarity degree analysis, which is made up, recommends method and apparatus

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111814551A (en) * 2020-06-06 2020-10-23 中信百信银行股份有限公司 Human face recognition method, device and equipment based on small program and storage medium
CN112148908A (en) * 2020-10-23 2020-12-29 北京百度网讯科技有限公司 Image database updating method and device, electronic equipment and medium
CN112597803A (en) * 2020-11-26 2021-04-02 深圳泰首智能技术有限公司 Face recognition method, device and system and electronic equipment
CN112633749A (en) * 2020-12-31 2021-04-09 河南橡树智能科技有限公司 Staff working time counting method, system and medium based on face recognition
CN113283305A (en) * 2021-04-29 2021-08-20 百度在线网络技术(北京)有限公司 Face recognition method and device, electronic equipment and computer readable storage medium
CN113283305B (en) * 2021-04-29 2024-03-26 百度在线网络技术(北京)有限公司 Face recognition method, device, electronic equipment and computer readable storage medium
CN114398606A (en) * 2021-10-09 2022-04-26 武汉烽火信息集成技术有限公司 Block chain-based face verification method, equipment and computer-readable storage medium
CN114398606B (en) * 2021-10-09 2024-05-03 武汉烽火信息集成技术有限公司 Face verification method, equipment and computer readable storage medium based on block chain
CN116597552A (en) * 2023-07-19 2023-08-15 青岛大数华创科技有限公司 Face recognition authorization management system for biological sample warehouse-in and warehouse-out
CN116597552B (en) * 2023-07-19 2023-09-22 青岛大数华创科技有限公司 Face recognition authorization management system for biological sample warehouse-in and warehouse-out

Also Published As

Publication number Publication date
CN109598203A (en) 2019-04-09

Similar Documents

Publication Publication Date Title
WO2020093634A1 (en) Face recognition-based method, device and terminal for adding image, and storage medium
WO2018028546A1 (en) Key point positioning method, terminal, and computer storage medium
CN110443110B (en) Face recognition method, device, terminal and storage medium based on multipath camera shooting
US11210541B2 (en) Liveness detection method, apparatus and computer-readable storage medium
WO2017185630A1 (en) Emotion recognition-based information recommendation method and apparatus, and electronic device
TW201911130A (en) Method and device for remake image recognition
TW202113757A (en) Target object matching method and apparatus, electronic device and storage medium
WO2017054442A1 (en) Image information recognition processing method and device, and computer storage medium
CN109670444B (en) Attitude detection model generation method, attitude detection device, attitude detection equipment and attitude detection medium
CN110072047B (en) Image deformation control method and device and hardware device
EP2998960A1 (en) Method and device for video browsing
US10592759B2 (en) Object recognition apparatus and control method therefor
CN109784304B (en) Method and apparatus for labeling dental images
US9799099B2 (en) Systems and methods for automatic image editing
CN110062157B (en) Method and device for rendering image, electronic equipment and computer readable storage medium
WO2020151156A1 (en) Video stream playing method and system, computer apparatus and readable storage medium
CN111818385B (en) Video processing method, video processing device and terminal equipment
CN111428570A (en) Detection method and device for non-living human face, computer equipment and storage medium
CN109271929B (en) Detection method and device
CN113409342A (en) Training method and device for image style migration model and electronic equipment
WO2023197648A1 (en) Screenshot processing method and apparatus, electronic device, and computer readable medium
CN112597944A (en) Key point detection method and device, electronic equipment and storage medium
CN111881740A (en) Face recognition method, face recognition device, electronic equipment and medium
CN109034032B (en) Image processing method, apparatus, device and medium
CN111126159A (en) Method, apparatus, electronic device, and medium for tracking pedestrian in real time

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19883157

Country of ref document: EP

Kind code of ref document: A1