Patent Description:
Facial recognition is an identity recognition technology based on a person's facial feature. In particular, the facial feature is extracted and compared against feature information that has been stored in a database, thus obtaining a result of comparison for identity recognition. Currently, however, the accuracy of facial recognition needs to be improved due to changes in a person's age, makeup, posture, or the like.

<CIT>) has disclosed an analytics server for use in a transaction system with a terminal for performing authenticated user-initiated transactions and generating transaction data including a user identity associated with each transaction and a camera for capturing image data of a user performing an authenticated transaction at the terminal is configured to extract user characteristic features from the image data associated with authenticated transactions and iteratively update a user database of the user characteristic features over multiple authenticated transactions. The analytics server is further configured to compute a match score, based on preset rules, of the user characteristic features for a current transaction with the user characteristic features associated with a current user stored in the user database, and raise an alarm when the match score fails to meet a threshold value.

In view of this, the present invention provides a facial recognition method, an electronic device, a computer-readable storage medium, and a facial recognition system.

The present invention provides a facial recognition according to claim <NUM>.

The present invention further provides an electronic device. The electronic device includes at least one processor and a memory.

The memory is configured to store at least one computer program.

The at least one computer program when executed by the at least one processor causes the at least one processor to perform the method described above.

The present invention further provides a facial recognition system including an image capture device and an electronic device, where the image capture device is communicatively coupled to the electronic device.

The image capture device is configured to capture a facial image and transmit the facial image to the electronic device.

The electronic device is the electronic device described above.

Currently, facial recognition is needed for verifying people's identity in many occasions. Generally, due to a person's aging, makeup, and posture, omission of matching or false matching in facial recognition may happen during the process of capturing a facial image and matching the facial image against original images stored in a database, resulting in a decreased accuracy of facial recognition.

The present invention provides a facial recognition method, and the method includes steps described below.

A facial image is captured, a facial feature is extracted, and the facial feature is matched against a plurality of pre-stored original images, separately, to obtain a first required comparison value. The facial feature is matched against a plurality of pre-stored captured-on-site images, separately, to obtain a second required comparison value.

A determination is made as to whether the first required comparison value and the second required comparison value are greater than or equal to a preset comparison threshold.

A facial feature is re-extracted in response to determining that the first required comparison value is less than the preset comparison threshold and the second required comparison value is also less than the preset comparison threshold. The re-extracted a facial feature is matched against the plurality of original images, separately, to obtain a third required comparison value, and a determination is made as to whether the third required comparison value is greater than or equal to the preset comparison threshold.

The facial image is saved as a new captured-on-site image in response to determining that the third required comparison value is greater than or equal to the preset comparison threshold, a number of successful comparisons of a captured-on-site image is refreshed, and recognition is determined to be successful.

In one embodiment, the method further includes a step of in response to determining that the third required comparison value is less than the preset comparison threshold, determining that comparison is unsuccessful and the recognition is failed.

In one embodiment, the method further includes steps described below.

A determination is made as to whether an original image corresponding to the first required comparison value and a captured-on-site image corresponding to the second required comparison value are images of a same person in response to determining that the first required comparison value is greater than or equal to the preset comparison threshold.

A comparison is determined to be successful and recognition is determined to pass in response to determining that the first required comparison value is greater than or equal to the preset comparison threshold and the original image corresponding to the first required comparison value and the captured-on-site image corresponding to the second required comparison value are the images of the same person.

A determination is made as to whether the second required comparison value is greater than or equal to the preset comparison threshold is determined in response to determining that the first required comparison value is greater than or equal to the preset comparison threshold and an original image corresponding to the first required comparison value and a captured-on-site image corresponding to the second required comparison value are not images of a same person.

A comparison is determined to be successful and recognition is determined to pass in response to determining that the second required comparison value is less than the preset comparison threshold.

In one embodiment, after the step of determining, in response to determining that the first required comparison value is greater than or equal to the preset comparison threshold and the original image corresponding to the first required comparison value and the captured-on-site image corresponding to the second required comparison value are not images of the same person, whether the second required comparison value is greater than or equal to the preset comparison threshold, the method further includes steps described below.

A determination is made as to whether the person corresponding to the original image corresponding to the first required comparison value is present in a pre-stored approximate mismatch database is determined in response to determining that the second required comparison value is greater than or equal to the preset comparison threshold.

A determination is made as to whether a number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is greater than or equal to two is determined in response to determining that the person corresponding to the original image corresponding to the first required comparison value is in the approximate mismatch database. A comparison is determined to be successful and recognition is determined to pass in response to determining that the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is greater than or equal to two.

A facial feature is re-extracted in response to determining that the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is less than two, and the re-extracted a facial feature is compared with the captured-on-site image corresponding to the second required comparison value again.

A comparison is determined to be successful in response to determining that a comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is greater than or equal to the preset comparison threshold. The number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is refreshed, and recognition is determined to pass.

In one embodiment, after the step of re-extracting, in response to determining that the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is less than two, the facial feature, and comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value again, the method further includes a step described below.

The comparison is determined to be unsuccessful in response to determining that the comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is less than the preset comparison threshold. The number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is removed, the second required comparison value is deleted, and the recognition is determined fail.

A facial feature is re-extracted in response to determining that the person corresponding to the original image corresponding to the first required comparison value is not present in the approximate mismatch database, and the re-extracted a facial feature is matched against the plurality of original images to obtain a fourth required comparison value.

A comparison is determined to be successful and recognition is determined to pass in response to determining that the fourth required comparison value is greater than or equal to the preset comparison threshold.

The comparison is determined to be unsuccessful and the recognition is determined fail in response to determining that the fourth required comparison value is less than the preset comparison threshold.

A determination is made as to whether a number of successful comparisons of a captured-on-site image corresponding to the second required comparison value is greater than or equal to two is determined in response to determining that the first required comparison value is less than the preset comparison threshold and the second required comparison value is greater than or equal to the preset comparison threshold.

A comparison is determined to be successful and recognition is determined to pass in response to determining that the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is greater than or equal to two.

In one embodiment, the method further includes a step described below. A facial feature is re-extracted in response to determining that the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is less than two, and the re-extracted a facial feature is compared with the captured-on-site image corresponding to the second required comparison value.

The comparison is determined to be successful based on that a comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is greater than or equal to the preset comparison threshold, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is refreshed, and the recognition is determined to pass.

The comparison is determined to be unsuccessful in response to determining that the comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is less than the preset comparison threshold, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is removed, the second required comparison value is deleted, and the recognition is determined fail.

In one embodiment, the step of obtaining the facial image, extracting the facial feature, and matching the facial feature against the plurality of pre-stored original images, separately, to obtain the first required comparison value; and matching the facial feature against the plurality of pre-stored captured-on-site images, separately, to obtain the second required comparison value includes steps described below.

It is determined whether there is a face to be recognized. The facial feature is extracted in response to determining that there is a face to be recognized, and the facial feature is compared with the plurality of pre-stored original images, separately, to obtain the first required comparison value. The facial feature is compared with the plurality of pre-stored captured-on-site images, separately, to obtain the second required comparison value.

Referring to <FIG> is a schematic diagram of a facial recognition system <NUM> according to the present invention. The facial recognition system <NUM> may be applied to an access control system. The facial recognition system <NUM> includes an image capture device <NUM> and an electronic device <NUM>. The electronic device <NUM> includes a memory <NUM> and at least one processor, and each of the at least one processor may specifically include an image processing module <NUM>. The image capture device <NUM> is communicatively coupled to the electronic device <NUM>. The image capture device <NUM> is configured to acquire a facial image and transmit the captured facial image to the electronic device <NUM>.

The memory <NUM> stores computer programs which can be executed on the image processing module <NUM>, and when the image processing module <NUM> executes the computer programs, the electronic device <NUM> is enabled to implement the facial recognition method described below.

Referring to <FIG> in conjunction, <FIG> is a flowchart of a facial recognition method according to the present invention. This method can be applied to the facial recognition system <NUM> shown in <FIG> and executed by the electronic device <NUM> in the facial recognition system <NUM>.

The method may be applied to the electronic device <NUM>, and the electronic device <NUM> pre-stores original images of a plurality of persons, captured-on-site images of the plurality of persons, and a number of successful comparisons based on each captured-on-site image. The method may include steps described below.

In step S <NUM>, whether there is a face to be recognized within an effective recognition distance is detected, and if there is a face to be recognized, step S11 to step S14 are executed. If no face to be recognized exists, step S10 is returned and executed.

In step S <NUM>, a facial image is captured and a facial feature is extracted.

In step S12, the facial feature is compared with a plurality of original images, separately, to obtain a first required comparison value; and the facial feature is compared with a plurality of captured-on-site images, separately, to obtain a second required comparison value.

The facial feature is matched against the plurality of original images to obtain a plurality of comparison values, and in the obtained plurality of comparison values, a highest comparison value is the first required comparison value. Similarly, the facial feature is compared with the plurality of captured-on-site images to obtain a plurality of comparison values, and in the obtained plurality of comparison values, a highest comparison value is the second required comparison value. The higher the comparison value, the higher the similarity between the captured facial image and the original image and the captured-on-site image.

In step S <NUM>, whether the first required comparison value and the second required comparison value are greater than or equal to a preset comparison threshold is determined, if the first required comparison value is less than the preset comparison threshold and the second required comparison value is also less than the preset comparison threshold, step S14 is executed.

In step S14, a facial feature is re-extracted, the re-extracted a facial feature is matched against the plurality of original images, separately, to obtain a third required comparison value, and whether the third required comparison value is greater than or equal to the preset comparison threshold is determined; and if the third required comparison value is greater than or equal to the preset comparison threshold, step S15 is executed, and if the third required comparison value is less than the preset comparison threshold, step S16 is executed.

In step S <NUM>, the facial image is stored in the electronic device <NUM> as a new captured-on-site image, a number of successful comparisons of a captured-on-site image is refreshed, and recognition is determined to pass.

In a case where the first required comparison value is less than the preset comparison threshold and the second required comparison value is also less than the preset comparison threshold, the facial feature is re-extracted and facial recognition is performed again, the re-extracted a facial feature is different from the facial feature extracted before, the re-extracted facial feature can be more refining compared with the facial feature extracted before, and accuracy of the re-extracted facial feature can be higher.

In one embodiment, when the captured facial image is stored in the electronic device <NUM> as the new captured-on-site image, the new captured-on-site image is not stored in a database, and in next facial recognition, after a next comparison is performed, only a new captured-on-site image that the comparison is successful and the recognition is successful will be stored in the database. In this way, after multiple verifications and comparisons, the captured-on-site image is more adaptable in a facial recognition process.

In order to improve accuracy of the facial recognition, when the captured facial image is stored in the electronic device <NUM> as the new captured-on-site image, whether the captured facial image satisfies a preset condition may further be determined. A facial image that enables the comparison to be successful and satisfies the preset condition is stored in the electronic device <NUM> as the new captured-on-site image. If the electronic device <NUM> stores a captured-on-site image, the captured-on-site image is replaced.

In a specific implementation, the plurality of captured-on-site images stored in the electronic device <NUM> may correspond to different persons, that is, at most one image of each person is stored in the electronic device <NUM>. If the electronic device <NUM> stores a captured-on-site image of a same person as the new captured-on-site image, the captured-on-site image may be replaced by the new captured-on-site image to achieve the replacement processing.

The preset condition includes at least one of: determining whether quality of the captured facial image satisfies a preset threshold for storing the captured-on-site image in the database, and determining whether a distance of a captured face is within a preset distance range. Distance detection of the captured face can predict a distance to the face through a size of the captured face or a geometric space model.

In one embodiment, a process of determining whether the preset condition is satisfied may include steps described below. If the quality of the captured facial image satisfies a threshold for storing the captured-on-site image in the database, and the distance of the captured face is within the preset distance range, the comparison is successful. The captured facial image is stored in the electronic device <NUM> as the new captured-on-site image, the number of successful comparisons based on the new captured-on-site image is refreshed, and the recognition is determined to pass. In one embodiment, the process of determining whether the preset condition is satisfied may include a step described below. If the quality of the captured facial image satisfies the threshold for storing the captured-on-site image in the database, the comparison is successful and the recognition is determined to pass. In one embodiment, the process of determining whether the preset condition is satisfied may include a step described below. If the distance of the captured face is within the preset distance range, the comparison is successful and the recognition is determined to pass. In one embodiment, the process of determining whether the preset condition is satisfied may include a step described below. If the quality of the captured facial image does not satisfy the threshold for storing the captured-on-site image in the database and the distance of the captured face is not within the preset distance range, the comparison is unsuccessful and the recognition is determined fail.

It is to be noted that in step S15 of this embodiment, the step of refreshing the number of successful comparisons of the captured-on-site image specifically is refreshing the number of successful comparisons of the new captured-on-site image.

In other embodiments, the step of refreshing the number of successful comparisons of the captured-on-site image specifically may be refreshing a number of successful comparisons of a target captured-on-site image in the plurality of pre-stored captured-on-site images. The target captured-on-site image may be a captured-on-site image corresponding to the second required comparison value. The target captured-on-site image may be a captured-on-site image that can be successfully compared with the new captured-on-site image. The target captured-on-site image may be an image of a same person as the new captured-on-site image.

In step S16, the comparison is unsuccessful and the recognition is failed.

Referring to <FIG> in conjunction, the electronic device <NUM> may store an approximate mismatch database, and the approximate mismatch database stores a list of similar personnel. If the first required comparison value is greater than or equal to the preset comparison threshold, step S21 is executed.

In step S21, whether an original image corresponding to the first required comparison value and a captured-on-site image corresponding to the second required comparison value are images of a same person is determined; if the first required comparison value is greater than or equal to the preset comparison threshold and the original image corresponding to the first required comparison value and the captured-on-site image corresponding to the second required comparison value are the images of the same person, step S22 is executed; and if the first required comparison value is greater than or equal to the preset comparison threshold and the original image corresponding to the first required comparison value and the captured-on-site image corresponding to the second required comparison value are not images of the same person, step S23 is executed.

In step S22, the comparison is successful and the recognition is successful.

After determining that the recognition is successful, the first required comparison value is stored in the electronic device <NUM> as a record of determining the recognition is successful.

In step S23, whether the second required comparison value is greater than or equal to the preset comparison threshold is determined; if the second required comparison value is less than the preset comparison threshold, step S24 is executed; and if the second required comparison value is greater than or equal to the preset comparison threshold, step S25 is executed.

In step S24, the comparison is successful and the recognition is successful.

In step S25, whether a person corresponding to the original image corresponding to the first required comparison value is in the approximate mismatch database is determined; if the person corresponding to the original image corresponding to the first required comparison value is in the approximate mismatch database, step S26 is executed; and if the person corresponding to the original image corresponding to the first required comparison value is not present in the approximate mismatch database, step S27 and step S28 are executed.

In step S26, whether a number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is greater than two (that is, greater than or equal to two) is determined; if the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is two or more, step S261 is executed; and if the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is one or less (that is, less than two), step S262 is executed.

In step S261, the comparison is successful and the recognition is successful.

After determining that the recognition is successful, the second required comparison value is stored in the electronic device <NUM> as a record of determining the recognition is successful.

In step S262, a facial feature is re-extracted, the re-extracted a facial feature is compared with the captured-on-site image corresponding to the second required comparison value again, and whether a comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is greater than or equal to the preset comparison threshold is determined; if the comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is greater than or equal to the preset comparison threshold, step S2621 is executed; and if the comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is less than the preset comparison threshold, step S2622 is executed.

In step S2621, the comparison is successful, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is refreshed, and the recognition is determined to pass.

After determining that the recognition is successful, the comparison value is taken as a record of determining the recognition is successful, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value after refreshing and the record of determining the recognition is successful are stored in the electronic device <NUM>.

In step S2622, the comparison is unsuccessful, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is removed, the second required comparison value is deleted, and the recognition is determined fail.

In the embodiment shown in <FIG>, the method further includes step S27. In step S27, a facial feature is re-extracted, and the re-extracted a facial feature is matched against the plurality of original images to obtain a fourth required comparison value.

In step S28, whether the fourth required comparison value is greater than or equal to the preset comparison threshold is determined; if the fourth required comparison value is less than the preset comparison threshold, step S281 is executed; and if the fourth required comparison value is greater than or equal to the preset comparison threshold, step S282 is executed.

In step S281, the comparison is unsuccessful, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is removed, the second required comparison value is deleted, and the recognition is determined fail.

In step S282, the comparison is successful and the recognition is successful.

If the fourth required comparison value is greater than or equal to the preset comparison threshold, the comparison is successful, and after determining that the recognition is successful, if an original image corresponding to the fourth required comparison value and the original image corresponding to the first required comparison value are images of a same person, the first required comparison value is taken as a record of determining that the recognition is successful and stored in a server. The number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is removed, and the second required comparison value is deleted. If the original image corresponding to the fourth required comparison value and the captured-on-site image corresponding to the second required comparison value are images of a same person, a personnel list corresponding to the original image corresponding to the first required comparison value and a personnel list corresponding to the captured-on-site image corresponding to the second required comparison value are stored in the approximate mismatch database, and the second required comparison value is stored in the electronic device <NUM> as a record of determining that the recognition is successful. If the original image corresponding to the fourth required comparison value and the original image corresponding to the first required comparison value are not images of a same person and the original image corresponding to the fourth required comparison value and the captured-on-site image corresponding to the second required comparison value are not images of a same person, the fourth required comparison value is stored in the electronic device <NUM> as a record of determining that the recognition is successful, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is removed, and the second required comparison value is deleted.

In conjunction with and referring to <FIG>, if the first required comparison value is less than the preset comparison threshold and the second required comparison value is greater than or equal to the preset comparison threshold, step S31 is executed.

In step S31, whether the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is greater than two is determined; if the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is two or more (that is, greater than or equal to two), step S32 is executed; and if the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is one or less (that is, less than two), step S33 is executed.

In step S32, the comparison is successful and the recognition is successful.

In step S33, a facial feature is re-extracted, the re-extracted a facial feature is compared with the captured-on-site image corresponding to the second required comparison value, and whether a comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is greater than or equal to the preset comparison threshold is determined; if the comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is greater than or equal to the preset comparison threshold, step S331 is executed; and if the comparison value obtained by comparing the re-extracted facial feature with the captured-on-site image corresponding to the second required comparison value is less than the preset comparison threshold, step S332 is executed.

In step S331, the comparison is successful, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is refreshed, and the recognition is determined to pass.

In step S332, the comparison is unsuccessful, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is removed, the second required comparison value is deleted, and the recognition is determined fail.

In the above-mentioned process, the comparison is successful, the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is refreshed, and the number of successful comparisons is added to the original number of successful comparisons. For example, if the original number of successful comparisons is one, and after refreshing, the number of successful comparisons is added to <NUM>, and thereby the number of successful comparisons is changed to two.

The comparison is unsuccessful, and the number of successful comparisons of the captured-on-site image corresponding to the second required comparison value is removed. For example, the number of successful comparisons of the captured-on-site image is one, after the comparison is unsuccessful, the one is changed to zero, that is, an initialization state, the comparison value (that is, the second required comparison value) obtained by comparing the extracted face with the captured-on-site image is deleted, and the recognition is determined to fail.

In order to ensure the accuracy of facial recognition, the captured-on-site images stored in the electronic device <NUM> are continuously updated. An update mode may be that in the process of facial recognition, a face acquisition image satisfying the preset condition is taken as a new captured-on-site image to replace an existing captured-on-site image and stored in the electronic device <NUM>; or may be that in the process of facial recognition, a facial image satisfying the preset condition is periodically captured, and the facial image is taken as a new captured-on-site image and stored in the electronic device <NUM> so as to update the captured-on-site image in the electronic device <NUM>. Moreover, original images stored in the electronic device <NUM> may be updated by periodically inputting new images.

The present invention provides a facial recognition system <NUM> applied to an access control system. The facial recognition system <NUM> includes an image capture device <NUM> and an electronic device <NUM>, and the image capture device <NUM> is communicatively coupled to the electronic device <NUM>.

The image capture device <NUM> is configured to acquire a facial image and transmit the facial image to the electronic device <NUM>.

The electronic device <NUM> includes a memory <NUM>, a processor (the processor may be an image processing module <NUM>), and computer programs that are stored in the memory <NUM> and that can be executed on the processor. When the processor executes the computer programs, the electronic device <NUM> in the facial recognition system <NUM> is enabled to perform the above-mentioned facial recognition method.

In one embodiment, the memory <NUM> includes a personnel database, and the personnel database stores original images of a plurality of persons and captured-on-site images of the plurality of persons.

The image processing module <NUM> is configured to extract a facial feature in the facial image, and match the extracted facial feature against the plurality of original images and the plurality of captured-on-site images, separately, to recognize the facial image.

For example, when the facial recognition system <NUM> provided by the present invention is applied to the access control system, the electronic device <NUM> may be a terminal device disposed on the access control system. The terminal device detects passing people in real time, acquires facial images, extracts facial feature and performs the facial recognition on pedestrians to pass through the access control system. When the facial recognition is successful, the terminal device controls a gate to open, and a pedestrian can pass through the gate. When the pedestrian passes through the gate, the gate will automatically close after a period of delay and continue to detect a next pedestrian. When the facial recognition system <NUM> is applied to the access control system, there will be safety risks if the gate opens when the pedestrian is too far away from the gate. For example, other pedestrians enter the gate first. Therefore, the terminal device further needs to detect a distance between the gate and the face, and only when the face is within an appropriate distance range, will the gate be opened allowing the pedestrian to pass through. Optionally, the distance range is set to <NUM> to <NUM> in the present invention. In one embodiment, when the facial recognition system <NUM> is applied to the access control system, the terminal device defines two distance modes including a fast mode and a safe mode, where a distance threshold of the fast mode is greater than a distance threshold of the safe mode. When the fast mode is enabled, it is detected that the distance to the face is less than or equal to the distance threshold of the fast mode, and facial recognition comparison and verification process is started. When the safe mode will be enabled and it is detected that the distance to the face is less than or equal to the distance threshold of the safe mode, the facial recognition comparison verification process will be started.

It is clear to those skilled in the art that for the convenience and simplicity of the description, a specific working process of the above-mentioned facial recognition system <NUM> may refer to a corresponding process in the aforementioned method and will not be repeated herein.

To sum up, in the facial recognition method and the facial recognition system provided by the present invention, the electronic device stores the original images of the plurality of persons and the captured-on-site images of the plurality of persons, the facial image is captured, the facial feature is extracted, and the extracted a facial feature is matched against the plurality of original images and the plurality of captured-on-site images, thus performing the facial recognition on the face. In a case where the comparison between the face and the original image and the comparison between the face and the captured-on-site image are both failed, more refining a facial feature is re-extracted and matched against the plurality of original images in the electronic device, thereby performing the facial recognition on the face again. In this way, a condition without missing matching or false matching in facial recognition may be ensured and accuracy of the face may be effectively guaranteed. At the same time, in the present invention, when the facial image is restored in the database as the new captured-on-site image, the new captured-on-site image may need to be compared and verified multiple times so as to ensure that the new captured-on-site image may have strong adaptability, which may be beneficial to improving the accuracy of facial recognition.

An embodiment of the present invention further provides a computer-readable storage medium configured to store computer-executable instructions for executing the method described above.

Claim 1:
A facial recognition method comprising:
capturing a facial image, extracting a facial feature from the facial image,
matching the facial feature against a plurality of pre-stored original images of a plurality of persons separately to obtain a plurality of first comparison values, and determining a highest comparison value of the plurality of first comparison values as a first required comparison value, wherein a higher first comparison value represents a higher similarity between the facial image and a pre-stored original image; and matching the facial feature against a plurality of pre-stored captured-on-site images of the plurality of persons separately to obtain a plurality of second comparison values, and determining a highest comparison value of the plurality of second comparison values as a second required comparison value, wherein a higher second comparison value represents a higher similarity between the facial feature and a pre-stored captured-on-site image (S11 and S12);
determining whether the first required comparison value and the second required comparison value are greater than or equal to a preset comparison threshold (S13);
in response to determining that the first required comparison value is less than the preset comparison threshold and the second required comparison value is also less than the preset comparison threshold, re-extracting a facial feature from the facial image, matching the re-extracted facial feature against the plurality of original images separately to obtain a plurality of third comparison values, determining a highest comparison value of the plurality of third comparison values as a third required comparison value, wherein a higher third comparison value represents a higher similarity between the facial image and an original image; and determining whether the third required comparison value is greater than or equal to the preset comparison threshold (S14); and
in response to determining that the third required comparison value is greater than or equal to the preset comparison threshold, saving the facial image as a new captured-on-site image, refreshing a number of successful comparisons of the captured-on-site image, and determining that the recognition is successful (S15).