WO2023040436A1 - 人脸识别及门禁控制 - Google Patents

人脸识别及门禁控制 Download PDF

Info

Publication number
WO2023040436A1
WO2023040436A1 PCT/CN2022/104602 CN2022104602W WO2023040436A1 WO 2023040436 A1 WO2023040436 A1 WO 2023040436A1 CN 2022104602 W CN2022104602 W CN 2022104602W WO 2023040436 A1 WO2023040436 A1 WO 2023040436A1
Authority
WO
WIPO (PCT)
Prior art keywords
face
feature
recognized
user
facial
Prior art date
Application number
PCT/CN2022/104602
Other languages
English (en)
French (fr)
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 WO2023040436A1 publication Critical patent/WO2023040436A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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/30Individual registration on entry or exit not involving the use of a pass
    • G07C9/32Individual registration on entry or exit not involving the use of a pass in combination with an identity check
    • G07C9/37Individual registration on entry or exit not involving the use of a pass in combination with an identity check using biometric data, e.g. fingerprints, iris scans or voice recognition

Definitions

  • the present disclosure relates to the technical field of face recognition, and in particular, to methods, devices, computer equipment and storage media for face recognition and access control.
  • Face recognition is currently one of the most widely used biometric technologies, and it is also the most common technology in the security field. It has mature applications in many scenarios, such as access control.
  • Embodiments of the present disclosure at least provide methods, devices, computer equipment, and storage media for face recognition and access control.
  • the embodiment of the present disclosure provides a face recognition method, including: extracting the first face feature of the face image to be recognized; combining the first face feature with the first face feature of one or more registered users The facial features of the two people are matched to obtain a matching result, and a face recognition result is obtained based on the matching result; wherein, for each registered user, the second facial feature of the registered user is based on the registered
  • the reference face features of the user's registered face image and the face features of the registered user's historical face image that are determined to match the registered user's registered face image in historical face recognition are determined.
  • face recognition can be performed based on the second face features of one or more registered users and the first face feature of the face image to be recognized, since each registered user
  • the second face feature of the registered user is determined based on the reference face feature of the registered face image of the registered user and the first face feature of the historical face image, so the second face feature of the registered user can reflect the registrant Features of face images and historical face images.
  • the second face features depend on Based on historical face images, therefore, the second face features are often updated periodically/aperiodically, which means that the second face features can also correspond to changes over time.
  • This enables the registered user to continuously generate updated second facial features for face recognition without actively updating the facial image. It can be seen that when the face image to be recognized is recognized, the influence of the user's face changing at different times on the recognition result can be reduced, and the face recognition accuracy is improved.
  • it also includes: when there is no historical face image matching the registered face image of the registered user, using the reference face feature of the registered face image of the registered user as the The registered user's second face feature.
  • the recognition can be performed based on the reference face features of the user's registered face image, thereby improving the pass rate of face recognition while ensuring the recognition accuracy.
  • the method further includes: when an update trigger condition is met, if the face recognition result shows that the face image to be recognized belongs to one of the registered users, based on the first A face feature updates a second face feature of the user to be recognized involved in the face image to be recognized. For example, for each of the registered user's feature group including the second facial feature and the reference facial feature, determine the first facial feature of the face image to be recognized and the registered user the first similarity between the second facial features of the to-be-recognized human face image; similarity.
  • the target feature group can be determined based on the first similarity and the second similarity corresponding to each of the registered users, and when it is determined that the target feature group satisfies the update condition, based on the person to be identified
  • the first facial feature of the face image updates the second facial feature of the user to be recognized.
  • the first similarity corresponding to the target feature group is greater than a first preset threshold
  • the second similarity corresponding to the target feature group is greater than a second preset threshold.
  • the second facial feature of the user to be recognized is updated.
  • the first face feature of is the first face feature of the user to be recognized, thereby improving the accuracy of the second face feature.
  • the first preset threshold and the second preset threshold it can be ensured that the accuracy of the first facial feature used is higher when the second facial feature is updated.
  • the update condition in response to the face image to be recognized is collected from a first scene, the update condition includes: the number of the target feature group is greater than or equal to 1.
  • the update condition in response to the face image to be recognized is collected from a second scene, the update condition further includes: the number of the target feature groups is greater than or equal to 1 and less than a predetermined number.
  • updating the second face feature of the user to be recognized based on the first face feature of the face image to be recognized includes: A second face feature matched by a face feature is determined as the second face feature of the user to be identified; based on the first face feature of the face image to be identified and the second person of the user to be identified The first similarity between face features, determine the update weights respectively corresponding to the first face features of the face image to be recognized and the second face features of the user to be recognized; based on the update weights, The first face feature of the face image to be recognized and the second face feature of the user to be recognized are used to update the second face feature of the user to be recognized.
  • the determination of the to-be-recognized face image based on the first similarity between the first face feature of the to-be-recognized face image and the second face feature of the user to be recognized Identifying the update weights corresponding to the first facial features of the human face image and the second facial features of the user to be identified, including: based on the first facial feature of the facial image to be identified and the user to be identified The first similarity between the second facial features, the preset weight range and the first preset threshold, determine the first update weight and corresponding first facial feature of the face image to be recognized The second update weight corresponding to the second face feature of the user to be identified.
  • the first update weight is proportional to the first similarity
  • the sum of the first update weight and the second update weight is a preset fixed value
  • the preset weight range includes a preset weight Maximum and preset weight minimums.
  • the embodiment of the present disclosure also provides an access control method, including: responding to the face recognition request, controlling the image acquisition device to collect the face image to be recognized; based on the first aspect or any possible implementation of the first aspect
  • face recognition is performed on the face image to be recognized to determine a face recognition result
  • door lock control is performed based on the face recognition result.
  • the embodiment of the present disclosure also provides a face recognition device, including: a feature extraction module, used to extract the first face feature of the face image to be recognized; a matching module, used to combine the first face The features are respectively matched with the second face features of one or more registered users to obtain a matching result, so as to obtain a face recognition result based on the matching result; wherein, for each of the registered users, all of the registered users
  • the second face feature is a reference face feature based on the registered face image of the registered user, and the registered user is determined to match the registered face image of the registered user in historical face recognition
  • the facial features of the historical face images are determined.
  • the matching module is further configured to: if there is no historical face image matching the registered face image of the registered user, the The reference face feature of the registered face image is used as the second face feature of the registered user.
  • the device further includes an update module, configured to: if the face recognition result is that the face image to be recognized belongs to one of the registered users when an update trigger condition is met,
  • the second facial feature of the user to be recognized involved in the facial image to be recognized is updated based on the first facial feature. For example, for each of the registered user's feature group including the second facial feature and the reference facial feature, the first facial feature of the face image to be recognized and the registered user's first facial feature can be determined. a first similarity between the second facial features; and determining a second similarity between the first facial feature of the face image to be recognized and the reference facial feature of the registered user.
  • the update module may determine that the target feature group satisfies the update condition based on the first similarity and the second similarity corresponding to each of the registered users, based on the first The face feature updates the second face feature of the user to be recognized.
  • the first similarity corresponding to the target feature group is greater than a first preset threshold
  • the second similarity corresponding to the target feature group is greater than a second preset threshold.
  • the update condition in response to the face image to be recognized is collected from a first scene, the update condition includes: the number of the target feature group is greater than or equal to 1.
  • the update condition in response to the face image to be recognized is collected from a second scene, the update condition further includes: the number of the target feature groups is greater than or equal to 1 and less than a predetermined number.
  • the update module when updating the second facial feature of the user to be recognized based on the first facial feature of the facial image to be recognized, is configured to: The second facial feature matched by the first facial feature of the human face image to be identified is determined as the second facial feature of the user to be identified; based on the first facial feature of the facial image to be identified and the The first similarity between the second facial features of the user to be identified determines the update weights corresponding to the first facial features of the facial image to be identified and the second facial features of the user to be identified; based on The update weight, the first face feature of the face image to be recognized and the second face feature of the user to be recognized update the second face feature of the user to be recognized.
  • the updating module determines the When updating the weights corresponding to the first facial feature of the face image to be recognized and the second facial feature of the user to be recognized, it is used to: based on the first facial feature of the face image to be recognized and the The first similarity between the second facial features of the user to be recognized, the preset weight range, and the first preset threshold corresponding to the first similarity, determine the first human face of the facial image to be recognized The first update weight corresponding to the feature and the second update weight corresponding to the second face feature of the user to be recognized.
  • the first update weight is proportional to the first similarity
  • the sum of the first update weight and the second update weight is a preset fixed value
  • the preset weight range includes a preset weight Maximum and preset weight minimums.
  • an embodiment of the present disclosure also provides an access control device, including: a collection module, configured to respond to a face recognition request, and control an image collection device to collect a face image to be recognized; a recognition module, configured to In the face recognition method described in any possible implementation manner of the first aspect, face recognition is performed on the face image to be recognized to determine a face recognition result; a control module is configured to perform face recognition based on the face recognition result Door lock control.
  • an embodiment of the present disclosure further provides a computer device, including a processor, a memory, and a bus.
  • the memory stores machine-readable instructions executable by the processor.
  • the processor communicates with the memory through a bus, and the machine-readable instructions are executed by the processor.
  • the embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the above-mentioned first aspect, or any of the first aspects in the first aspect, can be executed. Steps in a possible implementation manner, or performing the steps described in the second aspect above.
  • FIG. 1 shows a flow chart of a face recognition method provided by an embodiment of the present disclosure
  • FIG. 2 shows a flow chart of a specific method for updating the second face feature of the user to be recognized in the face image to be recognized in the face recognition method provided by the embodiment of the present disclosure
  • Fig. 3 shows the specific method of updating the second facial feature of the user to be recognized based on the first facial feature of the face image to be recognized in the face recognition method provided by the embodiment of the present disclosure flow chart;
  • FIG. 4 shows a schematic structural diagram of a face recognition device provided by an embodiment of the present disclosure
  • FIG. 5 shows a schematic structural diagram of an access control device provided by an embodiment of the present disclosure
  • FIG. 6 shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure.
  • the registered face images of all users are generally obtained first, and then the facial features in the registered images are extracted and stored.
  • the image to be recognized hereinafter also referred to as the face image to be recognized or the image to be recognized
  • the facial features in the image to be recognized are extracted, and the facial features in the image to be recognized are extracted It is compared with the facial features in the registration image, and if the comparison is successful, it is determined that the face recognition has passed.
  • users often need to re-upload new face images to the database every once in a while, which is cumbersome to operate.
  • the user's facial features may change, for example, he may gain weight, become thinner, grow a beard, etc. If the time interval for updating the face image in the database is long, there may be differences between the face features in the captured image to be recognized and the face features in the registered image, which will affect the recognition accuracy.
  • the background of the registered image is usually relatively simple, for example, the registered image is a ID photo, etc., so when extracting the facial features of the registered image, the background has little influence on the facial features.
  • the background of the image to be recognized may be cluttered. When extracting the face features of the image to be recognized, it may be affected by the cluttered background noise, thereby affecting the recognition accuracy.
  • the present disclosure provides a face recognition and access control method, device, computer equipment, and storage medium.
  • the first face feature of the image is used for face recognition.
  • the second face feature can simultaneously reflect Features of registered face images and historical face images.
  • the second face feature depends on the historical face image, which means that the second face feature can also reflect feature changes of the face over time. This allows the user to continuously generate updated second face features for face recognition without actively updating the registered face image, which can reduce the impact on the recognition results caused by the user's face changing at different times. Influence, effectively improve the accuracy of face recognition.
  • the execution subject of the face recognition method provided in the embodiments of the present disclosure is generally a computer device with certain computing capabilities.
  • the computer equipment includes, for example, a terminal or a server or other processing equipment.
  • the terminal can be user equipment (User Equipment, UE), mobile device, user terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc. .
  • the face recognition method may be implemented by a processor invoking computer-readable instructions stored in a memory.
  • FIG. 1 it is a flow chart of a face recognition method provided by an embodiment of the present disclosure, the method includes steps 101 to 102, wherein:
  • Step 101 extracting the first human face feature of the human face image to be recognized.
  • Step 102 Match the first facial features with the second facial features of one or more registered users to obtain a matching result, and obtain a face recognition result based on the matching results.
  • the second face feature is determined based on the reference face feature of the registered face image and the face feature of the historical face image determined to match the registered face image in the historical face recognition.
  • the face image to be recognized may be a face image taken in different application scenarios, such as face payment scenarios, security inspection scenarios, access control scenarios, etc., which require the user's face to be recognized or Scenarios that require authentication of the user's identity.
  • the image collection device can upload the image of the face to be recognized to the server after the image collection device is taken; if the execution subject of the method provided in the present disclosure is a terminal or other processing devices, the terminal or other processing devices may pre-store the second face features of all registered users, and then receive the face image to be recognized sent by the image acquisition device.
  • the execution subject of the method provided by the present disclosure is a terminal or other processing device, and the corresponding application scenarios may include scenarios with a large number of registered users, such as communities, shopping malls, etc., or scenarios with a small number of registered users. Scenes, such as companies, exhibitions, etc.
  • the face image to be recognized when extracting the first face feature of the face image to be recognized, can be input into a pre-trained neural network, and the neural network can extract the face to be recognized The first face feature corresponding to the image. All facial features described in this disclosure can be expressed in the form of vectors.
  • the neural network may be trained based on sample images carrying user identifiers.
  • the sample images carrying the user identification can be input into the neural network to obtain the facial features corresponding to the sample images, and then based on the facial features corresponding to each sample image, multiple sample images of the same user are determined, and then based on The user identification of the sample image and multiple sample images corresponding to the same user determine the accuracy of the neural network during this training process, and continue to train the neural network when the accuracy does not meet the preset conditions.
  • the second facial features may be pre-stored.
  • two face features of the user are stored in the database, one is the reference face feature in the user's registration image, the other is the user's second face feature, and the user's second face feature
  • the facial features are determined based on the user's reference facial features and the user's historical matching facial features.
  • the historical face recognition for the user if the result of the historical face recognition is "pass recognition", the first face feature of the historical face image used for the historical face recognition is determined as the The user's history matches facial features.
  • the historical matching facial features of the user refer to the facial features of the historical facial images that are determined to match the registered facial images of the user in historical facial recognition.
  • the The reference face feature of the registered face image of the registered user is directly used as the second face feature of the registered user.
  • the registered user may refer to a user who has not performed face recognition stored in the database; or, the registered user may refer to a user to be recognized who does not have a corresponding historical face image when performing face feature matching , such as face recognition results that have been performed but have not been "passed”.
  • the corresponding second face feature can be the user's registered image.
  • reference face features For example, when the user has not obtained the user's face image to be recognized after completing the registration, the user's reference face feature stored in the database can be regarded as the user's second face feature, or the user's second face feature stored in the database.
  • the second face feature of the user is the same as the reference face feature.
  • the reference face feature is directly regarded as the second face feature, by only storing the user's reference face feature, it can be equivalent to storing the user's second face feature separately.
  • feature and the reference face feature and when there is a difference between the two types of features of the user, additionally store the second face feature of the user.
  • the degree of matching (for example, the value of parameters that can represent the similarity or association between the two, such as Euclidean distance, can be calculated) between the first human face feature and each second human face feature updated recently, the highest degree of matching , and the user corresponding to the second face feature whose matching degree is greater than the preset matching degree threshold is used as the user in the face image to be recognized, and the face recognition result is determined as passed recognition.
  • the determination of the face recognition result based on the matching result can be understood as, when there is a second face feature matching the first face feature, the face recognition result is passed recognition; when there is no face feature matching the first face feature When matching the second face feature, the face recognition result is that the recognition fails.
  • the stored second facial features may be continuously updated.
  • an update trigger condition may be set, and when the update trigger condition is satisfied, the stored second facial features may be updated.
  • the update trigger condition may be to update every preset time period, for example, update once every week; or for a single user, update the user's second face feature every preset number of times according to the number of face recognition times, For example, after user A undergoes face recognition every 10 times, the second face feature of user A is updated.
  • the update triggering condition may be set according to at least one of various factors such as the requirements of different scenarios or the number of registered users, and may be periodic or aperiodic. For example, in scenarios where the accuracy of face recognition is high, and/or when the number of registered users is small, a shorter time interval can be used as an update trigger condition.
  • a longer time interval can be used as the update trigger condition, that is, the update period indicated by the update trigger condition is negatively correlated with the face recognition accuracy, while the number of registered users positively correlated.
  • the time interval corresponding to the update trigger condition may be dynamically changed or fixed, which is not limited here.
  • the prerequisite for updating the second facial feature of the user may be that the user has passed at least one facial recognition.
  • the face image to be recognized is the face image of user B
  • the update trigger condition of user B is met at this time, then it can be based on at least the current face recognition.
  • the related facial image to be recognized updates the second facial feature of user B.
  • the images used for multiple face recognition can be stored in the storage space authorized by the user, such as the local or the cloud.
  • Two-face feature update Especially for places where users frequently appear, such as communities and companies, this updating method can save computing resources consumed by generating the second facial features.
  • the second face feature can meet the face recognition requirements in the face recognition process, and in order to protect user privacy Based on the principle, there is no need to store the face images of previous visits, but only based on the current face recognition image and the existing second face features, the update of the second face features is realized.
  • updating the second face feature based on the user to be recognized in the face image to be recognized includes the following steps:
  • Step 201 For each registered user's feature group including the second facial feature and the reference facial feature, determine the difference between the first facial feature of the face image to be recognized and the second facial feature of the registered user. and determining a second similarity between the first facial feature of the face image to be recognized and the reference facial feature of the registered user.
  • each registered user has a unique corresponding feature group, and the reference face feature and the second face feature of the registered user are stored in the feature group.
  • Step 202 Based on the first similarity and the second similarity corresponding to each feature group, it is determined that the target feature group satisfies the update condition, based on the first face feature of the to-be-recognized face image to the The second face feature of the user to be recognized is updated.
  • the first similarity corresponding to the target feature group exceeds a first preset threshold
  • the second similarity corresponding to the feature group exceeds a second preset threshold.
  • the user to be recognized may also be determined based on the matching result The second facial features.
  • the second facial feature in the matching result that matches the first facial feature of the face image to be recognized is determined as the second facial feature of the user to be recognized.
  • the calculation method of the first similarity between the first facial feature and the second facial feature, and the calculation of the second similarity between the first facial feature and the reference facial feature can be the same, for example, they can all calculate the values of parameters such as Euclidean distance, cosine distance, and covariance that can reflect the similarity or correlation between two features.
  • the update condition may include: the number of the target feature group is greater than or equal to 1.
  • the first scene may refer to a scene where there are few close relatives, such as an exhibition hall, a meeting place, a company, a store, and the like.
  • close relatives refer to brothers, sisters, parents, children, etc. who are related by blood.
  • multiple users belonging to close relatives have similar or partially identical facial features.
  • f query represents the first face feature
  • f rec represents the second face feature
  • f db represents the reference face feature
  • similar(f query , f rec ) represents the first similarity
  • similar( f query , f db ) represents the second similarity
  • t 1 is the first preset threshold
  • t 2 is the second preset threshold.
  • the second facial feature of the user can be updated. In this way, small changes of the user over time can be reflected in the second face features in time, thereby ensuring the face recognition accuracy when the user visits again.
  • the update condition in response to the face image to be recognized is collected from a second scene, the update condition further includes: the number of the target feature groups is greater than or equal to 1 and less than a predetermined number.
  • the second scenario can be understood as a scenario where there are many close relatives, such as a community, a home door lock, and the like.
  • the update condition in the second scenario can be understood as satisfying the above formula, and the number n of feature groups satisfying the above formula is less than the predetermined number t 3 .
  • the first preset threshold t1 is greater than the preset matching degree in the face recognition process, that is, the first face feature of any user's face image to be recognized and the latest updated first second face
  • the maximum matching degree between features may exceed the preset matching degree, but not exceed the first preset threshold, in this case, it is deemed that the update condition is not met.
  • the second facial feature of the user A When updating, the number of feature groups that satisfy the above formula may be 2 (maybe the feature groups corresponding to the above two twins).
  • the second face feature is to be updated, such as directly If the second face feature with the highest first similarity is updated, the second face feature corresponding to another user B may be wrongly updated, and it may be difficult for another user B to perform face recognition later.
  • face recognition or when user A performs face recognition, it is likely to be misidentified as user B, so that the second face features stored in the base database will be confused, affecting the relationship between user A and user B. face recognition accuracy.
  • the second face feature of feature group 1 is Update
  • the user to be detected in the face image to be detected is not the same user as the user corresponding to feature group 1, but the user to be detected is more similar to the user corresponding to feature group 1 at a certain angle. In this case, perform After the update, the user corresponding to feature group 1 may not be able to pass face recognition in the future.
  • the feature group that satisfies the above formula can be detected based on the user's face image, but the number of feature groups that satisfy the above formula is greater than or equal to the set number, in this case, it means that among the registered users There are multiple users with similar characteristics to the user, for example, they may be close relatives. Therefore, in order to improve the recognition pass rate of the user, the user's second facial characteristics may not be updated.
  • the first facial feature in the image to be detected can be directly used as the second facial feature of the user to be detected.
  • the method can improve the update speed, the accuracy of the updated second face features may be low, which may affect the accuracy of face recognition.
  • the method shown in FIG. 3 may be used. , including the following steps:
  • Step 301 Based on the first similarity between the first facial feature of the unidentified human face image and the second facial feature of the unrecognized user, determine the first human face of the unidentified human face image Update weights corresponding to the features and the second facial features of the user to be identified respectively.
  • Step 302 based on the update weight, the first facial feature of the unrecognized face image, and the second facial feature of the user to be recognized, update the second facial feature of the user to be recognized.
  • the person to be identified is determined based on the first similarity between the first facial feature of the facial image to be identified and the second facial feature of the user to be identified.
  • it may be based on the first face feature of the face image to be recognized and the second face feature of the user to be recognized.
  • the first similarity between the two facial features, the preset weight range, and the first preset threshold corresponding to the first similarity determine the first update corresponding to the first facial feature of the to-be-recognized facial image weight and a second updated weight corresponding to the second facial feature of the user to be identified;
  • the first update weight is proportional to the first similarity
  • the sum of the first update weight and the second update weight is a preset fixed value
  • the preset fixed value is generally 1, which may be based on the first similarity
  • the first preset threshold and the preset weight range determine the update weight corresponding to the first face feature of the face image to be recognized, and then based on the update weight corresponding to the first face feature of the face image to be recognized, Determine the update weight corresponding to the second facial feature of the user to be recognized.
  • a represents the update weight corresponding to the first face feature of the face image to be recognized
  • similar(f query , f rec ) represents the first similarity
  • t1 represents the first preset threshold corresponding to the first similarity
  • a ub indicates the maximum value of the preset weight
  • a lb indicates the minimum value of the preset weight.
  • the second face feature of the user to be recognized is performed when updating, it can be calculated by the following formula:
  • f rec_new a*f query +(1-a)*f rec
  • frec_new represents the updated second face feature.
  • the update weight corresponding to the first facial feature of the face image to be recognized is proportional to the first similarity, that is to say, the difference between the first facial feature and the second facial feature of the user to be recognized is The higher the similarity of , the higher the proportion of the first facial feature of the user to be recognized is when updating the second facial feature.
  • the update range may be 0.08-0.15, and the weight range may also be adjusted based on the user's actual update requirements.
  • the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible
  • the inner logic is OK.
  • an embodiment of the present disclosure also provides an access control method, which can be applied to a controller corresponding to the access control or door lock, and the controller is connected to the image acquisition device, and the connection method can be A wired connection or a wireless connection, the wireless connection may include, for example, a Bluetooth connection, a wireless network connection, and the like.
  • Step 1 Respond to the face recognition request, and control the image acquisition device to collect the image of the face to be recognized.
  • the face recognition request may be sent when it is detected that a user requests to open the door.
  • an infrared detection device may be installed at the position of the gate or door lock, and if the infrared detection device detects that there is a user , a face recognition request may be sent to the controller.
  • Step 2 Based on the face recognition method described in the above embodiment, face recognition is performed on the face image to be recognized to determine a face recognition result.
  • Step 3 Perform door lock control based on the face recognition result.
  • control door lock is opened, and if the face recognition result is recognition failure, the control door lock is closed.
  • the embodiment of the present disclosure also provides a face recognition device corresponding to the face recognition method. Since the problem-solving principle of the device in the embodiment of the present disclosure is similar to the above-mentioned face recognition method of the embodiment of the present disclosure, therefore For the implementation of the device, reference may be made to the implementation of the method, and repeated descriptions will not be repeated.
  • FIG. 4 it is a schematic structural diagram of a face recognition device provided by an embodiment of the present disclosure, and the device includes: a feature extraction module 401 , a matching module 402 and an update module 403 .
  • the feature extraction module 401 is used to extract the first facial features of the face image to be recognized;
  • the matching module 402 is used to combine the first facial features with the second facial features of one or more registered users respectively.
  • the second facial feature of the registered user is based on the registrant of the registered user
  • the reference facial features of the face image, and the facial features of the historical facial images of the registered user determined to match the registered facial images of the registered user in the historical face recognition.
  • the matching module 402 is further configured to: if there is no historical face image matching the registered face image of the registered user, the registered face image of the registered user The reference face feature is used as the second face feature of the registered user.
  • the device further includes an update module 403, configured to satisfy an update trigger condition, if the face recognition result shows that the face image to be recognized belongs to one of the registered users and updating a second facial feature of the user to be recognized involved in the facial image to be recognized based on the first facial feature. For example, for each feature group of the registered user including the second facial feature and the reference facial feature, determine the first facial feature of the face image to be recognized and the first facial feature of the registered user. a first similarity between two facial features; and determining a second similarity between the first facial feature of the face image to be recognized and the reference facial feature of the registered user.
  • the update module 403 may determine that the target feature group satisfies the update condition based on the first similarity and the second similarity corresponding to each registered user (that is, included in each feature group), based on the The first face feature of the face image to be recognized updates the second face feature of the user to be recognized.
  • the first similarity corresponding to the target feature group is greater than a first preset threshold
  • the second similarity corresponding to the target feature group is greater than a second preset threshold.
  • the update condition in response to the face image to be recognized is collected from a first scene, the update condition includes: the number of the target feature group is greater than or equal to 1.
  • the update condition in response to the face image to be recognized is collected from a second scene, the update condition further includes: the number of the target feature groups is greater than or equal to 1 and less than a predetermined number.
  • the updating module 403 when updating the second face feature of the user to be recognized based on the first face feature of the face image to be recognized, the updating module 403 is configured to: The second facial feature matched with the first facial feature of the facial image to be recognized is determined as the second facial feature of the user to be recognized; based on the first facial feature of the facial image to be recognized and the Describe the first similarity between the second facial features of the user to be identified, and determine the update weights respectively corresponding to the first facial features of the facial image to be identified and the second facial features of the user to be identified; The second facial feature of the user to be recognized is updated based on the update weight, the first facial feature of the facial image to be recognized, and the second facial feature of the user to be recognized.
  • the update module 403 determines When updating the weights corresponding to the first facial feature of the face image to be recognized and the second facial feature of the user to be recognized, it is used to: based on the first facial feature and The first similarity between the second facial features of the user to be identified, the preset weight range, and the first preset threshold corresponding to the first similarity determine the first person in the facial image to be identified
  • the first update weight corresponding to the face feature and the second update weight corresponding to the second face feature of the user to be recognized The first update weight corresponding to the face feature and the second update weight corresponding to the second face feature of the user to be recognized.
  • the first update weight is proportional to the first similarity
  • the sum of the first update weight and the second update weight is a preset fixed value
  • the preset weight range includes a preset weight Maximum and preset weight minimums.
  • the embodiment of the present disclosure also provides an access control device corresponding to the access control method.
  • the acquisition module 501 is used to respond to the face recognition request, and control the image acquisition device to collect the image of the face to be recognized;
  • the recognition module 502 is used to perform the recognition of the face to be recognized based on the face recognition method described in the above-mentioned embodiment. Face recognition is performed on the image to determine a face recognition result;
  • the control module 503 is configured to perform door lock control based on the face recognition result.
  • FIG. 6 it is a schematic structural diagram of a computer device 600 provided by an embodiment of the present disclosure, including a processor 601 , a memory 602 , and a bus 603 .
  • the memory 602 is used to store execution instructions, including a memory 6021 and an external memory 6022; the memory 6021 here is also called an internal memory, and is used to temporarily store calculation data in the processor 601 and exchange data with an external memory 6022 such as a hard disk.
  • the processor 601 exchanges data with the external memory 6022 through the memory 6021.
  • the processor 601 communicates with the memory 602 through the bus 603, so that the processor 601 is executing the following instructions: extracting the face image to be recognized The first face feature; the first face feature is matched with the second face feature of one or more registered users respectively to obtain a matching result, and a face recognition result is obtained based on the matching result; wherein, for For each of the registered users, the second face feature of the registered user is a reference face feature based on the registered face image of the registered user, and the registered user is determined to be consistent with the historical face recognition.
  • the registered face image of the registered user is determined by matching the face features of the historical face images.
  • the instructions executed by the processor 601 further include: if there is no historical face image matching the registered face image of the registered user, converting the registered face image of the registered user to The reference face feature of is used as the second face feature of the registered user.
  • the method further includes: if the face recognition result is that the face image to be recognized belongs to the registered If one of the users, based on the first facial feature, update the second facial feature of the user to be recognized in the facial image to be recognized. For example, for each feature group of the registered user including the second facial feature and the reference facial feature, determine the first facial feature of the face image to be recognized and the first facial feature of the registered user. a first similarity between two facial features; and determining a second similarity between the first facial feature of the face image to be recognized and the reference facial feature of the registered user.
  • the target feature group satisfies the update condition, based on the first face feature pair of the face image to be recognized
  • the second facial feature of the user to be recognized is updated.
  • the first similarity corresponding to the target feature group is greater than a first preset threshold
  • the second similarity corresponding to the target feature group is greater than a second preset threshold.
  • the update condition in response to the collection of the face image to be recognized from the first scene, includes: the number of the target feature group is greater than or equal to 1.
  • the update condition in response to the collection of the face image to be recognized from the second scene, the update condition further includes: the number of the target feature group is greater than or equal to 1, And less than the predetermined amount.
  • the method when updating the second facial features of the user to be recognized based on the first facial features of the facial image to be recognized, the method Specifically including: determining the second facial feature matching the first facial feature of the face image to be recognized as the second facial feature of the user to be recognized; based on the first facial feature of the face image to be recognized The first similarity between a face feature and the second face feature of the user to be recognized, determining the first face feature of the face image to be recognized and the second face feature of the user to be recognized Respectively corresponding update weights; based on the update weights, the first face feature of the face image to be recognized and the second face feature of the user to be recognized, the second face feature of the user to be recognized to update.
  • the first similarity between the first facial feature based on the face image to be recognized and the second facial feature of the user to be recognized degree determining the update weights corresponding to the first facial feature of the face image to be recognized and the second facial feature of the user to be recognized, including: based on the first facial feature of the face image to be recognized
  • the first similarity between the second facial features of the user to be identified, the preset weight range, and the first preset threshold corresponding to the first similarity determine the first feature of the facial image to be identified.
  • the processor 601 may execute the following instructions: in response to the face recognition request, control the image acquisition device to collect the face image to be recognized; Identify to determine the face recognition result; perform door lock control based on the face recognition result.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the steps of the face recognition method described in the above-mentioned method embodiments are executed.
  • the storage medium may be a volatile or non-volatile computer-readable storage medium.
  • the embodiment of the present disclosure also provides a computer program product, the computer product carries a program code, and the instructions included in the program code can be used to execute the steps of the face recognition method described in the above method embodiment, for details, please refer to the above method The embodiment will not be repeated here.
  • the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
  • a software development kit Software Development Kit, SDK
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor.
  • the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

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

Abstract

本公开提供了一种人脸识别及门禁控制的方法、装置、计算机设备及存储介质。根据所述人脸识别方法的一个示例,在获取待识别人脸图像之后,提取所述待识别人脸图像的第一人脸特征;将所述第一人脸特征分别和一个或多个注册用户的第二人脸特征进行匹配,得到匹配结果,并基于所述匹配结果得到人脸识别结果。其中,每个所述注册用户的所述第二人脸特征为基于所述注册用户的注册人脸图像的参考人脸特征,和所述注册用户在历史人脸识别中被确定为与所述注册用户的所述注册人脸图像匹配的历史人脸图像的人脸特征确定的。

Description

人脸识别及门禁控制
相关申请的交叉引用
本公开要求于2021年9月16日提交的申请号为202111087459.6的中国专利申请的优先权,该中国专利申请公开的全部内容以引用的方式并入本文中。
技术领域
本公开涉及人脸识别技术领域,具体而言,涉及用于人脸识别及门禁控制的方法、装置、计算机设备及存储介质。
背景技术
人脸识别是目前应用最广泛的生物识别技术之一,也是安防领域最普遍的技术,在许多场景都有成熟应用,例如门禁通行等。
相关技术中,一般是通过将采集到的人脸图像的特征与存储在数据库中的图像的特征逐个比对的方式,来判断是否通过人脸识别。这样,为了保证识别精度,往往需要用户每隔一段时间就重新上传新的人脸图像到数据库中。显然,这种方式操作较为繁琐。
发明内容
本公开实施例至少提供用于人脸识别及门禁控制的方法、装置、计算机设备及存储介质。
第一方面,本公开实施例提供了一种人脸识别方法,包括:提取待识别人脸图像的第一人脸特征;将所述第一人脸特征分别和一个或多个注册用户的第二人脸特征进行匹配,得到匹配结果,并基于所述匹配结果得到人脸识别结果;其中,针对每个所述注册用户,所述注册用户的所述第二人脸特征为基于所述注册用户的注册人脸图像的参考人脸特征,和所述注册用户在历史人脸识别中被确定与所述注册用户的所述注册人脸图像匹配的历史人脸图像的人脸特征确定的。
上述方法中,在获取到待识别人脸图像之后,可以基于一个或多个注册用户的第二人脸特征和待识别人脸图像的第一人脸特征进行人脸识别,由于每个注册用户的第二人脸特征是基于该注册用户的注册人脸图像的参考人脸特征和历史人脸图像的第一人脸特征确定的,因此该注册用户的第二人脸特征可以同时反映注册人脸图像和历史人脸图像的特征。由于随着时间流逝,不同时刻采集的历史人脸图像会存在或多或少的差异,且这个变化过程是持续性的,即历史人脸图像是会发生变化的,而第二人脸特征依赖于历史人脸图像,因此,第二人脸特征往往会周期性/非周期性更新,也就意味着,第二人脸特征也可以对应随时间发生的变化。这就使注册用户无需主动对人脸图像进行更新,即可不断生成更新后的第二人脸特征以用于人脸识别。可见,在对待识别人脸图像进行识别时,能够减少因用户的人脸在不同时刻发生变化而对识别结果产生的影响,提高了人脸识别精度。
一种可能的实施方式中,还包括:在不存在与注册用户的注册人脸图像匹配的历史人脸图像的情况下,将所述注册用户的注册人脸图像的参考人脸特征作为所述注册用户的第二人脸特征。
这样,在用户注册之后首次对用户进行人脸识别时,可以基于该用户的注册人脸图像的参考人脸特征进行识别,从而在保证识别精度的情况下,提高了人脸识别的通过率。
一种可能的实施方式中,所述方法还包括:在满足更新触发条件的情况下,若所述人脸识别结果为所述待识别人脸图像属于所述注册用户之一时,基于所述第一人脸特征对所述待识别人脸图像中涉及的待识别用户的第二人脸特征进行更新。例如,针对每个所述注册用户的包括所述第二人脸特征和所述参考人脸特征的特征组,确定所述待识别人脸图像的所述第一人脸特征和所述注册用户的所述第二人脸特征之间的第一相似度;以及确定所述待识别人脸图像的所述第一人脸特征和所述注册用户的所述参考人脸特征之间的第二相似度。这样,可基于各所述注册用户对应的所述第一相似度和所述第二相似度确定目标特征组,并在确定所述目标特征组满足更新条件的情况下,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新。其中,所述目标特征组对应的所述第一相似度大于第一预设阈值,且所述目标特征组对应的所述第二相似度大于第二预设阈值。
这样,通过基于第一人脸特征分别和第二人脸特征以及参考人脸特征之间的相似度来确定是否更新第二人脸特征,可以保证在对待识别用户的第二人脸特征进行更新的第一人脸特征为待识别用户的第一人脸特征,进而提升第二人脸特征的精度。其中,通过设置第一预设阈值和第二预设阈值,可以保证在更新第二人脸特征时,所采用的第一人脸特征的精度更高。
一种可能的实施方式中,响应于所述待识别人脸图像从第一场景采集,所述更新条件包括:所述目标特征组的数量大于或等于1。
一种可能的实施方式中,响应于所述待识别人脸图像从第二场景采集,所述更新条件还包括:所述目标特征组的数量大于或等于1、且小于预定数量。
这样,通过设置目标特征组的数量,可以减少由于特征更新错误,导致更新之后无法通过人脸识别的问题。
一种可能的实施方式中,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新,包括:将与所述待识别人脸图像的第一人脸特征匹配的第二人脸特征,确定为所述待识别用户的第二人脸特征;基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的所述第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重;基于所述更新权重、所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征,对所述待识别用户的第二人脸特征进行更新。
这样,在对待识别用户的第二人脸特征进行更新时,同时结合待识别用户的第一人脸特征和第二人脸特征,可以实现对于第二人脸特征的逐步更新,降低特征更新对识别精度造成的影响。
一种可能的实施方式中,所述基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的所述第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重,包括:基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的所述第一相似度、预设权重范围以及所述第一预设阈值,确定所述待识别人脸图像的第一人脸特征对应的第一更新权重和所述待识别用户的第二人脸特征对应的第二更新权重。其中,所述第一更新权重与所述第一相似度成正比,所述第一更新权重和所述第二更新权重之和为预设固定值,所述预设权重范围包括预设的权重最大值和预设的权重最小值。
第二方面,本公开实施例还提供了一种门禁控制方法,包括:响应人脸识别请求, 控制图像采集设备采集待识别人脸图像;基于第一方面或第一方面任一种可能的实施方式所述的人脸识别方法,对所述待识别人脸图像进行人脸识别,以确定人脸识别结果;基于所述人脸识别结果进行门锁控制。
第三方面,本公开实施例还提供一种人脸识别装置,包括:特征提取模块,用于提取待识别人脸图像的第一人脸特征;匹配模块,用于将所述第一人脸特征分别和一个或多个注册用户的第二人脸特征进行匹配,得到匹配结果,以基于所述匹配结果得到人脸识别结果;其中,针对每个所述注册用户,所述注册用户的所述第二人脸特征为基于所述注册用户的注册人脸图像的参考人脸特征,和所述注册用户在历史人脸识别中被确定为与所述注册用户的所述注册人脸图像匹配的历史人脸图像的人脸特征确定的。
一种可能的实施方式中,所述匹配模块,还用于:在不存在与所述注册用户的所述注册人脸图像匹配的历史人脸图像的情况下,将所述注册用户的所述注册人脸图像的所述参考人脸特征作为所述注册用户的所述第二人脸特征。
一种可能的实施方式中,所述装置还包括更新模块,用于在满足更新触发条件的情况下,若所述人脸识别结果为所述待识别人脸图像属于所述注册用户之一时,基于所述第一人脸特征对所述待识别人脸图像中涉及的待识别用户的第二人脸特征进行更新。例如,针对每个所述注册用户的包括所述第二人脸特征和所述参考人脸特征的特征组,可确定所述待识别人脸图像的第一人脸特征和所述注册用户的第二人脸特征之间的第一相似度;以及确定所述待识别人脸图像的第一人脸特征和所述注册用户的参考人脸特征之间的第二相似度。这样,更新模块可在基于各所述注册用户对应的所述第一相似度和所述第二相似度,确定目标特征组满足更新条件的情况下,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新。其中,所述目标特征组对应的所述第一相似度大于第一预设阈值,且所述目标特征组对应的所述第二相似度大于第二预设阈值。
一种可能的实施方式中,响应于所述待识别人脸图像从第一场景采集,所述更新条件包括:所述目标特征组的数量大于或等于1。
一种可能的实施方式中,响应于所述待识别人脸图像从第二场景采集,所述更新条件还包括:所述目标特征组的数量大于或等于1、且小于预定数量。
一种可能的实施方式中,在基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新时,所述更新模块用于:将与所述待识别人脸图像的第一人脸特征匹配的第二人脸特征,确定为所述待识别用户的第二人脸特征;基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重;基于所述更新权重、所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征,对所述待识别用户的第二人脸特征进行更新。
一种可能的实施方式中,所述更新模块,在基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重时,用于:基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度、预设权重范围以及所述第一相似度对应的第一预设阈值,确定所述待识别人脸图像的第一人脸特征对应的第一更新权重和所述待识别用户的第二人脸特征对应的第二更新权重。其中,所述第一更新权重与所述第一相似度成正比,所述第一更新权重和所述第二更新权重之和为预设固定值,所述预设权重范围包括预设的权重最大值和预设的权重最小值。
第四方面,本公开实施例还提供一种门禁控制装置,包括:采集模块,用于响应人脸识别请求,控制图像采集设备采集待识别人脸图像;识别模块,用于基于第一方面或第一方面任一可能的实施方式所述的人脸识别方法,对所述待识别人脸图像进行人脸识别,以确定人脸识别结果;控制模块,用于基于所述人脸识别结果进行门锁控制。
第五方面,本公开实施例还提供一种计算机设备,包括处理器、存储器和总线。其中,所述存储器存储有所述处理器可执行的机器可读指令,当计算机设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行上述第一方面,或第一方面中任一种可能的实施方式中的步骤,或执行如上述第二方面所述的步骤。
第六方面,本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述第一方面,或第一方面中任一种可能的实施方式中的步骤,或执行如上述第二方面所述的步骤。
关于上述人脸识别装置、计算机设备、及计算机可读存储介质的效果描述参见上述人脸识别方法的说明,这里不再赘述。
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了本公开实施例所提供的一种人脸识别方法的流程图;
图2示出了本公开实施例所提供的人脸识别方法中,对待识别人脸图像中的待识别用户的第二人脸特征进行更新的具体方法的流程图;
图3示出了本公开实施例所提供的人脸识别方法中,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新的具体方法的流程图;
图4示出了本公开实施例所提供的一种人脸识别装置的架构示意图;
图5示出了本公开实施例所提供的一种门禁控制装置的架构示意图;
图6示出了本公开实施例所提供的一种计算机设备的结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合附图对本公开实施例中的技术方案进行清楚、完整地描述。所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
相关技术中,在进行人脸识别时,一般是先获取所有用户的注册人脸图像(以下也 可简称为注册图像),然后提取并存储注册图像中的人脸特征。当拍摄到待识别用户的待识别图像(以下也可简称为待识别人脸图像或待识别图像)时,提取待识别图像中的人脸特征,并将提取的待识别图像中的人脸特征与注册图像中的人脸特征进行比对,若比对成功则确定人脸识别通过。而为了保证识别精度,往往需要用户每隔一段时间就重新上传新的人脸图像到数据库中,这种方式操作较为繁琐。
随着时间的流逝,用户的人脸特征可能发生改变,例如可能会长胖、变瘦、留胡子等。若数据库更新人脸图像的时间间隔较长,可能会造成拍摄的待识别图像中的人脸特征与注册图像中的人脸特征存在差异,影响识别精度。
另外,注册图像的背景通常较为简单,比如,注册图像为证件照等,因此在提取注册图像的人脸特征时,背景对于人脸特征的影响较小。而实际在应用时,待识别图像的背景可能会比较杂乱,提取待识别图像的人脸特征时,可能会受到杂乱的背景噪声的影响,进而影响识别精度。
基于上述研究,本公开提供了一种人脸识别及门禁控制方法、装置、计算机设备及存储介质,在获取到待识别人脸图像之后,可以基于多个第二人脸特征和待识别人脸图像的第一人脸特征进行人脸识别。其中,由于第二人脸特征是基于注册人脸图像的参考人脸特征和与所述注册人脸图像匹配的历史人脸图像的第一人脸特征确定的,第二人脸特征可以同时反映注册人脸图像和历史人脸图像的特征。随着时间流逝,不同时刻采集的历史人脸图像会存在或多或少的差异,且这个变化过程是持续性的,即历史人脸图像是会发生变化的。第二人脸特征依赖于历史人脸图像,也就意味着,第二人脸特征也可以反映人脸随时间发生的特征变化。这就使用户无需主动对注册人脸图像进行更新,即可不断生成更新后的第二人脸特征用于人脸识别,能够减少因用户的人脸在不同时刻发生变化而对识别结果产生的影响,有效提高了人脸识别精度。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
为便于对本实施例进行理解,首先对本公开实施例所公开的一种人脸识别方法进行详细介绍,本公开实施例所提供的人脸识别方法的执行主体一般为具有一定计算能力的计算机设备,该计算机设备例如包括终端或服务器或其它处理设备。其中,终端可以为用户设备(User Equipment,UE)、移动设备、用户终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该人脸识别方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。
参见图1所示,为本公开实施例提供的一种人脸识别方法的流程图,所述方法包括步骤101至步骤102,其中:
步骤101、提取待识别人脸图像的第一人脸特征。
步骤102、将所述第一人脸特征分别和一个或多个注册用户的第二人脸特征进行匹配,得到匹配结果,并基于所述匹配结果得到人脸识别结果。
其中,所述第二人脸特征为基于注册人脸图像的参考人脸特征、和在历史人脸识别中被确定与所述注册人脸图像匹配的历史人脸图像的人脸特征确定的。
在一种可能的实施方式中,所述待识别人脸图像可以是在不同应用场景下拍摄的人脸图像,例如人脸支付场景、安检场景、门禁场景等需要对用户的人脸进行识别或需要对用户的身份进行认证的场景。
若本公开所提供的方法的执行主体为服务器,则可以通过图像采集装置在拍摄完待 识别人脸图像之后,由图像采集装置上传至服务器;若本公开所提供的方法的执行主体为终端或其他处理设备,则终端或其他处理设备可以预先存储所有注册用户的第二人脸特征,然后可以接收由图像采集装置发送的待识别人脸图像。
需要说明的是,本公开所提供的方法的执行主体为终端或其他处理设备所对应的应用场景既可以包括注册用户数量较多的场景,例如社区、卖场等,也可以包括注册用户数量较少的场景,例如公司、展会等。
在一种可能的实施方式中,在提取待识别人脸图像的第一人脸特征时,可以将所述待识别人脸图像输入至预先训练的神经网络中,神经网络可以提取待识别人脸图像对应的第一人脸特征。本公开中所述的所有人脸特征均可以通过向量的形式表示。
其中,所述神经网络可以是基于携带有用户标识的样本图像训练得到的。示例性的,可以将携带有用户标识的样本图像输入至神经网络中,得到样本图像对应的人脸特征,然后基于各个样本图像对应的人脸特征,确定同一用户的多张样本图像,再基于样本图像的用户标识以及对应同一用户的多张样本图像,确定本次训练过程中神经网络的精度,并在所述精度不满足预设条件的情况下继续训练所述神经网络。
需要说明的是,上述神经网络的训练过程仅做示例性的说明,本领域技术人员熟知的其他训练神经网络的方法也可适用于本公开。
所述第二人脸特征可以是预先存储的。对于已注册的用户来说,数据库中存储有该用户的两个人脸特征,一个是该用户的注册图像中的参考人脸特征,一个是该用户的第二人脸特征,该用户的第二人脸特征是基于该用户的参考人脸特征以及该用户的历史匹配人脸特征确定的。其中,在针对该用户的历史人脸识别中,若该历史人脸识别的结果为“通过识别”,则将用于该历史人脸识别的历史人脸图像的第一人脸特征确定为该用户的历史匹配人脸特征。换言之,该用户的历史匹配人脸特征是指在历史人脸识别中,被确定为与该用户的注册人脸图像匹配的历史人脸图像的人脸特征。
在一种可能的实施方式中,在尚不存在与注册用户的注册人脸图像匹配的历史人脸图像的情况下,也即尚不存在所述历史匹配人脸特征的情况下,可将所述注册用户的注册人脸图像的参考人脸特征直接作为所述注册用户的第二人脸特征。
这里,所述注册用户可以是指数据库中存储的未进行过人脸识别的用户;或者,所述注册用户可以是指在进行人脸特征匹配时,没有对应的历史人脸图像的待识别用户,例如进行过人脸识别但未得到“通过识别”的人脸识别结果。
即实际应用中,在历史人脸图像为空的情况下,即在某一用户注册之后第一次对该用户进行人脸识别时,对应的第二人脸特征可以是该用户的注册图像中的参考人脸特征。例如,在该用户完成注册后未获取过该用户的待识别人脸图像时,数据库中存储的该用户的参考人脸特征,可视为该用户的第二人脸特征,或是数据库中存储的该用户的第二人脸特征和参考人脸特征相同。对于存储空间并不充裕的情况而言,在参考人脸特征直接被视为第二人脸特征时,通过仅存储用户的参考人脸特征,可相当于分别存储了该用户的第二人脸特征和参考人脸特征,并待该用户的这两类特征存在差异时,再额外存储该用户的第二人脸特征。
在一种可能的实施方式中,在将所述第一人脸特征和最近更新的一个或多个第二人脸特征(即对应不同注册用户的第二人脸特征)进行匹配时,可以计算所述第一人脸特征与最近更新的每一个第二人脸特征之间的匹配度(例如可以计算欧氏距离等能够表示二者相似性或关联关系的参数的值),将匹配度最高、且匹配度大于预设匹配度阈值的第二人脸特征对应的用户作为该待识别人脸图像中的用户,并确定人脸识别结果为通过识别。
所述基于匹配结果确定人脸识别结果可以理解为,当存在与第一人脸特征匹配的第二人脸特征时,所述人脸识别结果为通过识别;当不存在与第一人脸特征匹配的第二人脸特征时,所述人脸识别结果为识别不通过。
在一种可能的实施方式中,存储的第二人脸特征可以是不断更新的。例如,可以设置更新触发条件,当满足更新触发条件时,可以对存储的第二人脸特征进行更新。
所述更新触发条件可以是每隔预设时长进行更新,例如每个星期更新一次;或者针对单个用户,按人脸识别次数每隔预设次数对该用户的第二人脸特征进行更新一次,例如在用户A每经过10次人脸识别之后,对用户A的第二人脸特征进行更新。需要说明的是,更新触发条件可以根据不同场景的需求或是注册用户的数量等多种因素中的至少一项来设定,可以是周期性或非周期性的。比如,在场景对于人脸识别精度要求较高,和/或,注册用户的数量较少的情况下,可以较短的时间间隔作为更新触发条件,类似的,在场景对于人脸识别精度要求较低,和/或,注册用户的数量较多的情况下,可以较长的时间间隔作为更新触发条件,即更新触发条件指示的更新周期与人脸识别精度呈负相关,而与注册用户的数量呈正相关。当然,所述的更新触发条件对应时间间隔可以是动态变化的或是固定的,在此不予限定。
实际应用中,在对用户的第二人脸特征进行更新的前提可以是,该用户通过至少一次人脸识别。例如,在基于待识别人脸图像进行人脸识别,确定该待识别人脸图像为用户B的人脸图像,若此时满足用户B的更新触发条件,则可以基于至少本次人脸识别所涉及的待识别人脸图像对用户B的第二人脸特征进行更新。当然可以在用户多次通过人脸识别后,将多次通过人脸识别所使用到的图像分别存储在本地或是云端等用户授权的存储空间中,待累计一定时间或一定数量后再进行第二人脸特征的更新。尤其是对于社区、公司等用户会频繁出现的场所而言,这种更新方式可以节省因生成第二人脸特征而耗费的计算资源。相应的,对于展会、卖场等用户出现频次较低的场所而言,为保证用户再次到访时,第二人脸特征可以在人脸识别过程中满足人脸识别需求,且本着保护用户隐私的原则,无需存储历次到访的人脸图像,而仅基于当下通过人脸识别的图像以及已存的第二人脸特征,实现第二人脸特征的更新。
在一种可能的实施方式中,可以根据如图2所示的方法,对基于待识别人脸图像中的待识别用户的第二人脸特征进行更新,包括以下几个步骤:
步骤201、针对每个注册用户的包括第二人脸特征和参考人脸特征的特征组,确定所述待识别人脸图像的第一人脸特征和所述注册用户的第二人脸特征之间的第一相似度;以及确定所述待识别人脸图像的第一人脸特征和所述注册用户的参考人脸特征之间的第二相似度。
这里,对于各个注册用户而言,每个注册用户有唯一对应的特征组,特征组中存储有该注册用户的参考人脸特征和第二人脸特征。
步骤202、在基于各特征组对应的第一相似度和所述第二相似度,确定目标特征组满足更新条件的情况下,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新。其中,所述目标特征组对应的第一相似度超过第一预设阈值,且该特征组对应的第二相似度超过第二预设阈值。
在一种可能的实施方式中,在基于待识别人脸图像的第一人脸特征对待识别用户的第二人脸特征进行更新之前,还可以先基于所述匹配结果,确定所述待识别用户的第二人脸特征。示例性的,将所述匹配结果中与所述待识别人脸图像的第一人脸特征匹配的第二人脸特征,确定为所述待识别用户的第二人脸特征。
所述第一人脸特征和所述第二人脸特征之间的第一相似度的计算方法,与所述第 一人脸特征与所述参考人脸特征之间的第二相似度的计算方法可以相同,例如可以都是计算欧氏距离、余弦距离、协方差等能够体现两个特征之间相似程度或关联关系的参数的值。
这里,响应于所述待识别人脸图像从第一场景采集,所述更新条件可以包括:所述目标特征组的数量大于或等于1。
这里,所述第一场景可以是指近亲出现较少的场景,例如展厅、会场、公司、卖场等。其中,近亲指的是存在血缘关系的兄弟、姊妹、父母、子女等,通常属于近亲的多个用户之间具备相近或部分相同的人脸特征。
上述更新条件可以描述为:
Figure PCTCN2022104602-appb-000001
其中,针对同一用户而言,f query表示第一人脸特征,f rec表示第二人脸特征,f db表示参考人脸特征,similar(f query,f rec)表示第一相似度,similar(f query,f db)表示第二相似度,t 1为第一预设阈值,t 2为第二预设阈值。
可见,在用户的第一人脸特征分别与第二人脸特征、参考人脸特征相近的情况下,即可对该用户的第二人脸特征进行更新。这样可以将该用户随时间推移而产生的较小的变化及时体现在第二人脸特征中,从而确保该用户再次到访时的人脸识别精度。
在另一种可能的实施方式中,响应于所述待识别人脸图像从第二场景采集,所述更新条件还包括:所述目标特征组的数量大于或等于1、且小于预定数量。这里,所述第二场景可以理解为近亲出现较多的场景,例如社区、家庭门锁等。第二场景中的更新条件可以理解为,满足上述公式,且满足上述公式的特征组的个数n小于预定个数t 3
这里,一般第一预设阈值t 1大于在人脸识别过程中的预设匹配度,即任一用户的待识别人脸图像的第一人脸特征与最近更新的第一个第二人脸特征之间的最大匹配度,可能超过所述预设匹配度,但是并未超过所述第一预设阈值,在这种情况下,视为不满足更新条件。
这样,通过设置比预设匹配度更高的第一预设阈值和第二预设阈值,可以保证在更新第二人脸特征时,所采用的第一人脸特征的精度更高;另外通过设置特征组的个数,可以降低对于注册用户中特征相似的两个用户的特征更新错误的几率,从而减少因误更新而导致的更新之后用户难以通过人脸识别的问题。
示例性的,若注册用户中包括两个面部特征相似的用户,例如双胞胎,则在基于其中一个用户A的待检测人脸图像的第一人脸特征,对该用户A的第二人脸特征进行更新时,则满足上述公式的特征组的个数可能为2(可能是上述两个双胞胎分别对应的特征组),在这种情况下,若要对第二人脸特征进行更新,比如直接对第一相似度最高的第二人脸特征进行更新的话,可能会导致另一用户B对应的第二人脸特征进行了错误的更新,后续另一用户B在进行人脸识别时,可能难以通过人脸识别,或是,在用户A进行人脸识别时,很可能为误识别为用户B,这样底库存储的第二人脸特征就会出现错乱的情况,影响用户A和用户B的人脸识别精度。
示例性的,若满足上述公式的特征组包括特征组1、特征组2、特征组3,若基于 待检测人脸图像的第一人脸特征,对特征组1的第二人脸特征进行了更新,则可能待检测人脸图像中的待检测用户与特征组1对应的用户并非同一用户,而是待检测用户在某一角度上与特征组1对应的用户较为相像,这种情况下进行更新了以后,可能会导致特征组1对应的用户后续无法通过人脸识别。
针对单个用户,若基于该用户的人脸图像能够检测出满足上述公式的特征组,但是满足上述公式的特征组的数量大于或等于设定数量,在这种情况下,说明已注册的用户中包括多个与该用户特征相近的用户,例如可能是近亲,因此为了提高该用户的识别通过率,可以不对该用户的第二人脸特征进行更新。
在一种可能的实施方式中,在对待检测用户的第二人脸特征进行更新时,可以直接将待检测图像中的第一人脸特征作为待检测用户的第二人脸特征,这种更新方法虽然可以提高更新速度,但是更新后的第二人脸特征可能精度较低,进而可能会影响人脸识别的精度。
在另外一种可能的实施方式中,在基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新时,可以通过如图3所示的方法,包括以下几个步骤:
步骤301、基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重。
步骤302、基于所述更新权重、所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征,对所述待识别用户的第二人脸特征进行更新。
这样,在对待识别用户的第二人脸特征进行更新时,同时结合待识别用户的第一人脸特征和第二人脸特征,可以实现对于第二人脸特征的逐步更新,降低更新特征对识别精度的影响。
在一种可能的实施方式中,在基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重时,可以基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度、预设权重范围以及所述第一相似度对应的第一预设阈值,确定所述待识别人脸图像的第一人脸特征对应的第一更新权重和所述待识别用户的第二人脸特征对应的第二更新权重;
其中,所述第一更新权重与所述第一相似度成正比,所述第一更新权重和所述第二更新权重之和为预设固定值。
示例性的,所述预设固定值一般为1,可以先基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度、第一预设阈值以及预设权重范围,确定所述待识别人脸图像的第一人脸特征对应的更新权重,然后基于所述待识别人脸图像的第一人脸特征对应的更新权重,确定所述待识别用户的第二人脸特征对应的更新权重。
示例性的,在确定所述待识别人脸图像的第一人脸特征对应的更新权重时,可以通过如下公式进行计算:
Figure PCTCN2022104602-appb-000002
其中,a表示所述待识别人脸图像的第一人脸特征对应的更新权重,similar(f query,f rec)表示第一相似度,t 1表示第一相似度对应的第一预设阈值,a ub表示预设权重最大值,a lb表示预设权重最小值。
在确定所述待识别人脸图像的第一人脸特征对应的更新权重a之后,将1-a作为待识别用户的第二人脸特征对应的更新权重。
示例性的,在基于所述更新权重、所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征,对所述待识别用户的第二人脸特征进行更新时,可以通过如下公式进行计算:
f rec_new=a*f query+(1-a)*f rec
其中,f rec_new表示更新后的第二人脸特征。
由上述公式可知,所述待识别人脸图像的第一人脸特征对应的更新权重与第一相似度成正比,也就是说待识别用户的第一人脸特征与第二人脸特征之间的相似度越高,在对第二人脸特征进行更新时,待识别用户的第一人脸特征所占比重越高。
在对第二人脸特征进行更新时,为减少出现更新导致人脸特征变化较大,进而影响后续的人脸识别的情况的发生,因此可以通过设置更新权重范围,来实现对于更新幅度的控制。一般的,所述权重范围可以为0.08~0.15,也可以基于用户实际的更新需求对权重范围进行调整。
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
基于相同的构思,本公开实施例还提供一种门禁控制方法,所述门禁控制方法可以应用于门禁或门锁对应的控制器中,所述控制器与图像采集设备连接,其连接方式可以是有线连接或无线连接,所述无线连接方式例如可以包括蓝牙连接、无线网络连接等。包括以下几个步骤:
步骤1、响应人脸识别请求,控制图像采集设备采集待识别人脸图像。
这里,所述人脸识别请求可以是在检测到有用户请求开门的情况下发送的,示例性的,门禁或门锁位置处可以设置红外检测装置,在红外检测装置检测到有用户的情况下,可以向所述控制器发送人脸识别请求。
步骤2、基于上述实施例所述的人脸识别方法,对所述待识别人脸图像进行人脸识别,以确定人脸识别结果。
步骤3、基于所述人脸识别结果进行门锁控制。
若人脸识别结果为识别通过,则控制门锁打开,若人脸识别结果为识别失败,则控制门锁关闭。
通过这种方法,可以实现对于门禁或门锁的精确控制,减少人脸识别精度对门禁或门锁控制的影响。
基于同一发明构思,本公开实施例中还提供了与人脸识别方法对应的人脸识别装置,由于本公开实施例中的装置解决问题的原理与本公开实施例上述人脸识别方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。
参照图4所示,为本公开实施例提供的一种人脸识别装置的架构示意图,所述装置包括:特征提取模块401、匹配模块402以及更新模块403。其中,特征提取模块401,用于提取待识别人脸图像的第一人脸特征;匹配模块402,用于将所述第一人脸特征分别和一个或多个注册用户的第二人脸特征进行匹配,得到匹配结果,并基于所述匹配结果得到人脸识别结果;其中,针对每个所述注册用户,所述注册用户的所述第二人脸特征为基于所述注册用户的注册人脸图像的参考人脸特征,和所述注册用户的在历史人脸识别中被确定为与所述注册用户的所述注册人脸图像匹配的历史人脸图像的人脸特征确定的。
一种可能的实施方式中,所述匹配模块402,还用于:在不存在与注册用户的注册人脸图像匹配的历史人脸图像的情况下,将所述注册用户的注册人脸图像的参考人脸特征作为所述注册用户的第二人脸特征。
一种可能的实施方式中,所述装置还包括更新模块403,用于在满足更新触发条件的情况下,若所述人脸识别结果为所述待识别人脸图像属于所述注册用户之一时,基于所述第一人脸特征对所述待识别人脸图像中涉及的待识别用户的第二人脸特征进行更新。例如,针对每个所述注册用户的包括所述第二人脸特征和所述参考人脸特征的特征组,确定所述待识别人脸图像的第一人脸特征和所述注册用户的第二人脸特征之间的第一相似度;以及确定所述待识别人脸图像的第一人脸特征和所述注册用户的参考人脸特征之间的第二相似度。这样,更新模块403可在基于各所述注册用户对应(也即各特征组包括)的所述第一相似度和所述第二相似度,确定目标特征组满足更新条件的情况下,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新。其中,所述目标特征组对应的所述第一相似度大于第一预设阈值,且所述目标特征组对应的所述第二相似度大于第二预设阈值。
一种可能的实施方式中,响应于所述待识别人脸图像从第一场景采集,所述更新条件包括:所述目标特征组的数量大于或等于1。
一种可能的实施方式中,响应于所述待识别人脸图像从第二场景采集,所述更新条件还包括:所述目标特征组的数量大于或等于1、且小于预定数量。
一种可能的实施方式中,在基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新时,所述更新模块403用于:将与所述待识别人脸图像的第一人脸特征匹配的第二人脸特征,确定为所述待识别用户的第二人脸特征;基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重;基于所述更新权重、所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征,对所述待识别用户的第二人脸特征进行更新。
一种可能的实施方式中,所述更新模块403,在基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重时,用于:基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度、预设权重范围以及所述第一相似度对应的第一预设阈值,确定所述待识别人脸图像的第一人脸特征对应的第一更新权重和所述待识别用户的第二人脸特征对应的第二更新权重。其中,所述第一更新权重与所述第一相似度成正比,所述第一更新权重和所述第二更新权重之和为预设固定值,所述预设权重范围包括预设的权重最大值和预设的权重最小值。
关于装置中的各模块的处理流程以及各模块之间的交互流程的描述可以参照上述方法实施例中的相关说明,这里不再详述。
基于相同的构思,本公开实施例还提供了与门禁控制方法对应的门禁控制装置,如图5所示,为本公开实施例提供的一种门禁控制装置的架构示意图,包括采集模块501、识别模块502以及控制模块503。其中,采集模块501,用于响应人脸识别请求,控制图像采集设备采集待识别人脸图像;识别模块502,用于基于上述实施例所述的人脸识别方法,对所述待识别人脸图像进行人脸识别,以确定人脸识别结果;控制模块503,用于基于所述人脸识别结果进行门锁控制。
基于同一技术构思,本公开实施例还提供了一种计算机设备。参照图6所示,为本公开实施例提供的计算机设备600的结构示意图,包括处理器601、存储器602、和总线603。其中,存储器602用于存储执行指令,包括内存6021和外部存储器6022;这里的内存6021也称内存储器,用于暂时存放处理器601中的运算数据,以及与硬盘 等外部存储器6022交换的数据,处理器601通过内存6021与外部存储器6022进行数据交换,当计算机设备600运行时,处理器601与存储器602之间通过总线603通信,使得处理器601在执行以下指令:提取待识别人脸图像的第一人脸特征;将所述第一人脸特征分别和一个或多个注册用户的第二人脸特征进行匹配,得到匹配结果,并基于所述匹配结果得到人脸识别结果;其中,针对每个所述注册用户,所述注册用户的所述第二人脸特征为基于所述注册用户的注册人脸图像的参考人脸特征,和所述注册用户在历史人脸识别中被确定与所述注册用户的所述注册人脸图像匹配的历史人脸图像的人脸特征确定的。
一种可能的实施方式中,处理器601执行的指令中,还包括:在不存在与注册用户的注册人脸图像匹配的历史人脸图像的情况下,将所述注册用户的注册人脸图像的参考人脸特征作为所述注册用户的第二人脸特征。
一种可能的实施方式中,处理器601执行的指令中,所述方法还包括:在满足更新触发条件的情况下,若所述人脸识别结果为所述待识别人脸图像属于所述注册用户之一时,基于所述第一人脸特征对所述待识别人脸图像中的待识别用户的第二人脸特征进行更新。例如,针对每个所述注册用户的包括所述第二人脸特征和所述参考人脸特征的特征组,确定所述待识别人脸图像的第一人脸特征和所述注册用户的第二人脸特征之间的第一相似度;以及确定所述待识别人脸图像的第一人脸特征和所述注册用户的参考人脸特征之间的第二相似度。这样,可在基于各注册用户对应的所述第一相似度和所述第二相似度,确定目标特征组满足更新条件的情况下,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新。其中,所述目标特征组对应的所述第一相似度大于第一预设阈值,且所述目标特征组对应的所述第二相似度大于第二预设阈值。
一种可能的实施方式中,处理器601执行的指令中,响应于所述待识别人脸图像从第一场景采集,所述更新条件包括:所述目标特征组的数量大于或等于1。
一种可能的实施方式中,处理器601执行的指令中,响应于所述待识别人脸图像从第二场景采集,所述更新条件还包括:所述目标特征组的数量大于或等于1、且小于预定数量。
一种可能的实施方式中,处理器601执行的指令中,在基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新时,所述方法具体包括:将与所述待识别人脸图像的第一人脸特征匹配的第二人脸特征,确定为所述待识别用户的第二人脸特征;基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重;基于所述更新权重、所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征,对所述待识别用户的第二人脸特征进行更新。
一种可能的实施方式中,处理器601执行的指令中,所述基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重,包括:基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的第一相似度、预设权重范围以及所述第一相似度对应的第一预设阈值,确定所述待识别人脸图像的第一人脸特征对应的第一更新权重和所述待识别用户的第二人脸特征对应的第二更新权重;其中,所述第一更新权重与所述第一相似度成正比,所述第一更新权重和所述第二更新权重之和为预设固定值。
或者,处理器601可以执行如下指令:响应人脸识别请求,控制图像采集设备采集待识别人脸图像;基于上述实施方式所述的人脸识别方法,对所述待识别人脸图像进行人脸识别,以确定人脸识别结果;基于所述人脸识别结果进行门锁控制。
本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有 计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的人脸识别方法的步骤。其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。
本公开实施例还提供一种计算机程序产品,该计算机产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中所述的人脸识别方法的步骤,具体可参见上述方法实施例,在此不再赘述。
其中,上述计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上所述实施例,仅为本公开的具体实施方式,用以说明本公开的技术方案,而非对其限制,本公开的保护范围并不局限于此,尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本公开实施例技术方案的精神和范围,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应所述以权利要求的保护范围为准。

Claims (13)

  1. 一种人脸识别方法,其特征在于,包括:
    提取待识别人脸图像的第一人脸特征;
    将所述第一人脸特征分别和一个或多个注册用户的第二人脸特征进行匹配,得到匹配结果;并
    基于所述匹配结果得到人脸识别结果;
    其中,针对每个所述注册用户,所述注册用户的所述第二人脸特征为基于所述注册用户的注册人脸图像的参考人脸特征,和所述注册用户在历史人脸识别中被确定与所述注册用户的所述注册人脸图像匹配的历史人脸图像的人脸特征确定的。
  2. 根据权利要求1所述的方法,其特征在于,基于所述注册用户的注册人脸图像的参考人脸特征,和所述注册用户在历史人脸识别中被确定与所述注册用户的所述注册人脸图像匹配的历史人脸图像的人脸特征,确定所述注册用户的第二人脸特征,包括:
    在不存在与所述注册用户的所述注册人脸图像匹配的历史人脸图像的情况下,将所述注册用户的所述注册人脸图像的所述参考人脸特征作为所述注册用户的所述第二人脸特征;
    在满足更新触发条件的情况下,若所述人脸识别结果为所述待识别人脸图像属于所述注册用户之一时,基于所述第一人脸特征对所述待识别人脸图像中涉及的待识别用户的第二人脸特征进行更新。
  3. 根据权利要求2所述的方法,其特征在于,所述更新触发条件包括以下至少一个:
    自上一次更新起已经过了至少预设时长;以及
    在上一次更新之后对所述待识别用户进行人脸识别的次数达到预设次数。
  4. 根据权利要求2或3所述的方法,其特征在于,所述对所述待识别人脸图像中涉及的待识别用户的第二人脸特征进行更新,包括:
    针对每个所述注册用户的包括所述第二人脸特征和所述参考人脸特征的特征组,
    确定所述待识别人脸图像的所述第一人脸特征和所述注册用户的所述第二人脸特征之间的第一相似度;以及
    确定所述待识别人脸图像的所述第一人脸特征和所述注册用户的所述参考人脸特征之间的第二相似度;
    基于各所述注册用户对应的所述第一相似度和所述第二相似度确定目标特征组,其中,所述目标特征组对应的所述第一相似度大于第一预设阈值,且所述目标特征组对应的所述第二相似度大于第二预设阈值;
    在确定所述目标特征组满足更新条件的情况下,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新。
  5. 根据权利要求4所述的方法,其特征在于,所述更新条件包括以下至少一个:
    响应于所述待识别人脸图像从第一场景采集,所述目标特征组的数量大于或等于1;
    响应于所述待识别人脸图像从第二场景采集,所述目标特征组的数量大于或等于1且小于预定数量。
  6. 根据权利要求4或5所述的方法,其特征在于,基于所述待识别人脸图像的第一人脸特征对所述待识别用户的第二人脸特征进行更新,包括:
    将与所述待识别人脸图像的第一人脸特征匹配的第二人脸特征,确定为所述待识别用户的第二人脸特征;
    基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的所述第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重;
    基于所述更新权重、所述待识别人脸图像的第一人脸特征与所述待识别用户的第二 人脸特征,对所述待识别用户的第二人脸特征进行更新。
  7. 根据权利要求6所述的方法,其特征在于,所述基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的所述第一相似度,确定所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征分别对应的更新权重,包括:
    基于所述待识别人脸图像的第一人脸特征与所述待识别用户的第二人脸特征之间的所述第一相似度、预设权重范围以及所述第一预设阈值,确定所述待识别人脸图像的第一人脸特征对应的第一更新权重和所述待识别用户的第二人脸特征对应的第二更新权重;
    其中,所述第一更新权重与所述第一相似度成正比,
    所述第一更新权重和所述第二更新权重之和为预设固定值,
    所述预设权重范围包括预设的权重最大值和预设的权重最小值。
  8. 一种门禁控制方法,其特征在于,包括:
    响应人脸识别请求,控制图像采集设备采集待识别人脸图像;
    基于权利要求1至7任一所述的人脸识别方法,对所述待识别人脸图像进行人脸识别,以确定人脸识别结果;
    基于所述人脸识别结果进行门锁控制。
  9. 一种人脸识别装置,其特征在于,包括:
    特征提取模块,用于提取待识别人脸图像的第一人脸特征;
    匹配模块,用于将所述第一人脸特征分别和一个或多个注册用户的第二人脸特征进行匹配,得到匹配结果,并基于所述匹配结果得到人脸识别结果;
    其中,针对每个所述注册用户,所述注册用户的所述第二人脸特征为基于所述注册用户的注册人脸图像的参考人脸特征,和所述注册用户在历史人脸识别中被确定为与所述注册用户的所述注册人脸图像匹配的历史人脸图像的人脸特征确定的。
  10. 一种门禁控制装置,其特征在于,包括:
    采集模块,用于响应人脸识别请求,控制图像采集设备采集待识别人脸图像;
    识别模块,用于基于权利要求1至7任一所述的人脸识别方法,对所述待识别人脸图像进行人脸识别,以确定人脸识别结果;
    控制模块,用于基于所述人脸识别结果进行门锁控制。
  11. 一种计算机设备,其特征在于,包括处理器、存储器和总线,
    所述存储器存储有所述处理器可执行的机器可读指令,
    当所述计算机设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行如权利要求1至7任一项所述的人脸识别方法的步骤,或者执行如权利要求8所述的门禁控制方法的步骤。
  12. 一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器运行时执行如权利要求1至7任一项所述的人脸识别方法的步骤,或者执行如权利要求8所述的门禁控制方法的步骤。
  13. 一种计算机程序产品,所述计算机产品承载有程序代码,所述程序代码包括的指令用于执行如权利要求1至7任一项所述的人脸识别方法的步骤,或者执行如权利要求8所述的门禁控制方法的步骤。
PCT/CN2022/104602 2021-09-16 2022-07-08 人脸识别及门禁控制 WO2023040436A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111087459.6 2021-09-16
CN202111087459.6A CN113792668A (zh) 2021-09-16 2021-09-16 人脸识别及门禁控制方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023040436A1 true WO2023040436A1 (zh) 2023-03-23

Family

ID=78878593

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/104602 WO2023040436A1 (zh) 2021-09-16 2022-07-08 人脸识别及门禁控制

Country Status (2)

Country Link
CN (1) CN113792668A (zh)
WO (1) WO2023040436A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118155269A (zh) * 2024-05-09 2024-06-07 深圳聚瑞云控科技有限公司 一种门禁控制智能识别系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113792668A (zh) * 2021-09-16 2021-12-14 深圳市商汤科技有限公司 人脸识别及门禁控制方法、装置、计算机设备及存储介质
CN117011922B (zh) * 2023-09-26 2024-03-08 荣耀终端有限公司 人脸识别方法、设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160132718A1 (en) * 2014-11-06 2016-05-12 Intel Corporation Face recognition using gradient based feature analysis
CN110532991A (zh) * 2019-09-04 2019-12-03 深圳市捷顺科技实业股份有限公司 一种人脸识别方法、装置及设备
CN112818909A (zh) * 2021-02-22 2021-05-18 Oppo广东移动通信有限公司 图像更新方法、装置、电子设备及计算机可读介质
CN113792668A (zh) * 2021-09-16 2021-12-14 深圳市商汤科技有限公司 人脸识别及门禁控制方法、装置、计算机设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160132718A1 (en) * 2014-11-06 2016-05-12 Intel Corporation Face recognition using gradient based feature analysis
CN110532991A (zh) * 2019-09-04 2019-12-03 深圳市捷顺科技实业股份有限公司 一种人脸识别方法、装置及设备
CN112818909A (zh) * 2021-02-22 2021-05-18 Oppo广东移动通信有限公司 图像更新方法、装置、电子设备及计算机可读介质
CN113792668A (zh) * 2021-09-16 2021-12-14 深圳市商汤科技有限公司 人脸识别及门禁控制方法、装置、计算机设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118155269A (zh) * 2024-05-09 2024-06-07 深圳聚瑞云控科技有限公司 一种门禁控制智能识别系统

Also Published As

Publication number Publication date
CN113792668A (zh) 2021-12-14

Similar Documents

Publication Publication Date Title
WO2023040436A1 (zh) 人脸识别及门禁控制
AU2019203766B2 (en) System and method for biometric authentication in connection with camera-equipped devices
CN109948408B (zh) 活性测试方法和设备
CN107924436A (zh) 使用生物识别技术的电子装置接入控制
JP5805040B2 (ja) 人物認証用辞書更新方法、人物認証用辞書更新装置、人物認証用辞書更新プログラム及び人物認証システム
US20230401915A1 (en) Information processing apparatus, information processing system, and information processing method
US11455384B2 (en) User authentication method and apparatus with adaptively updated enrollment database (DB)
US20190278894A1 (en) Multiple-tiered facial recognition
JP2016151831A (ja) 生体情報登録装置、生体情報登録方法、及び生体情報登録プログラム
KR20210050884A (ko) 화자 인식을 위한 등록 방법 및 장치
CN114127801A (zh) 跨设备网络使用人物可识别性的系统和方法
CN111919217B (zh) 生物特征注册的方法、装置、用户设备及存储介质
WO2022033068A1 (zh) 一种图像管理的方法、装置、终端设备和系统
US11899765B2 (en) Dual-factor identification system and method with adaptive enrollment
US11126830B2 (en) Computerized system and method for adaptive stranger detection
EP4058912A1 (en) Using an enrolled biometric dataset to detect adversarial examples in biometrics-based authentication system
US10311290B1 (en) System and method for generating a facial model
WO2023134232A1 (zh) 特征向量数据库的更新方法、装置、设备及介质
WO2022000334A1 (zh) 生物特征识别方法、装置、设备及存储介质
CN112102551A (zh) 设备控制方法、装置、电子设备及存储介质
JP2020135666A (ja) 認証装置、認証用端末、認証方法、プログラム及び記録媒体
Mary Praveena et al. An Effective Security Based Wireless Information System Based on Fusion Principal Component Analysis
US20230259600A1 (en) Adaptive personalization for anti-spoofing protection in biometric authentication systems
US20230222193A1 (en) Information processing device, permission determination method, and program
WO2023188332A1 (ja) 人物特定装置、人物特定方法、および人物特定プログラム

Legal Events

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

Ref country code: DE