An unattended access control method based on face recognition
By using the combination of two network models in the face recognition access control system, simulated matching and precise matching are combined, the delay problem caused by the large computing power overhead of face recognition matching is solved, and efficient and accurate user recognition is achieved.
Patent Information
- Application Number
- CN202411138744.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In the case of high traffic, the computing power overhead of facial recognition matching is large, resulting in a long recognition delay and cannot meet the needs. How to take into account the accuracy of the matching and computing power overhead is a hot topic.
Using the combination of two network models, first simulated matching is performed through the first network model to quickly identify users without entry permission. If the match is passed, the second network model will be accurately matched to confirm the user's identity.
Through this method, while ensuring safety and accuracy, it can reduce computing power overhead, improve the system's response speed, and meet the needs of high traffic environments.
Smart Images

Figure CN118781701B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an unmanned access control method based on face recognition. Background Art
[0002] With the continuous development of science and technology, face recognition technology is being used more and more widely in various fields. In access control systems, face recognition technology can achieve unattended operation and improve security and convenience. This article will introduce the application background, technical principles, advantages and possible challenges of face recognition in access control systems.
[0003] In modern society, as people's demand for security and convenience continues to increase, access control systems have gradually become essential facilities in various office buildings, residential areas, shopping malls and other places. Traditional access control systems require manual identity authentication, such as entering passwords and swiping cards, which have certain security risks and inconveniences in operation. The emergence of face recognition technology has brought revolutionary changes to access control systems.
[0004] Facial recognition technology uses computer vision and machine learning algorithms to analyze and compare facial images to identify individual identities. Specifically, facial recognition access control systems usually include the following steps: (1) Facial image acquisition: The facial image is captured by a camera and transmitted to the processor. (2) Facial feature extraction: Using facial recognition algorithms, such as deep learning models, key facial features such as the location information of the eyes, nose, mouth, and facial contours are extracted from the captured image. (3) Facial comparison: The extracted facial features are compared with the facial features stored in the database to determine the individual's identity. (4) Identity verification: Based on the comparison results, the system automatically controls the gate to open or close. In this way, users do not need to carry cards or remember passwords, they can pass quickly by just facing the camera. In addition, the system can automatically identify and control the gate without manual intervention, which improves the efficiency of passage.
[0005] However, for unmanned access control systems, the accuracy of face recognition matching is the decisive factor in ensuring security when no one is on duty. However, the computing power overhead of face recognition matching is also very large under high accuracy, and the recognition and matching delay is relatively long, which cannot meet the needs when there is a large flow of people. Therefore, how to balance the matching accuracy and computing power overhead is a hot issue in current research. Summary of the invention
[0006] The embodiment of the present application provides an unattended access control method based on face recognition, which is used to take into account both matching accuracy and computing power overhead.
[0007] In order to achieve the above objectives, this application adopts the following technical solutions:
[0008] In a first aspect, an embodiment of the present application provides an unattended access control method based on face recognition, which is applied to an electronic device in an unattended access control system. The unattended access control system also includes an image acquisition device and an access control gate. The method includes: the electronic device obtains an image to be identified acquired by the image acquisition device; the electronic device simulates matching the image to be identified through a first network model to determine whether the user in the image to be identified is a user with entry permission; if the user in the image to be identified is not a user with entry permission, the electronic device refuses to control the access control gate to perform an opening operation, otherwise, the electronic device accurately matches the image to be identified through a second network model to determine whether the user in the image to be identified is a user with entry permission; if the user in the image to be identified is not a user with entry permission, the electronic device refuses to control the access control gate to perform an opening operation, otherwise, the electronic device controls the access control gate to perform an opening operation.
[0009] Optionally, the electronic device performs simulated matching on the image to be identified through the first network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device downsamples the image to be identified through the first network model to obtain a downsampled image to be identified; the electronic device fuzzy matches the downsampled image to be identified with the downsampled images in an image database through the first network model to determine whether the user in the image to be identified is a user with access permission, wherein the user contained in the downsampled image in the image database is a user with access permission.
[0010] Optionally, the image database includes M downsampled images, for the i-th downsampled image in the M downsampled images, i is an integer traversing from 1 to M, the electronic device performs fuzzy matching on the downsampled image to be identified with the downsampled images in the image database through the first network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device extracts features of the downsampled image to be identified through the first network model to obtain a first feature vector set, and extracts features of the i-th downsampled image through the first network model to obtain a second feature vector set #i; the electronic device performs dimensionality reduction processing on the first feature vector set through the first network model The electronic device performs feature matching on the third feature vector set and the fourth feature vector set #i through the first network model to determine whether the user in the image to be identified matches the user in the i-th downsampled image; when i traverses from 1 to M, the electronic device obtains a total of M matching degrees.
[0011] Correspondingly, if the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform an opening operation; otherwise, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device determines whether there is a match degree exceeding a threshold value among the M matching degrees; if there is no match degree exceeding the threshold value among the M matching degrees, the electronic device determines that the user in the image to be identified is not a user with access permission, and refuses to control the access control gate to perform an opening operation; if there is a match degree exceeding the threshold value among the M matching degrees, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission.
[0012] Optionally, the first feature vector set includes K1 feature vectors, K1 is an integer greater than 1, the second feature vector set #i includes K2i feature vectors, K2i is an integer greater than 1, the electronic device performs dimensionality reduction processing on the first feature vector set through the first network model to obtain a third feature vector set, and performs feature extraction on the second feature vector set #i through the first network model to obtain a fourth feature vector set #i, including: the electronic device upgrades the ath feature vector and the a+bth feature vector among the K1 feature vectors into one feature vector through the first network model, a is a positive integer, and when a traverses from 1 to K1-b, the third feature vector set is obtained; the electronic device upgrades the sth feature vector and the s+tth feature vector among the K2i feature vectors into one feature vector through the first network model, s is a positive integer, and when s traverses from 1 to K2i-t, the fourth feature vector set #i is obtained.
[0013] Optionally, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device determines the top N matching degrees among M matching degrees, where N is an integer greater than 1 and less than M; the electronic device accurately matches the image to be identified with the non-downsampled images corresponding to the top N matching degrees in the image database through the second network model to determine whether the user in the image to be identified is a user with access permission; the images of the same user in the image database include downsampled images and non-downsampled images.
[0014] Optionally, the first N highest matching degrees each correspond to a total of N un-downsampled images, and the electronic device uses a second network model to accurately match the image to be identified with the un-downsampled images corresponding to the first N highest matching degrees in the image database to determine whether the user in the image to be identified is a user with access permission, including: the electronic device uses the second network model to extract features of the image to be identified to obtain a fifth feature vector set, and uses the second network model to extract features of the j-th un-downsampled image among the N un-downsampled images to obtain a sixth feature vector set #j, where j is a positive integer and j traverses from 1 to N, and a total of N sixth feature vector sets are obtained; the electronic device uses the second network model to extract features of the N sixth feature vector sets. The electronic device performs feature matching on the fifth feature vector set and the fused feature vector set through the second network model to determine whether the user in the image to be identified matches the user corresponding to any of the N non-downsampled images; wherein, if the user in the image to be identified does not match the users corresponding to the N non-downsampled images, the user in the image to be identified is not a user with access permission, and the electronic device refuses to control the access control gate to perform an opening operation; otherwise, if the user in the image to be identified matches the user corresponding to any of the N non-downsampled images, the user in the image to be identified is a user with access permission, and the electronic device controls the access control gate to perform an opening operation.
[0015] Optionally, the electronic device performs feature vector fusion on N sets of sixth eigenvectors through a second network model to obtain a fused set of feature vectors, including: the electronic device fills the feature vectors in the sixth eigenvectors whose number of feature vectors does not reach the median value according to the median value of the number of feature vectors contained in each of the N sixth eigenvectors until the median value is reached, and discards the feature vectors in the sixth eigenvectors whose number of feature vectors exceeds the median value until the median value is reached, to obtain N preprocessed sixth eigenvectors, wherein the number of feature vectors of each sixth eigenvector in the preprocessed N sixth eigenvectors is the median value; the electronic device interleaves the preprocessed N sixth eigenvectors to obtain a fused set of feature vectors.
[0016] Optionally, the median value is X, X is an integer greater than 1, the fused feature vector set includes X*N feature vectors, the X*N feature vectors are divided into X / Y groups of feature vectors, Y is an integer greater than 1 and less than X, for the first group of feature vectors in the X / Y group of feature vectors, the first group of feature vectors includes, in order from front to back, the first to Yth feature vectors of each of the preprocessed N sixth feature vectors, for the second group of feature vectors in the X / Y group of feature vectors, the second group of feature vectors includes, in order from front to back, the Y+1th to 2Yth feature vectors of each of the preprocessed N sixth feature vectors, and so on, for the X / Yth group of feature vectors in the X / Y group of feature vectors, the X / Yth group of feature vectors includes, in order from front to back, the XYth to Xth feature vectors of each of the preprocessed N sixth feature vectors.
[0017] Optionally, the first network model and the second network model are different models.
[0018] In a second aspect, an embodiment of the present application provides an unattended access control system, which includes an electronic device, and the unattended access control system also includes an image acquisition device and an access control gate, and the system is configured as follows: the electronic device obtains an image to be identified acquired by the image acquisition device; the electronic device simulates matching the image to be identified through a first network model to determine whether the user in the image to be identified is a user with entry permission; if the user in the image to be identified is not a user with entry permission, the electronic device refuses to control the access control gate to perform an opening operation, otherwise, the electronic device accurately matches the image to be identified through a second network model to determine whether the user in the image to be identified is a user with entry permission; if the user in the image to be identified is not a user with entry permission, the electronic device refuses to control the access control gate to perform an opening operation, otherwise, the electronic device controls the access control gate to perform an opening operation.
[0019] Optionally, the electronic device performs simulated matching on the image to be identified through the first network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device downsamples the image to be identified through the first network model to obtain a downsampled image to be identified; the electronic device fuzzy matches the downsampled image to be identified with the downsampled images in an image database through the first network model to determine whether the user in the image to be identified is a user with access permission, wherein the user contained in the downsampled image in the image database is a user with access permission.
[0020] Optionally, the image database includes M downsampled images, for the i-th downsampled image in the M downsampled images, i is an integer traversing from 1 to M, the electronic device performs fuzzy matching on the downsampled image to be identified with the downsampled images in the image database through the first network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device extracts features of the downsampled image to be identified through the first network model to obtain a first feature vector set, and extracts features of the i-th downsampled image through the first network model to obtain a second feature vector set #i; the electronic device performs dimensionality reduction processing on the first feature vector set through the first network model The electronic device performs feature matching on the third feature vector set and the fourth feature vector set #i through the first network model to determine whether the user in the image to be identified matches the user in the i-th downsampled image; when i traverses from 1 to M, the electronic device obtains a total of M matching degrees.
[0021] Correspondingly, if the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform an opening operation; otherwise, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device determines whether there is a match degree exceeding a threshold value among the M matching degrees; if there is no match degree exceeding the threshold value among the M matching degrees, the electronic device determines that the user in the image to be identified is not a user with access permission, and refuses to control the access control gate to perform an opening operation; if there is a match degree exceeding the threshold value among the M matching degrees, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission.
[0022] Optionally, the first feature vector set includes K1 feature vectors, K1 is an integer greater than 1, the second feature vector set #i includes K2i feature vectors, K2i is an integer greater than 1, the electronic device performs dimensionality reduction processing on the first feature vector set through the first network model to obtain a third feature vector set, and performs feature extraction on the second feature vector set #i through the first network model to obtain a fourth feature vector set #i, including: the electronic device upgrades the ath feature vector and the a+bth feature vector among the K1 feature vectors into one feature vector through the first network model, a is a positive integer, and when a traverses from 1 to K1-b, the third feature vector set is obtained; the electronic device upgrades the sth feature vector and the s+tth feature vector among the K2i feature vectors into one feature vector through the first network model, s is a positive integer, and when s traverses from 1 to K2i-t, the fourth feature vector set #i is obtained.
[0023] Optionally, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device determines the top N matching degrees among M matching degrees, where N is an integer greater than 1 and less than M; the electronic device accurately matches the image to be identified with the non-downsampled images corresponding to the top N matching degrees in the image database through the second network model to determine whether the user in the image to be identified is a user with access permission; the images of the same user in the image database include downsampled images and non-downsampled images.
[0024] Optionally, the first N highest matching degrees each correspond to a total of N un-downsampled images, and the electronic device uses a second network model to accurately match the image to be identified with the un-downsampled images corresponding to the first N highest matching degrees in the image database to determine whether the user in the image to be identified is a user with access permission, including: the electronic device uses the second network model to extract features of the image to be identified to obtain a fifth feature vector set, and uses the second network model to extract features of the j-th un-downsampled image among the N un-downsampled images to obtain a sixth feature vector set #j, where j is a positive integer and j traverses from 1 to N, and a total of N sixth feature vector sets are obtained; the electronic device uses the second network model to extract features of the N sixth feature vector sets. The electronic device performs feature matching on the fifth feature vector set and the fused feature vector set through the second network model to determine whether the user in the image to be identified matches the user corresponding to any of the N non-downsampled images; wherein, if the user in the image to be identified does not match the users corresponding to the N non-downsampled images, the user in the image to be identified is not a user with access permission, and the electronic device refuses to control the access control gate to perform an opening operation; otherwise, if the user in the image to be identified matches the user corresponding to any of the N non-downsampled images, the user in the image to be identified is a user with access permission, and the electronic device controls the access control gate to perform an opening operation.
[0025] Optionally, the electronic device performs feature vector fusion on N sets of sixth eigenvectors through a second network model to obtain a fused set of feature vectors, including: the electronic device fills the feature vectors in the sixth eigenvectors whose number of feature vectors does not reach the median value according to the median value of the number of feature vectors contained in each of the N sixth eigenvectors until the median value is reached, and discards the feature vectors in the sixth eigenvectors whose number of feature vectors exceeds the median value until the median value is reached, to obtain N preprocessed sixth eigenvectors, wherein the number of feature vectors of each sixth eigenvector in the preprocessed N sixth eigenvectors is the median value; the electronic device interleaves the preprocessed N sixth eigenvectors to obtain a fused set of feature vectors.
[0026] Optionally, the median value is X, X is an integer greater than 1, the fused feature vector set includes X*N feature vectors, the X*N feature vectors are divided into X / Y groups of feature vectors, Y is an integer greater than 1 and less than X, for the first group of feature vectors in the X / Y group of feature vectors, the first group of feature vectors includes, in order from front to back, the first to Yth feature vectors of each of the preprocessed N sixth feature vectors, for the second group of feature vectors in the X / Y group of feature vectors, the second group of feature vectors includes, in order from front to back, the Y+1th to 2Yth feature vectors of each of the preprocessed N sixth feature vectors, and so on, for the X / Yth group of feature vectors in the X / Y group of feature vectors, the X / Yth group of feature vectors includes, in order from front to back, the XYth to Xth feature vectors of each of the preprocessed N sixth feature vectors.
[0027] Optionally, the first network model and the second network model are different models.
[0028] In a third aspect, an embodiment of the present application provides a computer-readable storage medium having program code stored thereon. When the program code is executed by the computer, the method described in the first aspect is executed.
[0029] In summary, based on the above method and system, it can be known that:
[0030] After obtaining the image to be identified, the electronic device can first simulate the matching of the image to be identified through the first network model, that is, the matching with relatively low computing power cost, to determine whether the user in the image to be identified is a user with access permission; at this time, if the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform the gate opening operation, otherwise, the electronic device then accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission. At this time, if the user in the image to be identified is a user with access permission, the electronic device controls the access control gate to perform the gate opening operation. In other words, users without access permission can be identified through fuzzy matching with relatively low computing power cost, and their entry can be denied. At this time, even if it is misidentified, it can be further determined whether the user has access permission through accurate matching with relatively high computing power cost. Not only does it ensure security, but the computing power consumed by a small amount of accurate matching is controllable, and the computing power cost is taken into account. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of the architecture of an unattended access control system provided in an embodiment of the present application;
[0032] Figure 2 A flow chart of an unattended access control method based on face recognition provided in an embodiment of the present application;
[0033] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0035] In the embodiment of the present application, "indication" may include direct indication and indirect indication, and may also include explicit indication and implicit indication. The information indicated by a certain information (such as the first indication information, the second indication information, or the third indication information, etc. below) is called information to be indicated. In the specific implementation process, there are many ways to indicate the information to be indicated, such as but not limited to, the information to be indicated can be directly indicated, such as the information to be indicated itself or the index of the information to be indicated. The information to be indicated can also be indirectly indicated by indicating other information, wherein there is an association relationship between the other information and the information to be indicated. It is also possible to indicate only a part of the information to be indicated, while the other parts of the information to be indicated are known or agreed in advance. For example, the indication of specific information can also be realized by means of the arrangement order of each information agreed in advance (such as specified by the protocol), thereby reducing the indication overhead to a certain extent. At the same time, the common parts of each information can also be identified and uniformly indicated to reduce the indication overhead caused by indicating the same information separately.
[0036] In addition, the specific indication method may also be various existing indication methods, such as but not limited to the above-mentioned indication methods and various combinations thereof. The specific details of the various indication methods can refer to the prior art and will not be repeated herein. As can be seen from the above, for example, when it is necessary to indicate multiple information of the same type, different indication methods may be used for different information. In the specific implementation process, the desired indication method can be selected according to specific needs. The embodiment of the present application does not limit the selected indication method. In this way, the indication method involved in the embodiment of the present application should be understood to cover various methods that can enable the party to be indicated to obtain the information to be indicated.
[0037] It should be understood that the information to be indicated can be sent as a whole, or divided into multiple sub-information and sent separately, and the sending period and / or sending time of these sub-information can be the same or different. The specific sending method is not limited in the embodiment of the present application. Among them, the sending period and / or sending time of these sub-information can be pre-defined, for example, pre-defined according to a protocol, or can be configured by the sending end device by sending configuration information to the receiving end device.
[0038] "Pre-definition" or "pre-configuration" can be implemented by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in the device, and the embodiments of the present application do not limit the specific implementation method. Among them, "saving" can mean saving in one or more memories. The one or more memories can be set separately or integrated in an encoder or decoder, a processor, or a communication device. The one or more memories can also be partially set separately and partially integrated in a decoder, a processor, or a communication device. The type of memory can be any form of storage medium, which is not limited by the embodiments of the present application.
[0039] The "protocol" involved in the embodiments of the present application may refer to a protocol family in the communication field, a standard protocol with a similar protocol family frame structure, or a related protocol used in future communication systems, and the embodiments of the present application do not make specific limitations on this.
[0040] In the embodiments of the present application, descriptions such as "when...", "in the case of...", "if" and "if" all mean that the device will make corresponding processing under certain objective circumstances. It does not limit the time, nor does it require the device to have a judgment action when implementing it, nor does it mean that there are other limitations.
[0041] In the description of the embodiments of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in the embodiments of the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In addition, in the description of the embodiments of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or its similar expression refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish the same or similar items with basically the same functions and effects. Those skilled in the art will appreciate that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0042] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0043] To facilitate understanding of the embodiments of the present application, first Figure 1 The control system shown in the example is used to explain in detail the unattended access control system applicable to the embodiment of the present application. Figure 1 A schematic diagram of the architecture of an unmanned access control system applicable to the method provided in an embodiment of the present application.
[0044] like Figure 1 As shown, the unattended access control system includes an electronic device, and the unattended access control system also includes an image acquisition device and an access control gate.
[0045] Electronic devices, image acquisition devices and access control gates can all be understood as terminal devices. The terminal device can be a terminal with wireless transceiver function or a chip or chip system that can be set in the terminal. The terminal device can also be called user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device. The terminal device in the embodiment of the present application can be a mobile phone, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a vehicle-mounted terminal, an RSU with terminal function, etc. The terminal device of the present application may also be a vehicle-mounted module, vehicle-mounted module, vehicle-mounted component, vehicle-mounted chip or vehicle-mounted unit that is built into the vehicle as one or more components or units. The vehicle can implement the method provided by the present application through the built-in vehicle-mounted module, vehicle-mounted module, vehicle-mounted component, vehicle-mounted chip or vehicle-mounted unit.
[0046] See also Figure 2 , the embodiment of the present application provides an unattended access control method based on face recognition. The method can be executed by an electronic device. The process of the method includes:
[0047] S201, an electronic device obtains an image to be recognized acquired by an image acquisition device.
[0048] The image acquisition device can be a camera, which is connected to the electronic device by wire / wirelessly and is installed near the access control gate. It can capture the facial image of the user who needs to enter the community / park, that is, the image to be identified contains the user, specifically the face of the user.
[0049] S202: The electronic device performs simulation matching on the image to be identified through the first network model to determine whether the user in the image to be identified is a user with access permission.
[0050] The first network model can be a trained convolutional neural network model (i.e., CNN). The embodiment of the present application does not provide additional introduction to the training process. It can be understood that on the basis of the method of the present application, a gradient regression process of back propagation is added to train and test the model. The training set and test set used in the training process can both be conventional face images. The difference from the method of the present application is that these face images are labeled samples for gradient regression of back propagation.
[0051] The electronic device can perform downsampling processing on the image to be recognized through the first network model to obtain a downsampled image to be recognized. The downsampling processing can be performed by constructing a downsampling layer implemented by a downsampling algorithm between the input layer and the convolution layer of the first network model, so that the first network model can automatically perform downsampling processing on the input image to be recognized. The downsampling algorithm can be an existing algorithm and will not be described in detail.
[0052] The electronic device can fuzzy match the downsampled image to be identified with the downsampled image in the image database through the first network model to determine whether the user in the image to be identified is a user with access permission, wherein the user contained in the downsampled image in the image database is a user with access permission, and the image of the same user in the image database includes a downsampled image and a non-downsampled image, which also contains the face of the user with access permission.
[0053] Specific:
[0054] S1: The image database may include M downsampled images (i.e., M users), and for the i-th downsampled image among the M downsampled images, i is an integer ranging from 1 to M. The electronic device may extract features of the downsampled image to be identified by using the first network model to obtain a first feature vector set, and extract features of the i-th downsampled image by using the first network model to obtain a second feature vector set #i. Feature extraction is convolution of the image output by the downsampled layer by the convolution layer of the first network model.
[0055] S2: The electronic device performs dimensionality reduction processing on the first feature vector set through the first network model to obtain a third feature vector set, and performs feature extraction on the second feature vector set #i through the first network model to obtain a fourth feature vector set #i, wherein the number of feature vectors in the third feature vector set is smaller than the number of feature vectors in the first feature vector set, and the number of feature vectors in the second feature vector set #i is smaller than the number of feature vectors in the fourth feature vector set #i.
[0056] Among them, the first feature vector set may include K1 feature vectors, K1 is an integer greater than 1, and the second feature vector set #i includes K2i feature vectors, K2i is an integer greater than 1. The electronic device can upgrade the ath feature vector and the a+bth feature vector in the K1 feature vectors into one feature vector (which can be the multiplication of two vectors) through the first network model, a is a positive integer, and when a traverses from 1 to K1-b, a third feature vector set is obtained (the number of feature vectors of the first feature vector set is halved). And, the electronic device can also upgrade the sth feature vector and the s+tth feature vector in the K2i feature vectors into one feature vector (which can be the multiplication of two vectors) through the first network model, s is a positive integer, and when s traverses from 1 to K2i-t, a fourth feature vector set #i is obtained (the number of feature vectors of the second feature vector set #i is halved).
[0057] Among them, “#i” means it is the i-th one among M ones.
[0058] The advantage of doing this is that it further reduces the number of vectors used for subsequent matching, thereby further reducing the computing power overhead of simulation matching while retaining the features, such as reducing the computing power overhead by half.
[0059] In addition, the dimensionality reduction processing can be performed by adding a feature processing layer between the convolution layer and the pooling layer of the first network model according to the algorithm logic of the dimensionality reduction processing to achieve the function of the dimensionality reduction processing.
[0060] S3: The electronic device performs feature matching on the third feature vector set and the fourth feature vector set #i through the first network model to determine whether the user in the image to be identified matches the user in the i-th downsampled image. Feature matching can be that the first network model inputs the third feature vector set and the fourth feature vector set #i into the fully connected layer for processing to obtain the matching degree of its output. The matching degree can be a value between 0 and 1, such as 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, etc. When i traverses from 1 to M, the electronic device obtains a total of M matching degrees.
[0061] S203, if the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform the gate opening operation, otherwise, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission.
[0062] Based on the above S202, the electronic device can determine whether there is a matching degree exceeding a threshold value (such as the threshold value is set to 0.7) among the M matching degrees. If there is no matching degree exceeding the threshold value among the M matching degrees, the electronic device determines that the user in the image to be identified is not a user with access permission, and refuses to control the access control gate to perform the gate opening operation. If there is a matching degree exceeding the threshold value among the M matching degrees, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission.
[0063] It can be seen that although the accuracy of fuzzy matching is not as high as that of precise matching, even if the matching result is wrong, such as a user without access permission is identified as a user with access permission, precise matching is still required to ensure security. For users who are correctly identified as those without access permission, their entry is denied, which can be achieved with low computing power overhead, thus taking computing power into consideration. The following is an introduction to precise matching.
[0064] Sa: The electronic device can determine the top N highest matching degrees among M matching degrees, where N is an integer greater than 1 and less than M. The value of N can be flexibly set according to actual conditions, such as being set to 3 to take into account overhead, or being set to 5 to improve accuracy.
[0065] Sb: The electronic device can accurately match the image to be identified with the non-downsampled images corresponding to the top N highest matching degrees in the image database through the second network model to determine whether the user in the image to be identified is a user with access permission.
[0066] Among them, the first network model and the second network model are different models. The second network model can also be a trained convolutional neural network model (i.e., CNN). The embodiment of the present application does not provide additional introduction to the training process. It can be understood that on the basis of the method of the present application, a gradient regression process of reverse transfer is added to train and test the model. The training set and test set used in the training process can both be conventional face images. The difference from the method of the present application is that these face images are labeled samples for gradient regression of reverse transfer.
[0067] The electronic device can perform feature extraction on the image to be recognized through the second network model to obtain a fifth feature vector set, and perform feature extraction on the jth un-downsampled image among the N un-downsampled images through the second network model to obtain a sixth feature vector set #j, where j is a positive integer and j traverses from 1 to N, a total of N sixth feature vector sets are obtained. Feature extraction is convolution of the input image by the convolution layer of the second network model.
[0068] The electronic device can fuse the N sixth eigenvector sets through the second network model to obtain a fused eigenvector set. Among them, the electronic device can fill the eigenvectors in the N sixth eigenvectors whose eigenvector numbers do not reach the median value according to the median value of the eigenvector numbers contained in each of the N sixth eigenvectors until the median value is reached, and discard the eigenvectors in the N sixth eigenvectors whose eigenvector numbers exceed the median value until the median value is reached, to obtain the preprocessed N sixth eigenvectors, and the eigenvector number of each sixth eigenvector in the preprocessed N sixth eigenvectors is the median value.
[0069] For example, the median value is X=100, and the sixth eigenvector #1 contains 90 eigenvectors. You can fill 10 eigenvectors at the end with 0, and each filled eigenvector is a 0 vector. Alternatively, you can copy the 81st to 90th eigenvectors and fill them at the end, which will not affect the processing result as a whole. The sixth eigenvector #2 contains 110 eigenvectors. You can delete the first and last vectors, such as deleting the 1st to 10th eigenvectors, or the 101st to 100th eigenvectors, which will not affect the processing result as a whole. Since the first and last eigenvectors basically do not contain information about the face, deleting or filling them will not affect the processing result as a whole. In addition, the number of eigenvectors of the N sixth eigenvectors is not very different, so it can usually be achieved by deleting or filling a small number of vectors at the first and last parts.
[0070] The electronic device interleaves the preprocessed N sixth eigenvectors to obtain a fused eigenvector set. The median value is X, X is an integer greater than 1, the fused eigenvector set includes X*N eigenvectors, the X*N eigenvectors are divided into X / Y groups of eigenvectors, Y is an integer greater than 1 and less than X, for the first group of eigenvectors in the X / Y group of eigenvectors, the first group of eigenvectors sequentially include the first to Yth eigenvectors of the preprocessed N sixth eigenvectors in the order of index from front to back, for the second group of eigenvectors in the X / Y group of eigenvectors, the second group of eigenvectors sequentially include the Y+1th to 2Yth eigenvectors of the preprocessed N sixth eigenvectors in the order of index from front to back, and so on, for the X / Yth group of eigenvectors in the X / Y group of eigenvectors, the X / Yth group of eigenvectors sequentially include the XYth to Xth eigenvectors of the preprocessed N sixth eigenvectors in the order of index from front to back.
[0071] That is to say, through interleaving, the feature vectors in each sixth feature vector set can be extracted together in sequence. The advantage of this is that the feature vectors in different sixth feature vector sets are coupled and associated, rather than isolated from each other, which can improve the robustness of subsequent processing.
[0072] For example, the sixth feature vector set #1 includes: feature vector A, feature vector C, feature vector D, feature vector E, feature vector F..., the sixth feature vector set #2 includes: feature vector 1, feature vector 2, feature vector 3, feature vector 4, feature vector 5..., setting Y=2, the fused feature vector set includes, in order from front to back of the index: feature vector A, feature vector C, feature vector 1, feature vector 2, feature vector D, feature vector E, feature vector 3, feature vector 4, feature vector F..., feature vector A, feature vector C, feature vector 1, feature vector 2 are the first group, feature vector D, feature vector E, feature vector 3, feature vector 4 are the second group, and so on.
[0073] The interleaving process can be implemented by adding a feature processing layer between the convolution layer and the pooling layer of the second network model according to the algorithm logic of the dimensionality reduction process to realize the function of the interleaving process.
[0074] Finally, the electronic device performs feature matching (i.e., processed by the fully connected layer) on the fifth feature vector set and the fused feature vector set through the second network model to determine whether the user in the image to be identified matches the user corresponding to any of the N un-downsampled images, that is, the final result is 0 / 1, 0 indicates no match, 1 indicates match, which does not specifically indicate which user is matched, but whether it matches the N un-downsampled images as a whole. Among them, if the user in the image to be identified does not match the user corresponding to the N un-downsampled images, the user in the image to be identified is not a user with access permission, and the electronic device refuses to control the access control gate to perform the gate opening operation. Otherwise, if the user in the image to be identified matches the user corresponding to any of the N un-downsampled images, the user in the image to be identified is a user with access permission, and the electronic device controls the access control gate to perform the gate opening operation.
[0075] S204: If the user in the image to be identified is not a user with access authority, the electronic device refuses to control the access control gate to perform an opening operation; otherwise, the electronic device controls the access control gate to perform an opening operation.
[0076] In summary, after obtaining the image to be identified, the electronic device can first simulate the matching of the image to be identified through the first network model, that is, the matching with relatively low computing power cost, to determine whether the user in the image to be identified is a user with access permission; at this time, if the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform the gate opening operation, otherwise, the electronic device then accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission. At this time, if the user in the image to be identified is a user with access permission, the electronic device controls the access control gate to perform the gate opening operation. In other words, users without access permission can be identified through fuzzy matching with relatively low computing power cost, and their entry can be denied. At this time, even if it is misidentified, it can be further determined whether the user has access permission through accurate matching with relatively high computing power cost. Not only does it ensure security, but the computing power consumed by a small amount of accurate matching is controllable, and the computing power cost is taken into account.
[0077] The present embodiment also provides an unattended access control system, which includes an electronic device, and the unattended access control system also includes an image acquisition device and an access control gate, and the system is configured as follows: the electronic device acquires an image to be identified acquired by the image acquisition device; the electronic device simulates matching the image to be identified through a first network model to determine whether the user in the image to be identified is a user with entry permission; if the user in the image to be identified is not a user with entry permission, the electronic device refuses to control the access control gate to perform an opening operation, otherwise, the electronic device accurately matches the image to be identified through a second network model to determine whether the user in the image to be identified is a user with entry permission; if the user in the image to be identified is not a user with entry permission, the electronic device refuses to control the access control gate to perform an opening operation, otherwise, the electronic device controls the access control gate to perform an opening operation.
[0078] Optionally, the electronic device performs simulated matching on the image to be identified through the first network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device downsamples the image to be identified through the first network model to obtain a downsampled image to be identified; the electronic device fuzzy matches the downsampled image to be identified with the downsampled images in an image database through the first network model to determine whether the user in the image to be identified is a user with access permission, wherein the user contained in the downsampled image in the image database is a user with access permission.
[0079] Optionally, the image database includes M downsampled images, for the i-th downsampled image in the M downsampled images, i is an integer traversing from 1 to M, the electronic device performs fuzzy matching on the downsampled image to be identified with the downsampled images in the image database through the first network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device extracts features of the downsampled image to be identified through the first network model to obtain a first feature vector set, and extracts features of the i-th downsampled image through the first network model to obtain a second feature vector set #i; the electronic device performs dimensionality reduction processing on the first feature vector set through the first network model The electronic device performs feature matching on the third feature vector set and the fourth feature vector set #i through the first network model to determine whether the user in the image to be identified matches the user in the i-th downsampled image; when i traverses from 1 to M, the electronic device obtains a total of M matching degrees.
[0080] Correspondingly, if the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform an opening operation; otherwise, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device determines whether there is a match degree exceeding a threshold value among the M matching degrees; if there is no match degree exceeding the threshold value among the M matching degrees, the electronic device determines that the user in the image to be identified is not a user with access permission, and refuses to control the access control gate to perform an opening operation; if there is a match degree exceeding the threshold value among the M matching degrees, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission.
[0081] Optionally, the first feature vector set includes K1 feature vectors, K1 is an integer greater than 1, the second feature vector set #i includes K2i feature vectors, K2i is an integer greater than 1, the electronic device performs dimensionality reduction processing on the first feature vector set through the first network model to obtain a third feature vector set, and performs feature extraction on the second feature vector set #i through the first network model to obtain a fourth feature vector set #i, including: the electronic device upgrades the ath feature vector and the a+bth feature vector among the K1 feature vectors into one feature vector through the first network model, a is a positive integer, and when a traverses from 1 to K1-b, the third feature vector set is obtained; the electronic device upgrades the sth feature vector and the s+tth feature vector among the K2i feature vectors into one feature vector through the first network model, s is a positive integer, and when s traverses from 1 to K2i-t, the fourth feature vector set #i is obtained.
[0082] Optionally, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission, including: the electronic device determines the top N matching degrees among M matching degrees, where N is an integer greater than 1 and less than M; the electronic device accurately matches the image to be identified with the non-downsampled images corresponding to the top N matching degrees in the image database through the second network model to determine whether the user in the image to be identified is a user with access permission; the images of the same user in the image database include downsampled images and non-downsampled images.
[0083] Optionally, the first N highest matching degrees each correspond to a total of N un-downsampled images, and the electronic device uses a second network model to accurately match the image to be identified with the un-downsampled images corresponding to the first N highest matching degrees in the image database to determine whether the user in the image to be identified is a user with access permission, including: the electronic device uses the second network model to extract features of the image to be identified to obtain a fifth feature vector set, and uses the second network model to extract features of the j-th un-downsampled image among the N un-downsampled images to obtain a sixth feature vector set #j, where j is a positive integer and j traverses from 1 to N, and a total of N sixth feature vector sets are obtained; the electronic device uses the second network model to extract features of the N sixth feature vector sets. The electronic device performs feature matching on the fifth feature vector set and the fused feature vector set through the second network model to determine whether the user in the image to be identified matches the user corresponding to any of the N non-downsampled images; wherein, if the user in the image to be identified does not match the users corresponding to the N non-downsampled images, the user in the image to be identified is not a user with access permission, and the electronic device refuses to control the access control gate to perform an opening operation; otherwise, if the user in the image to be identified matches the user corresponding to any of the N non-downsampled images, the user in the image to be identified is a user with access permission, and the electronic device controls the access control gate to perform an opening operation.
[0084] Optionally, the electronic device performs feature vector fusion on N sets of sixth eigenvectors through a second network model to obtain a fused set of feature vectors, including: the electronic device fills the feature vectors in the sixth eigenvectors whose number of feature vectors does not reach the median value according to the median value of the number of feature vectors contained in each of the N sixth eigenvectors until the median value is reached, and discards the feature vectors in the sixth eigenvectors whose number of feature vectors exceeds the median value until the median value is reached, to obtain N preprocessed sixth eigenvectors, wherein the number of feature vectors of each sixth eigenvector in the preprocessed N sixth eigenvectors is the median value; the electronic device interleaves the preprocessed N sixth eigenvectors to obtain a fused set of feature vectors.
[0085] Optionally, the median value is X, X is an integer greater than 1, the fused feature vector set includes X*N feature vectors, the X*N feature vectors are divided into X / Y groups of feature vectors, Y is an integer greater than 1 and less than X, for the first group of feature vectors in the X / Y group of feature vectors, the first group of feature vectors includes, in order from front to back, the first to Yth feature vectors of each of the preprocessed N sixth feature vectors, for the second group of feature vectors in the X / Y group of feature vectors, the second group of feature vectors includes, in order from front to back, the Y+1th to 2Yth feature vectors of each of the preprocessed N sixth feature vectors, and so on, for the X / Yth group of feature vectors in the X / Y group of feature vectors, the X / Yth group of feature vectors includes, in order from front to back, the XYth to Xth feature vectors of each of the preprocessed N sixth feature vectors.
[0086] Optionally, the first network model and the second network model are different models.
[0087] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. For example, the electronic device may be a terminal device, or a chip (system) or other component or assembly that can be provided in the terminal device. Figure 3 As shown, the electronic device 400 may include a processor 401. Optionally, the electronic device 400 may also include a memory 402 and / or a transceiver 403. The processor 401 is coupled to the memory 402 and the transceiver 403, such as being connected via a communication bus. In addition, the electronic device 400 may also be a chip, such as including the processor 401, in which case the transceiver may be an output and input interface of the chip.
[0088] Combine the following Figure 3 The components of the electronic device 400 are specifically introduced as follows:
[0089] The processor 401 is the control center of the electronic device 400, and may be a processor or a general term for multiple processing elements. For example, the processor 401 is one or more central processing units (CPUs), or may be application specific integrated circuits (ASICs), or may be configured to implement one or more integrated circuits of the embodiments of the present application, such as one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs).
[0090] Optionally, the processor 401 can execute various functions of the electronic device 400 by running or executing the software program stored in the memory 402 and calling the data stored in the memory 402, such as executing the above Figure 2 The method shown.
[0091] In a specific implementation, as an embodiment, the processor 401 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 are shown in FIG.
[0092] In a specific implementation, as an embodiment, the electronic device 400 may also include multiple processors. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer programs or instructions).
[0093] The memory 402 is used to store the software program for executing the solution of the present application, and the execution is controlled by the processor 401. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0094] Optionally, the memory 402 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 402 may be integrated with the processor 401, or may exist independently and access the computer through the interface circuit ( Figure 3 (not shown) is coupled to the processor 401, which is not specifically limited in the embodiment of the present application.
[0095] The transceiver 403 is used for communication with other electronic devices. For example, if the electronic device 400 is a terminal device, the transceiver 403 can be used to communicate with a network device, or with another terminal device. For another example, if the electronic device 400 is a network device, the transceiver 403 can be used to communicate with a terminal device, or with another network device.
[0096] Optionally, the transceiver 403 may include a receiver and a transmitter ( Figure 3 The receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0097] Optionally, the transceiver 403 may be integrated with the processor 401, or may exist independently and communicate with the electronic device 400 through an interface circuit ( Figure 3 (not shown) is coupled to the processor 401, which is not specifically limited in the embodiment of the present application.
[0098] Understandably, Figure 3 The structure of the electronic device 400 shown in the figure does not constitute a limitation on the electronic device, and the actual electronic device may include more or fewer components than those shown in the figure, or combine certain components, or arrange the components differently.
[0099] In addition, the technical effects of the electronic device 400 can refer to the technical effects of the methods described in the above method embodiments, which will not be repeated here.
[0100] It should be understood that the processor in the embodiment of the present application may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0101] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DRRAM).
[0102] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0103] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0104] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0105] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0106] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled professionals may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0107] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0108] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0109] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0110] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0111] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0112] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An unattended access control method based on face recognition, characterized in that: An electronic device applied to an unattended access control system, wherein the unattended access control system further comprises an image acquisition device and an access control gate, and the method comprises: The electronic device acquires the image to be identified acquired by the image acquisition device; The electronic device simulates and matches the image to be identified through a first network model to determine whether the user in the image to be identified is a user with access permission; If the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform the gate opening operation; otherwise, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission; If the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform an opening operation; otherwise, the electronic device controls the access control gate to perform an opening operation; The electronic device simulates matching the image to be identified through a first network model to determine whether a user in the image to be identified is a user with access permission, including: The electronic device performs downsampling processing on the image to be recognized by using the first network model to obtain a downsampled image to be recognized; The electronic device performs fuzzy matching on the downsampled image to be identified and the downsampled image in the image database through the first network model to determine whether the user in the image to be identified is a user with access permission, wherein the user included in the downsampled image in the image database is a user with access permission; The image database includes M downsampled images, and the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission, including: The electronic device determines the top N highest matching degrees among the M matching degrees, where N is an integer greater than 1 and less than M; The electronic device uses the second network model to accurately match the image to be identified with the non-downsampled images corresponding to the top N highest matching degrees in the image database to determine whether the user in the image to be identified is a user with access permission; the images of the same user in the image database include downsampled images and non-downsampled images.
2. The method according to claim 1, characterized in that For an i-th downsampled image among the M downsampled images, where i is an integer ranging from 1 to M, the electronic device performs fuzzy matching on the downsampled image to be identified with downsampled images in an image database through the first network model to determine whether a user in the image to be identified is a user with access permission, including: The electronic device extracts features of the downsampled image to be identified by using the first network model to obtain a first feature vector set, and extracts features of the i-th downsampled image by using the first network model to obtain a second feature vector set #i; The electronic device performs dimensionality reduction processing on the first feature vector set through the first network model to obtain a third feature vector set, and performs feature extraction on the second feature vector set #i through the first network model to obtain a fourth feature vector set #i, wherein the number of feature vectors in the third feature vector set is less than the number of feature vectors in the first feature vector set, and the number of feature vectors in the second feature vector set #i is less than the number of feature vectors in the fourth feature vector set #i; The electronic device performs feature matching on the third feature vector set and the fourth feature vector set #i through the first network model to determine whether the user in the image to be identified matches the user in the i-th downsampled image; In the case where i traverses from 1 to M, the electronic device obtains a total of M matching degrees; accordingly, if the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform an opening operation, otherwise, the electronic device performs an accurate match on the image to be identified through a second network model to determine whether the user in the image to be identified is a user with access permission, including: The electronic device determines whether there is a matching degree exceeding a threshold among the M matching degrees; If none of the M matching degrees exceeds the threshold, the electronic device determines that the user in the image to be identified is not a user with access permission, and refuses to control the access control gate to perform the gate opening operation; If a matching degree among the M matching degrees exceeds a threshold, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission.
3. The method according to claim 2, characterized in that The first feature vector set includes K1 feature vectors, K1 is an integer greater than 1, the second feature vector set #i includes K2i feature vectors, K2i is an integer greater than 1, the electronic device performs dimensionality reduction processing on the first feature vector set through the first network model to obtain a third feature vector set, and extracts features from the second feature vector set #i through the first network model to obtain a fourth feature vector set #i, including: The electronic device upgrades the ath feature vector and the a+bth feature vector of the K1 feature vectors into one feature vector through the first network model, where a is a positive integer, and when a traverses from 1 to K1-b, the third feature vector set is obtained; The electronic device uses the first network model to upgrade the sth feature vector and the s+tth feature vector among the K2i feature vectors into one feature vector, where s is a positive integer. When s traverses from 1 to K2i-t, the fourth feature vector set #i is obtained.
4. The method according to claim 3, characterized in that The non-downsampled images corresponding to the top N highest matching degrees each contain a total of N non-downsampled images, and the electronic device uses the second network model to accurately match the image to be identified with the non-downsampled images corresponding to the top N highest matching degrees each contain in the image database to determine whether the user in the image to be identified is a user with access permission, including: The electronic device extracts features of the image to be identified by using the second network model to obtain a fifth feature vector set, and extracts features of the j-th un-downsampled image among the N un-downsampled images by using the second network model to obtain a sixth feature vector set #j, where j is a positive integer and j traverses from 1 to N, a total of N sixth feature vector sets are obtained; The electronic device performs feature vector fusion on the N sixth feature vector sets through the second network model to obtain a fused feature vector set; The electronic device performs feature matching on the fifth feature vector set and the fused feature vector set through the second network model to determine whether the user in the image to be identified matches the user corresponding to any one of the N non-downsampled images; Among them, if the user in the image to be identified does not match the user corresponding to the N un-downsampled images, the user in the image to be identified is not a user with entry permission, and the electronic device refuses to control the access control gate to perform the gate opening operation; otherwise, the user in the image to be identified matches the user corresponding to any one of the N un-downsampled images, then the user in the image to be identified is a user with entry permission, and the electronic device controls the access control gate to perform the gate opening operation.
5. The method according to claim 4, characterized in that The electronic device performs feature vector fusion on the N sixth feature vector sets through the second network model to obtain a fused feature vector set, including: The electronic device fills the feature vectors in the sixth feature vectors whose feature vector number does not reach the median value among the N sixth feature vectors according to the median value of the number of feature vectors included in each of the N sixth feature vectors until the median value is reached, and discards the feature vectors in the sixth feature vectors whose feature vector number exceeds the median value among the N sixth feature vectors until the median value is reached, to obtain the preprocessed N sixth feature vectors, wherein the number of feature vectors of each of the preprocessed N sixth feature vectors is the median value; The electronic device interleaves the preprocessed N sixth eigenvectors to obtain the fused eigenvector set.
6. The method according to claim 5, characterized in that The median value is X, X is an integer greater than 1, the fused feature vector set includes X*N feature vectors, the X*N feature vectors are divided into X / Y groups of feature vectors, Y is an integer greater than 1 and less than X, for the first group of feature vectors in the X / Y group of feature vectors, the first group of feature vectors sequentially includes the first to Yth feature vectors of the N sixth feature vectors after preprocessing in order from front to back of the index, for the second group of feature vectors in the X / Y group of feature vectors, the second group of feature vectors sequentially includes the Y+1th to 2Yth feature vectors of the N sixth feature vectors after preprocessing in order from front to back of the index, and so on, for the X / Yth group of feature vectors in the X / Y group of feature vectors, the X / Yth group of feature vectors sequentially includes the XYth to Xth feature vectors of the N sixth feature vectors after preprocessing in order from front to back of the index.
7. The method according to claim 1, characterized in that The first network model and the second network model are different models.
8. An unattended access control system, characterized in that: The unattended access control system includes an electronic device, and the unattended access control system also includes an image acquisition device and an access control gate. The system is configured as follows: The electronic device acquires the image to be identified acquired by the image acquisition device; The electronic device simulates and matches the image to be identified through a first network model to determine whether the user in the image to be identified is a user with access permission; If the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform the gate opening operation; otherwise, the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission; If the user in the image to be identified is not a user with access permission, the electronic device refuses to control the access control gate to perform an opening operation; otherwise, the electronic device controls the access control gate to perform an opening operation; The electronic device simulates matching the image to be identified through a first network model to determine whether a user in the image to be identified is a user with access permission, including: The electronic device performs downsampling processing on the image to be recognized by using the first network model to obtain a downsampled image to be recognized; The electronic device performs fuzzy matching on the downsampled image to be identified and the downsampled image in the image database through the first network model to determine whether the user in the image to be identified is a user with access permission, wherein the user included in the downsampled image in the image database is a user with access permission; The image database includes M downsampled images, and the electronic device accurately matches the image to be identified through the second network model to determine whether the user in the image to be identified is a user with access permission, including: The electronic device determines the top N highest matching degrees among the M matching degrees, where N is an integer greater than 1 and less than M; The electronic device uses the second network model to accurately match the image to be identified with the non-downsampled images corresponding to the top N highest matching degrees in the image database to determine whether the user in the image to be identified is a user with access permission; the images of the same user in the image database include downsampled images and non-downsampled images.
Citation Information
Patent Citations
Electronic device, identification method based on face image and voiceprint information, and storage medium
CN108446674A
Access control system based on two-dimensional face recognition
CN109377616A