CN113591706A - Face recognition method and device, storage medium and electronic equipment - Google Patents

Face recognition method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113591706A
CN113591706A CN202110872553.6A CN202110872553A CN113591706A CN 113591706 A CN113591706 A CN 113591706A CN 202110872553 A CN202110872553 A CN 202110872553A CN 113591706 A CN113591706 A CN 113591706A
Authority
CN
China
Prior art keywords
face image
sequence
current face
recognition model
trained
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110872553.6A
Other languages
Chinese (zh)
Inventor
刘星
赵晨旭
唐大闰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Miaozhen Information Technology Co Ltd
Original Assignee
Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Minglue Artificial Intelligence Group Co Ltd filed Critical Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority to CN202110872553.6A priority Critical patent/CN113591706A/en
Publication of CN113591706A publication Critical patent/CN113591706A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application provides a face recognition method, a face recognition device, a storage medium and an electronic device, wherein the face recognition method comprises the following steps: acquiring a current face image; calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input; searching whether a second sequence corresponding to the first sequence exists in a database; and if so, determining that the user corresponding to the current face image has the authority. According to the method and the device, the current face image is calculated through the recognition model supporting dynamic input to obtain the first sequence, whether a user corresponding to the current face image has the authority or not is determined based on the first sequence and the pre-stored second sequence, the current face image with different sizes can be calculated, the current face image does not need to be zoomed to a fixed size, the current face image is adjusted to a target size, the integrity of pixel information of the current face image is guaranteed, and the accuracy of a recognition result is improved.

Description

Face recognition method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of human image processing technologies, and in particular, to a method and an apparatus for human face recognition, a storage medium, and an electronic device.
Background
The face recognition technology is widely applied to various scenes such as mobile phone unlocking, entrance guard, payment and the like. On the basis of collecting a large-scale face data set, a mainstream face recognition algorithm trains a convolutional neural network on the data set for face recognition. The main face recognition algorithm is as follows: the face image is input, and the size is usually a fixed size, such as: 112 × 112 pixels, and then performs recognition, analysis, and the like on the face image to obtain a recognition result.
However, in practical application, if the face cut from the original image of the face image is smaller than a fixed size, the face image with the fixed size needs to be obtained through amplification and interpolation, and pixels additionally introduced by interpolation are inaccurate; if the face cut out from the original image of the face image is larger than a fixed size, the face image needs to be obtained by reducing the original image, and the reduction process loses information of part of the face. Therefore, if the size of the original image of the face image is greatly different from the fixed size, the accuracy of the recognition result is lowered.
Disclosure of Invention
In view of this, embodiments of the present application provide a face recognition method, an apparatus, a storage medium, and an electronic device, so as to solve the problem in the prior art that an accuracy of a recognition result is low.
In a first aspect, an embodiment of the present application provides a face recognition method, where the method includes:
acquiring a current face image;
calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
searching whether a second sequence corresponding to the first sequence exists in a database;
and if so, determining that the user corresponding to the current face image has the authority.
In a possible implementation, the acquiring a current face image includes:
receiving an authority request of a user;
and acquiring the current face image of the user by utilizing camera equipment based on the permission request.
In a possible implementation manner, the calculating the current face image by using a pre-trained recognition model to obtain a first sequence includes:
taking the current face image as the input of the recognition model so as to adjust the current face image to a target size; the target size is the size difference with the current face image in a plurality of preset sizes, wherein the target size is the smallest size difference with the current face image;
calculating the adjusted current face image through the recognition model to obtain the first sequence; wherein the first sequence is a digital sequence.
In a possible embodiment, the searching whether the second sequence corresponding to the first sequence exists from the database includes:
calculating a similarity between the first sequence and each of the second sequences in the database;
and if the similarity which is greater than or equal to a preset threshold exists, determining that a second sequence corresponding to the first sequence exists.
In a possible implementation, the face recognition determination method further includes:
and under the condition that the user corresponding to the current face image has the authority, responding to the authority request of the user.
In a possible implementation, the face recognition method further includes the step of training the recognition model:
acquiring different face image samples aiming at each identity identification code;
adjusting the face image sample to each preset size;
inputting the adjusted face image sample into a recognition model to be trained to obtain an actual result; wherein the recognition model to be trained is set to support dynamic input;
and calculating an error between an actual result and a theoretical result, and if the error is greater than or equal to a preset threshold, adjusting the parameters of the recognition model to be trained through a loss function until the error is less than the preset threshold.
In a second aspect, an embodiment of the present application further provides a face recognition apparatus, where the face recognition apparatus includes:
an acquisition module that configurably acquires a current face image;
the calculation module is used for calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
a search module configured to search a database for the presence of a second sequence corresponding to the first sequence;
and the determining module is configured to determine that the user corresponding to the current face image has the authority if the face image exists.
In one possible embodiment, the system further comprises a training module configured to:
acquiring different face image samples aiming at each identity identification code;
adjusting the face image sample to each preset size;
inputting the adjusted face image sample into a recognition model to be trained to obtain an actual result; wherein the recognition model to be trained is set to support dynamic input;
and calculating an error between an actual result and a theoretical result, and if the error is greater than or equal to a preset threshold, adjusting the parameters of the recognition model to be trained through a loss function until the error is less than the preset threshold.
In a third aspect, the present application further provides a storage medium, wherein the computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to perform the following steps:
acquiring a current face image;
calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
searching whether a second sequence corresponding to the first sequence exists in a database;
and if so, determining that the user corresponding to the current face image has the authority.
In a fourth aspect, the present application further provides an electronic device, including: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over a bus when an electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of:
acquiring a current face image;
calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
searching whether a second sequence corresponding to the first sequence exists in a database;
and if so, determining that the user corresponding to the current face image has the authority.
According to the embodiment of the application, the current face image is calculated through the recognition model to obtain the first sequence, and whether a user corresponding to the current face image has authority or not is determined based on the first sequence and the pre-stored second sequence, wherein the recognition model supports dynamic input, namely the current face images with different sizes can be calculated, the current face image does not need to be zoomed to a fixed size, the current face image is adjusted to a target size, the integrity of the pixel information of the current face image is ensured, and the accuracy of a recognition result is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 shows a flow chart of a face recognition method provided in the present application;
fig. 2 shows a flowchart of obtaining a first sequence in a face recognition method provided by the present application;
fig. 3 is a flowchart illustrating a method for determining whether a second sequence corresponding to a first sequence exists in a face recognition method provided by the present application;
FIG. 4 is a flow chart illustrating training a recognition model in a face recognition method provided by the present application;
fig. 5 is a schematic structural diagram of a face recognition apparatus provided in the present application;
fig. 6 shows a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings of the embodiments of the present application. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the application without any inventive step, are within the scope of protection of the application.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs. As used in this application, the terms "first," "second," and the like do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
Detailed descriptions of known functions and known components are omitted in the present application in order to keep the following description of the embodiments of the present application clear and concise.
As shown in fig. 1, which is a flowchart of a face recognition method provided in the first aspect of the present application, the face recognition method in the embodiments of the present application can be applied to various scenarios such as mobile phone unlocking, door access, payment, and the like, and can improve accuracy of a recognition result. The execution subject of the face recognition method is a processor or a server, and the specific steps comprise S101-S104.
And S101, acquiring a current face image.
Specifically, a scene image is captured with a capture device. In a specific implementation, a user generates an authority request by performing a preset operation, and sends the authority request to a processor or a server.
After receiving an authority request of a user, responding the authority request to start the acquisition equipment, so that the acquisition equipment acquires a scene image in a preset area, wherein the acquisition equipment can be a camera, a fixed camera, infrared equipment and the like, and the preset range is an area which can be shot by the acquisition equipment.
Further, a face detection algorithm is adopted to select a face in the scene image, the face with the largest face area is selected as a target face under the condition that a plurality of faces exist in the scene image, and then the target face is completely adjusted to obtain a face image, namely the face image at least comprises hair, five sense organs, chin and the like of the target face. Meanwhile, whether the connecting line of the two eyes in the face image is parallel to the horizon or not can be determined, if not, the face image is adjusted until the connecting line of the two eyes in the face image is parallel to the horizon, and then the current face image is obtained.
S102, calculating a current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input.
After the current face image is acquired, the current face image is calculated by using a pre-trained recognition model supporting dynamic input to obtain a first sequence.
The support of dynamic input means that the calculation can be performed on the current face images with multiple sizes, and the accuracy of a calculation result, namely the first sequence, is ensured. For example, current face images having pixel sizes of 112 × 112, 224 × 224, 448 × 448, 896 × 896, 1792 × 1792, 3584 × 3584, etc. may all be computed by the recognition model.
Specifically, fig. 2 shows a flowchart of calculating a current face image by using a pre-trained recognition model to obtain a first sequence, where the specific steps include S201 and S202.
S201, taking the current face image as the input of an identification model to adjust the current face image to a target size; the target size is the size difference with the current face image in a plurality of preset sizes.
S202, calculating the adjusted current face image through the recognition model to obtain a first sequence; wherein the first sequence is a digital sequence.
In specific implementation, after the current face image is input into the recognition model, the recognition model detects the size of the current face image, calculates the difference between the size of the current face image and each preset size, selects the preset size with the minimum difference as a target size, and adjusts the current face image to the target size. Specifically, if the size of the current face image is smaller than the target size, the current face image is enlarged; and if the size of the current face image is larger than the target size, reducing the current face image.
Calculating the adjusted current face image through the recognition model to obtain a first sequence; wherein the first sequence is a digital sequence. For example, the digital sequence is 256 bits, 512 bits, etc.
S103, searching whether a second sequence corresponding to the first sequence exists in the database.
After the first sequence is obtained, whether a second sequence corresponding to the first sequence exists is searched in the database, wherein the database stores a plurality of second sequences, identity marks corresponding to the second sequences and the like, each second sequence is obtained by calculating a face image corresponding to the second sequence, and the way of calculating the second sequence is the same as the way of calculating the first sequence.
In order to improve accuracy, a plurality of second sequences corresponding to one identity identifier may be stored in the database, and the facial images corresponding to each second sequence are different, for example, for the identity identifier of the user a, the facial images of the user a at the ages of 20, 25 and 30 are respectively calculated to obtain three second sequences, and a mapping relationship between the three second sequences and the user a is established and stored in the database.
Further, referring to the flowchart shown in fig. 3, to determine whether there is a second sequence corresponding to the first sequence, specific steps include S301 and S302.
S301, calculating the similarity between the first sequence and each second sequence in the database.
S302, if the similarity which is greater than or equal to the preset threshold exists, determining that a second sequence corresponding to the first sequence exists.
Specifically, the similarity between the first sequence and each second sequence in the database is respectively calculated, each calculated similarity is compared with a preset threshold, and if the similarity which is greater than or equal to the preset threshold exists, the existence of the second sequence corresponding to the first sequence is determined, that is, the face image corresponding to the second sequence corresponding to the similarity and the current face image corresponding to the first sequence belong to the same user.
And S104, if the face image exists, determining that the user corresponding to the current face image has the authority.
And after the search result is obtained, if a second sequence corresponding to the first sequence exists, determining that the user corresponding to the current face image has the authority. And all users corresponding to the identity identifications in the database have the authority.
Further, under the condition that the user corresponding to the current face image has the authority, the authority request of the user is responded, for example, unlocking of a mobile phone, releasing of entrance guard, completion of payment and the like are completed.
According to the embodiment of the application, the current face image is calculated through the recognition model to obtain the first sequence, and whether a user corresponding to the current face image has authority or not is determined based on the first sequence and the pre-stored second sequence, wherein the recognition model supports dynamic input, namely the current face images with different sizes can be calculated, the current face image does not need to be zoomed to a fixed size, the current face image is adjusted to a target size, the integrity of the pixel information of the current face image is ensured, and the accuracy of a recognition result is improved.
The method steps for training the recognition model provided in the embodiment of the present application specifically refer to the flowchart shown in fig. 4, which includes S401 to S404.
S401, aiming at each identity code, different face image samples are obtained.
S402, adjusting the face image sample to each preset size.
S403, inputting the adjusted face image sample into a recognition model to be trained to obtain an actual result; wherein the recognition model to be trained is arranged to support dynamic input.
S404, calculating an error between the actual result and the theoretical result, and if the error is larger than or equal to a preset threshold, adjusting parameters of the recognition model to be trained through a loss function until the error is smaller than the preset threshold.
Before training a recognition model to be trained, a sample set for training is acquired, specifically, different face image samples are acquired for each identity code, for example, a face image is acquired as a face image sample for a user corresponding to each identity code every year.
In order to achieve the purpose that the recognition model to be trained supports dynamic input, the face image sample is adjusted to each preset size, so that the recognition model obtained after training can calculate the current face image with any size on the basis of ensuring the accuracy.
And inputting the adjusted face image sample into the recognition model to be trained to obtain an actual result, namely a result obtained by calculating the face image sample by the recognition model to be trained. And then, calculating an error between the actual result and the theoretical result, if the error is greater than or equal to a preset threshold, adjusting parameters of the recognition model to be trained through a loss function until the error is less than the preset threshold, and finishing the training of the recognition model.
Based on the same inventive concept, the second aspect of the present application further provides a face recognition device corresponding to the face recognition method, and as the principle of solving the problem of the face recognition device in the present application is similar to the face recognition method in the present application, the implementation of the face recognition device can refer to the implementation of the method, and repeated details are not repeated.
Fig. 5 shows a schematic diagram of a face recognition apparatus provided in an embodiment of the present application, which specifically includes:
an obtaining module 501, configured to obtain a current face image;
a calculation module 502 configured to calculate the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
a searching module 503 configured to search from a database whether a second sequence corresponding to the first sequence exists;
and a determining module 504 configured to determine that the user corresponding to the current face image has the right if the current face image exists.
In another embodiment, the obtaining module 501 is specifically configured to:
receiving an authority request of a user;
and acquiring the current face image of the user by utilizing camera equipment based on the permission request.
In yet another embodiment, the calculation module 502 is specifically configured to:
taking the current face image as the input of the recognition model so as to adjust the current face image to a target size; the target size is the size difference with the current face image in a plurality of preset sizes, wherein the target size is the smallest size difference with the current face image;
calculating the adjusted current face image through the recognition model to obtain the first sequence; wherein the first sequence is a digital sequence.
In another embodiment, the search module 503 is specifically configured to:
calculating a similarity between the first sequence and each of the second sequences in the database;
and if the similarity which is greater than or equal to a preset threshold exists, determining that a second sequence corresponding to the first sequence exists.
In yet another embodiment, the face recognition apparatus further comprises a response module 505 configured to:
and under the condition that the user corresponding to the current face image has the authority, responding to the authority request of the user.
In yet another embodiment, the face recognition device further comprises a training module 506 configured to:
acquiring different face image samples aiming at each identity identification code;
adjusting the face image sample to each preset size;
inputting the adjusted face image sample into a recognition model to be trained to obtain an actual result; wherein the recognition model to be trained is set to support dynamic input;
and calculating an error between an actual result and a theoretical result, and if the error is greater than or equal to a preset threshold, adjusting the parameters of the recognition model to be trained through a loss function until the error is less than the preset threshold.
According to the embodiment of the application, the current face image is calculated through the recognition model to obtain the first sequence, and whether a user corresponding to the current face image has authority or not is determined based on the first sequence and the pre-stored second sequence, wherein the recognition model supports dynamic input, namely the current face images with different sizes can be calculated, the current face image does not need to be zoomed to a fixed size, the current face image is adjusted to a target size, the integrity of the pixel information of the current face image is ensured, and the accuracy of a recognition result is improved.
The storage medium is a computer-readable medium, and stores a computer program, and when the computer program is executed by a processor, the method provided in any embodiment of the present application is implemented, including the following steps S11 to S14:
s11, acquiring a current face image;
s12, calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
s13, searching whether a second sequence corresponding to the first sequence exists in a database;
and S14, if yes, determining that the user corresponding to the current face image has the authority.
When the computer program is executed by the processor to acquire the current face image, the processor specifically executes the following steps: receiving an authority request of a user; and acquiring the current face image of the user by utilizing camera equipment based on the permission request.
When the computer program is executed by the processor and calculates the current face image by using the pre-trained recognition model to obtain a first sequence, the following steps are specifically executed by the processor: taking the current face image as the input of the recognition model so as to adjust the current face image to a target size; the target size is the size difference with the current face image in a plurality of preset sizes, wherein the target size is the smallest size difference with the current face image; calculating the adjusted current face image through the recognition model to obtain the first sequence; wherein the first sequence is a digital sequence.
When the computer program is executed by the processor to search whether a second sequence corresponding to the first sequence exists in the database, the following steps are further executed by the processor: calculating a similarity between the first sequence and each of the second sequences in the database; and if the similarity which is greater than or equal to a preset threshold exists, determining that a second sequence corresponding to the first sequence exists.
When the computer program is executed by the processor to execute the face recognition method, the processor also executes the following steps: and under the condition that the user corresponding to the current face image has the authority, responding to the authority request of the user.
When the computer program is executed by the processor to execute the face recognition method, the processor also executes the following steps: acquiring different face image samples aiming at each identity identification code; adjusting the face image sample to each preset size; inputting the adjusted face image sample into a recognition model to be trained to obtain an actual result; wherein the recognition model to be trained is set to support dynamic input; and calculating an error between an actual result and a theoretical result, and if the error is greater than or equal to a preset threshold, adjusting the parameters of the recognition model to be trained through a loss function until the error is less than the preset threshold.
According to the embodiment of the application, the current face image is calculated through the recognition model to obtain the first sequence, and whether a user corresponding to the current face image has authority or not is determined based on the first sequence and the pre-stored second sequence, wherein the recognition model supports dynamic input, namely the current face images with different sizes can be calculated, the current face image does not need to be zoomed to a fixed size, the current face image is adjusted to a target size, the integrity of the pixel information of the current face image is ensured, and the accuracy of a recognition result is improved.
An electronic device is provided in an embodiment of the present application, and a schematic structural diagram of the electronic device may be as shown in fig. 6, where the electronic device at least includes a memory 601 and a processor 602, where the memory 601 stores a computer program, and the processor 602 implements the method provided in any embodiment of the present application when executing the computer program on the memory 601. Illustratively, the electronic device computer program steps are as follows S21-S24:
s21, acquiring a current face image;
s22, calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
s23, searching whether a second sequence corresponding to the first sequence exists in a database;
and S24, if yes, determining that the user corresponding to the current face image has the authority.
The processor, when executing the acquiring of the current face image stored on the memory, further executes the following computer program: receiving an authority request of a user; and acquiring the current face image of the user by utilizing camera equipment based on the permission request.
When the processor calculates the current face image by using the pre-trained recognition model stored in the execution memory to obtain a first sequence, the processor also executes the following computer program: taking the current face image as the input of the recognition model so as to adjust the current face image to a target size; the target size is the size difference with the current face image in a plurality of preset sizes, wherein the target size is the smallest size difference with the current face image; calculating the adjusted current face image through the recognition model to obtain the first sequence; wherein the first sequence is a digital sequence.
The processor, in executing a second sequence stored on the memory that is looked up from the database for the presence of a second sequence corresponding to the first sequence, further executes the computer program: calculating a similarity between the first sequence and each of the second sequences in the database; and if the similarity which is greater than or equal to a preset threshold exists, determining that a second sequence corresponding to the first sequence exists.
The processor, when executing the face recognition method stored on the memory, also executes the following computer program: and under the condition that the user corresponding to the current face image has the authority, responding to the authority request of the user.
The processor, when executing the face recognition method stored on the memory, also executes the following computer program: acquiring different face image samples aiming at each identity identification code; adjusting the face image sample to each preset size; inputting the adjusted face image sample into a recognition model to be trained to obtain an actual result; wherein the recognition model to be trained is set to support dynamic input; and calculating an error between an actual result and a theoretical result, and if the error is greater than or equal to a preset threshold, adjusting the parameters of the recognition model to be trained through a loss function until the error is less than the preset threshold.
According to the embodiment of the application, the current face image is calculated through the recognition model to obtain the first sequence, and whether a user corresponding to the current face image has authority or not is determined based on the first sequence and the pre-stored second sequence, wherein the recognition model supports dynamic input, namely the current face images with different sizes can be calculated, the current face image does not need to be zoomed to a fixed size, the current face image is adjusted to a target size, the integrity of the pixel information of the current face image is ensured, and the accuracy of a recognition result is improved.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes. Optionally, in this embodiment, the processor executes the method steps described in the above embodiments according to the program code stored in the storage medium. Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again. It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
Moreover, although exemplary embodiments have been described herein, the scope thereof includes any and all embodiments based on the present application with equivalent elements, modifications, omissions, combinations (e.g., of various embodiments across), adaptations or alterations. The elements of the claims are to be interpreted broadly based on the language employed in the claims and not limited to examples described in the present specification or during the prosecution of the application, which examples are to be construed as non-exclusive. It is intended, therefore, that the specification and examples be considered as exemplary only, with a true scope and spirit being indicated by the following claims and their full scope of equivalents.
The above description is intended to be illustrative and not restrictive. For example, the above-described examples (or one or more versions thereof) may be used in combination with each other. For example, other embodiments may be used by those of ordinary skill in the art upon reading the above description. In addition, in the above detailed description, various features may be grouped together to streamline the application. This is not to be interpreted as an intention that the disclosed features not claimed are essential to each claim. Rather, subject matter of the present application can lie in less than all features of a particular disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description as examples or embodiments, with each claim standing on its own as a separate embodiment, and it is contemplated that these embodiments may be combined with each other in various combinations or permutations. The scope of the application should be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
The embodiments of the present application have been described in detail, but the present application is not limited to these specific embodiments, and those skilled in the art can make various modifications and modified embodiments based on the concept of the present application, and these modifications and modified embodiments should fall within the scope of the present application.

Claims (10)

1. A face recognition method, comprising:
acquiring a current face image;
calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
searching whether a second sequence corresponding to the first sequence exists in a database;
and if so, determining that the user corresponding to the current face image has the authority.
2. The method of claim 1, wherein the obtaining the current face image comprises:
receiving an authority request of a user;
and acquiring the current face image of the user by utilizing camera equipment based on the permission request.
3. The method of claim 1, wherein the calculating the current face image using a pre-trained recognition model to obtain a first sequence comprises:
taking the current face image as the input of the recognition model so as to adjust the current face image to a target size; the target size is the size difference with the current face image in a plurality of preset sizes, wherein the target size is the smallest size difference with the current face image;
calculating the adjusted current face image through the recognition model to obtain the first sequence; wherein the first sequence is a digital sequence.
4. The method of claim 1, wherein the searching for the second sequence corresponding to the first sequence from the database comprises:
calculating a similarity between the first sequence and each of the second sequences in the database;
and if the similarity which is greater than or equal to a preset threshold exists, determining that a second sequence corresponding to the first sequence exists.
5. The face recognition method of claim 2, further comprising:
and under the condition that the user corresponding to the current face image has the authority, responding to the authority request of the user.
6. The face recognition method of claim 1, further comprising the step of training the recognition model:
acquiring different face image samples aiming at each identity identification code;
adjusting the face image sample to each preset size;
inputting the adjusted face image sample into a recognition model to be trained to obtain an actual result; wherein the recognition model to be trained is set to support dynamic input;
and calculating an error between an actual result and a theoretical result, and if the error is greater than or equal to a preset threshold, adjusting the parameters of the recognition model to be trained through a loss function until the error is less than the preset threshold.
7. A face recognition apparatus, comprising:
an acquisition module that configurably acquires a current face image;
the calculation module is used for calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
a search module configured to search a database for the presence of a second sequence corresponding to the first sequence;
and the determining module is configured to determine that the user corresponding to the current face image has the authority if the face image exists.
8. The face recognition apparatus of claim 7, further comprising a training module configured to:
acquiring different face image samples aiming at each identity identification code;
adjusting the face image sample to each preset size;
inputting the adjusted face image sample into a recognition model to be trained to obtain an actual result; wherein the recognition model to be trained is set to support dynamic input;
and calculating an error between an actual result and a theoretical result, and if the error is greater than or equal to a preset threshold, adjusting the parameters of the recognition model to be trained through a loss function until the error is less than the preset threshold.
9. A storage medium, having a computer program stored thereon, the computer program when executed by a processor performing the steps of:
acquiring a current face image;
calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
searching whether a second sequence corresponding to the first sequence exists in a database;
and if so, determining that the user corresponding to the current face image has the authority.
10. An electronic device, comprising: a processor and a memory, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over a bus when an electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of:
acquiring a current face image;
calculating the current face image by using a pre-trained recognition model to obtain a first sequence; wherein the recognition model supports dynamic input;
searching whether a second sequence corresponding to the first sequence exists in a database;
and if so, determining that the user corresponding to the current face image has the authority.
CN202110872553.6A 2021-07-30 2021-07-30 Face recognition method and device, storage medium and electronic equipment Pending CN113591706A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110872553.6A CN113591706A (en) 2021-07-30 2021-07-30 Face recognition method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110872553.6A CN113591706A (en) 2021-07-30 2021-07-30 Face recognition method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113591706A true CN113591706A (en) 2021-11-02

Family

ID=78252739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110872553.6A Pending CN113591706A (en) 2021-07-30 2021-07-30 Face recognition method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113591706A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114499761A (en) * 2022-01-26 2022-05-13 中国工商银行股份有限公司 Data identification method and device, electronic equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114499761A (en) * 2022-01-26 2022-05-13 中国工商银行股份有限公司 Data identification method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN108885698B (en) Face recognition method and device and server
CN108921782B (en) Image processing method, device and storage medium
CN110489951A (en) Method, apparatus, computer equipment and the storage medium of risk identification
JP6535196B2 (en) Image processing apparatus, image processing method and image processing system
CN110675426B (en) Human body tracking method, device, equipment and storage medium
CN111241932A (en) Automobile exhibition room passenger flow detection and analysis system, method and storage medium
CN110245573B (en) Sign-in method and device based on face recognition and terminal equipment
CN112199530B (en) Multi-dimensional face library picture automatic updating method, system, equipment and medium
CN113302907B (en) Shooting method, shooting device, shooting equipment and computer readable storage medium
CN111507138A (en) Image recognition method and device, computer equipment and storage medium
CN107832598B (en) Unlocking control method and related product
CN112101195A (en) Crowd density estimation method and device, computer equipment and storage medium
CN113591706A (en) Face recognition method and device, storage medium and electronic equipment
WO2012177421A1 (en) Enrollment in a telepresence system using a face-recognition-based identification system
US9286707B1 (en) Removing transient objects to synthesize an unobstructed image
CN112101296B (en) Face registration method, face verification method, device and system
US10430459B2 (en) Server and method for providing city street search service
CN116091781B (en) Data processing method and device for image recognition
CN112070035A (en) Target tracking method and device based on video stream and storage medium
CN115830342A (en) Method and device for determining detection frame, storage medium and electronic device
CN113538315B (en) Image processing method and device
KR102426594B1 (en) System and method for estimating the location of object in crowdsourcing environment
CN111079551B (en) Finger vein recognition method and device based on singular value decomposition and storage medium
CN111382628B (en) Method and device for judging peer
CN113128278A (en) Image identification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211230

Address after: A111, 1f, building 3, No. 1, zone 1, Lize Zhongyuan, Wangjing emerging industrial zone, Chaoyang District, Beijing 100020

Applicant after: MIAOZHEN INFORMATION TECHNOLOGY Co.,Ltd.

Address before: Floor 29, 30, 31, 32, No. 701, Yunjin Road, Xuhui District, Shanghai, 200030

Applicant before: Shanghai minglue artificial intelligence (Group) Co.,Ltd.