WO2021139493A1 - Visitor identity authentication method and apparatus based on machine learning, and computer device - Google Patents

Visitor identity authentication method and apparatus based on machine learning, and computer device Download PDF

Info

Publication number
WO2021139493A1
WO2021139493A1 PCT/CN2020/136370 CN2020136370W WO2021139493A1 WO 2021139493 A1 WO2021139493 A1 WO 2021139493A1 CN 2020136370 W CN2020136370 W CN 2020136370W WO 2021139493 A1 WO2021139493 A1 WO 2021139493A1
Authority
WO
WIPO (PCT)
Prior art keywords
visitor
feature
facial features
target
authenticated
Prior art date
Application number
PCT/CN2020/136370
Other languages
French (fr)
Chinese (zh)
Inventor
孙太武
周超勇
刘玉宇
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021139493A1 publication Critical patent/WO2021139493A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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

Definitions

  • This application relates to the field of information technology, and in particular to a visitor identity authentication method, device and computer equipment based on machine learning.
  • visitor registration for example, common interview invitations, business negotiations between different companies, business trips and exchanges between branches and head offices, registration of outsiders from schools and communities, and visitors can be registered through visitor registration. Personnel identity is verified.
  • a visitor's photo is usually collected, and the characteristics of the collected visitor's photo are compared with the characteristics of all visitors in the feature database, and the visitor's identity is authenticated according to the comparison result.
  • the inventor realizes that only a single feature of each visitor is usually stored in the feature library, and only the extracted visitor feature is compared with a single feature of a visitor in the feature library, which cannot ensure the accuracy of the comparison result.
  • the accuracy of identity authentication is low. If multiple characteristics of each visitor are extracted and stored in the signature database, the comparison workload will be increased when the identity of the visitor is authenticated, thereby affecting the authentication efficiency of the visitor's identity.
  • This application provides a visitor identity authentication method, device, and computer equipment based on machine learning, which are mainly capable of effectively authenticating the visitor's identity. While improving the accuracy of the visitor's identity authentication, it can ensure the authentication efficiency of the visitor's identity.
  • a visitor identity authentication method based on machine learning including:
  • the identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
  • a visitor identity authentication device based on machine learning including:
  • the obtaining unit is used to obtain the facial features of the visitor to be authenticated
  • the analysis unit is configured to perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and to determine the preset feature library according to the multi-level analysis result Each target visitor;
  • the determining unit is configured to determine the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor.
  • a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:
  • the identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
  • a computer device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the following steps when the program is executed:
  • the identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
  • This application provides a machine learning-based visitor identity authentication method, device, and computer equipment. Compared with the current method of comparing the extracted visitor characteristics with the single characteristic of the visitor in the feature database, this application can obtain the information of the visitor to be authenticated. Face features; and perform multi-level analysis based on the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, so as to exclude the preset feature library and the waiting list according to the multi-level analysis result
  • the vast majority of visitors who are not close to the authenticated visitors will only keep a few target visitors close to the visitors to be authenticated, and then determine the identity of the visitor to be authenticated according to the multiple facial features corresponding to each target visitor.
  • the multiple facial features of the target visitor in the preset feature library are used to authenticate the identity of the visitor to be authenticated, which improves the accuracy of the visitor's identity verification.
  • it can also use multi-level analysis to exclude the face of most visitors in the preset feature library.
  • Features greatly reduce the workload of feature comparison. While improving the accuracy of visitor identity authentication, it can ensure the efficiency of visitor identity authentication.
  • Fig. 1 shows a flow chart of a method for guest identity authentication based on machine learning provided by an embodiment of the present application
  • FIG. 2 shows a flowchart of another method for guest identity authentication based on machine learning provided by an embodiment of the present application
  • FIG. 3 shows a schematic structural diagram of a visitor identity authentication device based on machine learning provided by an embodiment of the present application
  • FIG. 4 shows a schematic structural diagram of another visitor identity authentication device based on machine learning provided by an embodiment of the present application
  • Fig. 5 shows a schematic diagram of the physical structure of a computer device provided by an embodiment of the present application.
  • an embodiment of the present application provides a message assembly method. As shown in FIG. 1, the method includes:
  • the visitors to be authenticated are outsiders in closed areas such as companies, schools, communities, etc.
  • This embodiment of the application is mainly suitable for authenticating the identities of outsiders in the above closed areas, so as to record the flow of people in the closed areas and ensure that the closed areas are For the personal and property safety of personnel, the executor of the embodiment of this application is a system capable of authenticating the identity of the visitor.
  • the waiting The personal information and characteristic information of the authenticated visitor are entered into the system and stored in the preset feature library, so that when the visitor officially visits, the feature information of the visitor to be authenticated is extracted, and the identity of the visitor to be authenticated is authenticated using the preset feature library.
  • This application embodiment provides two ways to obtain visitor personal information and characteristic information, namely online and offline.
  • visitors can log in to the visitor identity authentication system in advance, register and fill in relevant personal information, including the visitor’s personal information.
  • personal information such as name, ID number, unit, address, etc., and upload a scanned copy of the ID card online.
  • the visitor ID authentication system uses the preset face detection model to detect and extract the visitor's ID card Further, the preset face recognition model is used to extract the facial features in the visitor’s ID photo, and the visitor’s personal information, visitor photos, and the extracted features of the visitor’s face are correspondingly stored in the preset feature library.
  • Visitors can use the facial features in the preset feature library to authenticate the identity of the visitor when they come officially; for the offline method, when the visitor to be authenticated visits for the first time, he needs to carry his ID card, and the visitor identity authentication system can treat the identity of the authenticated visitor.
  • the preset face recognition model is used to extract the facial features in the visitor’s ID photo, and the extracted visitor’s facial features, visitor personal information and visitor photos are correspondingly stored in the preset feature library, thereby , When the visitor visits again, there is no need to register information or carry an ID card, and the identity of the visitor can be directly authenticated through the preset feature database in the visitor identity authentication system.
  • the photos of all visitors in the preset feature library can be used as training samples, and the training samples are trained to construct the preset face recognition model.
  • the embodiment of the present application The blockchain technology is also involved, and the facial features in the preset feature library can be stored in the blockchain.
  • the preset feature library In order to ensure the accuracy of visitor identity authentication, avoid the inaccurate feature comparison result due to the fact that only a single feature of each visitor is stored in the preset feature library, which in turn affects the accuracy of visitor identity authentication.
  • the clarity of the ID photo of the visitor is relatively poor.
  • the preset super-resolution model can be used to clean the ID photo of the visitor.
  • the preset super-resolution model may be a preset convolutional neural network model, and further, the preset face recognition model is also used to extract facial features in the visitor’s image after the cleaning process, so that the visitor blur can be obtained
  • the facial features of the photo can also obtain the facial features of the visitor’s clear picture.
  • you can also obtain the visitor ID At the same time of the photo, the visitor is required to upload a recent photo.
  • the recent photo can be one or more recent photos of the visitor without batch processing and light makeup.
  • the facial features of each recent photo uploaded by the visitor are extracted separately.
  • the facial features extracted from different photos are stored in a preset feature library. It should be noted that, in order to ensure the accuracy and effectiveness of the visitor’s identity authentication, the facial features corresponding to each visitor in the preset feature library should not be overridden. For example, at least three facial features of each visitor are stored in the preset feature library.
  • the camera when a visitor comes to visit, can be used to collect the visitor's photos, and then the preset face recognition model is used to extract the facial features in the collected photos, so as to compare the facial features of the visitor to be authenticated with the preset feature library The multiple facial features of different visitors are compared, and the identity of the visitor is authenticated.
  • the specific application scenarios of the embodiments of this application can be applied to common interview invitations, business negotiations between different companies, and between different branches and headquarters. Scenes such as business trips and exchanges, registration of migrants from schools and communities, and registration of migrants in closed communities during the epidemic.
  • the preset feature library stores multiple facial features corresponding to different visitors.
  • the preset feature library stores five facial features corresponding to visitor A and three facial features corresponding to visitor B.
  • the preset feature library stores multiple features of different visitors, when a visitor to be authenticated visits, if the extracted facial features of the visitor to be authenticated are compared with the multiple facial features corresponding to all visitors in the preset feature library, one by one The comparison will increase the workload of comparison and the efficiency of image visitor identity authentication.
  • the extracted facial features of the visitor to be authenticated and the multiple facial features corresponding to different visitors in the preset feature library are multi-level Analyze, exclude most of the visitors in the preset feature database that are not similar to the visitors to be authenticated, retain target visitors that are similar to the visitors to be authenticated, and only compare the facial features corresponding to the visitors to be authenticated with the target visitors in the preset feature library Corresponding multiple facial features are compared one by one, so that while improving the accuracy of visitor identity authentication, it can ensure the authentication efficiency of visitor identity.
  • the facial features of the visitor to be authenticated are different from multiple facial features corresponding to different visitors.
  • Level analysis and comparison first calculate the feature centers corresponding to different visitors according to the multiple facial features corresponding to different visitors in the preset feature library, that is, the geometric centers corresponding to multiple facial features of different visitors, and then according to the features corresponding to different visitors.
  • the center clusters all visitors in the preset feature library, that is, divides all visitors in the preset feature library into different cluster categories, and selects the target cluster that is closest to the visitor to be authenticated from multiple cluster categories Category, complete the first-level comparative analysis, and further determine the feature center corresponding to each visitor under the target cluster category, and compare the facial features of the visitor to be authenticated with the feature center corresponding to each visitor under the target cluster category.
  • the comparison is performed to obtain the comparison result, and according to the comparison result, the target visitors are selected from each visitor under the target cluster category, thereby completing the second-level comparison analysis, and finally screening out the facial features corresponding to the visitors to be authenticated
  • the multiple facial features corresponding to each target visitor are compared to obtain a comparison result, and the identity of the authenticated visitor is authenticated according to the comparison result, thereby completing the third-level comparative analysis.
  • the facial features corresponding to the visitor to be authenticated are respectively combined with the multiple faces corresponding to each target visitor.
  • the features are compared, and the identity of the visitor to be authenticated is determined according to the result of the comparison.
  • the cosine distance between the facial feature of the visitor to be authenticated and the multiple facial features corresponding to each visitor can be calculated separately, according to the calculated individual The cosine distance is used to determine the identity of the visitor to be authenticated.
  • the facial features corresponding to the visitor to be authenticated are compared with multiple facial features corresponding to the target visitor A.
  • the facial features corresponding to the target visitor A include facial feature 1.
  • Face feature 2 and face feature 3 respectively calculate the cosine distance between the face feature corresponding to the visitor to be authenticated and face feature 1, face feature 2 and face feature 3, which are cosine distance 1, cosine distance 2, and Cosine distance 3, if the cosine distance 1, cosine distance 2 and cosine distance 3 are all greater than or equal to the preset cosine distance, the visitor to be authenticated is regarded as the target visitor A, that is, the visitor to be authenticated is allowed to enter the enclosed area after the identity authentication is passed.
  • the size of the preset cosine distance can be set according to the accuracy requirements of the business party for visitor identity authentication.
  • the embodiment of this application provides a machine learning-based visitor identity authentication method. Compared with the current method of comparing the extracted visitor features with the single feature of the visitor in the feature database, this application can obtain the facial features of the visitor to be authenticated. And perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, so that according to the multi-level analysis results, the preset feature library and the visitor to be authenticated are excluded The vast majority of visitors who are close to each other only keep a few target visitors who are close to the visitor to be authenticated.
  • the identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor, so that the preset can be used
  • the multiple facial features of the target visitor in the feature database are authenticated to the identity of the visitor to be authenticated, which improves the authentication accuracy of the visitor’s identity.
  • it can also use multi-level analysis to exclude the facial features of the vast majority of visitors in the preset feature database. It reduces the workload of feature comparison, and while improving the accuracy of visitor identity authentication, it can ensure the efficiency of visitor identity authentication.
  • the embodiment of this application provides another method for authenticating the identity of a visitor based on machine learning, as shown in FIG. 2 As shown, the method includes:
  • the ID photo and personal information of the visitor to be authenticated can be obtained online or offline in advance, and use the pre- Set up a face recognition model to extract the facial features in the ID photo, and store the extracted facial features and personal information of the visitors in a preset feature library, which stores all visitors who have visited and will be visiting
  • a preset feature library which stores all visitors who have visited and will be visiting
  • the photo of the visitor to be authenticated can be collected through the camera, and then the same preset face recognition model is used to extract the facial features in the photo of the visitor to be authenticated, and the person who is the visitor to be authenticated
  • the facial features are compared with the facial features of different visitors in the preset feature library, and the comparison result is obtained.
  • the identity of the visitor to be authenticated is determined. Further, in order to improve the accuracy of the authentication of the visitor’s identity, it is necessary to increase the preset
  • the feature information in the feature library specifically, while obtaining the ID photo of the visitor, the visitor can also be required to provide multiple recent photos, and the preset face recognition model can be used to extract the facial features corresponding to each recent photo. At the same time, in order to be able to obtain the facial features corresponding to different photos of visitors, the preset super-resolution model is used to clarify the visitor's ID photo to obtain the cleaned image.
  • the preset super-resolution model can be Preset the convolutional neural network model, and further use the preset face recognition model to extract the facial features of the visitor’s clear picture, so that multiple facial features corresponding to different visitors can be obtained, and the personal information and information of different visitors can be obtained.
  • the photos and multiple facial features are correspondingly stored in the preset feature library, which can enrich the feature information in the preset feature library and improve the accuracy of visitor identity authentication.
  • the comparison workload will be increased, and the efficiency of the image visitor identity authentication will be increased. Therefore, in this embodiment of the application, a multi-level analysis method is used to pre-empt the vast majority of visitors who are not similar to the visitor to be authenticated in the preset feature library, and only multiple target visitors who are similar to the visitor to be authenticated are retained. Comparing the corresponding facial features with the multiple facial features corresponding to each target visitor can not only improve the authentication accuracy of the visitor’s identity, but also ensure the authentication efficiency of the visitor’s identity.
  • Step 202 specifically includes: Multiple facial features, calculate the feature center corresponding to each visitor; based on the calculated feature center corresponding to each visitor, perform cluster analysis on each visitor to obtain multiple cluster categories; according to the person to be authenticated Face features and feature centers corresponding to each visitor under different cluster categories, determine the target cluster category in the multiple cluster categories; according to the facial features of the visitor to be authenticated and each visitor under the target cluster category The corresponding feature center determines each target visitor under the target cluster category.
  • the multiple clusters are determined according to the facial features of the visitor to be authenticated and the feature centers corresponding to each visitor in the different cluster categories.
  • the target cluster category in the category category includes: calculating the feature centers corresponding to the different cluster categories according to the feature centers corresponding to each visitor under the different cluster categories; respectively calculating the facial features of the visitors to be authenticated and The first cosine distance between the feature centers corresponding to the different cluster categories, and the target cluster category in the multiple cluster categories is determined based on the calculated first cosine distances.
  • the target cluster is determined according to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category
  • Each target visitor under the category includes: respectively calculating the second cosine distance between the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category; and each second cosine distance based on the calculation The chord distance is used to filter out the target visitors from each visitor under the target cluster category.
  • the determination of the target cluster category in the plurality of cluster categories based on the calculated first cosine distance includes: The cluster category corresponding to the largest first cosine distance in the chord distance is determined as the target cluster category, and each visitor under the target cluster category is determined.
  • screening the target visitors from each visitor in the target cluster category includes: performing calculations on the target cluster category according to the calculated second cosine distances. Each visitor is sorted, and the target visitors whose sorting rank is within the preset range are filtered out according to the sorting result.
  • m is the number of facial features corresponding to a visitor in the preset feature library
  • (x 11 ,x 12 ,...x 1n ) is the first facial sign corresponding to a visitor
  • (x m1 ,x m2 , ..., x mn ) is the m-th face feature corresponding to a visitor
  • (X 1 ,X 2 ,...X n) is the feature center corresponding to a visitor
  • the preset feature library can be calculated according to the above formula Feature centers corresponding to different visitors.
  • cluster analysis is performed on each visitor to obtain multiple cluster categories.
  • the characteristic centers corresponding to each visitor are input into a preset cluster analysis model for cluster analysis, and the result is Multiple cluster categories
  • each visitor in the preset feature library is divided into cluster categories with different values
  • the preset cluster analysis model can be a preset dbscan cluster analysis model, that is, the feature center corresponding to each visitor is input
  • the radius parameter and field density threshold can be performed according to the number of classifications and the accuracy of the clustering process.
  • m is the number of feature centers corresponding to all visitors under a certain cluster category, (y 11 ,y 12 ,...,y 1n ), (y m1 ,y m2 ,...,y mn ) are respectively a certain cluster
  • the feature center corresponding to the next visitor in the category and the feature center corresponding to the m-th visitor, (Y 1 , Y 2 ,..., Y n ) is the feature center corresponding to a certain clustering category, so according to the above formula according to different clustering
  • the feature centers corresponding to each visitor under the category can be calculated for the feature centers corresponding to different cluster categories.
  • the first cosine distances between the facial features corresponding to the visitors to be authenticated and the feature centers corresponding to different cluster categories are calculated respectively, and the maximum cosine distances are filtered from the calculated cosine distances, and the maximum cosine distances are corresponded to
  • the cluster category of is determined as the target cluster category, and the specific calculation formula of cosine distance is as follows:
  • cos ⁇ is the first cosine distance between the face feature corresponding to the visitor to be authenticated and the feature center corresponding to different cluster categories
  • (X 1 ,X 2 ,...X n ) are the facial features corresponding to the visitor to be authenticated and the facial features corresponding to different clustering categories
  • the above formula can be used to calculate the facial features corresponding to the visitor to be authenticated corresponding to different clustering categories.
  • the corresponding cluster category is used as the target cluster category, and each visitor under other cluster categories that is not similar to the visitor to be authenticated in the preset feature library is excluded, thereby greatly reducing the amount of calculation of feature comparison during visitor identity authentication.
  • the target cluster category includes visitor 1, visitor 2. , Visitor 3, visitor 4, and visitor 5, respectively calculate the second cosine distance between the facial feature corresponding to the visitor to be authenticated and the feature center corresponding to visitor 1, visitor 2, visitor 3, visitor 4, and visitor 5.
  • the calculated size of each second cosine distance sorts each visitor from largest to smallest, and the sorting result is visitor 3, visitor 4, visitor 1, visitor 2, visitor 5, and further, filter the visitors with the top three rankings 3.
  • Visitor 4 and visitor 1 are target visitors that are closer to the visitor to be authenticated.
  • the facial features corresponding to the visitor to be authenticated can be compared with multiple facial features corresponding to the target visitor, which can greatly reduce the features.
  • the amount of comparison calculation improves the efficiency of visitor identity authentication.
  • the specific calculation formula of the second cosine distance is the same as the calculation formula of the first cosine distance, and will not be repeated here.
  • the multiple facial features are respectively determined A weight value corresponding to each facial feature in, and calculate the feature center corresponding to each visitor based on the determined weight value and the multiple facial features.
  • the clarified ID photo of the visitor can reflect more characteristics of the visitor. Therefore, the weight value corresponding to the facial feature of the clarified ID photo of the visitor is assigned 0.5, and the fuzzy ID photo of the visitor and The weight values corresponding to the facial features of recent selfies are 0.3 and 0.2, respectively.
  • each target visitor in the preset feature library includes target visitor A and target visitor B, and the facial features corresponding to target visitor A are facial feature 1, facial feature 2, and facial feature 3.
  • the face features corresponding to target visitor B are face feature 4, face feature 5, and face feature 6, respectively.
  • the third is calculated between the face feature corresponding to visitor A to be authenticated and the multiple face features corresponding to target visitor A.
  • the cosine distance is to calculate the third cosine distance between the face feature of the visitor to be authenticated and face feature 1, face feature 2 and face feature 3 respectively, and similarly calculate the face feature corresponding to the visitor to be authenticated
  • the third cosine distance between the multiple facial features corresponding to the target visitor B, that is, the third remainder between the facial features corresponding to the visitor to be authenticated and the facial feature 4, the facial feature 5, and the facial feature 6 are calculated respectively Chord distance.
  • each calculated third cosine distance is greater than or equal to a preset cosine distance, determine that the visitor to be authenticated is any target visitor.
  • the visitor to be authenticated is determined to be the target visitor A; if the facial features of the visitor to be authenticated are the same as those of the target visitor B
  • the cosine distances between face feature 4, face feature 5, and face feature 6 are cosine distance 4, cosine distance 5, and cosine distance 6, respectively, and any cosine distance among cosine distance 4, cosine distance 5, and cosine distance 6 is less than With the preset cosine distance, it is determined that the visitor to be authenticated is not the target visitor B.
  • the identity of the visitor to be authenticated can be determined according to the comparison result.
  • the authentication accuracy of the visitor's identity is improved.
  • the preset cosine distance can be set according to the accuracy requirements of the visitor identity authentication. It should be noted that in order to ensure the authentication accuracy of the visitor identity, the preset cosine distance should not be set too small.
  • the preset feature library needs to be updated regularly, that is, faces with low accuracy in the preset feature library are deleted. Characteristics.
  • the method further includes: determining the number of facial features corresponding to each visitor according to multiple facial features corresponding to each visitor in the preset feature library; and according to the facial features corresponding to each visitor The feature quantity is used to determine the feature visitor to be updated among the visitors; perform cluster analysis on multiple facial features corresponding to the feature visitor to be updated to obtain the feature clustering result corresponding to the feature visitor to be updated; According to the feature clustering result, the feature update is performed on the feature visitor to be updated.
  • the performing feature update on the feature visitor to be updated according to the feature clustering result includes: if the feature clustering result is a plurality of feature categories, determining and deleting the feature visitor corresponding to the feature to be updated Outlier facial features; if the feature clustering result is a single feature category, according to the storage time of multiple facial features corresponding to the feature visitor to be updated, the earliest entry among the multiple facial features is determined and deleted The facial features of the library.
  • the determining the feature visitor to be updated in each visitor according to the facial feature quantity corresponding to each visitor includes: determining according to the facial feature quantity corresponding to each visitor The visitor whose number of facial features is greater than the preset number of facial features is determined as the visitor with the feature to be updated.
  • the preset number of facial features can be determined according to the storage space size of the server and the accuracy requirements for visitor identity authentication.
  • set the preset number of facial features to 5, and determine that the number of facial features corresponding to visitor A in the preset feature library is 8. Since the number of facial features corresponding to the visitor is greater than the preset number of facial features, visitor A is determined For the feature visitors to be updated, it is necessary to update multiple facial features corresponding to visitor A, and delete the facial features with lower accuracy. Further, cluster analysis of multiple facial features corresponding to visitor A can be used specifically The preset maximum and minimum distance clustering algorithm performs cluster analysis on the multiple facial features corresponding to visitor A, and obtains the feature clustering result corresponding to visitor A, thus by assigning the multiple facial features corresponding to visitor A to the nearest The clustering center divides the multiple facial features corresponding to visitor A into different feature categories.
  • the feature clustering result is multiple feature categories, for example, one feature category contains 5 facial features, and the other feature category contains 3 facial features, determine the 3 facial features in another feature category as outlier facial features, and delete them. If the feature clustering result is a feature category, then according to the storage time corresponding to each facial feature , Delete the earliest three facial features in the database, thereby realizing the update of the features in the preset feature database.
  • the collected photos of the visitors to be authenticated can also be transferred to the visitor identity authentication system and added to the training sample to optimize the preset face recognition model.
  • the preset face recognition model can be optimized using the photos of the visitors to be authenticated at preset time intervals, and then the optimized preset face recognition model can be used to extract the facial features corresponding to different photos in the preset feature library , Update the facial features in the preset feature library to further improve the accuracy of the facial features in the preset feature library.
  • each company branch can exchange the visitor's preset feature library, which can facilitate the visit of visitors from different branches.
  • sensitive information such as the visitor's ID number is stored in its own database. There will be no information exposure.
  • the embodiment of this application provides another machine learning-based visitor identity authentication method. Compared with the current method of comparing the extracted visitor features with the single feature of the visitor in the feature database, this application can obtain the face of the visitor to be authenticated. Features; and based on the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library to perform multi-level analysis, so as to exclude the preset feature library and the visitors to be authenticated according to the multi-level analysis results The vast majority of visitors who are not close, only keep a few target visitors close to the visitor to be authenticated, and then determine the identity of the visitor to be authenticated according to the multiple facial features corresponding to each target visitor.
  • an embodiment of the present application provides a visitor identity authentication device based on machine learning.
  • the device includes: an acquisition unit 31, an analysis unit 32, and a determination unit 33.
  • the acquiring unit 31 may be used to acquire the facial features of the visitor to be authenticated.
  • the acquiring unit 31 is the main functional module of the device for acquiring the facial features of the visitor to be authenticated.
  • the analysis unit 32 may be configured to perform multi-level analysis based on the facial features of the visitor to be authenticated and multiple facial features corresponding to each visitor in the preset feature library, and determine the preset based on the multi-level analysis result Each target visitor in the signature database.
  • the analysis unit 32 performs multi-level analysis in the device according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determines the preset according to the multi-level analysis result.
  • the main functional modules of each target visitor in the signature database are also core modules.
  • the determining unit 33 may be configured to determine the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor.
  • the determining unit 33 is a main functional module in the device that determines the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor, and is also a core module.
  • the analysis unit 32 in order to determine each target visitor in the preset feature library according to the multi-level analysis result, includes: a calculation module 321, an analysis module 322, and a determination module 323 .
  • the calculation module 321 may be used to calculate the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor.
  • the analysis module 322 may be used to perform cluster analysis on each visitor based on the calculated feature center corresponding to each visitor to obtain multiple cluster categories.
  • the determining module 323 may be used to determine the target cluster category among the multiple cluster categories according to the facial features of the visitor to be authenticated and the feature centers corresponding to each visitor in different cluster categories.
  • the determining module 323 may also be used to determine each target visitor in the target cluster category according to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor in the target cluster category.
  • the determining module 323 includes: a calculation sub-module and a determining sub-module.
  • the calculation sub-module may be used to calculate the characteristic centers corresponding to the different clustering categories according to the characteristic centers corresponding to each visitor in the different clustering categories.
  • the determining sub-module may be used to calculate the first cosine distances between the facial features of the visitor to be authenticated and the feature centers corresponding to the different cluster categories, and to calculate the first cosine distances based on the calculated first cosine distances. , Determining the target cluster category among the multiple cluster categories.
  • the determination module 323 further includes a screening sub-module, and the calculation sub-module may also be used to calculate the facial features of the visitors to be authenticated and the feature centers corresponding to each visitor in the target cluster category. The second cosine distance between.
  • the screening sub-module may be used to screen out target visitors from each visitor in the target cluster category based on each calculated second cosine distance.
  • the calculation module 321 includes a determination sub-module and a calculation sub-module.
  • the determining sub-module may be used to determine the weight value corresponding to each facial feature of the multiple facial features.
  • the calculation sub-module may be used to calculate the feature center corresponding to each visitor based on the determined weight value and the multiple facial features.
  • the determining unit 33 includes a calculating module 331 and a determining module 332.
  • the calculation module 331 may be used to determine any one of the target visitors, and calculate the difference between the facial features of the visitor to be authenticated and the facial features corresponding to any of the target visitors. The third cosine distance.
  • the determining module 332 may be configured to determine that the visitor to be authenticated is any target visitor if the calculated third cosine distances are all greater than or equal to a preset cosine distance.
  • the device further includes: an update unit 34.
  • the determining unit 33 may also be configured to determine the number of facial features corresponding to each visitor according to multiple facial features corresponding to each visitor in the preset feature library.
  • the determining unit 33 may also be configured to determine the feature visitor to be updated among the visitors according to the number of facial features corresponding to each visitor.
  • the analysis unit 32 may also be used to perform cluster analysis on multiple facial features corresponding to the feature visitor to be updated to obtain a feature clustering result corresponding to the feature visitor to be updated.
  • the updating unit 34 may be configured to update the characteristics of the visitor with the characteristics to be updated according to the result of the characteristic clustering.
  • the update unit 34 includes: a first deletion module 341 and a second deletion module 342.
  • the first deleting module 341 may be used to determine and delete the outlier facial features corresponding to the feature visitor to be updated if the feature clustering result is multiple feature categories.
  • the second deletion module 342 may be used to determine and delete the multiple face features according to the storage time of the multiple face features corresponding to the feature visitor to be updated if the feature clustering result is a single feature category The face feature that is the earliest in the database.
  • an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored.
  • the program is executed by a processor, the following steps are implemented: Face features; multi-level analysis is performed according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and each of the preset feature libraries is determined according to the multi-level analysis result Target visitor; determine the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor.
  • the computer storage medium may be non-volatile or volatile.
  • an embodiment of the present application also provides a physical structure diagram of a computer device.
  • the computer device includes: a processor 41, The memory 42 and a computer program that is stored on the memory 42 and can run on the processor, wherein the memory 42 and the processor 41 are both set on the bus 43, and the processor 41 implements the following steps when the processor 41 executes the program: Obtain the pending authentication The facial features of the visitor; perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determine the preset feature library according to the multi-level analysis result The identity of each target visitor to be authenticated is determined according to multiple facial features corresponding to each target visitor.
  • this application can obtain the facial features of the visitor to be authenticated; and perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library. Therefore, according to the multi-level analysis results, the vast majority of visitors who are not similar to the visitors to be authenticated in the preset feature library are excluded, and only a few target visitors who are similar to the visitors to be authenticated are retained. Then, according to the multiple faces corresponding to each target visitor.
  • Feature to determine the identity of the visitor to be authenticated so that multiple facial features of the target visitor in the preset feature library can be used to authenticate the identity of the visitor to be authenticated, which improves the authentication accuracy of the visitor’s identity, and can also use multiple levels
  • the analysis excludes the facial features of most visitors in the preset feature library, which greatly reduces the workload of feature comparison. While improving the accuracy of visitor identification, it can ensure the efficiency of visitor identification.
  • modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices.
  • they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, and in some cases, they can be executed in a different order than here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Medical Informatics (AREA)
  • Collating Specific Patterns (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed are a visitor identity authentication method and apparatus based on machine learning, and a computer device, which relate to the technical field of information, and are mainly aimed at effectively authenticating the identity of a visitor, improving the authentication precision of the identity of the visitor, and ensuring the efficiency of authenticating the identity of the visitor. The method comprises: acquiring facial features of a visitor to be authenticated; performing multi-level analysis according to the facial features of the visitor to be authenticated and a plurality of facial features respectively corresponding to each visitor in a preset feature library, and determining each target visitor in the preset feature library according to a multi-level analysis result; and determining, according to the plurality of facial features respectively corresponding to each target visitor, the identity of the visitor to be authenticated. The present method relates to machine learning technology in artificial intelligence, is applicable to visitor identity authentication, and also relates to blockchain technology.

Description

基于机器学习的访客身份认证方法、装置及计算机设备Machine learning-based visitor identity authentication method, device and computer equipment
本申请要求于2020年07月31日提交中国专利局、申请号为202010761117.7,发明名称为“基于机器学习的访客身份认证方法、装置及计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 31, 2020, the application number is 202010761117.7, and the invention title is "Machine Learning-based Visitor Identity Authentication Method, Apparatus, and Computer Equipment". The entire content is approved The reference is incorporated in this application.
技术领域Technical field
本申请涉及信息技术领域,尤其是涉及一种基于机器学习的访客身份认证方法、装置及计算机设备。This application relates to the field of information technology, and in particular to a visitor identity authentication method, device and computer equipment based on machine learning.
背景技术Background technique
现在很多场景都会涉及到访客登记,例如,常见的面试邀约,不同公司之间的商务洽谈、分公司与总公司之间的出差交流,学校以及小区的外来人员登记,通过访客登记情况能够对外来人员身份进行认证。Many scenes now involve visitor registration, for example, common interview invitations, business negotiations between different companies, business trips and exchanges between branches and head offices, registration of outsiders from schools and communities, and visitors can be registered through visitor registration. Personnel identity is verified.
目前,在对访客的身份进行认证时,通常会采集访客照片,并将采集的访客照片中的特征与特征库中所有访客的特征进行比对,根据比对结果认证访客身份。然而,发明人意识到特征库中通常只存储有每个访客的单一特征,仅将提取的访客特征与特征库中某个访客的单一特征进行比对,无法确保对比结果的准确性,对访客身份的认证精度较低,如果提取每个访客的多个特征存储至特征库中,在对访客的身份进行认证时,会加大对比工作量,从而影响访客身份的认证效率。At present, when authenticating the identity of a visitor, a visitor's photo is usually collected, and the characteristics of the collected visitor's photo are compared with the characteristics of all visitors in the feature database, and the visitor's identity is authenticated according to the comparison result. However, the inventor realizes that only a single feature of each visitor is usually stored in the feature library, and only the extracted visitor feature is compared with a single feature of a visitor in the feature library, which cannot ensure the accuracy of the comparison result. The accuracy of identity authentication is low. If multiple characteristics of each visitor are extracted and stored in the signature database, the comparison workload will be increased when the identity of the visitor is authenticated, thereby affecting the authentication efficiency of the visitor's identity.
技术问题technical problem
主要在于能够对访客身份进行有效认证,在提高访客身份认证精度的同时,能够保证访客身份的认证效率。Mainly lies in being able to carry out effective authentication to the visitor's identity, while improving the visitor's identity authentication accuracy, can guarantee the visitor identity authentication efficiency.
技术解决方案Technical solutions
本申请提供了一种基于机器学习的访客身份认证方法、装置及计算机设备,主要在于能够对访客身份进行有效认证,在提高访客身份认证精度的同时,能够保证访客身份的认证效率。This application provides a visitor identity authentication method, device, and computer equipment based on machine learning, which are mainly capable of effectively authenticating the visitor's identity. While improving the accuracy of the visitor's identity authentication, it can ensure the authentication efficiency of the visitor's identity.
根据本申请的第一个方面,提供一种基于机器学习的访客身份认证方法,包括:According to the first aspect of this application, a visitor identity authentication method based on machine learning is provided, including:
获取待认证访客的人脸特征;Obtain the facial features of the visitors to be authenticated;
根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;Perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determine each target visitor in the preset feature library according to the multi-level analysis result;
根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。The identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
根据本申请的第二个方面,提供一种基于机器学习的访客身份认证装置,包括:According to the second aspect of this application, a visitor identity authentication device based on machine learning is provided, including:
获取单元,用于获取待认证访客的人脸特征;The obtaining unit is used to obtain the facial features of the visitor to be authenticated;
分析单元,用于根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;The analysis unit is configured to perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and to determine the preset feature library according to the multi-level analysis result Each target visitor;
确定单元,用于根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。The determining unit is configured to determine the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor.
根据本申请的第三个方面,提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:According to a third aspect of the present application, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:
获取待认证访客的人脸特征;Obtain the facial features of the visitors to be authenticated;
根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;Perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determine each target visitor in the preset feature library according to the multi-level analysis result;
根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。The identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
根据本申请的第四个方面,提供一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:According to a fourth aspect of the present application, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the following steps when the program is executed:
获取待认证访客的人脸特征;Obtain the facial features of the visitors to be authenticated;
根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;Perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determine each target visitor in the preset feature library according to the multi-level analysis result;
根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。The identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
有益效果Beneficial effect
本申请提供的一种基于机器学习的访客身份认证方法、装置及计算机设备,与目前将提取的访客特征与特征库中访客的单一特征进行对比的方式相比,本申请能够获取待认证访客的人脸特征;并根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,从而根据多层级分析结果排除掉预设特征库中与待认证访客不相近的绝大多数访客,仅保留与待认证访客相近的少数目标访客,之后根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份,由此既能够利用预设特征库中目标访客的多个人脸特征对待认证访客的身份进行认证,提高了访客身份的认证精度,同时还能够利用多层级分析排除掉预设特征库中绝大多数访客的人脸特征,大大减少了特征比对的工作量,在提高访客身份认证精度的同时,能够确保访客身份的认证效率。This application provides a machine learning-based visitor identity authentication method, device, and computer equipment. Compared with the current method of comparing the extracted visitor characteristics with the single characteristic of the visitor in the feature database, this application can obtain the information of the visitor to be authenticated. Face features; and perform multi-level analysis based on the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, so as to exclude the preset feature library and the waiting list according to the multi-level analysis result The vast majority of visitors who are not close to the authenticated visitors will only keep a few target visitors close to the visitors to be authenticated, and then determine the identity of the visitor to be authenticated according to the multiple facial features corresponding to each target visitor. The multiple facial features of the target visitor in the preset feature library are used to authenticate the identity of the visitor to be authenticated, which improves the accuracy of the visitor's identity verification. At the same time, it can also use multi-level analysis to exclude the face of most visitors in the preset feature library. Features greatly reduce the workload of feature comparison. While improving the accuracy of visitor identity authentication, it can ensure the efficiency of visitor identity authentication.
附图说明Description of the drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The exemplary embodiments and descriptions of the application are used to explain the application, and do not constitute an improper limitation of the application. In the attached picture:
图1示出了本申请实施例提供的一种基于机器学习的访客身份认证方法流程图;Fig. 1 shows a flow chart of a method for guest identity authentication based on machine learning provided by an embodiment of the present application;
图2示出了本申请实施例提供的另一种基于机器学习的访客身份认证方法流程图;FIG. 2 shows a flowchart of another method for guest identity authentication based on machine learning provided by an embodiment of the present application;
图3示出了本申请实施例提供的一种基于机器学习的访客身份认证装置的结构示意图;FIG. 3 shows a schematic structural diagram of a visitor identity authentication device based on machine learning provided by an embodiment of the present application;
图4示出了本申请实施例提供的另一种基于机器学习的访客身份认证装置的结构示意图;FIG. 4 shows a schematic structural diagram of another visitor identity authentication device based on machine learning provided by an embodiment of the present application;
图5示出了本申请实施例提供的一种计算机设备的实体结构示意图。Fig. 5 shows a schematic diagram of the physical structure of a computer device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the application will be described in detail with reference to the drawings and in conjunction with the embodiments. It should be noted that the embodiments in the application and the features in the embodiments can be combined with each other if there is no conflict.
目前,在对访客的身份进行认证时,仅将提取的访客特征与特征库中访客的单一特征进行比对,无法确保对比结果的准确性,对访客身份的认证精度较低,如果特征库中搜集有每个访客的多个特征,则会加大特征对比的工作量,从而影响访客身份的认证效率。At present, when authenticating the identity of a visitor, only the extracted visitor feature is compared with a single feature of the visitor in the feature database. The accuracy of the comparison result cannot be ensured. The authentication accuracy of the visitor's identity is low. Collecting multiple characteristics of each visitor will increase the workload of feature comparison, thereby affecting the efficiency of visitor identity authentication.
为了解决上述问题,本申请实施例提供了一种报文组装方法,如图1所示,所述方法包括:In order to solve the foregoing problem, an embodiment of the present application provides a message assembly method. As shown in FIG. 1, the method includes:
101、获取待认证访客的人脸特征。101. Obtain the facial features of the visitor to be authenticated.
其中,待认证访客为公司、学校、小区等封闭区域的外来人员,本申请实施例主要适用于对上述封闭区域的外来人员的身份进行认证,以便记录封闭区域的人员流动情况,确保封闭区域内人员的人身和财产安全,本申请实施例的执行主体为能够对访客身份进行认证的系统,对于本申请实施例,为了避免手动登记信息对访客造成的不便和存在的安全隐患,可以预先将待认证访客的个人信息和特征信息录入系统,存储至预设特征库中,以便当访客正式来访时,提取待认证访客的特征信息,并利用预设特征库对待认证访客的身份进行认证。Among them, the visitors to be authenticated are outsiders in closed areas such as companies, schools, communities, etc. This embodiment of the application is mainly suitable for authenticating the identities of outsiders in the above closed areas, so as to record the flow of people in the closed areas and ensure that the closed areas are For the personal and property safety of personnel, the executor of the embodiment of this application is a system capable of authenticating the identity of the visitor. For this embodiment of the application, in order to avoid the inconvenience and potential safety hazard caused by manual registration of information to the visitor, the waiting The personal information and characteristic information of the authenticated visitor are entered into the system and stored in the preset feature library, so that when the visitor officially visits, the feature information of the visitor to be authenticated is extracted, and the identity of the visitor to be authenticated is authenticated using the preset feature library.
本申请实施例提供两种获取访客个人信息和特征信息的方式,分别是线上方式和线下方式,针对线上方式,访客可以预先登录访客身份认证系统,注册填写相关个人信息,包括访客的姓名、身份证号、单位、住址等个人信息,同时线上上传身份证的扫描件,访客身份认证系统接收到访客上传的身份证件后,利用预设人脸检测模型检测并提取访客的身份证照片,进一步地,利用预设人脸识别模型提取访客身份证照片中的人脸特征,并将访客个人信息、访客照片、提取的访客人脸特征对应存储至预设特征库中,由此在访客正式来访时能够利用预设特征库中的人脸特征对访客的身份进行认证;针对线下方式,在待认证访客首次来访时,需要携带身份证,访客身份认证系统能够对待认证访客的身份证的正反面进行识别,提取身份证中的个人信息,包括姓名、身份证号、住址等,同时利用预设人脸检测模型检测身份证件中的照片,或者直接从电子芯片中获取访客的身份证照片,进一步地,利用预设人脸识别模型提取访客身份证照片中的人脸特征,并将提取的访客人脸特征、访客个人信息和访客照片对应存储至预设特征库中,由此,在访客再次来访时,无需进行信息登记或者携带身份证,通过访客身份认证系统中的预设特征库能够直接对访客的身份进行认证。其中,针对预设人脸识别模型的构建,具体可以将预设特征库中所有访客的照片作为训练样本,对该训练样本进行训练构建预设人脸识别模型,与此同时,本申请实施例还涉及区块链技术,可将预设特征库中的人脸特征存储于区块链中。This application embodiment provides two ways to obtain visitor personal information and characteristic information, namely online and offline. For online methods, visitors can log in to the visitor identity authentication system in advance, register and fill in relevant personal information, including the visitor’s personal information. Personal information such as name, ID number, unit, address, etc., and upload a scanned copy of the ID card online. After the visitor ID authentication system receives the ID card uploaded by the visitor, it uses the preset face detection model to detect and extract the visitor's ID card Further, the preset face recognition model is used to extract the facial features in the visitor’s ID photo, and the visitor’s personal information, visitor photos, and the extracted features of the visitor’s face are correspondingly stored in the preset feature library. Visitors can use the facial features in the preset feature library to authenticate the identity of the visitor when they come officially; for the offline method, when the visitor to be authenticated visits for the first time, he needs to carry his ID card, and the visitor identity authentication system can treat the identity of the authenticated visitor. Identify the front and back of the ID card, extract the personal information in the ID, including name, ID number, address, etc., and use the preset face detection model to detect the photos in the ID card, or directly obtain the identity of the visitor from the electronic chip Furthermore, the preset face recognition model is used to extract the facial features in the visitor’s ID photo, and the extracted visitor’s facial features, visitor personal information and visitor photos are correspondingly stored in the preset feature library, thereby , When the visitor visits again, there is no need to register information or carry an ID card, and the identity of the visitor can be directly authenticated through the preset feature database in the visitor identity authentication system. Among them, for the construction of the preset face recognition model, the photos of all visitors in the preset feature library can be used as training samples, and the training samples are trained to construct the preset face recognition model. At the same time, the embodiment of the present application The blockchain technology is also involved, and the facial features in the preset feature library can be stored in the blockchain.
进一步地,为了确保访客身份认证的精度,避免由于预设特征库中仅存储有每个访客的单一特征,而造成特征对比结果不准确,进而影响访客身份的认证精度,对于本申请实施例,需要搜集不同访客的多张不同形式的照片,并提取每张 照片中的人脸特征,将不同访客对应的多个人脸特征存储至预设特征库中,具体地,由于通过人脸检测模型获取的访客身份证照片清晰度比较差,可以通过对访客的身份证照片进行清晰化处理,得到清晰化后的访客图片,具体可以利用预设超分辨率模型对访客的身份证照片进行清洗化处理,该预设超分辨率模型可以为预设卷积神经网络模型,进一步地,同样利用预设人脸识别模型提取清洗化处理后的访客图片中的人脸特征,由此既能够获取访客模糊照片的人脸特征,还能够获取访客清晰化图片的人脸特征,此外,为了保证预设特征库中存储有不同访客的多个特征,确保访客身份的认证精度,还可以在获取访客身份证照片的同时,要求访客上传近期照片,该近期照片可以为访客近期的一张或者多张未进行批图处理、淡妆的照片,进一步地,分别提取访客上传的各个近期照片中的人脸特征,并将提取的不同照片中的人脸特征存储至预设特征库中,需要说明的是,为了确保访客身份的认证精度和有效性,预设特征库中每个访客对应的人脸特征不宜过少,例如,预设特征库中至少存储有每个访客的三个人脸特征。Further, in order to ensure the accuracy of visitor identity authentication, avoid the inaccurate feature comparison result due to the fact that only a single feature of each visitor is stored in the preset feature library, which in turn affects the accuracy of visitor identity authentication. For this embodiment of the application, It is necessary to collect multiple photos of different forms of different visitors, extract the facial features in each photo, and store multiple facial features corresponding to different visitors in a preset feature library. Specifically, because of the facial detection model obtained The clarity of the ID photo of the visitor is relatively poor. By clearing the ID photo of the visitor, the cleared visitor image can be obtained. Specifically, the preset super-resolution model can be used to clean the ID photo of the visitor. , The preset super-resolution model may be a preset convolutional neural network model, and further, the preset face recognition model is also used to extract facial features in the visitor’s image after the cleaning process, so that the visitor blur can be obtained The facial features of the photo can also obtain the facial features of the visitor’s clear picture. In addition, in order to ensure that multiple features of different visitors are stored in the preset feature library to ensure the accuracy of visitor identity authentication, you can also obtain the visitor ID At the same time of the photo, the visitor is required to upload a recent photo. The recent photo can be one or more recent photos of the visitor without batch processing and light makeup. Furthermore, the facial features of each recent photo uploaded by the visitor are extracted separately. The facial features extracted from different photos are stored in a preset feature library. It should be noted that, in order to ensure the accuracy and effectiveness of the visitor’s identity authentication, the facial features corresponding to each visitor in the preset feature library should not be overridden. For example, at least three facial features of each visitor are stored in the preset feature library.
对于本申请实施例,当访客来访时,可以利用摄像头采集访客照片,之后利用预设人脸识别模型提取采集照片中的人脸特征,以便将待认证访客的人脸特征与预设特征库中不同访客的多个人脸特征进行比对,对访客的身份进行认证,本申请实施例的具体应用场景可以适用于常见的面试邀约、不同公司之间的商务洽谈,不同分公司和总部之间的出差交流,学校和小区的外来人员登记,以及疫情期间封闭小区对流动人员进行登记等场景。For the embodiment of this application, when a visitor comes to visit, the camera can be used to collect the visitor's photos, and then the preset face recognition model is used to extract the facial features in the collected photos, so as to compare the facial features of the visitor to be authenticated with the preset feature library The multiple facial features of different visitors are compared, and the identity of the visitor is authenticated. The specific application scenarios of the embodiments of this application can be applied to common interview invitations, business negotiations between different companies, and between different branches and headquarters. Scenes such as business trips and exchanges, registration of migrants from schools and communities, and registration of migrants in closed communities during the epidemic.
102、根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客。102. Perform multi-level analysis according to the facial features of the visitor to be authenticated and multiple facial features corresponding to each visitor in the preset feature library, and determine each target visitor in the preset feature library according to the multi-level analysis result .
其中,预设特征库中存储有不同访客对应的多个人脸特征,例如,预设特征库中存储有访客A对应的5个人脸特征和访客B对应的3个人脸特征,对于本申请实施,由于预设特征库中存储有不同访客的多个特征,在待认证访客来访时,如果将提取的待认证访客的人脸特征与预设特征库中所有访客对应的多个人脸特征进行一一对比,会增加对比工作量,影像访客身份的认证效率,因此,在本申请实施例中根据提取的待认证访客的人脸特征和预设特征库中不同访客对应的多个人脸特征进行多层级分析,排除掉预设特征库中与待认证访客不相近的绝大部分访客,保留与待认证访客比较相近的目标访客,仅将待认证访客对应的人脸特征与预设特征库中目标访客对应的多个人脸特征进行一一对比,如此在提高访客身份认证精度的同时,能够保证访客身份的认证效率。Among them, the preset feature library stores multiple facial features corresponding to different visitors. For example, the preset feature library stores five facial features corresponding to visitor A and three facial features corresponding to visitor B. For the implementation of this application, Since the preset feature library stores multiple features of different visitors, when a visitor to be authenticated visits, if the extracted facial features of the visitor to be authenticated are compared with the multiple facial features corresponding to all visitors in the preset feature library, one by one The comparison will increase the workload of comparison and the efficiency of image visitor identity authentication. Therefore, in the embodiment of this application, the extracted facial features of the visitor to be authenticated and the multiple facial features corresponding to different visitors in the preset feature library are multi-level Analyze, exclude most of the visitors in the preset feature database that are not similar to the visitors to be authenticated, retain target visitors that are similar to the visitors to be authenticated, and only compare the facial features corresponding to the visitors to be authenticated with the target visitors in the preset feature library Corresponding multiple facial features are compared one by one, so that while improving the accuracy of visitor identity authentication, it can ensure the authentication efficiency of visitor identity.
具体地,在将提取的待认证访客的人脸特征与预设特征库中不同访客的人脸特征进行比对时,将待认证访客的人脸特征与不同访客对应的多个人脸特征进行不同层级的分析比对,首先根据预设特征库中不同访客对应的多个人脸特征,计算不同访客对应的特征中心,即不同访客的多个人脸特征对应的几何中心,之后根据不同访客对应的特征中心,将预设特征库中所有访客进行聚类,即将预设特征库中所有访客划分至不同的聚类类别,并从多个聚类别类中筛选出与待认证访客最为相近的目标聚类类别,由此完成第一层级对比分析,进一步地,确定目标聚类类别下各个访客对应的特征中心,并将待认证访客的人脸特征与目标聚类类别下的各个访客对应的特征中心分别进行比对,得到对比结果,并根据对比结果, 从目标聚类类别下的各个访客中筛选出目标访客,由此完成第二层级对比分析,最终将待认证访客对应的人脸特征与筛选出的各个目标访客分别对应的多个人脸特征进行比对,得到对比结果,根据对比结果对待认证访客的身份进行认证,由此完成第三层级的对比分析。对于本申请实施例,通过对待认证访客的人脸特征和预设特征库中不同访客对应的多个人脸特征进行多层级的对比分析,能够筛选出预设特征库中的多个目标访客,避免将待认证访客的人脸特征与不同访客的多个人脸特征进行一一对比,从而加大了对比工作量,降低对访客身份的认证效率。Specifically, when comparing the extracted facial features of the visitor to be authenticated with the facial features of different visitors in the preset feature library, the facial features of the visitor to be authenticated are different from multiple facial features corresponding to different visitors. Level analysis and comparison, first calculate the feature centers corresponding to different visitors according to the multiple facial features corresponding to different visitors in the preset feature library, that is, the geometric centers corresponding to multiple facial features of different visitors, and then according to the features corresponding to different visitors The center clusters all visitors in the preset feature library, that is, divides all visitors in the preset feature library into different cluster categories, and selects the target cluster that is closest to the visitor to be authenticated from multiple cluster categories Category, complete the first-level comparative analysis, and further determine the feature center corresponding to each visitor under the target cluster category, and compare the facial features of the visitor to be authenticated with the feature center corresponding to each visitor under the target cluster category. The comparison is performed to obtain the comparison result, and according to the comparison result, the target visitors are selected from each visitor under the target cluster category, thereby completing the second-level comparison analysis, and finally screening out the facial features corresponding to the visitors to be authenticated The multiple facial features corresponding to each target visitor are compared to obtain a comparison result, and the identity of the authenticated visitor is authenticated according to the comparison result, thereby completing the third-level comparative analysis. For the embodiment of this application, by performing multi-level comparative analysis on the facial features of the visitor to be authenticated and multiple facial features corresponding to different visitors in the preset feature library, multiple target visitors in the preset feature library can be screened out and avoid The facial features of the visitors to be authenticated are compared with multiple facial features of different visitors, thereby increasing the workload of comparison and reducing the efficiency of authentication of the visitor's identity.
103、根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。103. Determine the identity of the visitor to be authenticated according to the multiple facial features corresponding to each target visitor.
对于本申请实施例,为了对待认证访客的身份进行认证,在从预设特征库中筛选出多个目标访客后,分别将待认证访客对应的人脸特征与每个目标访客对应的多个人脸特征进行比对,并根据比对结果确定待认证访客的身份,具体比对时,可以分别计算待认证访客的人脸特征与每个访客对应的多个人脸特征的余弦距离,根据计算的各个余弦距离,确定待认证访客的身份,例如,将待认证访客对应的人脸特征与目标访客A对应的多个人脸特征进行比对,目标访客A对应的人脸特征包括人脸特征1、人脸特征2和人脸特征3,分别计算待认证访客对应的人脸特征与人脸特征1、人脸特征2和人脸特征3之间的余弦距离,分别为余弦距离1、余弦距离2和余弦距离3,若余弦距离1、余弦距离2和余弦距离3均大于或者等于预设余弦距离,则认定待认证访客为目标访客A,即身份认证通过后允许待认证访客进入封闭区域,其中,预设余弦距离的大小可以根据业务方对访客身份认证的精度要求进行设定。For the embodiment of this application, in order to authenticate the identity of the visitor to be authenticated, after multiple target visitors are selected from the preset feature database, the facial features corresponding to the visitor to be authenticated are respectively combined with the multiple faces corresponding to each target visitor. The features are compared, and the identity of the visitor to be authenticated is determined according to the result of the comparison. During the specific comparison, the cosine distance between the facial feature of the visitor to be authenticated and the multiple facial features corresponding to each visitor can be calculated separately, according to the calculated individual The cosine distance is used to determine the identity of the visitor to be authenticated. For example, the facial features corresponding to the visitor to be authenticated are compared with multiple facial features corresponding to the target visitor A. The facial features corresponding to the target visitor A include facial feature 1. Face feature 2 and face feature 3, respectively calculate the cosine distance between the face feature corresponding to the visitor to be authenticated and face feature 1, face feature 2 and face feature 3, which are cosine distance 1, cosine distance 2, and Cosine distance 3, if the cosine distance 1, cosine distance 2 and cosine distance 3 are all greater than or equal to the preset cosine distance, the visitor to be authenticated is regarded as the target visitor A, that is, the visitor to be authenticated is allowed to enter the enclosed area after the identity authentication is passed. The size of the preset cosine distance can be set according to the accuracy requirements of the business party for visitor identity authentication.
本申请实施例提供的一种基于机器学习的访客身份认证方法,与目前将提取的访客特征与特征库中访客的单一特征进行对比的方式相比,本申请能够获取待认证访客的人脸特征;并根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,从而根据多层级分析结果排除掉预设特征库中与待认证访客不相近的绝大多数访客,仅保留与待认证访客相近的少数目标访客,之后根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份,由此既能够利用预设特征库中目标访客的多个人脸特征对待认证访客的身份进行认证,提高了访客身份的认证精度,同时还能够利用多层级分析排除掉预设特征库中绝大多数访客的人脸特征,大大减少了特征比对的工作量,在提高访客身份认证精度的同时,能够确保访客身份的认证效率。The embodiment of this application provides a machine learning-based visitor identity authentication method. Compared with the current method of comparing the extracted visitor features with the single feature of the visitor in the feature database, this application can obtain the facial features of the visitor to be authenticated. And perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, so that according to the multi-level analysis results, the preset feature library and the visitor to be authenticated are excluded The vast majority of visitors who are close to each other only keep a few target visitors who are close to the visitor to be authenticated. Then, the identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor, so that the preset can be used The multiple facial features of the target visitor in the feature database are authenticated to the identity of the visitor to be authenticated, which improves the authentication accuracy of the visitor’s identity. At the same time, it can also use multi-level analysis to exclude the facial features of the vast majority of visitors in the preset feature database. It reduces the workload of feature comparison, and while improving the accuracy of visitor identity authentication, it can ensure the efficiency of visitor identity authentication.
进一步的,为了更好的说明上述对访客身份的认证的过程,作为对上述实施例的细化和扩展,本申请实施例提供了另一种基于机器学习的访客身份认证方法,如图2所示,所述方法包括:Further, in order to better illustrate the above process of authenticating the identity of the visitor, as a refinement and extension of the above embodiment, the embodiment of this application provides another method for authenticating the identity of a visitor based on machine learning, as shown in FIG. 2 As shown, the method includes:
201、获取待认证访客的人脸特征。201. Obtain the facial features of the visitor to be authenticated.
对于本申请实施例,为了能够利用访客身份认证系统中的预设特征库对访客身份进行认证,可以预先通过线上或者线下的方式获取待认证访客的身份证照片和个人信息,并利用预设人脸识别模型提身份证照片中的人脸特征,将提取的访 客人脸特征和个人信息对应存储至预设特征库中,该预设特征库中存储有已来访和即将来访的所有访客的人脸特征,当访客正式来访时,可以通过摄像头采集待认证访客的照片,之后利用相同的预设人脸识别模型提取采待认证访客照片中的人脸特征,并将待认证访客的人脸特征与预设特征库中不同访客的人脸特征进行对比,得到对比结果,并根据该对比结果,确定待认证访客的身份,进一步地,为了提高对访客身份的认证精度,需要增加预设特征库中的特征信息,具体地,在获取访客的身份证照片的同时,还可以要求访客提供多张近期照片,并利用预设人脸识别模型分别提取各个近期照片对应的人脸特征,与此同时,为了能够获取访客不同照片对应的人脸特征,利用预设超分辨率模型对访客的身份证照片进行清晰化处理,得到清洗化处理后的图片,该预设超分辨率模型可以为预设卷积神经网络模型,进一步地,利用预设人脸识别模型提取访客清晰化图片的人脸特征,由此能够得到不同访客对应的多个人脸特征,并将不同访客的个人信息、多张照片和多个人脸特征对应存储至预设特征库中,由此能够丰富预设特征库中的特征信息,提高访客身份认证的精度。For this embodiment of the application, in order to be able to use the preset feature library in the visitor identity authentication system to authenticate the visitor's identity, the ID photo and personal information of the visitor to be authenticated can be obtained online or offline in advance, and use the pre- Set up a face recognition model to extract the facial features in the ID photo, and store the extracted facial features and personal information of the visitors in a preset feature library, which stores all visitors who have visited and will be visiting When a visitor visits formally, the photo of the visitor to be authenticated can be collected through the camera, and then the same preset face recognition model is used to extract the facial features in the photo of the visitor to be authenticated, and the person who is the visitor to be authenticated The facial features are compared with the facial features of different visitors in the preset feature library, and the comparison result is obtained. Based on the comparison result, the identity of the visitor to be authenticated is determined. Further, in order to improve the accuracy of the authentication of the visitor’s identity, it is necessary to increase the preset The feature information in the feature library, specifically, while obtaining the ID photo of the visitor, the visitor can also be required to provide multiple recent photos, and the preset face recognition model can be used to extract the facial features corresponding to each recent photo. At the same time, in order to be able to obtain the facial features corresponding to different photos of visitors, the preset super-resolution model is used to clarify the visitor's ID photo to obtain the cleaned image. The preset super-resolution model can be Preset the convolutional neural network model, and further use the preset face recognition model to extract the facial features of the visitor’s clear picture, so that multiple facial features corresponding to different visitors can be obtained, and the personal information and information of different visitors can be obtained. The photos and multiple facial features are correspondingly stored in the preset feature library, which can enrich the feature information in the preset feature library and improve the accuracy of visitor identity authentication.
202、根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客。202. Perform multi-level analysis according to the facial features of the visitor to be authenticated and multiple facial features corresponding to each visitor in the preset feature library, and determine each target visitor in the preset feature library according to the multi-level analysis result .
对于本申请实施例,如果将提取的待认证访客的人脸特征与预设特征库中不同访客对应的多个人脸特征一一进行对比,会增加对比工作量,从而影像访客身份的认证效率,因此,本申请实施例采用多层级分析方法预先排除掉预设特征库中与待认证访客不相近的绝大多数访客,仅保留与待认证访客比较相近的多个目标访客,通过将待认证访客对应的人脸特征与各个目标访客分别对应的多个人脸特征进行对比,不仅能够提高访客身份的认证精度,还能够保证访客身份的认证效率,步骤202具体包括:根据所述各个访客分别对应的多个人脸特征,计算所述各个访客对应的特征中心;基于计算的各个访客对应的特征中心,对所述各个访客进行聚类分析,得到多个聚类类别;根据所述待认证访客的人脸特征和不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别;根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客。For the embodiment of the application, if the extracted facial features of the visitor to be authenticated are compared with multiple facial features corresponding to different visitors in the preset feature library, the comparison workload will be increased, and the efficiency of the image visitor identity authentication will be increased. Therefore, in this embodiment of the application, a multi-level analysis method is used to pre-empt the vast majority of visitors who are not similar to the visitor to be authenticated in the preset feature library, and only multiple target visitors who are similar to the visitor to be authenticated are retained. Comparing the corresponding facial features with the multiple facial features corresponding to each target visitor can not only improve the authentication accuracy of the visitor’s identity, but also ensure the authentication efficiency of the visitor’s identity. Step 202 specifically includes: Multiple facial features, calculate the feature center corresponding to each visitor; based on the calculated feature center corresponding to each visitor, perform cluster analysis on each visitor to obtain multiple cluster categories; according to the person to be authenticated Face features and feature centers corresponding to each visitor under different cluster categories, determine the target cluster category in the multiple cluster categories; according to the facial features of the visitor to be authenticated and each visitor under the target cluster category The corresponding feature center determines each target visitor under the target cluster category.
进一步地,为了从多个聚类类别中识别目标聚类类别,所述根据所述待认证访客的人脸特征和所述不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别,包括:根据所述不同聚类类别下各个访客对应的特征中心,计算所述不同聚类类别对应的特征中心;分别计算所述待认证访客的人脸特征与所述不同聚类类别对应的特征中心之间的第一余弦距离,并基于计算的各个第一余弦距离,确定所述多个聚类类别中的目标聚类类别。在此基础上,为了确定目标聚类类别下的各个目标访客,所述根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客,包括:分别计算所述待认证访客的人脸特征与所述目标聚类类别下各个访客对应的特征中心之间的第二余弦距离;基于计算的各个第二余弦距离,从所述目标聚类类别下各个访客中筛选出目标访客。进一步地,为了确定目标聚类类别下的各个访客,所述基于计算的各个第一余弦距离,确定所述多个聚类类别中的目标聚类类别,包括,将计算的各个第一余弦距离中最大第一余弦距离对 应的聚类类别,确定为目标聚类类别,并确定目标聚类类别下的各个访客。与此同时,所述基于计算的各个第二余弦距离,从所述目标聚类类别下各个访客中筛选出目标访客,包括:按照计算的各个第二余弦距离大小对目标聚类类别下的各个访客进行排序,根据排序结果筛选出排序名次处于预设范围内的目标访客。Further, in order to identify the target cluster category from the multiple cluster categories, the multiple clusters are determined according to the facial features of the visitor to be authenticated and the feature centers corresponding to each visitor in the different cluster categories. The target cluster category in the category category includes: calculating the feature centers corresponding to the different cluster categories according to the feature centers corresponding to each visitor under the different cluster categories; respectively calculating the facial features of the visitors to be authenticated and The first cosine distance between the feature centers corresponding to the different cluster categories, and the target cluster category in the multiple cluster categories is determined based on the calculated first cosine distances. On this basis, in order to determine each target visitor under the target cluster category, the target cluster is determined according to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category Each target visitor under the category includes: respectively calculating the second cosine distance between the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category; and each second cosine distance based on the calculation The chord distance is used to filter out the target visitors from each visitor under the target cluster category. Further, in order to determine each visitor under the target cluster category, the determination of the target cluster category in the plurality of cluster categories based on the calculated first cosine distance includes: The cluster category corresponding to the largest first cosine distance in the chord distance is determined as the target cluster category, and each visitor under the target cluster category is determined. At the same time, based on the calculated second cosine distances, screening the target visitors from each visitor in the target cluster category includes: performing calculations on the target cluster category according to the calculated second cosine distances. Each visitor is sorted, and the target visitors whose sorting rank is within the preset range are filtered out according to the sorting result.
具体地,首先根据预设特征库中各个访客分别对应的多个人脸特征,计算各个访客对应的特征中心,具体计算公式如下:Specifically, first, calculate the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor in the preset feature library. The specific calculation formula is as follows:
Figure PCTCN2020136370-appb-000001
Figure PCTCN2020136370-appb-000001
其中,m为预设特征库中某个访客对应的人脸特征数量,(x 11,x 12,…x 1n)为某个访客对应的第一个人脸征,(x m1,x m2,…,x mn)为某个访客对应的第m个人脸特征,(X 1,X 2,…X n)为某个访客对应的特征中心,由此按照上述公式能够计算出预设特征库中不同访客对应的特征中心。 Among them, m is the number of facial features corresponding to a visitor in the preset feature library, (x 11 ,x 12 ,...x 1n ) is the first facial sign corresponding to a visitor, (x m1 ,x m2 , …, x mn ) is the m-th face feature corresponding to a visitor, (X 1 ,X 2 ,…X n) is the feature center corresponding to a visitor, and the preset feature library can be calculated according to the above formula Feature centers corresponding to different visitors.
进一步地,根据不同访客对应的特征中心,对各个访客进行聚类分析,得到多个聚类类别,具体地,将各个访客对应的特征中心输入至预设聚类分析模型进行聚类分析,得到多个聚类类别,将预设特征库中的各个访客划分值不同的聚类类别,其中,该预设聚类分析模型可以为预设dbscan聚类分析模型,即将各个访客对应的特征中心输入至预设预设dbscan聚类分析模型进行聚类分析,同时设定聚类过程中的半径参数和领域密度阈值,该半径参数和领域密度阈值可以根据划分类别的多少和聚类处理的精度进行设定,由此能够将预设特征库中的各个访客进行聚类处理,得到多个聚类类别,并确定不同聚类类别下的各个访客。Furthermore, according to the characteristic centers corresponding to different visitors, cluster analysis is performed on each visitor to obtain multiple cluster categories. Specifically, the characteristic centers corresponding to each visitor are input into a preset cluster analysis model for cluster analysis, and the result is Multiple cluster categories, each visitor in the preset feature library is divided into cluster categories with different values, where the preset cluster analysis model can be a preset dbscan cluster analysis model, that is, the feature center corresponding to each visitor is input Perform cluster analysis to the preset dbscan cluster analysis model, and set the radius parameter and field density threshold in the clustering process. The radius parameter and field density threshold can be performed according to the number of classifications and the accuracy of the clustering process. By setting, each visitor in the preset feature library can be clustered to obtain multiple cluster categories, and each visitor under different cluster categories can be determined.
进一步地,为了从多个聚类类别中筛选出目标聚类类别,即从多个聚类类别中筛选出与待认证访客最相近的目标聚类类别下的各个访客,需要根据不同聚类类别下各个访客对应的特征中心,分别计算不同聚类类别对应的特征中心,Further, in order to filter the target cluster category from multiple cluster categories, that is, to filter out each visitor under the target cluster category that is closest to the visitor to be authenticated from multiple cluster categories, it is necessary to select different cluster categories according to different cluster categories. Download the feature centers corresponding to each visitor, and calculate the feature centers corresponding to different cluster categories.
Figure PCTCN2020136370-appb-000002
Figure PCTCN2020136370-appb-000002
其中,m为某个聚类类别下所有访客对应的特征中心的数量,(y 11,y 12,…,y 1n),(y m1,y m2,…,y mn)分别为某个聚类类别下一个访客对应的特征中心和第m个访客对应的特征中心,(Y 1,Y 2,…,Y n)为某个聚类类别对应的特征中心, 由此按照上述公式根据不同聚类类别下各个访客对应的特征中心,能够计算出不同聚类类别对应的特征中心。 Among them, m is the number of feature centers corresponding to all visitors under a certain cluster category, (y 11 ,y 12 ,…,y 1n ), (y m1 ,y m2 ,…,y mn ) are respectively a certain cluster The feature center corresponding to the next visitor in the category and the feature center corresponding to the m-th visitor, (Y 1 , Y 2 ,..., Y n ) is the feature center corresponding to a certain clustering category, so according to the above formula according to different clustering The feature centers corresponding to each visitor under the category can be calculated for the feature centers corresponding to different cluster categories.
进一步地,分别计算待认证访客对应的人脸特征与不同聚类类别对应的特征中心之间的第一余弦距离,并从计算的各个余弦距离中筛选出最大余弦距离,将最大余弦距离对应的聚类类别确定为目标聚类类别,其中,余弦距离的具体计算公式如下:Further, the first cosine distances between the facial features corresponding to the visitors to be authenticated and the feature centers corresponding to different cluster categories are calculated respectively, and the maximum cosine distances are filtered from the calculated cosine distances, and the maximum cosine distances are corresponded to The cluster category of is determined as the target cluster category, and the specific calculation formula of cosine distance is as follows:
Figure PCTCN2020136370-appb-000003
Figure PCTCN2020136370-appb-000003
其中,cosθ为待认证访客对应的人脸特征与不同聚类类别对应的特征中心之间的第一余弦距离,(X 1,X 2,...X n),(Y 1,Y 2,...Y n)分别为待认证访客对应的人脸特征和不同聚类类别对应的人脸特征,由此通过上述公式能够计算出待认证访客对应的人脸特征与不同聚类类别对应的特征中心之间的第一余弦距离,第一余弦距离cosθ越大,代表待认证访客与某一聚类类别下的各个访客越相近,从而筛选出最大第一余弦距离,并将其对应的聚类类别作为目标聚类类别,排除掉预设特征库中与待认证访客不相近的其他聚类类别下的各个访客,由此能够大大降低访客身份认证时特征对比的计算量。 Among them, cosθ is the first cosine distance between the face feature corresponding to the visitor to be authenticated and the feature center corresponding to different cluster categories, (X 1 ,X 2 ,...X n ),(Y 1 ,Y 2 ,...Y n ) are the facial features corresponding to the visitor to be authenticated and the facial features corresponding to different clustering categories, and the above formula can be used to calculate the facial features corresponding to the visitor to be authenticated corresponding to different clustering categories. The first cosine distance between the feature centers of, the larger the first cosine distance cosθ, the closer the visitor to be authenticated is to each visitor in a certain cluster category, so as to filter out the largest first cosine distance, and The corresponding cluster category is used as the target cluster category, and each visitor under other cluster categories that is not similar to the visitor to be authenticated in the preset feature library is excluded, thereby greatly reducing the amount of calculation of feature comparison during visitor identity authentication.
与此同时,为了更进一步地减少特征对比的计算量,继续从目标聚类类别下的各个访客中筛选与待认证访客更相近的目标访客,例如,目标聚类类别下包括访客1、访客2、访客3、访客4和访客5,分别计算待认证访客对应的人脸特征与访客1、访客2、访客3、访客4和访客5对应的特征中心之间的第二余弦距离,并按照计算的各个第二余弦距离大小对各个访客进行由大到小的排序,排序结果为访客3、访客4、访客1、访客2、访客5,进一步地,筛选排序名次处于前三位的访客3、访客4和访客1作为与待认证访客更相近的目标访客,由此后续仅将待认证访客对应的人脸特征与目标访客对应的多个人脸特征分别进行比较即可,能够大大降低特征对比的计算量,提高访客身份的认证效率。其中,第二余弦距离的具体计算公式与第一余弦距离的计算公式相同,在此不再赘述。At the same time, in order to further reduce the amount of calculation of feature comparison, continue to filter the target visitors from each visitor under the target cluster category that are more similar to the visitor to be authenticated. For example, the target cluster category includes visitor 1, visitor 2. , Visitor 3, visitor 4, and visitor 5, respectively calculate the second cosine distance between the facial feature corresponding to the visitor to be authenticated and the feature center corresponding to visitor 1, visitor 2, visitor 3, visitor 4, and visitor 5. The calculated size of each second cosine distance sorts each visitor from largest to smallest, and the sorting result is visitor 3, visitor 4, visitor 1, visitor 2, visitor 5, and further, filter the visitors with the top three rankings 3. Visitor 4 and visitor 1 are target visitors that are closer to the visitor to be authenticated. Therefore, only the facial features corresponding to the visitor to be authenticated can be compared with multiple facial features corresponding to the target visitor, which can greatly reduce the features. The amount of comparison calculation improves the efficiency of visitor identity authentication. Wherein, the specific calculation formula of the second cosine distance is the same as the calculation formula of the first cosine distance, and will not be repeated here.
进一步地,由于访客上传的不同照片对应的重要程度不同,即能够反映访客真实特征的程度不同,因此,在计算预设特征库中各个访客对应的特征中心时,分别确定所述多个人脸特征中各个人脸特征对应的权重值;基于确定的权重值和所述多个人脸特征,计算所述各个访客对应的特征中心。例如,清晰化处理后的访客身份证照片能够反映访客的更多特征,因此赋予清晰化处理后的访客身份证照片的人脸特征对应的权重值为0.5,同时赋予访客的模糊身份证照片和近期自拍照的人脸特征对应的权重值分别为0.3和0.2。Further, since the different photos uploaded by the visitor correspond to different degrees of importance, that is, the degree to which they can reflect the real characteristics of the visitor is different, therefore, when calculating the feature center corresponding to each visitor in the preset feature library, the multiple facial features are respectively determined A weight value corresponding to each facial feature in, and calculate the feature center corresponding to each visitor based on the determined weight value and the multiple facial features. For example, the clarified ID photo of the visitor can reflect more characteristics of the visitor. Therefore, the weight value corresponding to the facial feature of the clarified ID photo of the visitor is assigned 0.5, and the fuzzy ID photo of the visitor and The weight values corresponding to the facial features of recent selfies are 0.3 and 0.2, respectively.
203、确定所述各个目标访客中的任一目标访客,计算所述待认证访客的人脸特征分别与所述任一目标访客对应的各个人脸特征之间的第三余弦距离。203. Determine any one of the target visitors, and calculate the third cosine distance between the facial features of the visitors to be authenticated and the facial features corresponding to the any target visitors.
对于本申请实施例,在确定目标聚类类别下的各个目标访客后,需要将待 认证访客对应的人脸特征与目标访客对应的多个人脸特征进行一一对比,得到对比结果,并根据对比结果对访客的身份进行认证,例如,预设特征库中的各个目标访客包括目标访客A和目标访客B,目标访客A对应的人脸特征为人脸特征1、人脸特征2和人脸特征3,目标访客B对应的人脸特征为人脸特征4、人脸特征5和人脸特征6,分别计算待认证访客A对应的人脸特征与目标访客A对应的多个人脸特征之间的第三余弦距离,即分别计算待认证访客的人脸特征与人脸特征1、人脸特征2和人脸特征3之间的第三余弦距离,同理计算待认证访客对应的人脸特征与目标访客B对应的多个人脸特征之间的第三余弦距离,即分别计算待认证访客对应的人脸特征与人脸特征4、人脸特征5和人脸特征6之间的第三余弦距离。For the embodiment of this application, after determining each target visitor under the target clustering category, it is necessary to compare the facial features corresponding to the visitor to be authenticated and the multiple facial features corresponding to the target visitor one by one to obtain the comparison result, and according to the comparison As a result, the identity of the visitor is authenticated. For example, each target visitor in the preset feature library includes target visitor A and target visitor B, and the facial features corresponding to target visitor A are facial feature 1, facial feature 2, and facial feature 3. The face features corresponding to target visitor B are face feature 4, face feature 5, and face feature 6, respectively. The third is calculated between the face feature corresponding to visitor A to be authenticated and the multiple face features corresponding to target visitor A. The cosine distance is to calculate the third cosine distance between the face feature of the visitor to be authenticated and face feature 1, face feature 2 and face feature 3 respectively, and similarly calculate the face feature corresponding to the visitor to be authenticated The third cosine distance between the multiple facial features corresponding to the target visitor B, that is, the third remainder between the facial features corresponding to the visitor to be authenticated and the facial feature 4, the facial feature 5, and the facial feature 6 are calculated respectively Chord distance.
204、若计算的各个第三余弦距离均大于或者等于预设余弦距离,则确定所述待认证访客为所述任一目标访客。204. If each calculated third cosine distance is greater than or equal to a preset cosine distance, determine that the visitor to be authenticated is any target visitor.
紧着上面的例子,若待认证访客的人脸特征与目标访客A的人脸特征1、人脸特征2和人脸特征3之间的第三余弦距离分别为余弦距离1、余弦距离2和余弦距离3,且余弦距离1、余弦距离2和余弦距离3均大于或者等于预设余弦距离,则确定待认证访客为目标访客A;若待认证访客的人脸特征与目标访客B的人脸特征4、人脸特征5和人脸特征6之间的余弦距离分别为余弦距离4、余弦距离5和余弦距离6,且余弦距离4、余弦距离5和余弦距离6中的任意余弦距离小于预设余弦距离,则确定待认证访客不是目标访客B,由此通过将待认证访客对应的人脸特征与目标访客对应的多个人脸特征分别进行比较,根据比较结果能够确定待认证访客的身份,同时由于利用了目标访客的多个人脸特征与待认证访客的人脸特征进行比对,提高了访客身份的认证精度。其中,预设余弦距离可以根据对访客身份认证的精度要求进行设定,需要说明的是,为了确保访客身份的认证精度,预设余弦距离不宜设置过小。Following the example above, if the third cosine distance between the face feature of the visitor to be authenticated and the face feature 1, face feature 2 and face feature 3 of the target visitor A are cosine distance 1, cosine distance 2 respectively And cosine distance 3, and cosine distance 1, cosine distance 2, and cosine distance 3 are all greater than or equal to the preset cosine distance, then the visitor to be authenticated is determined to be the target visitor A; if the facial features of the visitor to be authenticated are the same as those of the target visitor B The cosine distances between face feature 4, face feature 5, and face feature 6 are cosine distance 4, cosine distance 5, and cosine distance 6, respectively, and any cosine distance among cosine distance 4, cosine distance 5, and cosine distance 6 is less than With the preset cosine distance, it is determined that the visitor to be authenticated is not the target visitor B. By comparing the facial features corresponding to the visitor to be authenticated with multiple facial features corresponding to the target visitor, the identity of the visitor to be authenticated can be determined according to the comparison result. , At the same time, because multiple facial features of the target visitor are compared with the facial features of the visitor to be authenticated, the authentication accuracy of the visitor's identity is improved. Among them, the preset cosine distance can be set according to the accuracy requirements of the visitor identity authentication. It should be noted that in order to ensure the authentication accuracy of the visitor identity, the preset cosine distance should not be set too small.
进一步地,由于服务器的存储空间有限,且为了保证访客身份认证时与预设特征库中特征的对比速度,需要定时更新预设特征库,即删除掉预设特征库中精度比较低的人脸特征,基于此,所述方法还包括:根据所述预设特征库中各个访客分别对应的多个人脸特征,确定所述各个访客对应的人脸特征数量;根据所述各个访客对应的人脸特征数量,确定所述各个访客中的待更新特征访客;对所述待更新特征访客对应的多个人脸特征进行聚类分析,得到所述待更新特征访客对应的特征聚类结果;根据所述特征聚类结果,对所述待更新特征访客进行特征更新。进一步地,所述根据所述特征聚类结果,对所述待更新特征访客进行特征更新,包括:若所述特征聚类结果为多个特征类别,则确定并删除所述待更新特征访客对应的离群人脸特征;若所述特征聚类结果为单一特征类别,则根据所述待更新特征访客对应的多个人脸特征的入库时间,确定并删除所述多个人脸特征中最早入库的人脸特征。此外,为了确定待更新特征访客,所述根据所述各个访客对应的人脸特征数量,确定所述各个访客中的待更新特征访客,包括:根据所述各个访客对应的人脸特征数量,确定所述人脸特征数量大于预设人脸特征数量的访客,并将其确定为待更新特征访客。其中,预设人脸特征数量可以根据服务器的存储空间大小和对访客身份认证的精度要求确定。Furthermore, due to the limited storage space of the server, and in order to ensure the speed of comparison with the features in the preset feature library during visitor identity authentication, the preset feature library needs to be updated regularly, that is, faces with low accuracy in the preset feature library are deleted. Characteristics. Based on this, the method further includes: determining the number of facial features corresponding to each visitor according to multiple facial features corresponding to each visitor in the preset feature library; and according to the facial features corresponding to each visitor The feature quantity is used to determine the feature visitor to be updated among the visitors; perform cluster analysis on multiple facial features corresponding to the feature visitor to be updated to obtain the feature clustering result corresponding to the feature visitor to be updated; According to the feature clustering result, the feature update is performed on the feature visitor to be updated. Further, the performing feature update on the feature visitor to be updated according to the feature clustering result includes: if the feature clustering result is a plurality of feature categories, determining and deleting the feature visitor corresponding to the feature to be updated Outlier facial features; if the feature clustering result is a single feature category, according to the storage time of multiple facial features corresponding to the feature visitor to be updated, the earliest entry among the multiple facial features is determined and deleted The facial features of the library. In addition, in order to determine the feature visitor to be updated, the determining the feature visitor to be updated in each visitor according to the facial feature quantity corresponding to each visitor includes: determining according to the facial feature quantity corresponding to each visitor The visitor whose number of facial features is greater than the preset number of facial features is determined as the visitor with the feature to be updated. Among them, the preset number of facial features can be determined according to the storage space size of the server and the accuracy requirements for visitor identity authentication.
例如,设定预设人脸特征数量为5,确定预设特征库中访客A对应的人脸特 征数量为8,由于访客对应的人脸特征数量大于预设人脸特征数量,因此确定访客A为待更新特征访客,即需要对访客A对应的多个人脸特征进行更新,删除掉精度比较低的人脸特征,进一步地,对访客A对应的多个人脸特征进行聚类分析,具体可以采用预设最大最小距离聚类算法对访客A对应的多个人脸特征进行聚类分析,得到访客A对应的特征聚类结果,由此通过将访客A对应的多个人脸特征归到与其自身最近的聚类中心,将访客A对应的多个人脸特征划分至不同的特征类别,进一步地,若特征聚类结果为多个特征类别,例如,一个特征类别包含5个人脸特征,另一个特征类别包含3个人脸特征,则确定另一个特征类别中的3个人脸特征为离群人脸特征,并将其删除,若特征聚类结果为一个特征类别,则按照各个人脸特征对应的入库时间,删除掉最早入库的三个人脸特征,由此实现对预设特征库中特征的更新。For example, set the preset number of facial features to 5, and determine that the number of facial features corresponding to visitor A in the preset feature library is 8. Since the number of facial features corresponding to the visitor is greater than the preset number of facial features, visitor A is determined For the feature visitors to be updated, it is necessary to update multiple facial features corresponding to visitor A, and delete the facial features with lower accuracy. Further, cluster analysis of multiple facial features corresponding to visitor A can be used specifically The preset maximum and minimum distance clustering algorithm performs cluster analysis on the multiple facial features corresponding to visitor A, and obtains the feature clustering result corresponding to visitor A, thus by assigning the multiple facial features corresponding to visitor A to the nearest The clustering center divides the multiple facial features corresponding to visitor A into different feature categories. Further, if the feature clustering result is multiple feature categories, for example, one feature category contains 5 facial features, and the other feature category contains 3 facial features, determine the 3 facial features in another feature category as outlier facial features, and delete them. If the feature clustering result is a feature category, then according to the storage time corresponding to each facial feature , Delete the earliest three facial features in the database, thereby realizing the update of the features in the preset feature database.
与此同时,为了提高预设人脸识别模型的精度,采集的待认证访客的照片也可以传入访客身份认证系统,将其加入至训练样本,对预设人脸识别模型进行优化,具体地,可以每隔预设时间间隔利用采集的待认证访客的照片对预设人脸识别模型进行优化,之后利用优化后的预设人脸识别模型提取预设特征库中不同照片对应的人脸特征,更新预设特征库中的人脸特征,进一步提升预设特征库中人脸特征的精度。At the same time, in order to improve the accuracy of the preset face recognition model, the collected photos of the visitors to be authenticated can also be transferred to the visitor identity authentication system and added to the training sample to optimize the preset face recognition model. , The preset face recognition model can be optimized using the photos of the visitors to be authenticated at preset time intervals, and then the optimized preset face recognition model can be used to extract the facial features corresponding to different photos in the preset feature library , Update the facial features in the preset feature library to further improve the accuracy of the facial features in the preset feature library.
在具体应用场景中,各公司分部之间可以相互交换访客的预设特征库,这样可以方便不同分部访客的访问,同时访客的身份证号等敏感信息各自保存在自己的数据库中,也不会出现信息暴露的情况。In specific application scenarios, each company branch can exchange the visitor's preset feature library, which can facilitate the visit of visitors from different branches. At the same time, sensitive information such as the visitor's ID number is stored in its own database. There will be no information exposure.
本申请实施例提供的另一种基于机器学习的访客身份认证方法,与目前将提取的访客特征与特征库中访客的单一特征进行对比的方式相比,本申请能够获取待认证访客的人脸特征;并根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,从而根据多层级分析结果排除掉预设特征库中与待认证访客不相近的绝大多数访客,仅保留与待认证访客相近的少数目标访客,之后根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份,由此既能够利用预设特征库中目标访客的多个人脸特征对待认证访客的身份进行认证,提高了访客身份的认证精度,同时还能够利用多层级分析排除掉预设特征库中绝大多数访客的人脸特征,大大减少了特征比对的工作量,在提高访客身份认证精度的同时,能够确保访客身份的认证效率。The embodiment of this application provides another machine learning-based visitor identity authentication method. Compared with the current method of comparing the extracted visitor features with the single feature of the visitor in the feature database, this application can obtain the face of the visitor to be authenticated. Features; and based on the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library to perform multi-level analysis, so as to exclude the preset feature library and the visitors to be authenticated according to the multi-level analysis results The vast majority of visitors who are not close, only keep a few target visitors close to the visitor to be authenticated, and then determine the identity of the visitor to be authenticated according to the multiple facial features corresponding to each target visitor. Set multiple facial features of the target visitor in the feature library to authenticate the identity of the visitor to be authenticated, which improves the authentication accuracy of the visitor’s identity. At the same time, it can also use multi-level analysis to exclude the facial features of the vast majority of visitors in the preset feature library. It greatly reduces the workload of feature comparison, and while improving the accuracy of visitor identity authentication, it can ensure the efficiency of visitor identity authentication.
进一步地,作为图1的具体实现,本申请实施例提供了一种基于机器学习的访客身份认证装置,如图3所示,所述装置包括:获取单元31、分析单元32和确定单元33。Further, as a specific implementation of FIG. 1, an embodiment of the present application provides a visitor identity authentication device based on machine learning. As shown in FIG. 3, the device includes: an acquisition unit 31, an analysis unit 32, and a determination unit 33.
所述获取单元31,可以用于获取待认证访客的人脸特征。所述获取单元31是本装置中获取待认证访客的人脸特征的主要功能模块。The acquiring unit 31 may be used to acquire the facial features of the visitor to be authenticated. The acquiring unit 31 is the main functional module of the device for acquiring the facial features of the visitor to be authenticated.
所述分析单元32,可以用于根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客。所述分析单元32是本装置中根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客的主要 功能模块,也是核心模块。The analysis unit 32 may be configured to perform multi-level analysis based on the facial features of the visitor to be authenticated and multiple facial features corresponding to each visitor in the preset feature library, and determine the preset based on the multi-level analysis result Each target visitor in the signature database. The analysis unit 32 performs multi-level analysis in the device according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determines the preset according to the multi-level analysis result. The main functional modules of each target visitor in the signature database are also core modules.
所述确定单元33,可以用于根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。所述确定单元33是本装置中根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份的主要功能模块,也是核心模块。The determining unit 33 may be configured to determine the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor. The determining unit 33 is a main functional module in the device that determines the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor, and is also a core module.
对于本申请实施例,如图4所示,为了根据多层级分析结果确定所述预设特征库中的各个目标访客,所述分析单元32,包括:计算模块321、分析模块322和确定模块323。For the embodiment of the present application, as shown in FIG. 4, in order to determine each target visitor in the preset feature library according to the multi-level analysis result, the analysis unit 32 includes: a calculation module 321, an analysis module 322, and a determination module 323 .
所述计算模块321,可以用于根据所述各个访客分别对应的多个人脸特征,计算所述各个访客对应的特征中心。The calculation module 321 may be used to calculate the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor.
所述分析模块322,可以用于基于计算的各个访客对应的特征中心,对所述各个访客进行聚类分析,得到多个聚类类别。The analysis module 322 may be used to perform cluster analysis on each visitor based on the calculated feature center corresponding to each visitor to obtain multiple cluster categories.
所述确定模块323,可以用于根据所述待认证访客的人脸特征和不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别。The determining module 323 may be used to determine the target cluster category among the multiple cluster categories according to the facial features of the visitor to be authenticated and the feature centers corresponding to each visitor in different cluster categories.
所述确定模块323,还可以用于根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客。The determining module 323 may also be used to determine each target visitor in the target cluster category according to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor in the target cluster category.
进一步地,为了确定所述多个聚类类别中的目标聚类类别,所述确定模块323,包括:计算子模块和确定子模块。Further, in order to determine the target cluster category among the multiple cluster categories, the determining module 323 includes: a calculation sub-module and a determining sub-module.
所述计算子模块,可以用于根据所述不同聚类类别下各个访客对应的特征中心,计算所述不同聚类类别对应的特征中心。The calculation sub-module may be used to calculate the characteristic centers corresponding to the different clustering categories according to the characteristic centers corresponding to each visitor in the different clustering categories.
所述确定子模块,可以用于分别计算所述待认证访客的人脸特征与所述不同聚类类别对应的特征中心之间的第一余弦距离,并基于计算的各个第一余弦距离,确定所述多个聚类类别中的目标聚类类别。The determining sub-module may be used to calculate the first cosine distances between the facial features of the visitor to be authenticated and the feature centers corresponding to the different cluster categories, and to calculate the first cosine distances based on the calculated first cosine distances. , Determining the target cluster category among the multiple cluster categories.
进一步地,所述确定模块323,还包括筛选子模块,所述计算子模块,还可以用于分别计算所述待认证访客的人脸特征与所述目标聚类类别下各个访客对应的特征中心之间的第二余弦距离。Further, the determination module 323 further includes a screening sub-module, and the calculation sub-module may also be used to calculate the facial features of the visitors to be authenticated and the feature centers corresponding to each visitor in the target cluster category. The second cosine distance between.
所述筛选子模块,可以用于基于计算的各个第二余弦距离,从所述目标聚类类别下各个访客中筛选出目标访客。The screening sub-module may be used to screen out target visitors from each visitor in the target cluster category based on each calculated second cosine distance.
进一步地,为了计算各个访客对应的特征中心,所述计算模块321,包括确定子模块和计算子模块。Further, in order to calculate the characteristic center corresponding to each visitor, the calculation module 321 includes a determination sub-module and a calculation sub-module.
所述确定子模块,可以用于分别确定所述多个人脸特征中各个人脸特征对应的权重值。The determining sub-module may be used to determine the weight value corresponding to each facial feature of the multiple facial features.
所述计算子模块,可以用于基于确定的权重值和所述多个人脸特征,计算所述各个访客对应的特征中心。The calculation sub-module may be used to calculate the feature center corresponding to each visitor based on the determined weight value and the multiple facial features.
进一步地,为了确定所述待认证访客的身份,所述确定单元33,包括:计算模块331和确定模块332。Further, in order to determine the identity of the visitor to be authenticated, the determining unit 33 includes a calculating module 331 and a determining module 332.
所述计算模块331,可以用于确定所述各个目标访客中的任一目标访客,计算所述待认证访客的人脸特征分别与所述任一目标访客对应的各个人脸特征之间的第三余弦距离。The calculation module 331 may be used to determine any one of the target visitors, and calculate the difference between the facial features of the visitor to be authenticated and the facial features corresponding to any of the target visitors. The third cosine distance.
所述确定模块332,可以用于若计算的各个第三余弦距离均大于或者等于预设余弦距离,则确定所述待认证访客为所述任一目标访客。The determining module 332 may be configured to determine that the visitor to be authenticated is any target visitor if the calculated third cosine distances are all greater than or equal to a preset cosine distance.
进一步地,为了对预设特征库进行更新,所述装置还包括:更新单元34。Further, in order to update the preset feature library, the device further includes: an update unit 34.
所述确定单元33,还可以用于根据所述预设特征库中各个访客分别对应的多个人脸特征,确定所述各个访客对应的人脸特征数量。The determining unit 33 may also be configured to determine the number of facial features corresponding to each visitor according to multiple facial features corresponding to each visitor in the preset feature library.
所述确定单元33,还可以用于根据所述各个访客对应的人脸特征数量,确定所述各个访客中的待更新特征访客。The determining unit 33 may also be configured to determine the feature visitor to be updated among the visitors according to the number of facial features corresponding to each visitor.
所述分析单元32,还可以用于对所述待更新特征访客对应的多个人脸特征进行聚类分析,得到所述待更新特征访客对应的特征聚类结果。The analysis unit 32 may also be used to perform cluster analysis on multiple facial features corresponding to the feature visitor to be updated to obtain a feature clustering result corresponding to the feature visitor to be updated.
所述更新单元34,可以用于根据所述特征聚类结果,对所述待更新特征访客进行特征更新。The updating unit 34 may be configured to update the characteristics of the visitor with the characteristics to be updated according to the result of the characteristic clustering.
进一步地,为了对所述待更新特征访客进行特征更新,所述更新单元34,包括:第一删除模块341和第二删除模块342。Further, in order to update the feature of the visitor with the feature to be updated, the update unit 34 includes: a first deletion module 341 and a second deletion module 342.
所述第一删除模块341,可以用于若所述特征聚类结果为多个特征类别,则确定并删除所述待更新特征访客对应的离群人脸特征。The first deleting module 341 may be used to determine and delete the outlier facial features corresponding to the feature visitor to be updated if the feature clustering result is multiple feature categories.
所述第二删除模块342,可以用于若所述特征聚类结果为单一特征类别,则根据所述待更新特征访客对应的多个人脸特征的入库时间,确定并删除所述多个人脸特征中最早入库的人脸特征。The second deletion module 342 may be used to determine and delete the multiple face features according to the storage time of the multiple face features corresponding to the feature visitor to be updated if the feature clustering result is a single feature category The face feature that is the earliest in the database.
需要说明的是,本申请实施例提供的一种基于机器学习的访客身份认证装置所涉及各功能模块的其他相应描述,可以参考图1所示方法的对应描述,在此不再赘述。It should be noted that, for other corresponding descriptions of the functional modules involved in the machine learning-based visitor identity authentication device provided in the embodiment of the present application, reference may be made to the corresponding description of the method shown in FIG. 1, which will not be repeated here.
基于上述如图1所示方法,相应的,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:获取待认证访客的人脸特征;根据所述待认证访客的人脸特征和预设特征库中各个访 客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。Based on the above method shown in FIG. 1, correspondingly, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the following steps are implemented: Face features; multi-level analysis is performed according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and each of the preset feature libraries is determined according to the multi-level analysis result Target visitor; determine the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor.
所述计算机存储介质可以是非易失性,也可以是易失性。The computer storage medium may be non-volatile or volatile.
基于上述如图1所示方法和如图3所示装置的实施例,本申请实施例还提供了一种计算机设备的实体结构图,如图5所示,该计算机设备包括:处理器41、存储器42、及存储在存储器42上并可在处理器上运行的计算机程序,其中存储器42和处理器41均设置在总线43上所述处理器41执行所述程序时实现以下步骤:获取待认证访客的人脸特征;根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。Based on the above-mentioned method shown in FIG. 1 and the embodiment of the apparatus shown in FIG. 3, an embodiment of the present application also provides a physical structure diagram of a computer device. As shown in FIG. 5, the computer device includes: a processor 41, The memory 42 and a computer program that is stored on the memory 42 and can run on the processor, wherein the memory 42 and the processor 41 are both set on the bus 43, and the processor 41 implements the following steps when the processor 41 executes the program: Obtain the pending authentication The facial features of the visitor; perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determine the preset feature library according to the multi-level analysis result The identity of each target visitor to be authenticated is determined according to multiple facial features corresponding to each target visitor.
通过本申请的技术方案,本申请能够获取待认证访客的人脸特征;并根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,从而根据多层级分析结果排除掉预设特征库中与待认证访客不相近的绝大多数访客,仅保留与待认证访客相近的少数目标访客,之后根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份,由此既能够利用预设特征库中目标访客的多个人脸特征对待认证访客的身份进行认证,提高了访客身份的认证精度,同时还能够利用多层级分析排除掉预设特征库中绝大多数访客的人脸特征,大大减少了特征比对的工作量,在提高访客身份认证精度的同时,能够确保访客身份的认证效率。Through the technical solution of this application, this application can obtain the facial features of the visitor to be authenticated; and perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library. Therefore, according to the multi-level analysis results, the vast majority of visitors who are not similar to the visitors to be authenticated in the preset feature library are excluded, and only a few target visitors who are similar to the visitors to be authenticated are retained. Then, according to the multiple faces corresponding to each target visitor. Feature to determine the identity of the visitor to be authenticated, so that multiple facial features of the target visitor in the preset feature library can be used to authenticate the identity of the visitor to be authenticated, which improves the authentication accuracy of the visitor’s identity, and can also use multiple levels The analysis excludes the facial features of most visitors in the preset feature library, which greatly reduces the workload of feature comparison. While improving the accuracy of visitor identification, it can ensure the efficiency of visitor identification.
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices. Above, alternatively, they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device for execution by the computing device, and in some cases, they can be executed in a different order than here. Perform the steps shown or described, or fabricate them into individual integrated circuit modules respectively, or fabricate multiple modules or steps of them into a single integrated circuit module for implementation. In this way, this application is not limited to any specific combination of hardware and software.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。The above descriptions are only preferred embodiments of the application, and are not intended to limit the application. For those skilled in the art, the application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection scope of this application.

Claims (20)

  1. 一种基于机器学习的访客身份认证方法,其中,包括:A visitor identity authentication method based on machine learning, which includes:
    获取待认证访客的人脸特征;Obtain the facial features of the visitors to be authenticated;
    根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;Perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determine each target visitor in the preset feature library according to the multi-level analysis result;
    根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。The identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
  2. 根据权利要求1所述的方法,其中,所述根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客,包括:The method according to claim 1, wherein the multi-level analysis is performed according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and the determination is made according to the multi-level analysis result Each target visitor in the preset feature library includes:
    根据所述各个访客分别对应的多个人脸特征,计算所述各个访客对应的特征中心;Calculating the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor;
    基于计算的各个访客对应的特征中心,对所述各个访客进行聚类分析,得到多个聚类类别;Based on the calculated feature center corresponding to each visitor, perform a cluster analysis on each visitor to obtain multiple cluster categories;
    根据所述待认证访客的人脸特征和不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别;Determine the target cluster category among the multiple cluster categories according to the facial features of the visitors to be authenticated and the feature centers corresponding to each visitor in different cluster categories;
    根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客。According to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category, each target visitor under the target cluster category is determined.
  3. 根据权利要求2所述的方法,其中,所述根据所述待认证访客的人脸特征和所述不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别,包括:The method according to claim 2, wherein said determining the target clusters in the multiple clustering categories based on the facial features of the visitors to be authenticated and the feature centers corresponding to each visitor in the different clustering categories. Class categories, including:
    根据所述不同聚类类别下各个访客对应的特征中心,计算所述不同聚类类别对应的特征中心;Calculating the feature centers corresponding to the different cluster categories according to the feature centers corresponding to each visitor under the different cluster categories;
    分别计算所述待认证访客的人脸特征与所述不同聚类类别对应的特征中心之间的第一余弦距离,并基于计算的各个第一余弦距离,确定所述多个聚类类别中的目标聚类类别;Calculate the first cosine distances between the facial features of the visitor to be authenticated and the feature centers corresponding to the different cluster categories respectively, and determine the multiple cluster categories based on the calculated first cosine distances Target cluster category in
    所述根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客,包括:The determining each target visitor under the target cluster category according to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category includes:
    分别计算所述待认证访客的人脸特征与所述目标聚类类别下各个访客对应的特征中心之间的第二余弦距离;Respectively calculating the second cosine distance between the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor in the target cluster category;
    基于计算的各个第二余弦距离,从所述目标聚类类别下各个访客中筛选出目标访客。Based on the calculated second cosine distances, the target visitors are filtered from the visitors under the target cluster category.
  4. 根据权利要求2所述的方法,其中,所述根据所述各个访客分别对应的多个人脸特征,计算所述各个访客对应的特征中心,包括:The method according to claim 2, wherein the calculating the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor respectively comprises:
    分别确定所述多个人脸特征中各个人脸特征对应的权重值;Respectively determining a weight value corresponding to each of the multiple facial features;
    基于确定的权重值和所述多个人脸特征,计算所述各个访客对应的特征中心。Based on the determined weight value and the multiple facial features, the feature center corresponding to each visitor is calculated.
  5. 根据权利要求1所述的方法,其中,所述根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份,包括:The method according to claim 1, wherein the determining the identity of the visitor to be authenticated according to the multiple facial features corresponding to the respective target visitors comprises:
    确定所述各个目标访客中的任一目标访客,计算所述待认证访客的人脸特征分别与所述任一目标访客对应的各个人脸特征之间的第三余弦距离;Determine any target visitor among the target visitors, and calculate the third cosine distance between the facial features of the visitor to be authenticated and the facial features corresponding to the any target visitor;
    若计算的各个第三余弦距离均大于或者等于预设余弦距离,则确定所述待认证访客为所述任一目标访客。If each of the calculated third cosine distances is greater than or equal to the preset cosine distance, it is determined that the visitor to be authenticated is any target visitor.
  6. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    根据所述预设特征库中各个访客分别对应的多个人脸特征,确定所述各个访客对应的人脸特征数量;Determine the number of facial features corresponding to each visitor according to multiple facial features corresponding to each visitor in the preset feature library;
    根据所述各个访客对应的人脸特征数量,确定所述各个访客中的待更新特征访客;Determine the feature visitor to be updated among the visitors according to the number of facial features corresponding to each visitor;
    对所述待更新特征访客对应的多个人脸特征进行聚类分析,得到所述待更新特征访客对应的特征聚类结果;Performing cluster analysis on multiple facial features corresponding to the feature visitor to be updated to obtain a feature clustering result corresponding to the feature visitor to be updated;
    根据所述特征聚类结果,对所述待更新特征访客进行特征更新。According to the feature clustering result, perform feature update on the feature visitor to be updated.
  7. 根据权利要求6所述的方法,其中,所述根据所述特征聚类结果,对所述待更新特征访客进行特征更新,包括:8. The method according to claim 6, wherein the performing feature update on the feature visitor to be updated according to the feature clustering result comprises:
    若所述特征聚类结果为多个特征类别,则确定并删除所述待更新特征访客对应的离群人脸特征;If the feature clustering result is multiple feature categories, determine and delete the outlier facial features corresponding to the feature visitor to be updated;
    若所述特征聚类结果为单一特征类别,则根据所述待更新特征访客对应的多个人脸特征的入库时间,确定并删除所述多个人脸特征中最早入库的人脸特征。If the feature clustering result is a single feature category, according to the storage time of the multiple facial features corresponding to the feature visitor to be updated, the earliest stored facial feature among the multiple facial features is determined and deleted.
  8. 一种基于机器学习的访客身份认证装置,其中,包括:A visitor identity authentication device based on machine learning, which includes:
    获取单元,用于获取待认证访客的人脸特征;The obtaining unit is used to obtain the facial features of the visitor to be authenticated;
    分析单元,用于根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;The analysis unit is configured to perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and to determine the preset feature library according to the multi-level analysis result Each target visitor;
    确定单元,用于根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。The determining unit is configured to determine the identity of the visitor to be authenticated according to multiple facial features corresponding to each target visitor.
  9. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现以下方法步骤:A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the following method steps when executed by a processor:
    获取待认证访客的人脸特征;Obtain the facial features of the visitors to be authenticated;
    根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;Perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determine each target visitor in the preset feature library according to the multi-level analysis result;
    根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。The identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
  10. 根据权利要求9所述的计算机可读存储介质,其中,所述根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客,包括:The computer-readable storage medium according to claim 9, wherein the multi-level analysis is performed according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and based on the multiple The result of the hierarchical analysis determines each target visitor in the preset feature library, including:
    根据所述各个访客分别对应的多个人脸特征,计算所述各个访客对应的特征中心;Calculating the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor;
    基于计算的各个访客对应的特征中心,对所述各个访客进行聚类分析,得到多个聚类类别;Based on the calculated feature center corresponding to each visitor, perform a cluster analysis on each visitor to obtain multiple cluster categories;
    根据所述待认证访客的人脸特征和不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别;Determine the target cluster category among the multiple cluster categories according to the facial features of the visitors to be authenticated and the feature centers corresponding to each visitor in different cluster categories;
    根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客。According to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category, each target visitor under the target cluster category is determined.
  11. 根据权利要求10所述的计算机可读存储介质,其中,所述根据所述待认证访客的人脸特征和所述不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别,包括:The computer-readable storage medium according to claim 10, wherein the plurality of cluster categories are determined based on the facial features of the visitor to be authenticated and the feature centers corresponding to each visitor in the different cluster categories The target cluster categories in include:
    根据所述不同聚类类别下各个访客对应的特征中心,计算所述不同聚类类别 对应的特征中心;Calculating the feature centers corresponding to the different cluster categories according to the feature centers corresponding to each visitor under the different cluster categories;
    分别计算所述待认证访客的人脸特征与所述不同聚类类别对应的特征中心之间的第一余弦距离,并基于计算的各个第一余弦距离,确定所述多个聚类类别中的目标聚类类别;Calculate the first cosine distances between the facial features of the visitor to be authenticated and the feature centers corresponding to the different cluster categories respectively, and determine the multiple cluster categories based on the calculated first cosine distances Target cluster category in
    所述根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客,包括:The determining each target visitor under the target cluster category according to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category includes:
    分别计算所述待认证访客的人脸特征与所述目标聚类类别下各个访客对应的特征中心之间的第二余弦距离;Respectively calculating the second cosine distance between the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor in the target cluster category;
    基于计算的各个第二余弦距离,从所述目标聚类类别下各个访客中筛选出目标访客。Based on the calculated second cosine distances, the target visitors are filtered from the visitors under the target cluster category.
  12. 根据权利要求10所述的计算机可读存储介质,其中,所述根据所述各个访客分别对应的多个人脸特征,计算所述各个访客对应的特征中心,包括:11. The computer-readable storage medium according to claim 10, wherein the calculating the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor respectively comprises:
    分别确定所述多个人脸特征中各个人脸特征对应的权重值;Respectively determining a weight value corresponding to each of the multiple facial features;
    基于确定的权重值和所述多个人脸特征,计算所述各个访客对应的特征中心。Based on the determined weight value and the multiple facial features, the feature center corresponding to each visitor is calculated.
  13. 根据权利要求9所述的计算机可读存储介质,其中,所述根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份,包括:9. The computer-readable storage medium according to claim 9, wherein the determining the identity of the visitor to be authenticated according to the multiple facial features corresponding to each of the target visitors respectively comprises:
    确定所述各个目标访客中的任一目标访客,计算所述待认证访客的人脸特征分别与所述任一目标访客对应的各个人脸特征之间的第三余弦距离;Determine any target visitor among the target visitors, and calculate the third cosine distance between the facial features of the visitor to be authenticated and the facial features corresponding to the any target visitor;
    若计算的各个第三余弦距离均大于或者等于预设余弦距离,则确定所述待认证访客为所述任一目标访客。If each of the calculated third cosine distances is greater than or equal to the preset cosine distance, it is determined that the visitor to be authenticated is any target visitor.
  14. 根据权利要求9所述的计算机可读存储介质,其中,所述方法还包括:The computer-readable storage medium of claim 9, wherein the method further comprises:
    根据所述预设特征库中各个访客分别对应的多个人脸特征,确定所述各个访客对应的人脸特征数量;Determine the number of facial features corresponding to each visitor according to multiple facial features corresponding to each visitor in the preset feature library;
    根据所述各个访客对应的人脸特征数量,确定所述各个访客中的待更新特征访客;Determine the feature visitor to be updated among the visitors according to the number of facial features corresponding to each visitor;
    对所述待更新特征访客对应的多个人脸特征进行聚类分析,得到所述待更新特征访客对应的特征聚类结果;Performing cluster analysis on multiple facial features corresponding to the feature visitor to be updated to obtain a feature clustering result corresponding to the feature visitor to be updated;
    根据所述特征聚类结果,对所述待更新特征访客进行特征更新。According to the feature clustering result, perform feature update on the feature visitor to be updated.
  15. 一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述计算机程序被处理器执行时实现以下方法步骤:A computer device includes a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the computer program is executed by the processor to implement the following method steps:
    获取待认证访客的人脸特征;Obtain the facial features of the visitors to be authenticated;
    根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客;Perform multi-level analysis according to the facial features of the visitor to be authenticated and the multiple facial features corresponding to each visitor in the preset feature library, and determine each target visitor in the preset feature library according to the multi-level analysis result;
    根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份。The identity of the visitor to be authenticated is determined according to the multiple facial features corresponding to each target visitor.
  16. 根据权利要求15所述的计算机设备,其中,所述根据所述待认证访客的人脸特征和预设特征库中各个访客分别对应的多个人脸特征进行多层级分析,并根据多层级分析结果确定所述预设特征库中的各个目标访客,包括:The computer device according to claim 15, wherein the multi-level analysis is performed based on the facial features of the visitor to be authenticated and multiple facial features corresponding to each visitor in the preset feature library, and the multi-level analysis is performed according to the multi-level analysis result Determining each target visitor in the preset feature library includes:
    根据所述各个访客分别对应的多个人脸特征,计算所述各个访客对应的特征中心;Calculating the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor;
    基于计算的各个访客对应的特征中心,对所述各个访客进行聚类分析,得到多个聚类类别;Based on the calculated feature center corresponding to each visitor, perform a cluster analysis on each visitor to obtain multiple cluster categories;
    根据所述待认证访客的人脸特征和不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别;Determine the target cluster category among the multiple cluster categories according to the facial features of the visitors to be authenticated and the feature centers corresponding to each visitor in different cluster categories;
    根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客。According to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category, each target visitor under the target cluster category is determined.
  17. 根据权利要求16所述的计算机设备,其中,所述根据所述待认证访客的人脸特征和所述不同聚类类别下各个访客对应的特征中心,确定所述多个聚类类别中的目标聚类类别,包括:The computer device according to claim 16, wherein the target in the multiple clustering categories is determined based on the facial features of the visitor to be authenticated and the feature center corresponding to each visitor in the different clustering categories Cluster categories, including:
    根据所述不同聚类类别下各个访客对应的特征中心,计算所述不同聚类类别对应的特征中心;Calculating the feature centers corresponding to the different cluster categories according to the feature centers corresponding to each visitor under the different cluster categories;
    分别计算所述待认证访客的人脸特征与所述不同聚类类别对应的特征中心之间的第一余弦距离,并基于计算的各个第一余弦距离,确定所述多个聚类类别中的目标聚类类别;Calculate the first cosine distances between the facial features of the visitor to be authenticated and the feature centers corresponding to the different cluster categories respectively, and determine the multiple cluster categories based on the calculated first cosine distances Target cluster category in
    所述根据所述待认证访客的人脸特征和所述目标聚类类别下各个访客对应的特征中心,确定所述目标聚类类别下的各个目标访客,包括:The determining each target visitor under the target cluster category according to the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor under the target cluster category includes:
    分别计算所述待认证访客的人脸特征与所述目标聚类类别下各个访客对应的特征中心之间的第二余弦距离;Respectively calculating the second cosine distance between the facial feature of the visitor to be authenticated and the feature center corresponding to each visitor in the target cluster category;
    基于计算的各个第二余弦距离,从所述目标聚类类别下各个访客中筛选出目标访客。Based on the calculated second cosine distances, the target visitors are filtered from the visitors under the target cluster category.
  18. 根据权利要求16所述的计算机设备,其中,所述根据所述各个访客分别对应的多个人脸特征,计算所述各个访客对应的特征中心,包括:The computer device according to claim 16, wherein the calculating the feature center corresponding to each visitor according to the multiple facial features corresponding to each visitor respectively comprises:
    分别确定所述多个人脸特征中各个人脸特征对应的权重值;Respectively determining a weight value corresponding to each of the multiple facial features;
    基于确定的权重值和所述多个人脸特征,计算所述各个访客对应的特征中心。Based on the determined weight value and the multiple facial features, the feature center corresponding to each visitor is calculated.
  19. 根据权利要求15所述的计算机设备,其中,所述根据所述各个目标访客分别对应的多个人脸特征,确定所述待认证访客的身份,包括:15. The computer device according to claim 15, wherein the determining the identity of the visitor to be authenticated according to the multiple facial features corresponding to the respective target visitors comprises:
    确定所述各个目标访客中的任一目标访客,计算所述待认证访客的人脸特征分别与所述任一目标访客对应的各个人脸特征之间的第三余弦距离;Determine any target visitor among the target visitors, and calculate the third cosine distance between the facial features of the visitor to be authenticated and the facial features corresponding to the any target visitor;
    若计算的各个第三余弦距离均大于或者等于预设余弦距离,则确定所述待认证访客为所述任一目标访客。If each of the calculated third cosine distances is greater than or equal to the preset cosine distance, it is determined that the visitor to be authenticated is any target visitor.
  20. 根据权利要求15所述的计算机设备,其中,所述方法还包括:The computer device according to claim 15, wherein the method further comprises:
    根据所述预设特征库中各个访客分别对应的多个人脸特征,确定所述各个访客对应的人脸特征数量;Determine the number of facial features corresponding to each visitor according to multiple facial features corresponding to each visitor in the preset feature library;
    根据所述各个访客对应的人脸特征数量,确定所述各个访客中的待更新特征访客;Determine the feature visitor to be updated among the visitors according to the number of facial features corresponding to each visitor;
    对所述待更新特征访客对应的多个人脸特征进行聚类分析,得到所述待更新特征访客对应的特征聚类结果;Performing cluster analysis on multiple facial features corresponding to the feature visitor to be updated to obtain a feature clustering result corresponding to the feature visitor to be updated;
    根据所述特征聚类结果,对所述待更新特征访客进行特征更新。According to the feature clustering result, perform feature update on the feature visitor to be updated.
PCT/CN2020/136370 2020-07-31 2020-12-15 Visitor identity authentication method and apparatus based on machine learning, and computer device WO2021139493A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010761117.7A CN111898548B (en) 2020-07-31 2020-07-31 Visitor identity authentication method and device based on machine learning and computer equipment
CN202010761117.7 2020-07-31

Publications (1)

Publication Number Publication Date
WO2021139493A1 true WO2021139493A1 (en) 2021-07-15

Family

ID=73183472

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/136370 WO2021139493A1 (en) 2020-07-31 2020-12-15 Visitor identity authentication method and apparatus based on machine learning, and computer device

Country Status (2)

Country Link
CN (1) CN111898548B (en)
WO (1) WO2021139493A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131903A (en) * 2022-06-29 2022-09-30 河北时代电子有限公司 Public health visitor registration and monitoring method based on county-domain medical integration

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111898548B (en) * 2020-07-31 2023-07-28 平安科技(深圳)有限公司 Visitor identity authentication method and device based on machine learning and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050089197A1 (en) * 2003-09-02 2005-04-28 Fuji Photo Film Co., Ltd. Authentication system and program
CN101216884A (en) * 2007-12-29 2008-07-09 北京中星微电子有限公司 A method and system for face authentication
CN109255299A (en) * 2018-08-13 2019-01-22 北京市商汤科技开发有限公司 Identity identifying method and device, electronic equipment and storage medium
CN111898548A (en) * 2020-07-31 2020-11-06 平安科技(深圳)有限公司 Visitor identity authentication method and device based on machine learning and computer equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6697356B2 (en) * 2016-09-13 2020-05-20 Kddi株式会社 Device, program and method for identifying state of specific object among predetermined objects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050089197A1 (en) * 2003-09-02 2005-04-28 Fuji Photo Film Co., Ltd. Authentication system and program
CN101216884A (en) * 2007-12-29 2008-07-09 北京中星微电子有限公司 A method and system for face authentication
CN109255299A (en) * 2018-08-13 2019-01-22 北京市商汤科技开发有限公司 Identity identifying method and device, electronic equipment and storage medium
CN111898548A (en) * 2020-07-31 2020-11-06 平安科技(深圳)有限公司 Visitor identity authentication method and device based on machine learning and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131903A (en) * 2022-06-29 2022-09-30 河北时代电子有限公司 Public health visitor registration and monitoring method based on county-domain medical integration
CN115131903B (en) * 2022-06-29 2024-05-14 河北时代电子有限公司 Public health visitor registration and monitoring method based on county-domain medical community

Also Published As

Publication number Publication date
CN111898548A (en) 2020-11-06
CN111898548B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
WO2019120115A1 (en) Facial recognition method, apparatus, and computer apparatus
Rajasekar et al. Enhanced multimodal biometric recognition approach for smart cities based on an optimized fuzzy genetic algorithm
US11495056B2 (en) Intelligent gallery management for biometrics
CN112541458B (en) Domain self-adaptive face recognition method, system and device based on meta learning
WO2021139493A1 (en) Visitor identity authentication method and apparatus based on machine learning, and computer device
JP2014515842A (en) Face recognition
US8719191B2 (en) Training and verification using a correlated boosted entity model
US20190147218A1 (en) User specific classifiers for biometric liveness detection
CN111241992B (en) Face recognition model construction method, recognition method, device, equipment and storage medium
US11755708B2 (en) Methods and systems for facilitating secure authentication of user based on known data
Haji et al. Real time face recognition system (RTFRS)
CN112365007A (en) Model parameter determination method, device, equipment and storage medium
CN110348516B (en) Data processing method, data processing device, storage medium and electronic equipment
CN109359689B (en) Data identification method and device
Lai et al. Bridging the gap between forensics and biometric-enabled watchlists for e-borders
JP7231879B2 (en) Control method, control program and information processing device
Jadhav et al. HDL-PI: hybrid DeepLearning technique for person identification using multimodal finger print, iris and face biometric features
JP7355243B2 (en) Information processing device, information processing method and program
CN112041847A (en) Providing images with privacy tags
CN116595543A (en) Processing system for developing application data by software based on Internet platform
CN115063630A (en) Application of decoupling migration-based federated learning method in computer vision
JP6706397B1 (en) Learning system, learning method, and program
Khalil et al. Label-Aware Aggregation for Improved Federated Learning
Brintha et al. Privacy Enabled Dynamic Regimentation of Photo Posting on Online Social Networks
WO2024065374A1 (en) Automated verification of documents related to accounts within a service provider network

Legal Events

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

Ref document number: 20912543

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20912543

Country of ref document: EP

Kind code of ref document: A1