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

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

Info

Publication number
CN111738187A
CN111738187A CN202010601672.3A CN202010601672A CN111738187A CN 111738187 A CN111738187 A CN 111738187A CN 202010601672 A CN202010601672 A CN 202010601672A CN 111738187 A CN111738187 A CN 111738187A
Authority
CN
China
Prior art keywords
face image
face
time
matched
time limit
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
CN202010601672.3A
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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202010601672.3A priority Critical patent/CN111738187A/en
Publication of CN111738187A publication Critical patent/CN111738187A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The embodiment of the invention provides a face recognition method, a face recognition device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a face image to be recognized; comparing the face of the face image to be recognized with a face image to be matched stored in advance, comparing the time of the face image to be recognized with the time limit attribute of the face image to be matched, and determining a face recognition result; and the time limit attribute is used for identifying the effective time limit of the face image to be matched. Because the time comparison can be carried out based on the current time and the preset time limit attribute of the face image to be matched, the overdue face list can be filtered, the overdue face list does not need to be deleted manually, the intelligent degree is improved, and the accuracy of the face recognition result is ensured.

Description

Face recognition method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of intelligent face recognition technologies, and in particular, to a face recognition method, an apparatus, an electronic device, and a storage medium.
Background
In the intelligent recognition technology applying face recognition, a face image and person information of a person are generally required to be obtained in advance, and the face image and the person information are stored. When the face recognition is carried out, the face image is captured in real time, the captured face image is compared with the face image stored in advance, whether a target image matched with the captured face image exists or not is determined, and further whether the face recognition is successful or not is determined. The pre-acquired face image of the person and the person information may be referred to as a face list.
In the existing intelligent identification technology, when the face image of a person and the information of the person are obtained in advance and are overdue, the overdue face list needs to be deleted manually, so that the workload is large and the intelligence is insufficient. If the expired face list is not deleted, the problem of wrong recognition result can be caused.
Disclosure of Invention
The embodiment of the invention aims to provide a face recognition method, a face recognition device, electronic equipment and a storage medium, so as to filter an expired face list in an intelligent recognition technology, improve the intelligence degree and ensure the accuracy of a face recognition result. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a face recognition method, where the method includes:
acquiring a face image to be recognized;
comparing the face of the face image to be recognized with a face image to be matched stored in advance, comparing the time of the face image to be recognized with the time limit attribute of the face image to be matched, and determining a face recognition result;
and the time limit attribute is used for identifying the effective time limit of the face image to be matched.
Optionally, the step of comparing the face of the human face to be recognized with the face image to be matched stored in advance, comparing the time of the human face to be recognized with the time limit attribute of the face image to be matched, and determining the face recognition result includes:
comparing the face image to be recognized with each face image to be matched stored in advance;
if a target face image matched with the face image to be recognized exists, acquiring a preset time limit attribute of the target face image;
and comparing the current time with the acquired time limit attribute to determine a face recognition result.
Optionally, the time limit attribute is a deadline time point;
the step of comparing the current time with the acquired time limit attribute to determine the face recognition result comprises the following steps:
if the cutoff time point is later than the current time, determining the face recognition result as successful recognition;
and if the ending time point is not later than the current time, determining the face recognition result as the recognition failure.
Optionally, the time limit attribute is an effective time period;
the step of comparing the current time with the acquired time limit attribute to determine the face recognition result comprises the following steps:
if the current time belongs to the effective time period, determining the face recognition result as successful recognition;
and if the current time does not belong to the effective time period, determining the face recognition result as recognition failure.
Optionally, the step of comparing the face of the human face to be recognized with the face image to be matched stored in advance, comparing the time of the human face to be recognized with the time limit attribute of the face image to be matched, and determining the face recognition result includes:
acquiring preset time limit attributes of the face images to be matched;
comparing the current time with the acquired time limit attribute, and determining alternative face images meeting the time requirement from the face images to be matched;
comparing the face image to be recognized with the alternative face image;
if a target face image matched with the face image to be recognized exists, determining that the face recognition result is successful;
and if the target face image matched with the face image to be recognized does not exist, determining the face recognition result as recognition failure.
Optionally, the time limit attribute is a deadline time point;
the step of comparing the current time with the acquired time limit attribute and determining the alternative face image meeting the time requirement from each face image to be matched comprises the following steps:
determining an expiration time point later than the current time from the acquired expiration time points;
and determining the face image to be matched corresponding to the determined cut-off time point as a candidate face image meeting the time requirement.
Optionally, the time limit attribute is an effective time period;
the step of comparing the current time with the acquired time limit attribute and determining the alternative face image meeting the time requirement from each face image to be matched comprises the following steps:
determining a valid time period including the current time from the acquired valid time periods;
and determining the face image to be matched corresponding to the determined effective time period as a candidate face image meeting the time requirement.
In a second aspect, an embodiment of the present invention provides a face recognition apparatus, where the apparatus includes:
the image acquisition module is used for acquiring a face image to be recognized;
the face recognition module is used for comparing faces based on the face image to be recognized and a face image to be matched which is stored in advance, comparing time based on the current time and the preset time limit attribute of the face image to be matched, and determining a face recognition result;
and the time limit attribute is used for identifying the effective time limit of the face image to be matched.
Optionally, the face recognition module includes:
the first face comparison unit is used for comparing the face image to be recognized with each pre-stored face image to be matched;
the first time limit attribute acquisition unit is used for acquiring a preset time limit attribute of a target face image if the target face image matched with the face image to be recognized exists;
and the first time comparison unit is used for comparing the current time with the acquired time limit attribute to determine a face recognition result.
Optionally, the time limit attribute is a deadline time point;
the first time alignment unit comprises:
the first comparison subunit is used for determining that the face recognition result is successful if the deadline time point is later than the current time;
and the second comparison subunit is used for determining the face recognition result as the recognition failure if the deadline time point is not later than the current time.
Optionally, the time limit attribute is an effective time period;
the first time alignment unit comprises:
the third ratio pair subunit is used for determining that the face recognition result is successful if the current time belongs to the effective time period;
and the fourth comparison subunit is used for determining that the face recognition result is recognition failure if the current time does not belong to the valid time period.
Optionally, the face recognition module includes:
the second time limit attribute acquisition unit is used for acquiring the preset time limit attribute of each face image to be matched;
the second time comparison unit is used for comparing the current time with the acquired time limit attribute in time and determining alternative face images meeting the time requirement from the face images to be matched;
the second face comparison unit is used for comparing the face image to be recognized with the alternative face image;
the first result determining unit is used for determining the face recognition result as successful recognition if a target face image matched with the face image to be recognized exists;
and the second result determining unit is used for determining the face recognition result as recognition failure if the target face image matched with the face image to be recognized does not exist.
Optionally, the time limit attribute is a deadline time point;
the second time alignment unit includes:
a time point determining subunit configured to determine an expiration time point later than the current time from the acquired expiration time points;
and the first alternative image determining subunit is used for determining the face image to be matched corresponding to the determined cut-off time point as the alternative face image meeting the time requirement.
Optionally, the time limit attribute is an effective time period;
the second time alignment unit includes:
a time period determination subunit operable to determine, from the acquired valid time periods, a valid time period including the current time;
and the second alternative image determining subunit is used for determining the face image to be matched corresponding to the determined effective time period as the alternative face image meeting the time requirement.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any one of the above first aspects.
In the scheme provided by the embodiment of the invention, the electronic equipment can acquire the face image to be recognized, carry out face comparison based on the face image to be recognized and the face image to be matched which is stored in advance, carry out time comparison based on the current time and the preset time limit attribute of the face image to be matched, and determine the face recognition result, wherein the time limit attribute is used for identifying the effective time limit of the face image to be matched. Because the time comparison can be carried out based on the current time and the preset time limit attribute of the face image to be matched, the overdue face list can be filtered, the overdue face list does not need to be deleted manually, the intelligent degree is improved, and the accuracy of the face recognition result is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a face recognition method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the step S102 in the embodiment shown in FIG. 1;
FIG. 3 is another detailed flowchart of step S102 in the embodiment shown in FIG. 1;
FIG. 4 is a flowchart illustrating a specific step S302 in the embodiment shown in FIG. 3;
FIG. 5 is another detailed flowchart of step S302 in the embodiment shown in FIG. 3;
fig. 6 is a schematic structural diagram of a face recognition apparatus according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating a specific structure of the face recognition module 620 in the embodiment shown in fig. 6;
FIG. 8 is a schematic diagram of another specific structure of the face recognition module 620 in the embodiment shown in FIG. 6;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to filter an expired face list, delete the expired face list without manual operation, improve intelligence degree, and ensure accuracy of a face recognition result, embodiments of the present invention provide a face recognition method, an apparatus, an electronic device, and a computer-readable storage medium.
First, a face recognition method provided by an embodiment of the present invention is described below. The face recognition method provided by the embodiment of the invention can be applied to any electronic equipment needing face recognition, for example, a server, a processor and the like, and is not particularly limited herein. For convenience of description, it will be referred to as electronic equipment hereinafter.
As shown in fig. 1, a face recognition method includes:
s101, obtaining a face image to be recognized;
s102, comparing the face of the face image to be recognized with a face image to be matched stored in advance, comparing the time of the face image to be recognized with the time limit attribute of the face image to be matched, and determining a face recognition result.
And the time limit attribute is used for identifying the effective time limit of the face image to be matched.
Therefore, in the scheme provided by the embodiment of the invention, the electronic equipment can acquire the face image to be recognized, perform face comparison based on the face image to be recognized and the face image to be matched stored in advance, perform time comparison based on the current time and the preset time limit attribute of the face image to be matched, and determine the face recognition result, wherein the time limit attribute is used for identifying the effective time limit of the face image to be matched. Because the time comparison can be carried out based on the current time and the preset time limit attribute of the face image to be matched, the overdue face list can be filtered, the overdue face list does not need to be deleted manually, the intelligent degree is improved, and the accuracy of the face recognition result is ensured.
In many intelligent recognition scenes, face recognition is required, for example, school entrance guard, park entrance check, cell resident entrance check, and the like. In these scenes, a face image of a person to be checked needs to be captured.
In one embodiment, when the electronic device is a processor, a server, or other device with an image processing function, the electronic device may be in communication connection with the image acquisition device, so as to obtain a face image captured by the image acquisition device, and use the face image as a face image to be recognized. In one embodiment, when the electronic device has both an image acquisition function and an image processing function, it is reasonable that the electronic device can capture a face image of a person to be checked, and the face image can be used as a face image to be recognized.
In order to filter the expired staff list, a time limit attribute of the facial image to be matched can be preset, wherein the time limit attribute is used for identifying the effective time limit of the facial image to be matched. The face image to be matched is the face image of the person stored in advance. Of course, the time attribute of the face image to be matched is recorded, and meanwhile, the personnel information of the personnel can also be recorded, for example, the personnel information can include information such as names, identification numbers, telephone numbers, positions and the like.
For example, in a school entrance guard application scenario, face images of students and teachers may be collected in advance as face images to be matched, and a time attribute may be set for each face image to be matched. If student A is going to be graduate at 7/15/2020, then the time attribute of the face image a to be matched of student A may be set to be 7/15/2020, for identifying that the face image a to be matched is expired after 15/7/2020.
In this way, in step S102, after the electronic device acquires the face image to be recognized, the electronic device may perform face comparison based on the face image to be recognized and the face image to be matched stored in advance, perform time comparison based on the current time and the time limit attribute of the face image to be matched set in advance, and determine the face recognition result.
Whether the person corresponding to the face image to be recognized is one of the persons corresponding to the face images to be matched which are acquired in advance can be determined through face comparison, and whether the person has identity authority can be determined. The face images to be matched within the effective time limit can be screened out through time comparison, and whether the identity authority of the personnel is overdue or not can be determined, so that filtering of the overdue face list can be achieved based on the face comparison and the time comparison, the overdue face list is not required to be deleted through manual operation, the intelligent degree is improved, and the face recognition result is accurately determined.
As an implementation manner of the embodiment of the present invention, as shown in fig. 2, the step of performing face comparison based on the to-be-recognized face image and a pre-stored to-be-matched face image, and performing time comparison based on the current time and a pre-set time limit attribute of the to-be-matched face image to determine a face recognition result may include:
s201, comparing the face image to be recognized with each pre-stored face image to be matched, and executing S202 if a target face image matched with the face image to be recognized exists; if the target face image matched with the face image to be recognized does not exist, determining the face recognition result as recognition failure;
the electronic device may first perform face comparison on the face image to be recognized and each of the face images to be matched stored in advance, and in one embodiment, the face comparison may be performed by establishing a face model. Specifically, the electronic device may respectively establish a face model for the face image to be recognized and each of the face images to be matched that are stored in advance, and then compare the face model corresponding to the face image to be recognized with the face model corresponding to each of the face images to be matched, and search for the face model with the highest similarity.
If the similarity is higher than a preset threshold value, the face image to be matched corresponding to the face model with the highest similarity can be determined to be the target face image matched with the face image to be recognized. If the similarity is not higher than the preset threshold, it indicates that the image corresponding to the person does not exist in the face image to be matched, and the face recognition result can be determined as the recognition failure.
For example, the electronic device performs face comparison on the face image B to be recognized and each pre-stored face image to be matched, determines that the similarity between the face model corresponding to the face image B to be matched and the face model corresponding to the face image B to be recognized is the highest, and is 96%, and the preset threshold is 80%, and then, since 96% is higher than 80%, it can be determined that the face image B to be matched is the target face image matched with the face image B to be recognized.
S202, acquiring a preset time limit attribute of the target face image;
although the above target face image matches the face image to be recognized, there may be a problem that it is no longer valid for a time limit, so for the electronic device, a time limit attribute of the target face image set in advance may be acquired in order to determine whether it has expired.
In one embodiment, the time limit attribute may be stored in the same storage location as other attribute information such as the person information, so that when the other attribute information of the face image to be matched is obtained, the time limit attribute may be obtained at the same time. Of course, the time attribute may also be stored in other set storage locations, as long as the electronic device can acquire the time attribute when time alignment is required, and is not particularly limited herein.
S203, comparing the current time with the acquired time limit attribute to determine a face recognition result.
After the time attribute of the target face image is acquired, the electronic device may compare the current time with the acquired time limit attribute to determine whether the target face image exceeds the valid time limit.
As can be seen, in this embodiment, the electronic device may perform face comparison on the face image to be recognized and each of the face images to be matched that are stored in advance, acquire a time limit attribute of a preset target face image if a target face image matching the face image to be recognized exists, and then perform time comparison on the current time and the acquired time limit attribute to determine a face recognition result. After the target face image is recognized, the electronic equipment can determine whether the target face image exceeds the valid time limit or not through the time limit attribute of the target face image, and can accurately determine the face recognition result.
As an implementation manner of the embodiment of the present invention, the time limit attribute may be an expiration time point. The deadline time identifies the deadline time of the valid time of the corresponding face image to be matched.
For this case, the step of comparing the current time with the acquired time limit attribute to determine the face recognition result may include:
if the cutoff time point is later than the current time, determining the face recognition result as successful recognition; and if the ending time point is not later than the current time, determining the face recognition result as the recognition failure.
If the deadline time of the target face image is later than the current time, which indicates that the deadline time of the valid time of the target face image is later than the current time, the target face image is valid at the current moment, so that the face recognition result can be determined to be successful.
If the deadline time of the target face image is not later than the current time, which indicates that the deadline time of the valid time of the target face image is not later than the current time, the target face image is invalid at the current time, so that the face recognition result can be determined as the recognition failure.
For example, the person P transacts the entrance ticket monthly card of the scenic spot S at eight points in the 10 morning of 5 month and 10 month in 2020, the term is one month, and the person P enters the scenic spot S by face recognition. When the person P transacts the ticket monthly card, the image acquisition device can acquire the face image and store the face image in a storage location such as a database to serve as the face image C to be matched. And simultaneously recording the time attribute of the face image C to be matched as a cut-off time point: eight am 10 am 6/2020.
Thus, when a person P wants to enter the scenic spot S at a certain time later, if the person P wants to enter the scenic spot S at nine points in the morning of 27.5.2020, the face image of the person P may be collected as the face image to be recognized, and the electronic device may perform face comparison between the face image to be recognized and the stored face image to be matched, and find the face image C to be matched, which is matched with the face image to be recognized, as the target face image.
Further, the electronic device may obtain a time attribute of the face image C to be matched, that is, a cutoff time point: eight am 10 am 6/2020. And then comparing the current time with the cut-off time point, and determining that the face image C to be matched is within the valid time limit because eight points in 10 morning of 6 month and 10 morning of 2020 is later than nine points in 27 morning of 5 month and 27 month of 2020, so that the face identification result is determined to be successful, the entrance ticket month card of the person P can be determined to be valid, and the person P can enter the scenic spot S.
If it is assumed that the person P wants to enter the scenic spot S at 11 am 6/2020, then the person P can be determined that the face image C to be matched is not within the valid time limit because eight am at 10 am 6/2020 is no later than ten am at 11 am 6/2020, and the face identification result is identification failure, so that the ticket month card of the person P can be determined to be invalid, and the person P can be rejected to enter the scenic spot S, or can be reminded to re-handle tickets entering the campus and the like.
As can be seen, in this embodiment, in the case that the time limit attribute is the deadline, the electronic device may quickly and accurately determine whether the face recognition result is a successful recognition according to the morning and evening relationship between the deadline and the current time.
As an implementation manner of the embodiment of the present invention, the time limit attribute may be an effective time period. The valid time period marks the starting time point and the ending time point of the valid time limit of the corresponding face image to be matched.
For this case, the step of comparing the current time with the acquired time limit attribute to determine the face recognition result may include:
if the current time belongs to the effective time period, determining the face recognition result as successful recognition; and if the current time does not belong to the effective time period, determining the face recognition result as recognition failure.
If the current time belongs to the valid time period of the target face image, which indicates that the current time is within the valid time limit of the target face image, the target face image is valid at the current moment, so that the face recognition result can be determined as successful recognition.
If the current time does not belong to the valid time period of the target face image, the current time is not within the valid time limit of the target face image, and the target face image is invalid at the current moment, so that the face recognition result can be determined as the recognition failure.
In an embodiment, the valid time periods may be multiple, and the current time belongs to any valid time period of the target face image, and it may be determined that the face recognition result is successful.
For example, when a student M is about to enter six-year class, and the authority of face recognition entrance guard for entering a school is set for the student M, since one school year includes two school dates, the student M is not allowed to randomly perform the school during the holiday, the image acquisition device acquires the face image of the student M and stores the face image into a storage location such as a database as the face image N to be matched. Meanwhile, the time attribute of the face image N to be matched can be recorded as an effective time period: 1/9/2021/15/2020; 3/1/2021-7/15/2021.
Therefore, when the student M wants to enter the campus at a certain time later, if the student M wants to enter the campus in 11/9/2020, the face image of the student M can be collected and used as the face image to be recognized, the electronic device can compare the face image to be recognized with the stored face image to be matched, and find the face image N to be matched, which is matched with the face image to be recognized, and use the face image N as the target face image.
Further, the electronic device may obtain a time attribute of the face image C to be matched, that is, an effective time period: 1/9/2021/15/2020; 3/1/2021-7/15/2021. And then comparing the current time with the effective time period, wherein 11 and 9 days in 2020 belong to 9 and 1 days in 2020 to 1 and 15 days in 2021 and 1 month in 2020, so that the face image N to be matched can be determined to be within the effective time limit, the face recognition result can be determined to be successful, and the student M can be determined to have the right to enter the campus and can be allowed to enter the campus.
If it is assumed that the student M wants to enter the campus at 2/11/2021, the student M does not belong to the valid period 2020, 9/1/2021, 1/15/2021, or the valid period 2021, 3/1, 7/15/2021, and indicates that the face image N to be matched is not within the valid period, and therefore it can be determined that the face recognition result is a recognition failure, and it can be determined that the student M does not have the right to enter the campus at the present time, and can be rejected to enter the campus.
Therefore, in this embodiment, in the case that the time limit attribute is the valid time period, the electronic device may quickly and accurately determine whether the face recognition result is successfully recognized according to the attribution relationship between the valid time period and the current time. Simultaneously, a plurality of effective time periods can be conveniently set, the application scene is wider, and the intelligent degree of face recognition is further improved.
As an implementation manner of the embodiment of the present invention, as shown in fig. 3, the step of performing face comparison based on the to-be-recognized face image and a pre-stored to-be-matched face image, and performing time comparison based on the current time and a pre-set time limit attribute of the to-be-matched face image to determine a face recognition result may include:
s301, acquiring preset time limit attributes of the face images to be matched;
in this embodiment, the electronic device may first acquire the preset time limit attribute of each face image to be matched, and the specific acquisition mode is the same as the mode of acquiring the time attribute of the target face image, and is not described herein again.
S302, comparing the current time with the acquired time limit attribute, and determining alternative face images meeting the time requirement from the face images to be matched;
after the time limit attribute of each face image to be matched is obtained, the electronic equipment can compare the current time with the obtained time limit attribute to determine the time limit attribute in the effective time limit, and further determine alternative face images corresponding to the time limit attribute in the effective time limit from each face image to be matched, wherein the time attribute of the alternative face images is in accordance with the time requirement.
For example, the number of the face images to be matched is 100, and the electronic device may obtain the time attributes of the 100 face images to be matched, and further compare the time attributes with the current time to determine the candidate face images meeting the time requirement.
S303, comparing the face image to be recognized with the alternative face image, and executing the step S304 if a target face image matched with the face image to be recognized exists; if the target face image matched with the face image to be recognized does not exist, executing step S305;
after the candidate face images are determined, the electronic device may perform face comparison on the face image to be recognized and each candidate face image, so as to determine a target face image matched with the face image to be recognized, where a specific face comparison manner may be any comparison manner in the face recognition field, for example, a comparison manner of similarity of the face model described above may be used, and no specific limitation is made herein.
S304, determining the face recognition result as successful recognition;
s305, determining the face recognition result as a recognition failure.
If the target face image matched with the face image to be recognized exists in the alternative face images, the target face image is shown to meet the requirement of the valid time limit and the requirement of face comparison, and then the face recognition result can be determined to be successful in recognition. If the target face image matched with the face image to be recognized does not exist in the alternative face images, it is indicated that although the alternative images meeting the requirement of the valid time limit exist in the face images to be matched, the target face images meeting the requirement of face comparison do not exist in the alternative images, and then the face recognition result can be determined as the recognition failure.
Therefore, in this embodiment, the electronic device may obtain a preset time limit attribute of each face image to be matched, perform time comparison between the current time and the obtained time limit attribute, determine an alternative face image meeting the time requirement from each face image to be matched, perform face comparison between the face image to be recognized and the alternative face image, and further determine whether the face recognition result is successful, so that the alternative face image meeting the time requirement may be screened out first, and then perform face comparison, which may reduce the number of images that need face comparison while ensuring to obtain a correct face recognition result, and improve face recognition efficiency.
As an implementation manner of the embodiment of the present invention, the time limit attribute may be an expiration time point. The deadline time identifies the deadline time of the valid time of the corresponding face image to be matched.
For such a case, as shown in fig. 4, the step of comparing the current time with the obtained time limit attribute to determine the candidate face image meeting the time requirement from each of the face images to be matched may include:
s401, determining a deadline time point later than the current time from the acquired deadline time points;
after the electronic device acquires the deadline time point of each face image to be matched, the electronic device can determine the deadline time point later than the current time from the images to be matched, because the face images to be matched corresponding to the deadline time point later than the current time point are unexpired images.
For example, if the current time is 15 o 'clock and 7 o' clock at 5/11/2020, the electronic device may determine the deadline time that is 7 o 'clock later than 15 o' clock at 5/11/2020 from the acquired deadline time.
S402, determining the face image to be matched corresponding to the determined cut-off time point as a candidate face image meeting the time requirement.
After the ending time point later than the current time is determined, the electronic equipment can determine the face image to be matched corresponding to the determined ending time point as the alternative face image meeting the time requirement. For example, the face images to be matched corresponding to the determined cut-off time point are the face image to be matched T1, the face image to be matched T2, the face image to be matched T3 and the face image to be matched T9, respectively, and then the face image to be matched T1, the face image to be matched T2, the face image to be matched T3 and the face image to be matched T9 may be determined as candidate face images meeting the time requirement.
Therefore, in this embodiment, in the case that the time limit attribute is the deadline, the electronic device may quickly and accurately determine the candidate face image meeting the time requirement according to the morning and evening relationship between the deadline and the current time.
As an implementation manner of the embodiment of the present invention, the time limit attribute may be an effective time period. The valid time period marks the starting time point and the ending time point of the valid time limit of the corresponding face image to be matched.
For such a case, as shown in fig. 5, the step of comparing the current time with the obtained time limit attribute to determine the candidate face image meeting the time requirement from each of the face images to be matched may include:
s501, determining an effective time period including the current time from the acquired effective time periods;
after the electronic device acquires the valid time period of each face image to be matched, the electronic device can determine the valid time period including the current time from the valid time period including the current time because the face image to be matched corresponding to the valid time period is an unexpired image. For example, if the current time is 15 o 'clock and 7 o' clock at 5/11/2020, the electronic device may determine the valid time period including 7 o 'clock at 15 o' clock at 11/5/2020.
In one embodiment, if the valid time periods of the face images to be matched are multiple, only one valid time period includes the current time. For example, the current time is 5/11/15/7 in 2020, and the effective time period of the face image L to be matched is: 9 o' clock 10 points in 5 month and 5 days in 2020 to 10 points in 5 month and 15 days in 2020; 8 o 'clock in 17/5/2020-10 o' clock in 5/2020. Then it can be determined that the valid period of the face image L to be matched includes the current time since the valid period includes the current time at 9 o 'clock at 5 month 5/2020 and at 10 o' clock at 15 month 5/2020 and at 19 o 'clock at 10 o' clock.
And S502, determining the face image to be matched corresponding to the determined effective time period as a candidate face image meeting the time requirement.
After the valid time period including the current time is determined, the electronic device may determine the face image to be matched corresponding to the determined valid time period as the candidate face image meeting the time requirement. For example, the face images to be matched corresponding to the determined valid time periods are the face image to be matched T11, the face image to be matched T12, the face image to be matched T13 and the face image to be matched T19, respectively, and then the face image to be matched T11, the face image to be matched T12, the face image to be matched T13 and the face image to be matched T19 may be determined to be candidate face images meeting the time requirement.
Therefore, in this embodiment, in the case that the time limit attribute is the valid time period, the electronic device may quickly and accurately determine the candidate face image according to the attribution relationship between the valid time period and the current time.
The embodiment of the invention provides a face recognition device corresponding to the face recognition method. A face recognition apparatus according to an embodiment of the present invention is described below.
As shown in fig. 6, a face recognition apparatus, the apparatus comprising:
the image acquisition module 610 is used for acquiring a face image to be recognized;
the face recognition module 620 is configured to perform face comparison based on the to-be-recognized face image and a pre-stored to-be-matched face image, perform time comparison based on current time and a preset time limit attribute of the to-be-matched face image, and determine a face recognition result;
and the time limit attribute is used for identifying the effective time limit of the face image to be matched.
Therefore, in the scheme provided by the embodiment of the invention, the electronic equipment can acquire the face image to be recognized, perform face comparison based on the face image to be recognized and the face image to be matched stored in advance, perform time comparison based on the current time and the preset time limit attribute of the face image to be matched, and determine the face recognition result, wherein the time limit attribute is used for identifying the effective time limit of the face image to be matched. Because the time comparison can be carried out based on the current time and the preset time limit attribute of the face image to be matched, the overdue face list can be filtered, the overdue face list does not need to be deleted manually, the intelligent degree is improved, and the accuracy of the face recognition result is ensured.
As an implementation manner of the embodiment of the present invention, as shown in fig. 7, the face recognition module 620 may include:
the first face comparison unit 621 is configured to perform face comparison on the face image to be recognized and each pre-stored face image to be matched;
a first time limit attribute obtaining unit 622, configured to, if there is a target face image that matches the face image to be recognized, obtain a preset time limit attribute of the target face image;
a first time comparison unit 623, configured to compare the current time with the obtained time limit attribute to determine a face recognition result.
As an implementation manner of the embodiment of the present invention, the time limit attribute may be a deadline;
the first time alignment unit may include:
the first comparison subunit is used for determining that the face recognition result is successful if the deadline time point is later than the current time;
and the second comparison subunit is used for determining the face recognition result as the recognition failure if the deadline time point is not later than the current time.
As an implementation manner of the embodiment of the present invention, the time limit attribute may be an effective time period;
the first time alignment unit may include:
the third ratio pair subunit is used for determining that the face recognition result is successful if the current time belongs to the effective time period;
and the fourth comparison subunit is used for determining that the face recognition result is recognition failure if the current time does not belong to the valid time period.
As an implementation manner of the embodiment of the present invention, as shown in fig. 8, the face recognition module 620 may include:
a second time limit attribute obtaining unit 624, configured to obtain a preset time limit attribute of each to-be-matched face image;
a second time comparison unit 625, configured to perform time comparison between the current time and the obtained time limit attribute, and determine, from each to-be-matched face image, a candidate face image meeting the time requirement;
a second face comparing unit 626, configured to perform face comparison on the to-be-recognized face image and the candidate face image;
a first result determining unit 627, configured to determine that a face recognition result is successful if a target face image matching the face image to be recognized exists;
a second result determining unit 628, configured to determine that the face recognition result is a recognition failure if there is no target face image matching the face image to be recognized.
As an implementation manner of the embodiment of the present invention, the time limit attribute may be a deadline;
the second time comparison unit includes:
a time point determining subunit configured to determine an expiration time point later than the current time from the acquired expiration time points;
and the first alternative image determining subunit is used for determining the face image to be matched corresponding to the determined cut-off time point as the alternative face image meeting the time requirement.
As an implementation manner of the embodiment of the present invention, the time limit attribute may be an effective time period;
the second time alignment unit may include:
a time period determination subunit operable to determine, from the acquired valid time periods, a valid time period including the current time;
and the second alternative image determining subunit is used for determining the face image to be matched corresponding to the determined effective time period as the alternative face image meeting the time requirement.
An embodiment of the present invention further provides an electronic device, as shown in fig. 9, the electronic device may include a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the steps of the face recognition method according to any of the above embodiments when executing the program stored in the memory 903.
Therefore, in the scheme provided by the embodiment of the invention, the electronic equipment can acquire the face image to be recognized, perform face comparison based on the face image to be recognized and the face image to be matched stored in advance, perform time comparison based on the current time and the preset time limit attribute of the face image to be matched, and determine the face recognition result, wherein the time limit attribute is used for identifying the effective time limit of the face image to be matched. Because the time comparison can be carried out based on the current time and the preset time limit attribute of the face image to be matched, the overdue face list can be filtered, the overdue face list does not need to be deleted manually, the intelligent degree is improved, and the accuracy of the face recognition result is ensured.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the face recognition method according to any of the above embodiments are implemented.
In the scheme provided by the embodiment of the invention, when being executed by the processor, the computer program can acquire the face image to be recognized, perform face comparison based on the face image to be recognized and the face image to be matched which is stored in advance, perform time comparison based on the current time and the preset time limit attribute of the face image to be matched, and determine the face recognition result, wherein the time limit attribute is used for identifying the effective time limit of the face image to be matched. Because the time comparison can be carried out based on the current time and the preset time limit attribute of the face image to be matched, the overdue face list can be filtered, the overdue face list does not need to be deleted manually, the intelligent degree is improved, and the accuracy of the face recognition result is ensured.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the electronic device, and the computer-readable storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A face recognition method, comprising:
acquiring a face image to be recognized;
comparing the face of the face image to be recognized with a face image to be matched stored in advance, comparing the time of the face image to be recognized with the time limit attribute of the face image to be matched, and determining a face recognition result;
and the time limit attribute is used for identifying the effective time limit of the face image to be matched.
2. The method according to claim 1, wherein the step of comparing the face based on the face image to be recognized with the face image to be matched stored in advance, and comparing the time based on the current time and the time limit attribute of the face image to be matched set in advance to determine the face recognition result comprises:
comparing the face image to be recognized with each face image to be matched stored in advance;
if a target face image matched with the face image to be recognized exists, acquiring a preset time limit attribute of the target face image;
and comparing the current time with the acquired time limit attribute to determine a face recognition result.
3. The method of claim 2, wherein the time limit attribute is an expiration time point;
the step of comparing the current time with the acquired time limit attribute to determine the face recognition result comprises the following steps:
if the cutoff time point is later than the current time, determining the face recognition result as successful recognition;
and if the ending time point is not later than the current time, determining the face recognition result as the recognition failure.
4. The method of claim 2, wherein the time limit attribute is a valid time period;
the step of comparing the current time with the acquired time limit attribute to determine the face recognition result comprises the following steps:
if the current time belongs to the effective time period, determining the face recognition result as successful recognition;
and if the current time does not belong to the effective time period, determining the face recognition result as recognition failure.
5. The method according to claim 1, wherein the step of comparing the face based on the face image to be recognized with the face image to be matched stored in advance, and comparing the time based on the current time and the time limit attribute of the face image to be matched set in advance to determine the face recognition result comprises:
acquiring preset time limit attributes of the face images to be matched;
comparing the current time with the acquired time limit attribute, and determining alternative face images meeting the time requirement from the face images to be matched;
comparing the face image to be recognized with the alternative face image;
if a target face image matched with the face image to be recognized exists, determining that the face recognition result is successful;
and if the target face image matched with the face image to be recognized does not exist, determining the face recognition result as recognition failure.
6. The method of claim 5, wherein the time limit attribute is an expiration time point;
the step of comparing the current time with the acquired time limit attribute and determining the alternative face image meeting the time requirement from each face image to be matched comprises the following steps:
determining an expiration time point later than the current time from the acquired expiration time points;
and determining the face image to be matched corresponding to the determined cut-off time point as a candidate face image meeting the time requirement.
7. The method of claim 5, wherein the time limit attribute is a valid time period;
the step of comparing the current time with the acquired time limit attribute and determining the alternative face image meeting the time requirement from each face image to be matched comprises the following steps:
determining a valid time period including the current time from the acquired valid time periods;
and determining the face image to be matched corresponding to the determined effective time period as a candidate face image meeting the time requirement.
8. An apparatus for face recognition, the apparatus comprising:
the image acquisition module is used for acquiring a face image to be recognized;
the face recognition module is used for comparing faces based on the face image to be recognized and a face image to be matched which is stored in advance, comparing time based on the current time and the preset time limit attribute of the face image to be matched, and determining a face recognition result;
and the time limit attribute is used for identifying the effective time limit of the face image to be matched.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202010601672.3A 2020-06-28 2020-06-28 Face recognition method and device, electronic equipment and storage medium Pending CN111738187A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010601672.3A CN111738187A (en) 2020-06-28 2020-06-28 Face recognition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010601672.3A CN111738187A (en) 2020-06-28 2020-06-28 Face recognition method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111738187A true CN111738187A (en) 2020-10-02

Family

ID=72651530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010601672.3A Pending CN111738187A (en) 2020-06-28 2020-06-28 Face recognition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111738187A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117523631A (en) * 2023-11-08 2024-02-06 北京京能招标集采中心有限责任公司 Image-based bid evaluation room early warning method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107833285A (en) * 2017-11-21 2018-03-23 李新跃 Real name ticketing and ticket-checking system and method based on recognition of face
CN108109080A (en) * 2017-12-29 2018-06-01 深圳春沐源控股有限公司 Hotel occupancy method and device self-service moves in machine and computer readable storage medium
CN110738779A (en) * 2019-10-25 2020-01-31 上海燕汐软件信息科技有限公司 personnel trajectory detection method, system and device
CN111161430A (en) * 2019-12-25 2020-05-15 杭州中威电子股份有限公司 Real-name self-service ticket selling and checking integrated device and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107833285A (en) * 2017-11-21 2018-03-23 李新跃 Real name ticketing and ticket-checking system and method based on recognition of face
CN108109080A (en) * 2017-12-29 2018-06-01 深圳春沐源控股有限公司 Hotel occupancy method and device self-service moves in machine and computer readable storage medium
CN110738779A (en) * 2019-10-25 2020-01-31 上海燕汐软件信息科技有限公司 personnel trajectory detection method, system and device
CN111161430A (en) * 2019-12-25 2020-05-15 杭州中威电子股份有限公司 Real-name self-service ticket selling and checking integrated device and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117523631A (en) * 2023-11-08 2024-02-06 北京京能招标集采中心有限责任公司 Image-based bid evaluation room early warning method
CN117523631B (en) * 2023-11-08 2024-06-25 北京京能招标集采中心有限责任公司 Image-based bid evaluation room early warning method

Similar Documents

Publication Publication Date Title
CN109920174B (en) Book borrowing method and device, electronic equipment and storage medium
CN108446681B (en) Pedestrian analysis method, device, terminal and storage medium
CN110738779A (en) personnel trajectory detection method, system and device
CN110136286B (en) Attendance checking method and device based on mobile terminal, computer equipment and storage medium
CN110110325B (en) Repeated case searching method and device and computer readable storage medium
CN108388831A (en) A kind of identification of spare part and finish message method and device
CN107346410B (en) Picture processing method and device
CN111563105A (en) Sleep management method and device, electronic equipment and storage medium
CN111738187A (en) Face recognition method and device, electronic equipment and storage medium
CN111104542A (en) Part identification management method and device
CN113077018A (en) Target object identification method and device, storage medium and electronic device
CN110827430A (en) Attendance checking method, device, equipment and computer readable storage medium
CN110457332B (en) Information processing method and related equipment
CN111754655A (en) Regional access management method, system and computer readable storage medium
WO2021104126A1 (en) User verification method and apparatus, electronic device and computer-readable medium
CN111696220A (en) Sign-in method and device
CN110956559A (en) Order processing method, authority verification method, device, equipment and storage medium
CN114792451B (en) Information processing method, device, and storage medium
CN116595397A (en) Identity recognition method and device based on network fingerprint
JP2011248754A (en) System and method for automatically collecting person information, and program thereof
CN112825083B (en) Method, device and equipment for constructing group relation network and readable storage medium
CN117095466B (en) Image recognition-based job submitting method, device, medium and computing equipment
CN114666142A (en) Object authentication method, device and system
CN112000293B (en) Monitoring data storage method, device, equipment and storage medium based on big data
CN115050084B (en) Airport rapid identity retrieval method and system based on face feature abstract

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