CN111523405A - Face recognition method and system and electronic equipment - Google Patents

Face recognition method and system and electronic equipment Download PDF

Info

Publication number
CN111523405A
CN111523405A CN202010268858.1A CN202010268858A CN111523405A CN 111523405 A CN111523405 A CN 111523405A CN 202010268858 A CN202010268858 A CN 202010268858A CN 111523405 A CN111523405 A CN 111523405A
Authority
CN
China
Prior art keywords
feature vector
vector data
neural network
network model
authenticated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010268858.1A
Other languages
Chinese (zh)
Inventor
张官兴
王赟
郭蔚
黄康莹
张铁亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Ewa Intelligent Technology Co ltd
Shaoxing Ewa Technology Co Ltd
Original Assignee
Shanghai Ewa Intelligent Technology Co ltd
Shaoxing Ewa Technology Co Ltd
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 Shanghai Ewa Intelligent Technology Co ltd, Shaoxing Ewa Technology Co Ltd filed Critical Shanghai Ewa Intelligent Technology Co ltd
Priority to CN202010268858.1A priority Critical patent/CN111523405A/en
Publication of CN111523405A publication Critical patent/CN111523405A/en
Pending legal-status Critical Current

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/168Feature extraction; Face representation
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Abstract

A face recognition method, comprising: acquiring facial image data to be authenticated, a first neural network model, a second neural network model, first registered user feature vector data and second registered user feature vector data; extracting coarse-grained features of the image by using the first neural network model, and extracting fine-grained features of the image by using the second neural network model; extracting first to-be-authenticated user face feature vector data in to-be-authenticated face image data by using a first neural network model; and when the first comparison result passes, continuing to execute the next round of authentication by using the second neural network model, the second registered user feature vector data and the to-be-authenticated face image data, otherwise, failing to authenticate or retrying. The advantages are that: and performing first low-precision identification blocking part illegal authentication and false triggering authentication on the user to be authenticated through the first neural network model.

Description

Face recognition method and system and electronic equipment
Technical Field
The present application relates to the field of face recognition technologies, and in particular, to a face recognition method, a face recognition system, and an electronic device.
Background
With the development of computer technology, Face Recognition (Face Recognition) technology is applied to various intelligent terminal devices, such as mobile phones, tablet computers, intelligent door locks, and the like.
For the face recognition method, the conventional technical means in the prior art mainly includes acquiring current face image data through acquisition equipment such as a camera, inputting the current face image data into a processor such as a special image processor, extracting user face feature data by using a specific algorithm such as a neural network algorithm after detecting and aligning key points in a face image through the processor, and then performing similarity comparison with the extracted user face feature data by loading registered template face feature data prestored in an external memory, thereby realizing face recognition.
The above conventional methods have disadvantages in that: the authentication of an illegal user or the authentication triggered by a behavior error can not be effectively limited, and further, unnecessary energy loss in subsequent loading of corresponding subsystems and image processing processes is caused.
Disclosure of Invention
Accordingly, it is desirable to provide a face recognition method, a face recognition system and an electronic device for solving the above technical problems.
A face recognition method is characterized by comprising the following steps:
the method comprises the steps of obtaining facial image data to be authenticated, a first neural network model, a second neural network model, first registered user feature vector data and second registered user feature vector data, wherein the first neural network model extracts image coarse-grained features, and the second neural network model extracts image fine-grained features;
extracting first to-be-authenticated user face feature vector data in the to-be-authenticated face image data by using the first neural network model;
and comparing the similarity of the first to-be-authenticated user face feature vector data with the first registered user feature vector data to obtain a first comparison result, and when the first comparison result passes through, continuing to execute the next round of authentication by using the second neural network model, the second registered user feature vector data and the to-be-authenticated face image data, otherwise, failing to authenticate or retrying.
In the above face recognition method, the next round of authentication specifically includes:
extracting second to-be-authenticated user face feature vector data in the to-be-authenticated face image data by using the second neural network model;
and comparing the similarity of the second to-be-authenticated user face feature vector data with the second registered user feature vector data to obtain a second comparison result.
In the above face recognition method, the step of comparing the first to-be-authenticated user face feature vector data with the first registered user feature vector data for the first time to obtain the first comparison result specifically includes:
comparing the similarity of the first to-be-authenticated user face feature vector data with the first registered user feature vector data to obtain a first similarity score;
if the first similarity score is larger than or equal to the first threshold value, the first similarity score passes;
if the first threshold value is larger than the first similarity score and is larger than or equal to the second threshold value, retry is carried out, and the human face image data to be authenticated are obtained again;
if the first similarity score is less than the second threshold, the authentication fails, and the authentication is finished or other additional modes are adopted.
The face recognition method comprises the following steps:
the step of comparing the similarity of the second to-be-authenticated user face feature vector data with the second registered user feature vector data to obtain a second comparison result specifically includes:
comparing the similarity of the second user face feature vector data to be authenticated with the second registered user feature vector data to obtain a second similarity score;
if the second similarity score is larger than or equal to the third threshold, passing;
if the third threshold value is larger than the second similarity score and is larger than or equal to the fourth threshold value, retry is carried out, and the face image data to be authenticated is obtained again;
if the second similarity score is less than the fourth threshold value, the authentication fails, and the authentication is finished or other additional modes are adopted;
the face recognition method further comprises the following steps: and counting the total times of returning and re-acquiring the face image data to be authenticated, and ending or adopting other additional authentication steps when the authentication cannot pass even if the preset times are exceeded.
The face recognition method further comprises:
acquiring facial image data to be registered;
extracting feature vectors of the facial image data to be registered through the first neural network model to obtain feature vector data of the first registered user;
extracting feature vectors of the facial image data to be registered through the second neural network model to obtain feature vector data of the second registered user;
and after the first comparison result passes, directly acquiring corresponding second registered user feature vector data according to the first registered user feature vector data index, and comparing the similarity with the second to-be-authenticated user face feature vector data.
The face recognition method comprises the following steps:
the second neural network model shares a partial feature layer with the first neural network model.
A face recognition system, comprising:
the system comprises an activation module, a detection module and a control module, wherein the activation module is used for activating the system when an external activation instruction is obtained, and the external activation instruction comprises that an object is detected to approach or the system activation instruction is received;
the data acquisition module is used for acquiring the face image data to be authenticated, a first neural network model, a second neural network model, first registered user feature vector data and second registered user feature vector data, wherein the first neural network model extracts image coarse-grained features, and the second neural network model extracts image fine-grained features;
the data storage module comprises an on-chip memory and an off-chip memory; wherein the on-chip memory stores at least one of the first neural network model and the first registered user feature vector;
a comparison module comprising a first comparison module and a second comparison module; the first comparison module is used for extracting first to-be-authenticated user face feature vector data in the to-be-authenticated face image data by using the first neural network model; comparing the similarity of the first to-be-authenticated user face feature vector data with the first registered user feature vector data to obtain a first comparison result; and the second comparison module is used for continuously executing the next round of authentication by utilizing the second neural network model, the second registered user feature vector data and the face image data to be authenticated when the first comparison result passes.
The face recognition system described above, wherein:
the on-chip memory stores the first neural network model and the first registered user feature vector data, the off-chip memory stores the second neural network model and the second registered user feature vector data, or,
the on-chip memory stores the first and second registered user feature vector data, the off-chip memory stores the first and second neural network models, or,
the on-chip memory stores the first registered user feature vector data, and the off-chip memory stores the second registered user feature vector data, the first neural network model, and the second neural network model.
The face recognition system described above, wherein:
after the activation module obtains an external activation instruction,
the data acquisition module acquires the face image data to be authenticated, the activation module firstly activates the first comparison module, the first comparison module acquires the first neural network model and the first registered user feature vector data, the first neural network model is configured to extract the first face feature vector data of the user to be authenticated in the face image data to be authenticated, similarity comparison calculation is carried out on the first face feature vector data of the user to be authenticated and the first registered user feature vector data to obtain a first comparison result, if the first comparison result passes,
the activation module activates the second comparison module, the second comparison module obtains the second neural network model and the second registered user feature vector data, configures the second neural network model to extract the second to-be-authenticated user face feature vector data in the to-be-authenticated face image data, and compares the second to-be-authenticated user face feature vector data with the second registered user feature vector data.
An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that:
the processor realizes the steps of the above method when executing the computer program.
Compared with the prior art, the face recognition method, the face recognition system and the electronic equipment have the following advantages:
1. the method comprises the steps that a first low-precision identification is carried out on a user to be authenticated in advance through a first neural network model so as to block partial illegal authentication and false trigger authentication and reduce power consumption at the same time;
2. the first neural network model is designed to have the feature extraction precision lower than that of the second neural network model, so that the feature data extracted by the first neural network model is smaller than that extracted by the second neural network model, and partial data is stored in an on-chip memory to realize on-chip near processing calculation so as to further reduce the operation power consumption;
3. the first neural network model and the second neural network model are designed to share partial feature hierarchy, and then sharing of feature parameters is achieved, so that at least one feature layer output by the first neural network can be directly used as input and fusion data of the second neural network, and the operation amount of the second neural network is effectively reduced.
Drawings
FIG. 1 is a flow diagram of a method of face recognition in one embodiment of the invention;
fig. 2 is a flowchart illustrating the specific steps of the method of S0 according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps S311-S312 of an embodiment of a face recognition method according to the present invention;
FIG. 4 is a flowchart illustrating steps S332-S322 of an embodiment of a face recognition method according to the present invention;
fig. 5 is a flowchart illustrating steps of a specific method of step S322 in an embodiment of the face recognition method of the present invention;
FIG. 6 is a flowchart illustrating an implementation of a face recognition method according to an embodiment of the present invention;
FIG. 7 is an example of a first neural network model structure in one embodiment of the face recognition method of the present invention;
FIG. 8 is a structural diagram of a second neural network model in one embodiment of the face recognition method of the present invention;
FIG. 9 is a flowchart illustrating an implementation of the face recognition method according to another embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a first neural network model and a second neural network model in another embodiment of the face recognition method of the present invention;
FIG. 11 is a detailed system block diagram of a face recognition system of the present invention in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The face recognition method can be applied to electronic equipment, the electronic equipment can be a terminal, and the terminal can communicate with a server through a network. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server can be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 1, there is provided a face recognition method, including the steps of:
s1, obtaining face image data to be authenticated, a first neural network model, a second neural network model, first registered user feature vector data and second registered user feature vector data, wherein the first neural network model extracts image coarse-grained features, and the second neural network model extracts image fine-grained features;
s2, extracting first to-be-authenticated user face feature vector data L1 in to-be-authenticated face image data by using a first neural network model;
s3, carrying out similarity comparison on the first to-be-authenticated user face feature vector data and the first registered user feature vector data to obtain a first comparison result, and when the first comparison result passes, continuing to execute the next round of authentication by using the second neural network model, the second registered user feature vector data and the to-be-authenticated face image data, otherwise, failing to authenticate or retrying.
The feature extraction accuracy of the first neural network model is lower than that of the second neural network model, that is, the second neural network model is more complex, for example, in some embodiments the second neural network model may have one hundred layers and the first neural network has only a dozen layers, therefore, the invention carries out the first low-precision identification on the user to be authenticated in advance through the first neural network model, so as to achieve the purpose of distinguishing whether the person is, whether the face of the person is blocked, the position of the face of the person is obtained and the like, block partial illegal authentication and false triggering authentication in a pre-judging mode, meanwhile, the subsequent high-precision identification authentication of the second round of second neural network model is carried out only when the first low-precision identification is passed, and compared with the mode that all subprograms in the system are loaded in each face identification in the prior art, the method effectively reduces the system power consumption through the authentication after pre-blocking.
As shown in fig. 2, in an embodiment, the step S1 of the face recognition method may further include the step S0: acquiring facial image data to be registered, first registered user feature vector data and second registered user feature vector data, specifically, step S0 may include:
s00: acquiring facial image data to be registered to finish acquisition of first registered user feature vector data and second registered user feature vector data, wherein the number of the facial image data to be registered can be one or more, and the fault tolerance of system verification can be improved when the number of the facial image data to be registered is more than one;
s01, extracting the face image data to be registered by using the first neural network model to obtain first registered user feature vector data;
and S02, extracting the facial image data to be registered by using the second neural network model to obtain second registered user feature vector data.
It is noted that the first neural network model and the second neural network model are both pre-trained models.
In this embodiment, the facial image data to be registered includes three frames of image data, for example, the first frame of image data is front face image data of a person, the second frame of image data is left face image data of a person, the third frame of image data is right face image data of a person, the first frame of image data and the second frame of image data are preprocessed and used as input of a first neural network model and a second neural network model, and after feature extraction, first registered user feature vector data Pn { (N) is obtained1 1/N1 2/N1 3……)、(N2 1/N2 2/N2 3……)……(Na 1/Na 2/Na 3… …), second registered user feature vector data Pw { (W)1 1/W1 2/W1 3……)、(W2 1/W2 2/W2 3……)……(Wa 1/Wa 2/Wa 3… …), where Pn { }, Pw { } respectively represent a set of enrollment template feature vector data; (N)1 1/N1 2/N1 3……)、(N2 1/N2 2/N2 3……)……(Na 1/Na 2/Na 3… …) respectively represent first registered user feature vector data, N, corresponding to respective registered templates of different users1 1、N1 2、N1 3… … respectively represent a plurality of first face feature vector values registered by the same user; (W)1 1/W1 2/W1 3……)、(W2 1/W2 2/W2 3……)……(Wa 1/Wa 2/Wa 3… …) respectively represent second registered user feature vector data, W, corresponding to respective registered templates of different users1 1、W1 2、W1 3… … respectivelyRepresenting second face feature vector values corresponding to a plurality of first face feature vectors registered by the same user; in this embodiment, the face image data to be registered acquires three frames or three kinds of face image data in different states, so that a is 3.
In an embodiment, as shown in fig. 3, the step of comparing the first to-be-authenticated user face feature vector data with the first registered user feature vector data for the first time to obtain the first comparison result specifically includes:
s311, carrying out similarity comparison on the first to-be-authenticated user face feature vector data L1 and the first registered user feature vector data to obtain a first similarity score;
s312, if the first similarity score is larger than or equal to the first threshold value, the first similarity score passes;
if the first comparison result is that the first threshold value is larger than the first similarity score and is not smaller than the second threshold value, retry is carried out, and the face image data to be authenticated is obtained again;
if the first similarity score is less than the second threshold value, the authentication fails, and the authentication is finished or other additional modes are adopted;
wherein the first threshold > the second threshold.
In an embodiment, as shown in fig. 4, the step of continuing to execute the next round of authentication by using the second neural network model, the second registered user feature vector data, and the to-be-authenticated face image data specifically includes:
s321, extracting second to-be-authenticated user face feature vector data L2 in to-be-authenticated face image data by using a second neural network model;
and S322, comparing the similarity of the second to-be-authenticated user face feature vector data with the second registered user feature vector data to obtain a second comparison result.
In an embodiment, as shown in fig. 5, the step of S322 performing similarity comparison between the second to-be-authenticated user face feature vector data and the second registered user feature vector data to obtain a second comparison result specifically includes:
s3221, similarity comparison is carried out on the second to-be-authenticated user face feature vector data and the second registered user feature vector data, and a second similarity score is obtained;
s3222, if the second similarity score is larger than or equal to the third threshold value, passing; if the third threshold value is larger than the second similarity score and is larger than or equal to the fourth threshold value, retry is carried out, and the face image data to be authenticated is obtained again; if the second similarity score is less than the fourth threshold value, the authentication fails, and the authentication is finished or other additional modes are adopted;
wherein the third threshold value is larger than the first threshold value, and the fourth threshold value is larger than the third threshold value.
In an embodiment, the method may further include: and counting the total times of returning and re-acquiring the face image data to be authenticated, and ending or adopting other additional modes for authentication when the authentication can not pass even if the preset times are exceeded. Specifically, in some examples, the counting of the total number of times of returning to reacquire the face image data to be authenticated may be respectively performed under two conditions that the first similarity score is greater than or equal to the second threshold and the second similarity score is greater than or equal to the fourth threshold, and then the number of times under the two conditions is respectively compared with a preset number of times to obtain a result, or may be performed after the statistical conditions under the two conditions are accumulated and counted and then compared with the preset number of times to obtain a result, which is not limited herein.
In an embodiment, as shown in fig. 10, the second neural network model and the first neural network model share a partial feature layer, so that when the second neural network model needs to be called for feature extraction in the face recognition process, since the second neural network model and the first neural network model have a feature layer with a part being the same, as shown in fig. 9, a partial feature vector which has been extracted in the feature layer with the part being the same in the first neural network model before can be directly used to reduce the computation load when the second neural network model performs feature extraction. The neural network model generally includes a convolutional layer for feature extraction operation in image processing, a pooling layer for dimensionality reduction, commonly used maximum pooling and average pooling, and a full-connection layer for full connection of the neural network.
In another embodiment, as shown in fig. 7 and 8, the first neural network model and the second neural network model may also be designed independently, and at this time, as shown in fig. 6, because the two models do not have a shared layer, when the second neural network model needs to be called for feature extraction in the face recognition process, the computation amount of the second neural network model during feature extraction cannot be reduced.
In one embodiment, after the first comparison result passes, the method further comprises: finding a high similarity template with the highest similarity with the first to-be-authenticated user face feature vector data L1 in the first registered user feature vector data; when the similarity comparison is performed between the second to-be-authenticated user face feature vector data L2 and the second registered user feature vector data, the template corresponding to the first registered user feature vector data in the second registered user feature vector data is called to perform the similarity comparison with the second to-be-authenticated user vector data.
Specifically, in an example, the index tags of the first registered user feature vector data correspond to the index tags of the second registered user feature vector data one to one, and after the first comparison result passes, the corresponding second registered user feature vector data is directly obtained according to the first registered user feature vector data index and is used for performing similarity comparison with the second to-be-authenticated user face feature vector data.
For example, if the first to-be-authenticated user face feature vector data L1 is (N) in the first registered user feature vector data2 1/N2 2/N2 3… …) the registered user feature vector data corresponding to the registered template has the highest matching degree and meets the requirement of the relevant threshold value, namely, the user N is considered to be the most probable user2Correspondingly, only the face feature vector data L2 of the second user to be authenticated is compared with the user N2Corresponding second registered face feature data W2That is (W)2 1/W2 2/W2 3… …) without traversing other registration template libraries, thereby achieving the purpose of further reducing the computation load and reducing the energy consumption. At the same time, ifOnly the first user registers feature data N2 2If the constraint condition of the comparison result is satisfied, the comparison can be directly performed with N2 2Corresponding W2 2If the comparison is in accordance with the constraint condition, the comparison is completed without traversing other registration templates of the user, if the corresponding registration template is not in accordance with the constraint condition, the corresponding registration template is traversed, if the corresponding registration template is not in accordance with the constraint condition, the retry or the termination is carried out, and the authentication is carried out in other modes.
It should be understood that although the various steps in the flow charts of fig. 1-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the other steps or stages.
As shown in fig. 7, the present invention provides a face recognition system, which includes:
the system comprises an activation module 1, a detection module and a control module, wherein the activation module is used for activating the system when an external activation instruction is obtained, and the external activation instruction comprises that an object is detected to approach or the system activation instruction is received; the activation module may include, but is not limited to, one or more combinations of an infrared proximity sensor, a touch sensor, a voice wake-up sensor, a light intensity sensor;
the data acquisition module 2 is used for acquiring face image data to be authenticated, a first neural network model, a second neural network model, first registered user feature vector data and second registered user feature vector data, wherein the first neural network model extracts image coarse-grained features, and the second neural network model extracts image fine-grained features;
a data storage module 3, including an on-chip memory 31 and an off-chip memory 32, for storing a first neural network model, a second neural network model, first registered user feature vector data, second registered user feature vector data and other program instructions and parameters; wherein an on-chip memory stores 31 at least one of the first neural network model and the first registered user feature vector;
a comparison module 4 comprising a first comparison module 41 and a second comparison module 42; the first comparison module 41 is configured to extract, by using a first neural network model, first to-be-authenticated user face feature vector data in to-be-authenticated face image data; carrying out similarity comparison on the first to-be-authenticated user face feature vector data and the first registered user feature vector data to obtain a first comparison result; and the second comparison module 42 is used for continuing to execute the next round of authentication by utilizing the second neural network model, the second registered user feature vector data and the face image data to be authenticated when the first comparison result passes.
In an example, the on-chip memory 31 stores a first neural network model and first registered user feature vector data and the off-chip memory stores a second neural network model and said second registered user feature vector data, or, in yet another example, the on-chip memory 31 stores first registered user feature vector data and second registered user feature vector data and the off-chip memory 32 stores said first neural network model and said second neural network model, or, in another example, the on-chip memory 31 stores first registered user feature vector data and the off-chip memory 32 stores second registered user feature vector data, the first neural network model and the second neural network model.
When the on-chip memory 31 stores a first neural network model and first registered user feature vector data, and the off-chip memory 32 stores a second neural network model and second registered user feature vector data, the first neural network model is a lightweight neural network, so that the extracted first registered user feature vector data is also very small, and the first neural network model and the first registered user feature vector data can be stored by using an on-chip nonvolatile memory (power-off data is not lost), so that the purpose of near-processor calculation can be achieved, and the processing speed is high, and the power consumption is low. It will be appreciated that in other examples, storing the first and second neural network models in off-chip memory 32 and the associated corresponding registration feature vectors in on-chip memory 31, or storing only the first registration user feature vector data in on-chip memory 31, may also achieve some degree of processing speed improvement and power consumption reduction.
In an example, after the activation module 1 obtains an external activation instruction, the data obtaining module 2 obtains face image data of a user to be authenticated, the activation module 1 first activates the first comparison module 41, the first comparison module 41 obtains a first neural network model and first registered user feature vector data, the first neural network model is configured to extract first face feature vector data of the user to be authenticated in the face image data of the user to be authenticated, similarity comparison calculation is performed between the first face feature vector data of the user to be authenticated and the first registered user feature vector data to obtain a first comparison result, if the first comparison result passes, the activation module 1 activates the second comparison module 42, the second comparison module 42 obtains second neural network model and second registered user feature vector data, and the second neural network model is configured to extract second face feature vector data of the user to be authenticated in the face image data of the user to be authenticated, and comparing the second to-be-authenticated user face feature vector data with the second registered user feature vector data.
For the specific definition of the face recognition system, reference may be made to the above definition of the face recognition method, which is not described herein again. All or part of the modules in the face recognition system can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
The invention also provides an electronic device, which can be a terminal and comprises a memory, an image collector and a processor, wherein the memory stores a computer program, and the electronic device comprises: the steps of the above method are implemented when the processor executes the computer program, and the processor is integrated into an in-chip memory. When the on-chip memory stores the first neural network model, the calling process of the first neural network model is directly called in the chip without passing through the process from the off-chip memory to the cache, the storage mode of the core of the near processor has the advantages of low power consumption and high speed, usually the processor 1 calls external algorithm instructions (such as model weight, operation instruction and other data), and then matrix, accumulation, activation, normalization operation and the like are carried out on the neural network model parameter weight in a pulsating array or other image processing acceleration modes according to the operation instruction and the input image data, so that an operation result is obtained.
The electronic device comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the electronic device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a face recognition method. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the block diagrams are merely partial structures related to the embodiments of the present application and do not constitute limitations on the electronic devices to which the embodiments of the present application may be applied, and that a particular electronic device may include more or fewer components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A face recognition method, comprising:
the method comprises the steps of obtaining facial image data to be authenticated, a first neural network model, a second neural network model, first registered user feature vector data and second registered user feature vector data, wherein the first neural network model extracts image coarse-grained features, and the second neural network model extracts image fine-grained features;
extracting first to-be-authenticated user face feature vector data in the to-be-authenticated face image data by using the first neural network model;
and comparing the similarity of the first to-be-authenticated user face feature vector data with the first registered user feature vector data to obtain a first comparison result, and when the first comparison result passes through, continuing to execute the next round of authentication by using the second neural network model, the second registered user feature vector data and the to-be-authenticated face image data, otherwise, failing to authenticate or retrying.
2. The face recognition method according to claim 1, wherein the next round of authentication specifically comprises:
extracting second to-be-authenticated user face feature vector data in the to-be-authenticated face image data by using the second neural network model;
and comparing the similarity of the second to-be-authenticated user face feature vector data with the second registered user feature vector data to obtain a second comparison result.
3. The face recognition method according to claim 2, wherein the step of comparing the first to-be-authenticated user face feature vector data with the first registered user feature vector data for the first time to obtain a first comparison result specifically comprises:
comparing the similarity of the first to-be-authenticated user face feature vector data with the first registered user feature vector data to obtain a first similarity score;
if the first similarity score is larger than or equal to the first threshold value, the first similarity score passes;
if the first threshold value is larger than the first similarity score and is larger than or equal to the second threshold value, retry is carried out, and the human face image data to be authenticated are obtained again;
if the first similarity score is less than the second threshold, the authentication fails, and the authentication is finished or other additional modes are adopted.
4. The face recognition method of claim 3, wherein:
the step of comparing the similarity of the second to-be-authenticated user face feature vector data with the second registered user feature vector data to obtain a second comparison result specifically includes:
comparing the similarity of the second user face feature vector data to be authenticated with the second registered user feature vector data to obtain a second similarity score;
if the second similarity score is larger than or equal to the third threshold, passing;
if the third threshold value is larger than the second similarity score and is larger than or equal to the fourth threshold value, retry is carried out, and the face image data to be authenticated is obtained again;
if the second similarity score is less than the fourth threshold value, the authentication fails, and the authentication is finished or other additional modes are adopted;
the face recognition method further comprises the following steps: and counting the total times of returning and re-acquiring the face image data to be authenticated, and ending or adopting other additional authentication steps when the authentication cannot pass even if the preset times are exceeded.
5. The face recognition method of claim 2, further comprising:
acquiring facial image data to be registered;
extracting feature vectors of the facial image data to be registered through the first neural network model to obtain feature vector data of the first registered user;
extracting feature vectors of the facial image data to be registered through the second neural network model to obtain feature vector data of the second registered user;
and after the first comparison result passes, directly acquiring corresponding second registered user feature vector data according to the first registered user feature vector data index, and comparing the similarity with the second to-be-authenticated user face feature vector data.
6. The face recognition method of claim 1, wherein:
the second neural network model shares a partial feature layer with the first neural network model.
7. A face recognition system, comprising:
the system comprises an activation module, a detection module and a control module, wherein the activation module is used for activating the system when an external activation instruction is obtained, and the external activation instruction comprises that an object is detected to approach or the system activation instruction is received;
the data acquisition module is used for acquiring the face image data to be authenticated, a first neural network model, a second neural network model, first registered user feature vector data and second registered user feature vector data, wherein the first neural network model extracts image coarse-grained features, and the second neural network model extracts image fine-grained features;
the data storage module comprises an on-chip memory and an off-chip memory; wherein the on-chip memory stores at least one of the first neural network model and the first registered user feature vector;
a comparison module comprising a first comparison module and a second comparison module; the first comparison module is used for extracting first to-be-authenticated user face feature vector data in the to-be-authenticated face image data by using the first neural network model; comparing the similarity of the first to-be-authenticated user face feature vector data with the first registered user feature vector data to obtain a first comparison result; and the second comparison module is used for continuously executing the next round of authentication by utilizing the second neural network model, the second registered user feature vector data and the face image data to be authenticated when the first comparison result passes.
8. The face recognition system of claim 7, wherein:
the on-chip memory stores the first neural network model and the first registered user feature vector data, the off-chip memory stores the second neural network model and the second registered user feature vector data, or,
the on-chip memory stores the first and second registered user feature vector data, the off-chip memory stores the first and second neural network models, or,
the on-chip memory stores the first registered user feature vector data, and the off-chip memory stores the second registered user feature vector data, the first neural network model, and the second neural network model.
9. The face recognition system of claim 7 or 8, wherein:
after the activation module obtains an external activation instruction,
the data acquisition module acquires the face image data to be authenticated, the activation module firstly activates the first comparison module, the first comparison module acquires the first neural network model and the first registered user feature vector data, the first neural network model is configured to extract the first face feature vector data of the user to be authenticated in the face image data to be authenticated, similarity comparison calculation is carried out on the first face feature vector data of the user to be authenticated and the first registered user feature vector data to obtain a first comparison result, if the first comparison result passes,
the activation module activates the second comparison module, the second comparison module obtains the second neural network model and the second registered user feature vector data, configures the second neural network model to extract the second to-be-authenticated user face feature vector data in the to-be-authenticated face image data, and compares the second to-be-authenticated user face feature vector data with the second registered user feature vector data.
10. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that:
the processor, when executing the computer program, realizes the steps of the method of any one of claims 1 to 6.
CN202010268858.1A 2020-04-08 2020-04-08 Face recognition method and system and electronic equipment Pending CN111523405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010268858.1A CN111523405A (en) 2020-04-08 2020-04-08 Face recognition method and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010268858.1A CN111523405A (en) 2020-04-08 2020-04-08 Face recognition method and system and electronic equipment

Publications (1)

Publication Number Publication Date
CN111523405A true CN111523405A (en) 2020-08-11

Family

ID=71901229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010268858.1A Pending CN111523405A (en) 2020-04-08 2020-04-08 Face recognition method and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN111523405A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113269318A (en) * 2021-06-04 2021-08-17 安谋科技(中国)有限公司 Electronic device, neural network model operation method thereof and storage medium
CN113420699A (en) * 2021-07-02 2021-09-21 杭州海康威视数字技术股份有限公司 Face matching method and device and electronic equipment
CN113553989A (en) * 2021-08-04 2021-10-26 河南华辰智控技术有限公司 Method for applying super computing to biological recognition characteristic analysis
CN115830749A (en) * 2022-11-24 2023-03-21 惠州市则成技术有限公司 Home access control management method and system
CN117235694A (en) * 2023-09-14 2023-12-15 黑龙江都越科技有限公司 Login system and method based on face recognition big data
CN115830749B (en) * 2022-11-24 2024-05-17 惠州市则成技术有限公司 Household access control management method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069622A (en) * 2015-08-03 2015-11-18 福州海景科技开发有限公司 Face identification payment system facing mobile terminal and face identification payment method facing mobile terminal
CN109346089A (en) * 2018-09-27 2019-02-15 深圳市声扬科技有限公司 Living body identity identifying method, device, computer equipment and readable storage medium storing program for executing
CN110113319A (en) * 2019-04-16 2019-08-09 深圳壹账通智能科技有限公司 Identity identifying method, device, computer equipment and storage medium
CN110276313A (en) * 2019-06-25 2019-09-24 网易(杭州)网络有限公司 Identity identifying method, identification authentication system, medium and calculating equipment
CN110516649A (en) * 2019-09-02 2019-11-29 南京微小宝信息技术有限公司 Alumnus's authentication method and system based on recognition of face

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105069622A (en) * 2015-08-03 2015-11-18 福州海景科技开发有限公司 Face identification payment system facing mobile terminal and face identification payment method facing mobile terminal
CN109346089A (en) * 2018-09-27 2019-02-15 深圳市声扬科技有限公司 Living body identity identifying method, device, computer equipment and readable storage medium storing program for executing
CN110113319A (en) * 2019-04-16 2019-08-09 深圳壹账通智能科技有限公司 Identity identifying method, device, computer equipment and storage medium
CN110276313A (en) * 2019-06-25 2019-09-24 网易(杭州)网络有限公司 Identity identifying method, identification authentication system, medium and calculating equipment
CN110516649A (en) * 2019-09-02 2019-11-29 南京微小宝信息技术有限公司 Alumnus's authentication method and system based on recognition of face

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113269318A (en) * 2021-06-04 2021-08-17 安谋科技(中国)有限公司 Electronic device, neural network model operation method thereof and storage medium
CN113420699A (en) * 2021-07-02 2021-09-21 杭州海康威视数字技术股份有限公司 Face matching method and device and electronic equipment
CN113553989A (en) * 2021-08-04 2021-10-26 河南华辰智控技术有限公司 Method for applying super computing to biological recognition characteristic analysis
CN113553989B (en) * 2021-08-04 2022-10-28 河南华辰智控技术有限公司 Method for applying super computing to biological recognition feature analysis
CN115830749A (en) * 2022-11-24 2023-03-21 惠州市则成技术有限公司 Home access control management method and system
CN115830749B (en) * 2022-11-24 2024-05-17 惠州市则成技术有限公司 Household access control management method and system
CN117235694A (en) * 2023-09-14 2023-12-15 黑龙江都越科技有限公司 Login system and method based on face recognition big data

Similar Documents

Publication Publication Date Title
CN111523405A (en) Face recognition method and system and electronic equipment
US11588653B2 (en) Blockchain-based smart contract call methods and apparatus, and electronic device
US10824849B2 (en) Method, apparatus, and system for resource transfer
EP3846051A1 (en) Physiological characteristic information-based identity authentication method, device, system and medium
US11244035B2 (en) Apparatus and methods for biometric verification
WO2018007823A1 (en) Step-up authentication
TW201712584A (en) Electronic device access control using biometric technologies
US10037419B2 (en) System, method, and apparatus for personal identification
CN104424414A (en) Method for logging a user in to a mobile device
CN108804006B (en) Unlocking method, device, equipment and storage medium for wearable equipment
Ijiri et al. Security management for mobile devices by face recognition
CN110245714B (en) Image recognition method and device and electronic equipment
KR102401194B1 (en) Method and apparatus for authenticating a user using an electrocardiogram signal
Zhang et al. Robust multimodal recognition via multitask multivariate low-rank representations
CN111581625A (en) User identity identification method and device and electronic equipment
US20230027527A1 (en) Identity authentication method, and method and apparatus for training identity authentication model
CN107368722A (en) Verification method, computer-readable recording medium, the mobile terminal of biometric image
CA3202706A1 (en) Method and apparatus for user recognition
CN108664277B (en) Lifting awakening method and device based on triaxial acceleration sensor
US20170243043A1 (en) Method and system for controlling an electronic device
KR102253757B1 (en) Device and method for face liveness detection of facial image
US20230205296A1 (en) Electronic apparatus and response operation method for electronic apparatus
CN114519898A (en) Biological characteristic multi-mode fusion recognition method and device, storage medium and equipment
US20220083636A1 (en) Smart timeout with change detection
Wang et al. Who is using the phone? representation-learning-based continuous authentication on smartphones

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination