Nothing Special   »   [go: up one dir, main page]

WO2023279783A1 - Facial recognition method, device, and storage medium - Google Patents

Facial recognition method, device, and storage medium Download PDF

Info

Publication number
WO2023279783A1
WO2023279783A1 PCT/CN2022/083552 CN2022083552W WO2023279783A1 WO 2023279783 A1 WO2023279783 A1 WO 2023279783A1 CN 2022083552 W CN2022083552 W CN 2022083552W WO 2023279783 A1 WO2023279783 A1 WO 2023279783A1
Authority
WO
WIPO (PCT)
Prior art keywords
face recognition
preset threshold
ratio
preset
adjustment strategy
Prior art date
Application number
PCT/CN2022/083552
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 WO2023279783A1 publication Critical patent/WO2023279783A1/en

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00563Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys using personal physical data of the operator, e.g. finger prints, retinal images, voicepatterns
    • 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
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit

Definitions

  • the present disclosure relates to the technical field of face recognition, and in particular to a face recognition method, a face recognition device and a storage medium.
  • Face recognition is a biometric technology for identity recognition through facial feature information. It mainly extracts facial features from collected facial images, and calculates the similarity value between the extracted facial features and registered facial features. Compare the similarity value with the preset threshold, if it is greater than the preset threshold, the recognition is passed, otherwise it is not passed.
  • the environment of face recognition is complex and changeable, such as changes in the user's face posture, makeup, or changes in light intensity, so the fixed preset threshold cannot adapt to the changeable environment .
  • the main purpose of the embodiments of the present disclosure is to provide a face recognition method, a face recognition device, and a storage medium, aiming to dynamically adjust the preset threshold according to the similarity data of the user in the historical face recognition process.
  • the face recognition method can be adapted to different scenarios and improve user experience.
  • an embodiment of the present disclosure provides a face recognition method, including: obtaining a plurality of similarity values in historical face recognition, wherein the similarity value is the difference between the face image in the historical face recognition and the registrant The similarity of the face image; the adjustment strategy of the preset threshold is determined according to the comparison result of the multiple similarity values and the preset threshold; the preset threshold is adjusted according to the determined adjustment strategy, and the adjusted Preset thresholds are used for face recognition comparison.
  • the embodiment of the present disclosure also provides a face recognition device, the face recognition device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and used to implement A data bus connecting and communicating between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any one face recognition method provided in this disclosure specification are realized.
  • an embodiment of the present disclosure further provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors , so as to realize the steps of any face recognition method provided in this disclosure specification.
  • FIG. 1 is a schematic flow diagram of a face recognition method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic structural block diagram of a face recognition device provided by an embodiment of the present disclosure.
  • Embodiments of the present disclosure provide a face recognition method, a face recognition device, and a storage medium.
  • the face recognition method can be applied to a mobile terminal, and the mobile terminal can be electronic equipment such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
  • FIG. 1 is a schematic flowchart of a face recognition method provided by an embodiment of the present disclosure.
  • the face recognition method includes steps S101 to S103.
  • Step S101 obtaining a plurality of similarity values in historical face recognition, wherein the similarity value is the similarity between the face image in the historical face recognition and the registered face image.
  • the registered face images pre-registered in the face feature database are processed, and the face detection network is used to detect the face area, and then the extracted face area is input to the face recognition network for further processing.
  • Feature extraction get the registered face image features and save them. Every time face recognition is performed, the collected face images are extracted through the face detection network and face recognition network, and the face image features are matched with the registered face image features to calculate the similarity of the features. degree to get the similarity value of each face recognition.
  • the face detection network can be a SSD target detection model (Single Shot MultiBox Detector, SSD), and the face recognition network can be a MobileFaceNet face recognition model, and of course the face detection network and the face recognition network can also be Other network models are not limited in this application.
  • SSD single Shot MultiBox Detector
  • MobileFaceNet MobileFaceNet face recognition model
  • the multiple similarity values only record the similarity values obtained by registered users through face recognition, and multiple similarity values may be obtained in each face recognition, and each face recognition only records one similarity value. degree value.
  • the unlocking is successful; otherwise, the unlocking fails.
  • the user successfully unlocks through the face, record the similarity value when the unlock is successful. If the user cannot unlock the device through the face image, and there is no follow-up action, the current user is considered to be a non-registered user, and the similarity value of this face recognition will not be recorded. If the user fails to unlock through the face image, and then unlocks by entering a password or other authentication methods, the current user is considered to be a registered user, and the similarity value at the time of the last unlock failure is recorded.
  • multiple similarity values can be obtained by acquiring historical face recognition data within a preset period, wherein the preset period includes: a preset duration, or a preset number of face recognition times , or the preset number of face recognition failures.
  • the preset period is a preset time length, and each time the historical face recognition of the preset time length is passed, a plurality of similarity values obtained by face recognition within the preset time length are automatically obtained and analyzed And it is used for subsequently determining the adjustment strategy of the preset threshold.
  • the preset period is one week
  • a plurality of similarity values obtained in the face recognition of the previous week are automatically obtained, analyzed and used for subsequent determination of the preset threshold adjustment strategy.
  • the preset period is the preset number of times of face recognition, and when the number of times of face recognition reaches the preset number of times, a plurality of similarity values obtained by the preset face recognition are automatically obtained, and performed Analysis and adjustment strategies for subsequent determination of preset thresholds.
  • the preset period is 100 times of face recognition
  • the number of face recognition reaches 100 times
  • the 100 similarity values obtained by these 100 times of face recognition are automatically obtained, analyzed and used for subsequent Identify adjustment strategies for preset thresholds.
  • the preset period can also be set to the preset number of face recognition failures.
  • the number of face recognition failures reaches the preset number of times, it will trigger the preset threshold Adjustment.
  • the multiple similarity values obtained by face recognition within this period of time are automatically acquired, analyzed and used to subsequently determine an adjustment strategy for a preset threshold.
  • the preset period is 10 times of face recognition failures
  • the number of face recognition failures reaches 10 times
  • it will automatically trigger the adjustment of the preset threshold, by obtaining multiple similar
  • the degree value is analyzed and used to subsequently determine the adjustment strategy for the preset threshold.
  • Step S102 determining an adjustment strategy for the preset threshold according to a comparison result between the plurality of similarity values and a preset threshold.
  • the first ratio of the ratio used to indicate the success of face recognition and the second ratio of the ratio used to indicate the failure of face recognition are determined, and then according to The first ratio and the second ratio determine different adjustment strategies for the preset threshold.
  • the method for determining the first ratio and the second ratio specifically includes counting the number of the plurality of similarity values greater than or equal to the preset threshold, and according to the number of the plurality of similarity values and the greater than Or the number equal to the preset threshold value determines the first ratio; counts the number of the multiple similarity values smaller than the preset threshold value, and according to the number of the multiple similarity values and the smaller than the The number of the preset thresholds determines the second ratio.
  • the adjustment strategy of the preset threshold is a first adjustment strategy, and the first adjustment strategy is to increase the preset threshold.
  • the preset threshold may be appropriately increased, and the adjusted preset threshold may be used for subsequent face recognition.
  • the second ratio that is, the ratio of face recognition failures is greater than the second preset ratio
  • the preset threshold is too high, or the environment during this time period belongs to an abnormal scene, which can be appropriately Lower the threshold to improve user experience.
  • the adjustment strategy of the preset threshold is the second adjustment strategy, and the second adjustment strategy is to lower the preset threshold.
  • the preset threshold when the second preset ratio is set to 90% and the second ratio is greater than 90%, the preset threshold should be appropriately lowered, and the lowered preset threshold should be used for subsequent face recognition.
  • the adjustment range corresponding to the first adjustment strategy and the second adjustment strategy may be determined according to a difference between an average of multiple similarity values and a preset threshold.
  • the mean value of the similarity obtained by performing mean filtering on a plurality of similarity values is used as a reference value of the preset threshold.
  • the adjusted preset threshold is determined according to the difference between the reference value of the preset threshold and the preset threshold before adjustment.
  • S new is an adjusted preset threshold
  • S is a preset threshold before adjustment
  • S t is a reference value of the preset threshold
  • multiple similarity values can also be calculated by median average filtering, and the average value of the similarity calculated after removing the maximum and minimum values among the multiple similarity values can be used as a reference value for the preset threshold, In order to reduce the impact of extreme values on the mean similarity in abnormal scenarios.
  • the adjustment strategy of the preset threshold is the third adjustment strategy
  • the third adjustment strategy is to lower the preset threshold and the range of lowering the preset threshold is determined by the preset range Sure.
  • the third preset ratio is set to 40%
  • the fourth preset ratio is set to 50%
  • the first ratio that is, the ratio of successful face recognition is greater than 40% and less than 95%
  • the second ratio that is, the proportion of face recognition failures is greater than 50% and less than 80%
  • the adjustment range of the preset threshold is determined according to the average value of multiple similarities, since the multiple similarity values are greater than or equal to the preset threshold and less than the preset The distribution of the thresholds is relatively close.
  • the reference value of the preset threshold obtained according to the average value of multiple similarities may be relatively close to the original threshold before adjustment. Therefore, in this case, the preset range is used as the adjustment range of the preset threshold, and the specific value of the preset range can be determined according to experimental data and actual usage scenarios of face recognition, which is not limited in the present application.
  • the first preset ratio, the second preset ratio, the third preset ratio, and the fourth preset ratio can be predetermined according to experimental data and specific application scenarios of face recognition. Not limited.
  • Step S103 Adjust the preset threshold according to the determined adjustment strategy, and use the adjusted preset threshold for face recognition comparison.
  • the preset threshold is adjusted based on the strategy of increasing or decreasing and the adjustment range included in the adjustment strategy, and then The adjusted preset threshold is used for subsequent face recognition until the next adjustment of the preset threshold is triggered.
  • the threshold of face recognition can be associated with the corresponding user of the terminal through the terminal device of the registered user, and the preset threshold of a registered user can be adjusted separately , such as face recognition access control attendance system, face recognition anti-theft door.
  • the threshold of face recognition is common to all registered users, and does not support individual adjustment of the preset threshold of a certain registered user, such as the face recognition intelligent access control system in residential quarters. Therefore, the adjustment of the preset threshold can be divided into separate statistical analysis of multiple similarity values from the same registered user or different registered users according to the actual application scenario, and adjust the threshold according to the analysis results of multiple similarity values.
  • the preset threshold for the same registered user or the preset threshold for different registered users are examples of the preset threshold for different registered users.
  • the determined adjustment policy is used to adjust the preset threshold for face recognition performed by the same registered user.
  • the access control time attendance system is associated with each registered user through the user's terminal device.
  • the initial value of the preset threshold of all registered users is the same, and then According to the comparison result between the similarity value of each registered user in the historical face recognition and the preset threshold value, the preset threshold value of a certain registered user is individually adjusted.
  • the determined adjustment strategy is used to adjust the preset thresholds for face recognition performed by the different registered users.
  • the face recognition intelligent access control system in a residential area may not be associated with each registered user in the residential area through a device, according to the similarity of all registered users who use the face recognition intelligent access control system within this period
  • the degree value is used to determine the adjustment strategy of the preset threshold, and the adjusted preset threshold is also used for face recognition by all registered users registered in the access control system.
  • This embodiment discloses a face recognition method, which is applied to an intelligent access control system in a remote control scene, and the method includes the following steps.
  • Step S1 Process the registered face images that are pre-entered into the face feature database, first use the SSD face detection network to detect face regions, and then input the extracted face image regions to the MobileFaceNet face recognition network for feature extraction , get the registered face image features and save them.
  • Step S2 When the user uses the face image to unlock the access control, record the similarity value when the user unlocks the access control each time.
  • each time face recognition is performed the user's face image is collected through the front camera, and features of the collected face image are extracted. Extracting features is also to perform face detection through the SSD face detection network first, and then input the detected face image into the MobileFaceNet face recognition network to extract face image features, and perform the extracted face image features and registered face image features Match, calculate the similarity value. If the calculated similarity value is greater than or equal to the preset threshold, the access control can be successfully unlocked, otherwise, the unlocking fails.
  • the user successfully unlocks the access control through the face image, record the similarity value when the unlock is successful; The face similarity value is not recorded. If the user enters a password to unlock after failing to unlock through the face image, the current user is considered to be a registered user, and the current environment belongs to an abnormal scene, and the similarity value at the time of the last unlocking failure is recorded.
  • Step S3 According to the preset cycle parameters set by the system, the similarity value in the current cycle is counted.
  • the preset cycle is set to unlock 100 times through face recognition.
  • the user unlocks the access control 100 times, the statistical analysis of the similarity value and the adjustment of the preset threshold are automatically triggered.
  • Step S4 According to the comparison result of the statistical similarity value and the preset threshold, determine different adjustment strategies, as follows:
  • the threshold can be increased to improve the security of the access control system.
  • the preset threshold needs to be lowered.
  • the adjustment range is determined based on the mean value calculated by the median average filtering method for the similarity values obtained from these 100 face recognitions, and the average similarity value obtained after removing the maximum and minimum values is used as a reference value for the preset threshold, and according to The reference value of the preset threshold adjusts the preset threshold.
  • the face recognition method can be adapted to different environments, the preset threshold can be lowered, and the adjustment range can be set to 0.5.
  • Step S5 Use the adjusted preset threshold for subsequent face recognition comparisons until the next preset threshold adjustment is triggered.
  • an adjustment strategy for a preset threshold is determined and the preset threshold is dynamically adjusted.
  • the preset threshold is increased to increase the anti-prosthesis attack capability.
  • the preset threshold is appropriately lowered to reduce the false rejection rate for users while ensuring safety .
  • FIG. 2 is a schematic structural block diagram of a face recognition device provided by an embodiment of the present disclosure.
  • the face recognition device 300 includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected through a bus 303, such as an I2C (Inter-integrated Circuit) bus.
  • a bus 303 such as an I2C (Inter-integrated Circuit) bus.
  • the processor 301 is used to provide computing and control capabilities to support the operation of the entire face recognition device.
  • the processor 301 can be a central processing unit (Central Processing Unit, CPU), and the processor 301 can also be other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC) ), Field-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 be any conventional processor or the like.
  • the memory 302 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
  • FIG. 2 is only a block diagram of a partial structure related to the embodiment of the present disclosure, and does not constitute a limitation on the face recognition device to which the embodiment of the present disclosure is applied.
  • a particular server may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • the processor is configured to run a computer program stored in the memory, and implement any one of the face recognition methods provided by the embodiments of the present disclosure when executing the computer program.
  • the processor is configured to run a computer program stored in a memory, and implement the following steps when executing the computer program: obtain a plurality of similarity values in historical face recognition, wherein the similarity The degree value is the similarity between the face image in the historical face recognition and the registered face image; determine the adjustment strategy of the preset threshold according to the comparison results of the multiple similarity values and the preset threshold; according to the determined The adjustment strategy adjusts the preset threshold, and uses the adjusted preset threshold for face recognition comparison.
  • the processor when the processor realizes the adjustment strategy of determining the preset threshold according to the comparison result of the multiple similarity values and the preset threshold, it is configured to: determine the first threshold according to the comparison result. A ratio and a second ratio, wherein the first ratio is used to represent the ratio of successful face recognition, and the second ratio is used to represent the ratio of failed face recognition. counting the number of the multiple similarity values greater than or equal to the preset threshold, and determining the first Proportion; counting the number of the multiple similarity values smaller than the preset threshold, and determining the second ratio according to the number of the multiple similarity values and the number smaller than the preset threshold; An adjustment strategy for the preset threshold is determined according to the first ratio and the second ratio.
  • the processor when the processor realizes the adjustment strategy of determining different preset thresholds according to the first ratio and the second ratio, it is configured to realize: when the first ratio is greater than a first preset ratio, the adjustment strategy of the preset threshold is the first adjustment strategy, and the first adjustment strategy is to increase the preset threshold; when the second ratio is greater than the second preset ratio, the preset The threshold adjustment strategy is a second adjustment strategy, and the second adjustment strategy is to lower the preset threshold.
  • the processor when the processor implements the face recognition method, it is configured to implement: the adjustment range corresponding to the first adjustment strategy and the second adjustment strategy is based on the mean value and the value of the plurality of similarity values The difference between the preset thresholds is determined.
  • the processor when the processor realizes the adjustment strategy of determining different preset thresholds according to the first ratio and the second ratio, it is configured to realize: when the first ratio is greater than a third preset When the ratio is smaller than the first preset ratio, and the second ratio is larger than the fourth preset ratio and smaller than the second preset ratio, the adjustment strategy of the preset threshold is the third adjustment strategy, the first The third adjustment strategy is to lower the preset threshold, and the range of lowering the preset threshold is determined by the preset range.
  • the processor when the processor implements the face recognition method, it is used to realize that: the multiple similarity values are from the same registered user or different registered users; when the multiple similarity values are from When the same registered user, the determined adjustment strategy is used to adjust the preset threshold for face recognition of the same registered user; when the multiple similarity values are from different registered users, the determined The adjustment strategy is used to adjust the preset threshold for face recognition of the different registered users.
  • the processor when implementing the face recognition method, is configured to realize: when recording multiple similarity values in the historical face recognition, when the face image in the historical face recognition is consistent with When the similarity value of the registered face image is less than the preset threshold, further confirm whether the user corresponding to the face image is a registered user; when confirming that the user corresponding to the face image is a registered user, record the last The similarity value calculated when a matching is unsuccessful; when it is confirmed that the user corresponding to the face image is a non-registered user, the similarity value calculated based on the face image is not recorded.
  • the processor when implementing the face recognition method, is configured to realize: the historical face recognition is historical face recognition within a preset period, and the preset period includes: preset The duration, the preset number of times of face recognition or the preset number of times of failed face recognition.
  • An embodiment of the present disclosure also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following: The steps of any face recognition method provided in the description of the embodiments of the present disclosure.
  • the storage medium may be an internal storage unit of the face recognition device described in the foregoing embodiments, such as a hard disk or a memory of the face recognition device.
  • the storage medium can also be an external storage device of the face recognition device, such as a plug-in hard disk equipped on the face recognition device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc.
  • the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute.
  • Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit .
  • Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

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

Abstract

The present disclosure belongs to the technical field of facial recognition, and provided in embodiments thereof are a facial recognition method, a device, and a storage medium. The method comprises: obtaining a plurality of similarity measure values in instances of historical facial recognition, wherein each similarity measure value is a similarity measure of a registration facial image and a facial image in an instance of historical facial recognition; determining an adjustment policy for a preset threshold according to a comparison value of the plurality of similarity measure values and said preset threshold; adjusting the preset threshold according to the determined adjustment policy and using the adjusted preset threshold for facial recognition comparison.

Description

人脸识别方法、设备及存储介质Face recognition method, device and storage medium
相关申请的交叉引用Cross References to Related Applications
本公开要求享有2021年07月06日提交的名称为“人脸识别方法、设备及存储介质”的中国专利申请CN202110765422.8的优先权,其全部内容通过引用并入本公开中。This disclosure claims the priority of the Chinese patent application CN202110765422.8 filed on July 06, 2021, entitled "Face Recognition Method, Device and Storage Medium", the entire content of which is incorporated by reference into this disclosure.
技术领域technical field
本公开涉及人脸识别技术领域,尤其涉及一种人脸识别方法、人脸识别设备及存储介质。The present disclosure relates to the technical field of face recognition, and in particular to a face recognition method, a face recognition device and a storage medium.
背景技术Background technique
随着5G技术的不断发展,受益于其本身的低延迟、高带宽、广连接的特性,近年来涌现出一大批依托于5G技术的行业应用,例如5G智能移动终端的普及、依托于智能摄像头的智慧教室以及依赖于车路协同技术的自动驾驶行业等,而人脸识别技术正是其中重要的一环。人脸识别是一种通过人脸特征信息来进行身份识别的生物识别技术,主要是从采集的人脸图像提取人脸特征,计算提取到的人脸特征和注册人脸特征的相似度值,将相似度值与预设阈值进行比较,如果大于预设阈值,则识别通过,反之不通过。然而在实际应用中,人脸识别的环境是复杂多变的,比如用户的人脸姿态、妆容的变化,或者是光照强度的变化等,因此固定不变的预设阈值无法适应多变的环境。With the continuous development of 5G technology, benefiting from its own characteristics of low latency, high bandwidth, and wide connection, a large number of industrial applications relying on 5G technology have emerged in recent years, such as the popularization of 5G smart mobile terminals, relying on smart cameras Smart classrooms and the autonomous driving industry relying on vehicle-road collaboration technology, etc., and face recognition technology is an important part of it. Face recognition is a biometric technology for identity recognition through facial feature information. It mainly extracts facial features from collected facial images, and calculates the similarity value between the extracted facial features and registered facial features. Compare the similarity value with the preset threshold, if it is greater than the preset threshold, the recognition is passed, otherwise it is not passed. However, in practical applications, the environment of face recognition is complex and changeable, such as changes in the user's face posture, makeup, or changes in light intensity, so the fixed preset threshold cannot adapt to the changeable environment .
发明内容Contents of the invention
本公开实施例的主要目的在于提供一种人脸识别方法、人脸识别设备及存储介质,旨在根据用户在历史人脸识别过程中的相似度数据,对预设阈值进行动态调整,在不改动人脸识别模型的情况下,使得人脸识别方法可以适应不同场景,改善用户体验。The main purpose of the embodiments of the present disclosure is to provide a face recognition method, a face recognition device, and a storage medium, aiming to dynamically adjust the preset threshold according to the similarity data of the user in the historical face recognition process. In the case of changing the face recognition model, the face recognition method can be adapted to different scenarios and improve user experience.
第一方面,本公开实施例提供一种人脸识别方法,包括:获取历史人脸识别中的多个相似度值,其中,所述相似度值为历史人脸识别中人脸图像与注册人脸图像的相似度;根据所述多个相似度值与预设阈值的比较结果确定所述预设阈值的调整策略;根据确定的所述调整策略调整所述预设阈值,并将调整后的预设阈值用于人脸识别比较。In the first aspect, an embodiment of the present disclosure provides a face recognition method, including: obtaining a plurality of similarity values in historical face recognition, wherein the similarity value is the difference between the face image in the historical face recognition and the registrant The similarity of the face image; the adjustment strategy of the preset threshold is determined according to the comparison result of the multiple similarity values and the preset threshold; the preset threshold is adjusted according to the determined adjustment strategy, and the adjusted Preset thresholds are used for face recognition comparison.
第二方面,本公开实施例还提供一种人脸识别设备,所述人脸识别设备包括处理器、存储器、存储在所述存储器上并可被所述处理器执行的计算机程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,其中所述计算机程序被所述处理器执行时,实现如本公开说明书提供的任一项人脸识别方法的步骤。In the second aspect, the embodiment of the present disclosure also provides a face recognition device, the face recognition device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and used to implement A data bus connecting and communicating between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any one face recognition method provided in this disclosure specification are realized.
第三方面,本公开实施例还提供一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如本公开说明书提供的任一项人脸识别方法的步骤。In a third aspect, an embodiment of the present disclosure further provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors , so as to realize the steps of any face recognition method provided in this disclosure specification.
附图说明Description of drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can also obtain other drawings based on these drawings on the premise of not paying creative work.
图1为本公开实施例提供的一种人脸识别方法的流程示意图;FIG. 1 is a schematic flow diagram of a face recognition method provided by an embodiment of the present disclosure;
图2为本公开实施例提供的一种人脸识别设备的结构示意框图。FIG. 2 is a schematic structural block diagram of a face recognition device provided by an embodiment of the present disclosure.
具体实施方式detailed description
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are part of the embodiments of the present disclosure, not all of them. Based on the embodiments in the present disclosure, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present disclosure.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flow charts shown in the drawings are just illustrations, and do not necessarily include all contents and operations/steps, nor must they be performed in the order described. For example, some operations/steps can be decomposed, combined or partly combined, so the actual order of execution may be changed according to the actual situation.
应当理解,在此本公开说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本公开。如在本公开说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should be understood that the terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used in this disclosure and the appended claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise.
本公开实施例提供一种人脸识别方法、人脸识别设备及存储介质。其中,该人脸识别方法可应用于移动终端中,该移动终端可以是手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等电子设备。Embodiments of the present disclosure provide a face recognition method, a face recognition device, and a storage medium. Wherein, the face recognition method can be applied to a mobile terminal, and the mobile terminal can be electronic equipment such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device.
下面结合附图,对本公开的一些实施例作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
请参照图1,图1为本公开实施例提供的一种人脸识别方法的流程示意图。Please refer to FIG. 1 , which is a schematic flowchart of a face recognition method provided by an embodiment of the present disclosure.
如图1所示,该人脸识别方法包括步骤S101至步骤S103。As shown in FIG. 1 , the face recognition method includes steps S101 to S103.
步骤S101、获取历史人脸识别中的多个相似度值,其中,所述相似度值为历史人脸识别 中人脸图像与注册人脸图像的相似度。Step S101, obtaining a plurality of similarity values in historical face recognition, wherein the similarity value is the similarity between the face image in the historical face recognition and the registered face image.
在一实施方式中,首先对预先录入人脸特征库中的注册人脸图像进行处理,先利用人脸检测网络进行人脸区域检测,再将提取到的人脸区域输入到人脸识别网络进行特征提取,得到注册人脸图像特征并加以保存。每次进行人脸识别时,对采集的人脸图像,经由人脸检测网络及人脸识别网络提取人脸图像特征,并将人脸图像特征和注册人脸图像特征进行匹配,计算特征的相似度得到每次人脸识别的相似度值。In one embodiment, firstly, the registered face images pre-registered in the face feature database are processed, and the face detection network is used to detect the face area, and then the extracted face area is input to the face recognition network for further processing. Feature extraction, get the registered face image features and save them. Every time face recognition is performed, the collected face images are extracted through the face detection network and face recognition network, and the face image features are matched with the registered face image features to calculate the similarity of the features. degree to get the similarity value of each face recognition.
在一些实施例中,人脸检测网络可以为SSD目标检测模型(Single Shot MultiBox Detector,SSD),人脸识别网络可以为MobileFaceNet人脸识别模型,当然人脸检测网络和人脸识别网络还可以为其他网络模型,本申请对此不作限定。In some embodiments, the face detection network can be a SSD target detection model (Single Shot MultiBox Detector, SSD), and the face recognition network can be a MobileFaceNet face recognition model, and of course the face detection network and the face recognition network can also be Other network models are not limited in this application.
需要说明的是,所述多个相似度值只记录注册用户进行人脸识别得到的相似度值,且每一次人脸识别中可能得到多个相似度值,每一次人脸识别只记录一个相似度值。在一实施方式中,在基于用户的人脸图像进行人脸识别过程中,若计算出的相似度值大于预设阈值,则解锁成功,反之则解锁失败。在此过程中,如用户通过人脸成功解锁,则记录解锁成功时的相似度值。如果用户无法通过人脸图像解锁设备,且无后续的动作,则认为当前用户为非注册用户,不予记录本次人脸识别的相似度值。如用户在通过人脸图像解锁失败后,又通过输入密码或其他认证方式进行了解锁,则认为当前用户为注册用户,记录最后一次解锁失败时的相似度值。It should be noted that the multiple similarity values only record the similarity values obtained by registered users through face recognition, and multiple similarity values may be obtained in each face recognition, and each face recognition only records one similarity value. degree value. In one embodiment, during the face recognition process based on the user's face image, if the calculated similarity value is greater than a preset threshold, the unlocking is successful; otherwise, the unlocking fails. During this process, if the user successfully unlocks through the face, record the similarity value when the unlock is successful. If the user cannot unlock the device through the face image, and there is no follow-up action, the current user is considered to be a non-registered user, and the similarity value of this face recognition will not be recorded. If the user fails to unlock through the face image, and then unlocks by entering a password or other authentication methods, the current user is considered to be a registered user, and the similarity value at the time of the last unlock failure is recorded.
在一些实施例中,可以通过获取预设周期内的历史人脸识别中的数据来获得多个相似度值,其中,所述预设周期包括:预设时长,或预设的人脸识别次数,或预设的人脸识别失败次数。In some embodiments, multiple similarity values can be obtained by acquiring historical face recognition data within a preset period, wherein the preset period includes: a preset duration, or a preset number of face recognition times , or the preset number of face recognition failures.
在一些实施例中,预设周期为预设时长,每经过预设时长的历史人脸识别,自动获取这一段预设时长内的人脸识别得到的多个相似度值,并对其进行分析并用于后续确定预设阈值的调整策略。In some embodiments, the preset period is a preset time length, and each time the historical face recognition of the preset time length is passed, a plurality of similarity values obtained by face recognition within the preset time length are automatically obtained and analyzed And it is used for subsequently determining the adjustment strategy of the preset threshold.
示例性地,当预设周期为一周时,每经过一周的历史人脸识别,自动获取上一周的人脸识别中得到的多个相似度值,并对其进行分析并用于后续确定预设阈值的调整策略。For example, when the preset period is one week, after each week of historical face recognition, a plurality of similarity values obtained in the face recognition of the previous week are automatically obtained, analyzed and used for subsequent determination of the preset threshold adjustment strategy.
在一些实施例中,预设周期为预设的人脸识别次数,当人脸识别次数到达预设次数时,自动获取该预设次人脸识别得到的多个相似度值,并对其进行分析并用于后续确定预设阈值的调整策略。In some embodiments, the preset period is the preset number of times of face recognition, and when the number of times of face recognition reaches the preset number of times, a plurality of similarity values obtained by the preset face recognition are automatically obtained, and performed Analysis and adjustment strategies for subsequent determination of preset thresholds.
示例性地,当预设周期为经过100次人脸识别时,人脸识别次数达到100次时,自动获取这100次人脸识别得到的100个相似度值,并对其进行分析并用于后续确定预设阈值的调 整策略。Exemplarily, when the preset period is 100 times of face recognition, when the number of face recognition reaches 100 times, the 100 similarity values obtained by these 100 times of face recognition are automatically obtained, analyzed and used for subsequent Identify adjustment strategies for preset thresholds.
在一些实施例中,为了更好地提升用户体验,还可以将预设周期设置为预设的人脸识别失败次数,当人脸识别失败次数到达预设次数时,就触发对预设阈值的调整。通过自动获取该段时间内的人脸识别得到的多个相似度值,并对其进行分析并用于后续确定预设阈值的调整策略。In some embodiments, in order to better improve the user experience, the preset period can also be set to the preset number of face recognition failures. When the number of face recognition failures reaches the preset number of times, it will trigger the preset threshold Adjustment. The multiple similarity values obtained by face recognition within this period of time are automatically acquired, analyzed and used to subsequently determine an adjustment strategy for a preset threshold.
示例性地,当预设周期为经过10次人脸识别失败次数时,人脸识别失败的次数达到10次时,会自动触发对预设阈值的调整,通过获取这段时间内的多个相似度值,并对其进行分析并用于后续确定预设阈值的调整策略。Exemplarily, when the preset period is 10 times of face recognition failures, when the number of face recognition failures reaches 10 times, it will automatically trigger the adjustment of the preset threshold, by obtaining multiple similar The degree value is analyzed and used to subsequently determine the adjustment strategy for the preset threshold.
步骤S102、根据所述多个相似度值与预设阈值的比较结果确定所述预设阈值的调整策略。Step S102 , determining an adjustment strategy for the preset threshold according to a comparison result between the plurality of similarity values and a preset threshold.
在一实施方式中,根据多个相似度值与预设阈值的比较结果确定用于表示人脸识别成功的比值的第一比例和用于表示人脸识别失败的比值的第二比例,再根据所述第一比例和第二比例确定不同的所述预设阈值的调整策略。In one embodiment, according to the comparison results of multiple similarity values and the preset threshold value, the first ratio of the ratio used to indicate the success of face recognition and the second ratio of the ratio used to indicate the failure of face recognition are determined, and then according to The first ratio and the second ratio determine different adjustment strategies for the preset threshold.
其中,第一比例和第二比例的确定方法具体为,统计所述多个相似度值中大于或等于所述预设阈值的个数,根据所述多个相似度值的数量和所述大于或等于所述预设阈值的个数确定所述第一比例;统计所述多个相似度值中小于所述预设阈值的个数,根据所述多个相似度值的数量和所述小于所述预设阈值的个数确定所述第二比例。Wherein, the method for determining the first ratio and the second ratio specifically includes counting the number of the plurality of similarity values greater than or equal to the preset threshold, and according to the number of the plurality of similarity values and the greater than Or the number equal to the preset threshold value determines the first ratio; counts the number of the multiple similarity values smaller than the preset threshold value, and according to the number of the multiple similarity values and the smaller than the The number of the preset thresholds determines the second ratio.
在一些实施例中,当所述第一比例也即人脸识别成功的比值大于第一预设比例时,说明所述预设阈值过于保守,可以适当调高以保证用户的安全性。在这种情况下,所述预设阈值的调整策略为第一调整策略,所述第一调整策略为调高所述预设阈值。In some embodiments, when the first ratio, that is, the ratio of successful face recognition is greater than the first preset ratio, it means that the preset threshold is too conservative, and can be appropriately increased to ensure user safety. In this case, the adjustment strategy of the preset threshold is a first adjustment strategy, and the first adjustment strategy is to increase the preset threshold.
示例性地,当第一预设比例设定为95%且第一比例大于95%时,可以适当调高预设阈值,并将调高后的预设阈值用于之后的人脸识别。Exemplarily, when the first preset ratio is set to 95% and the first ratio is greater than 95%, the preset threshold may be appropriately increased, and the adjusted preset threshold may be used for subsequent face recognition.
在一些实施例中,当所述第二比例也即人脸识别失败的比值大于第二预设比例时,说明预设阈值偏高,或者该时间段内所处的环境属于异常场景,可以适当调低阈值以提升用户的体验。此时,所述预设阈值的调整策略为第二调整策略,所述第二调整策略为调低所述预设阈值。In some embodiments, when the second ratio, that is, the ratio of face recognition failures is greater than the second preset ratio, it means that the preset threshold is too high, or the environment during this time period belongs to an abnormal scene, which can be appropriately Lower the threshold to improve user experience. At this time, the adjustment strategy of the preset threshold is the second adjustment strategy, and the second adjustment strategy is to lower the preset threshold.
示例性地,当第二预设比例设定为90%且第二比例大于90%时,应该适当调低预设阈值,并将调低后的预设阈值用于之后的人脸识别。Exemplarily, when the second preset ratio is set to 90% and the second ratio is greater than 90%, the preset threshold should be appropriately lowered, and the lowered preset threshold should be used for subsequent face recognition.
在一实施方式中,所述第一调整策略和第二调整策略对应的调整幅度可以根据多个相似度值的均值与预设阈值的差值来确定。在一实施方式中,将多个相似度值进行均值滤波计算 得到的相似度均值作为预设阈值的参考值。根据预设阈值的参考值和调整之前的预设阈值之间的差值来确定调整后的预设阈值。公式表征为:In an implementation manner, the adjustment range corresponding to the first adjustment strategy and the second adjustment strategy may be determined according to a difference between an average of multiple similarity values and a preset threshold. In one embodiment, the mean value of the similarity obtained by performing mean filtering on a plurality of similarity values is used as a reference value of the preset threshold. The adjusted preset threshold is determined according to the difference between the reference value of the preset threshold and the preset threshold before adjustment. The formula is characterized as:
S new=S+0.1×(S t-S) S new =S+0.1×(S t -S)
其中,S new为调整后的预设阈值,S为调整之前的预设阈值,S t为预设阈值的参考值。 Wherein, S new is an adjusted preset threshold, S is a preset threshold before adjustment, and S t is a reference value of the preset threshold.
在一些实施例中,还可以对多个相似度值通过中位值平均滤波计算,去除多个相似度值中的最大值和最小值后计算得到的相似度均值作为预设阈值的参考值,以降低异常场景下极端值对相似度均值的影响。In some embodiments, multiple similarity values can also be calculated by median average filtering, and the average value of the similarity calculated after removing the maximum and minimum values among the multiple similarity values can be used as a reference value for the preset threshold, In order to reduce the impact of extreme values on the mean similarity in abnormal scenarios.
在一些实施例中,当第一比例也即人脸识别成功的比值大于第三预设比例且小于第一预设比例,且第二比例也即人脸识别失败的比值大于第四预设比例且小于第二预设比例时,这种情况下,多个相似度值在预设阈值上下波动,由此可以分析得知该段时间内的使用场景比较复杂,既存在正常场景,也存在一些异常场景,例如当前场景的光照条件频繁变化,对当前的预设阈值比较敏感。为了更好地提升用户使用体验,所述预设阈值的调整策略为第三调整策略,第三调整策略为调低所述预设阈值且调低所述预设阈值的幅度由预设幅度来确定。In some embodiments, when the first ratio, that is, the ratio of face recognition success is greater than the third preset ratio and smaller than the first preset ratio, and the second ratio, that is, the ratio of face recognition failure is greater than the fourth preset ratio and is less than the second preset ratio, in this case, multiple similarity values fluctuate up and down the preset threshold, so it can be analyzed that the usage scenarios during this period of time are relatively complex, and there are both normal scenarios and some Abnormal scenes, such as frequent changes in the lighting conditions of the current scene, are more sensitive to the current preset threshold. In order to better improve user experience, the adjustment strategy of the preset threshold is the third adjustment strategy, the third adjustment strategy is to lower the preset threshold and the range of lowering the preset threshold is determined by the preset range Sure.
示例性地,如将第三预设比例设定为40%,第四预设比例设定为50%,当第一比例也即人脸识别成功的比例大于40%且小于95%,且第二比例也即人脸识别失败的比例大于50%,且小于80%时,说明相似度值在预设阈值的上下波动,为了更好地适应各种场景,此时应当调低预设阈值。Exemplarily, if the third preset ratio is set to 40%, and the fourth preset ratio is set to 50%, when the first ratio, that is, the ratio of successful face recognition is greater than 40% and less than 95%, and the second When the second ratio, that is, the proportion of face recognition failures is greater than 50% and less than 80%, it indicates that the similarity value fluctuates around the preset threshold. In order to better adapt to various scenarios, the preset threshold should be lowered at this time.
需要说明的是,当相似度值在预设阈值上下波动时,如根据多个相似度的均值来确定预设阈值的调整幅度,由于多个相似度值中大于等于预设阈值和小于预设阈值的分布情况比较接近,此时根据多个相似度的均值得到的预设阈值的参考值可能和调整之前的原阈值比较接近。因而,在这种情况下,将预设幅度作为预设阈值的调整幅度,预设幅度的具体数值可以根据实验数据和人脸识别的实际使用场景来确定,本申请对此不作限定。It should be noted that when the similarity value fluctuates above and below the preset threshold, if the adjustment range of the preset threshold is determined according to the average value of multiple similarities, since the multiple similarity values are greater than or equal to the preset threshold and less than the preset The distribution of the thresholds is relatively close. At this time, the reference value of the preset threshold obtained according to the average value of multiple similarities may be relatively close to the original threshold before adjustment. Therefore, in this case, the preset range is used as the adjustment range of the preset threshold, and the specific value of the preset range can be determined according to experimental data and actual usage scenarios of face recognition, which is not limited in the present application.
需要说明的是,所述第一预设比例、第二预设比例、第三预设比例以及第四预设比例,可以根据实验数据及人脸识别具体的应用场景预先确定,本申请对此不作限定。It should be noted that the first preset ratio, the second preset ratio, the third preset ratio, and the fourth preset ratio can be predetermined according to experimental data and specific application scenarios of face recognition. Not limited.
步骤S103、根据确定的所述调整策略调整所述预设阈值,并将调整后的预设阈值用于人脸识别比较。Step S103. Adjust the preset threshold according to the determined adjustment strategy, and use the adjusted preset threshold for face recognition comparison.
在一实施方式中,根据历史人脸识别的多个相似度值确定预设阈值的调整策略后,基于调整策略中包含的调高或调低的策略以及调整幅度对预设阈值进行调整,之后将调整后的预设阈值用于之后的人脸识别,直到下一次的预设阈值的调整被触发。In one embodiment, after the adjustment strategy of the preset threshold is determined according to multiple similarity values of historical face recognition, the preset threshold is adjusted based on the strategy of increasing or decreasing and the adjustment range included in the adjustment strategy, and then The adjusted preset threshold is used for subsequent face recognition until the next adjustment of the preset threshold is triggered.
由于人脸识别的应用场景非常广泛,在一些应用场景下,人脸识别的阈值可以通过注册 用户的终端设备与终端对应的用户进行关联,并且支持单独对某一注册用户的预设阈值进行调整,例如人脸识别门禁考勤系统,人脸识别防盗门。在另外一些应用场景中,人脸识别的阈值是通用于所有注册用户,不支持对某一个注册用户的预设阈值单独调整,例如住宅小区内的人脸识别智能门禁系统。因此对预设阈值的调整根据实际的应用场景可以分为单独统计分析来自于同一个注册用户或不同的注册用户的多个相似度值,并根据对多个相似度值的分析结果来调整该同一个注册用户的预设阈值或者不同注册用户的预设阈值。Due to the wide range of application scenarios of face recognition, in some application scenarios, the threshold of face recognition can be associated with the corresponding user of the terminal through the terminal device of the registered user, and the preset threshold of a registered user can be adjusted separately , such as face recognition access control attendance system, face recognition anti-theft door. In other application scenarios, the threshold of face recognition is common to all registered users, and does not support individual adjustment of the preset threshold of a certain registered user, such as the face recognition intelligent access control system in residential quarters. Therefore, the adjustment of the preset threshold can be divided into separate statistical analysis of multiple similarity values from the same registered user or different registered users according to the actual application scenario, and adjust the threshold according to the analysis results of multiple similarity values. The preset threshold for the same registered user or the preset threshold for different registered users.
在一些实施例中,当所述多个相似度值来自于同一个注册用户时,确定的所述调整策略用于调整所述同一个注册用户进行人脸识别的预设阈值。In some embodiments, when the multiple similarity values are from the same registered user, the determined adjustment policy is used to adjust the preset threshold for face recognition performed by the same registered user.
示例性地,在人脸识别门禁考勤系统中,门禁考勤系统通过用户的终端设备与每个注册用户关联,启用人脸识别方法时,所有注册用户的预设阈值的初始值是相同的,之后根据每一个注册用户在历史人脸识别中的相似度值和预设阈值的比较结果,单独对某一个注册用户的预设阈值进行调整。Exemplarily, in the face recognition access control time attendance system, the access control time attendance system is associated with each registered user through the user's terminal device. When the face recognition method is enabled, the initial value of the preset threshold of all registered users is the same, and then According to the comparison result between the similarity value of each registered user in the historical face recognition and the preset threshold value, the preset threshold value of a certain registered user is individually adjusted.
在一些实施例中,当所述多个相似度值来自不同的注册用户时,确定的所述调整策略用于调整所述不同的注册用户进行人脸识别的预设阈值。In some embodiments, when the multiple similarity values are from different registered users, the determined adjustment strategy is used to adjust the preset thresholds for face recognition performed by the different registered users.
示例性地,住宅小区内的人脸识别智能门禁系统,由于可以不通过设备与住宅区内的每个注册用户关联,根据这段时间内使用该人脸识别智能门禁系统的所有注册用户的相似度值来确定预设阈值的调整策略,调整后的预设阈值也用于所有在该门禁系统中注册的注册用户进行人脸识别。Exemplarily, the face recognition intelligent access control system in a residential area may not be associated with each registered user in the residential area through a device, according to the similarity of all registered users who use the face recognition intelligent access control system within this period The degree value is used to determine the adjustment strategy of the preset threshold, and the adjusted preset threshold is also used for face recognition by all registered users registered in the access control system.
为使本公开的目的、技术方案和优点更加清楚明白,下文中将结合附图对本公开的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solution and advantages of the present disclosure clearer, the embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.
实施例一Embodiment one
本实施例中公开了一种人脸识别方法,该人脸识别方法应用于远程控制场景下的智能门禁系统,该方法包括以下步骤。This embodiment discloses a face recognition method, which is applied to an intelligent access control system in a remote control scene, and the method includes the following steps.
步骤S1:对预先录入人脸特征库的注册人脸图像进行处理,先利用SSD人脸检测网络进行人脸区域检测,再将提取到的人脸图像区域输入到MobileFaceNet人脸识别网络进行特征提取,得到注册人脸图像特征并加以保存。Step S1: Process the registered face images that are pre-entered into the face feature database, first use the SSD face detection network to detect face regions, and then input the extracted face image regions to the MobileFaceNet face recognition network for feature extraction , get the registered face image features and save them.
步骤S2:在用户使用人脸图像用于解锁门禁的过程中,记录用户每次解锁门禁时的相似度值。在一实施方式中,每次进行人脸识别时,通过前置摄像头采集用户的人脸图像,并提取采集到的人脸图像特征。提取特征也是先通过SSD人脸检测网络进行人脸检测,再将检测 到的人脸图像输入MobileFaceNet人脸识别网络提取人脸图像特征,将提取到的人脸图像特征和注册人脸图像特征进行匹配,计算相似度值。若计算出的相似度值大于或等于预设阈值,则能够成功解锁门禁,反之则解锁失败。Step S2: When the user uses the face image to unlock the access control, record the similarity value when the user unlocks the access control each time. In one embodiment, each time face recognition is performed, the user's face image is collected through the front camera, and features of the collected face image are extracted. Extracting features is also to perform face detection through the SSD face detection network first, and then input the detected face image into the MobileFaceNet face recognition network to extract face image features, and perform the extracted face image features and registered face image features Match, calculate the similarity value. If the calculated similarity value is greater than or equal to the preset threshold, the access control can be successfully unlocked, otherwise, the unlocking fails.
在此过程中,如果用户通过人脸图像成功解锁,则记录解锁成功时的相似度值;如果用户无法通过人脸解锁门禁,且无后续的动作,则认为当前人员非注册用户,本次的人脸相似度值不予记录。如果用户在通过人脸图像解锁失败后,输入了密码进行解锁,则认为当前用户为注册用户,当前环境属于异常场景,记录最后一次解锁失败时的相似度值。During this process, if the user successfully unlocks the access control through the face image, record the similarity value when the unlock is successful; The face similarity value is not recorded. If the user enters a password to unlock after failing to unlock through the face image, the current user is considered to be a registered user, and the current environment belongs to an abnormal scene, and the similarity value at the time of the last unlocking failure is recorded.
步骤S3:根据系统设定的预设周期参数,对当前周期内的相似度值进行统计。在本实施例中,预设周期设定为通过人脸识别解锁100次,当用户解锁门禁达到100次时,自动触发相似度值的统计分析以及预设阈值的调整。Step S3: According to the preset cycle parameters set by the system, the similarity value in the current cycle is counted. In this embodiment, the preset cycle is set to unlock 100 times through face recognition. When the user unlocks the access control 100 times, the statistical analysis of the similarity value and the adjustment of the preset threshold are automatically triggered.
步骤S4:根据统计到的相似度值与预设阈值的比较结果,确定不同的调整策略,具体如下:Step S4: According to the comparison result of the statistical similarity value and the preset threshold, determine different adjustment strategies, as follows:
如100次中有96次解锁成功,说明调整前的预设阈值对当前用户而言偏保守,可以调高阈值,以提高门禁系统的安全性。For example, 96 times out of 100 are unlocked successfully, indicating that the preset threshold before adjustment is conservative for the current user, and the threshold can be increased to improve the security of the access control system.
如100次中有82次解锁失败,说明当前周期内频繁解锁失败,说明用户频繁处于异常场景,为了提高用户体验,需要调低预设阈值。调整幅度根据对这100次人脸识别得到的相似度值通过中位值平均滤波法计算的均值来确定,去除最大值和最小值后得到的相似度均值作为预设阈值的参考值,并根据预设阈值的参考值对预设阈值进行调整。For example, 82 unlocking failures out of 100 times indicate frequent unlocking failures in the current period, indicating that the user is frequently in abnormal situations. In order to improve user experience, the preset threshold needs to be lowered. The adjustment range is determined based on the mean value calculated by the median average filtering method for the similarity values obtained from these 100 face recognitions, and the average similarity value obtained after removing the maximum and minimum values is used as a reference value for the preset threshold, and according to The reference value of the preset threshold adjusts the preset threshold.
如100次中有45次解锁成功,55次解锁失败,说明当前周期内人脸相似度值在阈值上下波动,此时用户的使用场景比较复杂,既存在正常场景,也存在一些异常场景,为了提升用户的体验,使得人脸识别方法可以适应不同环境,可以调低预设阈值,调整的幅度可以设置为0.5。For example, 45 times out of 100 are unlocked successfully and 55 times failed, indicating that the face similarity value fluctuates above and below the threshold in the current period. To improve the user experience, the face recognition method can be adapted to different environments, the preset threshold can be lowered, and the adjustment range can be set to 0.5.
步骤S5:将调整后的预设阈值用于之后的人脸识别比较,直到下一次预设阈值调整被触发。Step S5: Use the adjusted preset threshold for subsequent face recognition comparisons until the next preset threshold adjustment is triggered.
本公开实施例通过分析用户在历史人脸识别过程中的多个相似度值,确定预设阈值的调整策略并对预设阈值进行动态调整。当一段时期内的待识别人脸图像和注册人脸图像的相似度很高时,则调高预设阈值,调高抗假体攻击能力。当一段时期内的待识别人脸图像和注册人脸图像相似度在阈值上下波动,导致用户解锁体验不好,则适当调低预设阈值,在保证安全的情况下降低对用户的误拒率。在不改动原有人脸识别模型的情况下,使得人脸识别方法可以适应不同环境,改善了用户的体验。In the embodiments of the present disclosure, by analyzing multiple similarity values of a user in a historical face recognition process, an adjustment strategy for a preset threshold is determined and the preset threshold is dynamically adjusted. When the similarity between the face image to be recognized and the registered face image in a period of time is very high, the preset threshold is increased to increase the anti-prosthesis attack capability. When the similarity between the face image to be recognized and the registered face image fluctuates above and below the threshold for a period of time, resulting in a poor unlocking experience for the user, the preset threshold is appropriately lowered to reduce the false rejection rate for users while ensuring safety . Without changing the original face recognition model, the face recognition method can be adapted to different environments, and the user experience is improved.
请参阅图2,图2为本公开实施例提供的一种人脸识别设备的结构示意性框图。Please refer to FIG. 2 . FIG. 2 is a schematic structural block diagram of a face recognition device provided by an embodiment of the present disclosure.
如图2所示,人脸识别设备300包括处理器301和存储器302,处理器301和存储器302通过总线303连接,该总线比如为I2C(Inter-integrated Circuit)总线。As shown in FIG. 2, the face recognition device 300 includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected through a bus 303, such as an I2C (Inter-integrated Circuit) bus.
在一实施方式中,处理器301用于提供计算和控制能力,支撑整个人脸识别设备的运行。处理器301可以是中央处理单元(Central Processing Unit,CPU),该处理器301还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。In one embodiment, the processor 301 is used to provide computing and control capabilities to support the operation of the entire face recognition device. The processor 301 can be a central processing unit (Central Processing Unit, CPU), and the processor 301 can also be other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein, the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
在一实施方式中,存储器302可以是Flash芯片、只读存储器(ROM,Read-Only Memory)磁盘、光盘、U盘或移动硬盘等。In one embodiment, the memory 302 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
本领域技术人员可以理解,图2中示出的结构,仅仅是与本公开实施例方案相关的部分结构的框图,并不构成对本公开实施例方案所应用于其上的人脸识别设备的限定,具体的服务器可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 2 is only a block diagram of a partial structure related to the embodiment of the present disclosure, and does not constitute a limitation on the face recognition device to which the embodiment of the present disclosure is applied. , a particular server may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
其中,所述处理器用于运行存储在存储器中的计算机程序,并在执行所述计算机程序时实现本公开实施例提供的任意一种所述的人脸识别方法。Wherein, the processor is configured to run a computer program stored in the memory, and implement any one of the face recognition methods provided by the embodiments of the present disclosure when executing the computer program.
在一实施例中,所述处理器用于运行存储在存储器中的计算机程序,并在执行所述计算机程序时实现如下步骤:获取历史人脸识别中的多个相似度值,其中,所述相似度值为历史人脸识别中人脸图像与注册人脸图像的相似度;根据所述多个相似度值与预设阈值的比较结果确定所述预设阈值的调整策略;根据确定的所述调整策略调整所述预设阈值,并将调整后的预设阈值用于人脸识别比较。In one embodiment, the processor is configured to run a computer program stored in a memory, and implement the following steps when executing the computer program: obtain a plurality of similarity values in historical face recognition, wherein the similarity The degree value is the similarity between the face image in the historical face recognition and the registered face image; determine the adjustment strategy of the preset threshold according to the comparison results of the multiple similarity values and the preset threshold; according to the determined The adjustment strategy adjusts the preset threshold, and uses the adjusted preset threshold for face recognition comparison.
在一实施例中,所述处理器在实现根据所述多个相似度值与预设阈值的比较结果确定所述预设阈值的调整策略时,用于实现:根据所述比较结果确定第一比例和第二比例,其中,所述第一比例用于表示人脸识别成功的比值,所述第二比例用于表示人脸识别失败的比值。统计所述多个相似度值中大于或等于所述预设阈值的个数,根据所述多个相似度值的数量和所述大于或等于所述预设阈值的个数确定所述第一比例;统计所述多个相似度值中小于所述预设阈值的个数,根据所述多个相似度值的数量和所述小于所述预设阈值的个数确定所述第二比例;根据所述第一比例和第二比例确定所述预设阈值的调整策略。In an embodiment, when the processor realizes the adjustment strategy of determining the preset threshold according to the comparison result of the multiple similarity values and the preset threshold, it is configured to: determine the first threshold according to the comparison result. A ratio and a second ratio, wherein the first ratio is used to represent the ratio of successful face recognition, and the second ratio is used to represent the ratio of failed face recognition. counting the number of the multiple similarity values greater than or equal to the preset threshold, and determining the first Proportion; counting the number of the multiple similarity values smaller than the preset threshold, and determining the second ratio according to the number of the multiple similarity values and the number smaller than the preset threshold; An adjustment strategy for the preset threshold is determined according to the first ratio and the second ratio.
在一实施例中,所述处理器在实现根据所述第一比例和第二比例确定不同的所述预设阈值的调整策略时,用于实现:当所述第一比例大于第一预设比例时,所述预设阈值的调整策 略为第一调整策略,所述第一调整策略为调高所述预设阈值;当所述第二比例大于第二预设比例时,所述预设阈值的调整策略为第二调整策略,所述第二调整策略为调低所述预设阈值。In an embodiment, when the processor realizes the adjustment strategy of determining different preset thresholds according to the first ratio and the second ratio, it is configured to realize: when the first ratio is greater than a first preset ratio, the adjustment strategy of the preset threshold is the first adjustment strategy, and the first adjustment strategy is to increase the preset threshold; when the second ratio is greater than the second preset ratio, the preset The threshold adjustment strategy is a second adjustment strategy, and the second adjustment strategy is to lower the preset threshold.
在一实施例中,所述处理器在实现所述人脸识别方法时,用于实现:所述第一调整策略和第二调整策略对应的调整幅度根据所述多个相似度值的均值与所述预设阈值的差值来确定。In an embodiment, when the processor implements the face recognition method, it is configured to implement: the adjustment range corresponding to the first adjustment strategy and the second adjustment strategy is based on the mean value and the value of the plurality of similarity values The difference between the preset thresholds is determined.
在一实施例中,所述处理器在实现根据所述第一比例和第二比例确定不同的所述预设阈值的调整策略时,用于实现:当所述第一比例大于第三预设比例且小于所述第一预设比例,且所述第二比例大于第四预设比例且小于所述第二预设比例时,所述预设阈值的调整策略第三调整策略,所述第三调整策略为调低所述预设阈值且调低所述预设阈值的幅度由预设幅度来确定。In an embodiment, when the processor realizes the adjustment strategy of determining different preset thresholds according to the first ratio and the second ratio, it is configured to realize: when the first ratio is greater than a third preset When the ratio is smaller than the first preset ratio, and the second ratio is larger than the fourth preset ratio and smaller than the second preset ratio, the adjustment strategy of the preset threshold is the third adjustment strategy, the first The third adjustment strategy is to lower the preset threshold, and the range of lowering the preset threshold is determined by the preset range.
在一实施例中,所述处理器在实现人脸识别方法时,用于实现:所述多个相似度值来自于同一个注册用户或不同的注册用户;当所述多个相似度值来自于同一个注册用户时,确定的所述调整策略用于调整所述同一个注册用户进行人脸识别的预设阈值;当所述多个相似度值来自不同的注册用户时,确定的所述调整策略用于调整所述不同的注册用户进行人脸识别的预设阈值。In one embodiment, when the processor implements the face recognition method, it is used to realize that: the multiple similarity values are from the same registered user or different registered users; when the multiple similarity values are from When the same registered user, the determined adjustment strategy is used to adjust the preset threshold for face recognition of the same registered user; when the multiple similarity values are from different registered users, the determined The adjustment strategy is used to adjust the preset threshold for face recognition of the different registered users.
在一实施例中,所述处理器在实现人脸识别方法时,用于实现:在记录所述历史人脸识别中的多个相似度值时,当历史人脸识别中的人脸图像与所述注册人脸图像的相似度值小于所述预设阈值时,进一步确认所述人脸图像对应的用户是否为已注册用户;确认所述人脸图像对应的用户为注册用户时,记录最后一次匹配不成功时计算得到的相似度值;确认所述人脸图像对应的用户为非注册用户时,不记录基于所述人脸图像计算得到的相似度值。In an embodiment, when implementing the face recognition method, the processor is configured to realize: when recording multiple similarity values in the historical face recognition, when the face image in the historical face recognition is consistent with When the similarity value of the registered face image is less than the preset threshold, further confirm whether the user corresponding to the face image is a registered user; when confirming that the user corresponding to the face image is a registered user, record the last The similarity value calculated when a matching is unsuccessful; when it is confirmed that the user corresponding to the face image is a non-registered user, the similarity value calculated based on the face image is not recorded.
在一实施例中,所述处理器在实现所述人脸识别方法时,用于实现:所述历史人脸识别为预设周期内的历史人脸识别,所述预设周期包括:预设时长、预设的人脸识别次数或预设的人脸识别失败次数。In an embodiment, when implementing the face recognition method, the processor is configured to realize: the historical face recognition is historical face recognition within a preset period, and the preset period includes: preset The duration, the preset number of times of face recognition or the preset number of times of failed face recognition.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的人脸识别设备的具体工作过程,可以参考前述人脸识别方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the face recognition device described above can refer to the corresponding process in the aforementioned embodiment of the face recognition method. This will not be repeated here.
本公开实施例还提供一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如本公开实施例说明书提供的任一项人脸识别方法的步骤。An embodiment of the present disclosure also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following: The steps of any face recognition method provided in the description of the embodiments of the present disclosure.
其中,所述存储介质可以是前述实施例所述的人脸识别设备的内部存储单元,例如所述 人脸识别设备的硬盘或内存。所述存储介质也可以是所述人脸识别设备的外部存储设备,例如所述人脸识别设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。Wherein, the storage medium may be an internal storage unit of the face recognition device described in the foregoing embodiments, such as a hard disk or a memory of the face recognition device. The storage medium can also be an external storage device of the face recognition device, such as a plug-in hard disk equipped on the face recognition device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施例中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof. In hardware embodiments, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
应当理解,在本公开说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be understood that the term "and/or" used in the present disclosure and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. It should be noted that, as used herein, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。以上所述,仅为本公开的具体实施例,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。The serial numbers of the above-mentioned embodiments of the present disclosure are for description only, and do not represent the advantages and disadvantages of the embodiments. The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art can easily think of various equivalents within the technical scope of the present disclosure. Modifications or replacements should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be determined by the protection scope of the claims.

Claims (10)

  1. 一种人脸识别方法,其中,包括:A face recognition method, comprising:
    获取历史人脸识别中的多个相似度值,其中,所述相似度值为历史人脸识别中人脸图像与注册人脸图像的相似度;Obtaining a plurality of similarity values in historical face recognition, wherein the similarity value is the similarity between a face image in historical face recognition and a registered face image;
    根据所述多个相似度值与预设阈值的比较结果确定所述预设阈值的调整策略;determining an adjustment strategy for the preset threshold according to a comparison result between the plurality of similarity values and a preset threshold;
    根据确定的所述调整策略调整所述预设阈值,并将调整后的预设阈值用于人脸识别比较。The preset threshold is adjusted according to the determined adjustment policy, and the adjusted preset threshold is used for face recognition comparison.
  2. 根据权利要求1所述的人脸识别方法,其中,所述根据所述多个相似度值与预设阈值的比较结果确定所述预设阈值的调整策略,包括:The face recognition method according to claim 1, wherein the adjustment strategy for determining the preset threshold based on the comparison result of the plurality of similarity values and the preset threshold includes:
    根据所述比较结果确定第一比例和第二比例,其中,所述第一比例用于表示人脸识别成功的比值,所述第二比例用于表示人脸识别失败的比值;Determine a first ratio and a second ratio according to the comparison result, wherein the first ratio is used to represent the ratio of successful face recognition, and the second ratio is used to represent the ratio of failed face recognition;
    统计所述多个相似度值中大于或等于所述预设阈值的个数,根据所述多个相似度值的数量和所述大于或等于所述预设阈值的个数确定所述第一比例;counting the number of the multiple similarity values greater than or equal to the preset threshold, and determining the first Proportion;
    统计所述多个相似度值中小于所述预设阈值的个数,根据所述多个相似度值的数量和所述小于所述预设阈值的个数确定所述第二比例;Counting the number of the multiple similarity values smaller than the preset threshold, and determining the second ratio according to the number of the multiple similarity values and the number smaller than the preset threshold;
    根据所述第一比例和第二比例确定所述预设阈值的调整策略。An adjustment strategy for the preset threshold is determined according to the first ratio and the second ratio.
  3. 根据权利要求2所述的人脸识别方法,其中,根据所述第一比例和第二比例确定所述预设阈值的调整策略,包括:The face recognition method according to claim 2, wherein determining the adjustment strategy of the preset threshold according to the first ratio and the second ratio includes:
    当所述第一比例大于第一预设比例时,所述预设阈值的调整策略为第一调整策略,所述第一调整策略为调高所述预设阈值;When the first ratio is greater than the first preset ratio, the adjustment strategy of the preset threshold is a first adjustment strategy, and the first adjustment strategy is to increase the preset threshold;
    当所述第二比例大于第二预设比例时,所述预设阈值的调整策略为第二调整策略,所述第二调整策略为调低所述预设阈值。When the second ratio is greater than the second preset ratio, the adjustment strategy of the preset threshold is a second adjustment strategy, and the second adjustment strategy is to lower the preset threshold.
  4. 根据权利要求3所述的人脸识别方法,其中,所述第一调整策略和第二调整策略对应的调整幅度根据所述多个相似度值的均值与所述预设阈值的差值来确定。The face recognition method according to claim 3, wherein the adjustment range corresponding to the first adjustment strategy and the second adjustment strategy is determined according to the difference between the average of the multiple similarity values and the preset threshold .
  5. 根据权利要求2所述的人脸识别方法,其中,所述根据所述第一比例和第二比例确定所述预设阈值的调整策略,包括:The face recognition method according to claim 2, wherein the adjustment strategy for determining the preset threshold according to the first ratio and the second ratio includes:
    当所述第一比例大于第三预设比例且小于所述第一预设比例,且所述第二比例大于第四预设比例且小于所述第二预设比例时,所述预设阈值的调整策略为第三调整策略,所述第三调整策略为调低所述预设阈值且调低所述预设阈值的幅度由预设幅度来确定。When the first ratio is greater than the third preset ratio and smaller than the first preset ratio, and the second ratio is larger than the fourth preset ratio and smaller than the second preset ratio, the preset threshold The adjustment strategy is a third adjustment strategy, the third adjustment strategy is to lower the preset threshold and the range of lowering the preset threshold is determined by the preset range.
  6. 根据权利要求1所述的人脸识别方法,其中,所述多个相似度值来自于同一个注册用户或不同的注册用户;The face recognition method according to claim 1, wherein the multiple similarity values are from the same registered user or different registered users;
    当所述多个相似度值来自于同一个注册用户时,确定的所述调整策略用于调整所述同一个注册用户进行人脸识别的预设阈值;When the multiple similarity values come from the same registered user, the determined adjustment strategy is used to adjust the preset threshold for face recognition of the same registered user;
    当所述多个相似度值来自不同的注册用户时,确定的所述调整策略用于调整所述不同的注册用户进行人脸识别的预设阈值。When the multiple similarity values are from different registered users, the determined adjustment strategy is used to adjust the preset thresholds for face recognition performed by the different registered users.
  7. 根据权利要求1所述的人脸识别方法,其中,还包括:The face recognition method according to claim 1, further comprising:
    在记录所述历史人脸识别中的多个相似度值时,当历史人脸识别中的人脸图像与所述注册人脸图像的相似度值小于所述预设阈值时,进一步确认所述人脸图像对应的用户是否为已注册用户;When recording multiple similarity values in the historical face recognition, when the similarity value between the face image in the historical face recognition and the registered face image is less than the preset threshold, further confirm the Whether the user corresponding to the face image is a registered user;
    确认所述人脸图像对应的用户为注册用户时,记录最后一次匹配不成功时计算得到的相似度值;When confirming that the user corresponding to the face image is a registered user, record the similarity value calculated when the last matching is unsuccessful;
    确认所述人脸图像对应的用户为非注册用户时,不记录基于所述人脸图像计算得到的相似度值。When it is confirmed that the user corresponding to the face image is a non-registered user, the similarity value calculated based on the face image is not recorded.
  8. 根据权利要求1至7中任一项所述的人脸识别方法,其中,所述历史人脸识别为预设周期内的历史人脸识别,所述预设周期包括:预设时长、预设的人脸识别次数或预设的人脸识别失败次数。The face recognition method according to any one of claims 1 to 7, wherein the historical face recognition is historical face recognition within a preset period, and the preset period includes: preset duration, preset The number of face recognition times or the preset number of face recognition failures.
  9. 一种人脸识别设备,其中,所述人脸识别设备包括处理器、存储器、存储在所述存储器上并可被所述处理器执行的计算机程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,其中所述计算机程序被所述处理器执行时,实现如权利要求1至8中任一项所述的人脸识别方法的步骤。A face recognition device, wherein the face recognition device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a computer program for implementing the processor and the memory A data bus connecting and communicating between them, wherein when the computer program is executed by the processor, the steps of the face recognition method according to any one of claims 1 to 8 are realized.
  10. 一种存储介质,用于计算机可读存储,其中,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至8中任一项所述的人脸识别方法的步骤。A storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement claims 1 to 8 The steps of any one of the face recognition methods.
PCT/CN2022/083552 2021-07-06 2022-03-29 Facial recognition method, device, and storage medium WO2023279783A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110765422.8 2021-07-06
CN202110765422.8A CN115588216A (en) 2021-07-06 2021-07-06 Face recognition method, face recognition equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023279783A1 true WO2023279783A1 (en) 2023-01-12

Family

ID=84772322

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083552 WO2023279783A1 (en) 2021-07-06 2022-03-29 Facial recognition method, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115588216A (en)
WO (1) WO2023279783A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109858447A (en) * 2019-01-31 2019-06-07 维沃移动通信有限公司 A kind of information processing method and terminal
US20190213420A1 (en) * 2018-01-09 2019-07-11 Qualcomm Incorporated Adaptive object detection and recognition
CN111783058A (en) * 2020-07-21 2020-10-16 青岛海信智慧家居系统股份有限公司 Biological feature recognition device and biological feature recognition method
CN112906568A (en) * 2020-07-16 2021-06-04 云从科技集团股份有限公司 Dynamic threshold management method, system, electronic device and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190213420A1 (en) * 2018-01-09 2019-07-11 Qualcomm Incorporated Adaptive object detection and recognition
CN109858447A (en) * 2019-01-31 2019-06-07 维沃移动通信有限公司 A kind of information processing method and terminal
CN112906568A (en) * 2020-07-16 2021-06-04 云从科技集团股份有限公司 Dynamic threshold management method, system, electronic device and medium
CN111783058A (en) * 2020-07-21 2020-10-16 青岛海信智慧家居系统股份有限公司 Biological feature recognition device and biological feature recognition method

Also Published As

Publication number Publication date
CN115588216A (en) 2023-01-10

Similar Documents

Publication Publication Date Title
US8340366B2 (en) Face recognition system
US9817982B2 (en) Identity authentication system
WO2019091012A1 (en) Security check method based on facial recognition, application server, and computer readable storage medium
JP2018508875A (en) Method and apparatus for biological face detection
JP2017091520A (en) Methods and apparatuses for adaptively updating enrollment database for user authentication
EP3357210B1 (en) System and method for person reidentification
TWI679584B (en) Human recognition method based on data fusion
CN103856614A (en) Method and device for avoiding error hibernation of mobile terminal
WO2021082548A1 (en) Living body testing method and apparatus, server and facial recognition device
US8995728B1 (en) Visual security mechanism for a device with a front-facing camera
JP5618295B2 (en) Authentication system and authentication reliability determination method
US11281922B2 (en) Face recognition system, method for establishing data of face recognition, and face recognizing method thereof
CN109684993B (en) Face recognition method, system and equipment based on nostril information
CN110717428A (en) Identity recognition method, device, system, medium and equipment fusing multiple features
WO2016110024A1 (en) Terminal unlock method and device based on eye-print identification
JP2007249587A (en) Authentication device, authentication method, authentication program and computer readable recording medium having the same recorded thereon
CN112183167B (en) Attendance checking method, authentication method, living body detection method, device and equipment
CN113837006B (en) Face recognition method and device, storage medium and electronic equipment
CN111611437A (en) Method and device for preventing face voiceprint verification and replacement attack
US10311290B1 (en) System and method for generating a facial model
WO2023279783A1 (en) Facial recognition method, device, and storage medium
US20120219192A1 (en) Method of controlling a session at a self-service terminal, and a self-service terminal
CN114898475A (en) Underground personnel identity identification method and device, electronic equipment and readable storage medium
JP2014067352A (en) Apparatus, method, and program for biometric authentication
JP2016110467A (en) Collation system, collation method, face-to-face collation system, and walk-through collation system

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 22836542

Country of ref document: EP

Kind code of ref document: A1