CN115880761B - Face recognition method, system, storage medium and application based on policy optimization - Google Patents

Face recognition method, system, storage medium and application based on policy optimization Download PDF

Info

Publication number
CN115880761B
CN115880761B CN202310087360.9A CN202310087360A CN115880761B CN 115880761 B CN115880761 B CN 115880761B CN 202310087360 A CN202310087360 A CN 202310087360A CN 115880761 B CN115880761 B CN 115880761B
Authority
CN
China
Prior art keywords
face
library
recognized
similarity
images
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.)
Active
Application number
CN202310087360.9A
Other languages
Chinese (zh)
Other versions
CN115880761A (en
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.)
Data Space Research Institute
Original Assignee
Data Space Research Institute
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 Data Space Research Institute filed Critical Data Space Research Institute
Priority to CN202310087360.9A priority Critical patent/CN115880761B/en
Publication of CN115880761A publication Critical patent/CN115880761A/en
Application granted granted Critical
Publication of CN115880761B publication Critical patent/CN115880761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Collating Specific Patterns (AREA)

Abstract

The invention relates to the technical field of face recognition, in particular to a face recognition method, a face recognition system, a face recognition storage medium and application based on policy optimization. According to the face recognition method provided by the invention, each person stores a plurality of face images in the face library, the faces to be recognized are compared with the face images in the face library by combining strategy optimization, the reference images with low similarity are firstly removed according to the similarity between the faces to be recognized and the reference images, and then the faces are further recognized by the weight, namely the number of the reference images with high similarity and corresponding to the same person in the face library. The invention can effectively avoid the situation that the face to be recognized is recognized as other people in the face library, and can greatly reduce the false recognition rate of the face while ensuring the accuracy of face recognition.

Description

Face recognition method, system, storage medium and application based on policy optimization
Technical Field
The invention relates to the technical field of face recognition, in particular to a face recognition method, a face recognition system, a face recognition storage medium and application based on policy optimization.
Background
Face recognition is an indispensable technical means in the monitoring field, and the current face recognition adopts a mode of comparing with a face image with a known identity pre-stored in a face library.
Machine learning is a common technical means for face recognition, and generally, a face image to be recognized is compared with all face images in a face library, where each person in the face library corresponds to one face image, so as to determine whether the person is a person in the face library. The comparison mode has less face data information contained in each person, and is easy to confuse. In addition, for the occasion of personnel gathering, for example, class student scenes, more face information exists in the camera picture, and more similar faces exist in face images in a face library, especially certain schools require unified hairstyle clothes of students, face recognition is carried out on the face images in the camera picture at the moment, and the situation of face misidentification is more likely to occur when the face images in the camera picture are compared with the face images in the face library in identity.
Disclosure of Invention
In order to solve the defects that the false face recognition or the large face recognition calculation amount easily occurs in the prior art, the invention provides a face recognition method based on strategy optimization, wherein more face data information of each person is indirectly provided by increasing the number of face images of each person in a face library in the face recognition, the strategy optimization is performed by using the information, and the false face recognition rate is reduced on the premise of ensuring the accurate face recognition.
The invention provides a face recognition method based on strategy optimization, which comprises the steps of firstly setting a maximum similarity threshold valueTh max Setting valueKMinimum similarity thresholdTh min Threshold of numberL min And a weight thresholdP min The method comprises the steps of carrying out a first treatment on the surface of the Then obtaining the similarity between the face to be recognized and each reference image pre-stored in the constructed face library, wherein the reference images are face images;
if the maximum value in the similaritySim max Greater than or equal toTh max Judging the face to be recognizedSim max The corresponding reference images are the same person;
if it isSim max Less thanTh max Judging whether the human face library has the human being meeting the following condition 1-2;
condition 1: selecting K reference images according to the sequence of the similarity from large to small, wherein the selected reference images are not less thanL min The corresponding similarity is greater than or equal toTh min
Condition 2: in the selected reference images, the similarity corresponding to the same person is greater than or equal toTh min The number of reference images of (a) is recorded as the weight corresponding to the person, and at least one reference image not smaller thanP min Weights of (2);
and if the person meeting the condition 1-2 exists, judging that the face to be recognized is the person corresponding to the maximum weight.
Preferably, the method comprises the following steps:
s1, acquiring a face library, wherein the face library is stored withTThe face image is used as a reference image,Tzhang Canzhao image is assigned toSSets of face images, each set of face images including a corresponding personNA Zhang Canzhao image of the object,T=S×NS≥2N ≥2
s2, acquiring a face to be recognized, calculating the similarity between the face to be recognized and each reference image in a face library, and acquiring the maximum value in the similaritySim max The corresponding reference image is taken as a first candidate object;
s3, judgingSim max Whether greater than or equal to a set maximum similarity thresholdTh max The method comprises the steps of carrying out a first treatment on the surface of the If yes, judging that the face to be recognized corresponds to the same person with the first alternative image; if not, executing the following step S4;
s4, selecting according to the sequence from high to low of similarity with the face to be identifiedKZhang Canzhao image as a second candidate;N≤K<2Nthe method comprises the steps of carrying out a first treatment on the surface of the Acquiring a minimum similarity threshold value with similarity to a face to be identified larger than a set minimum similarity threshold valueTh min As a third candidate object, counting the number of the third candidate objectsLTh min <Th max
S5, judgingLWhether greater than or equal to a set quantity thresholdL min [N/2]<L min ≤N[N/2]Representation pairN/2, taking an integer part; if not, judging that the face to be recognized does not exist in the face libraryIn (a) and (b); if yes, executing the following step S6;
s6, acquiring persons corresponding to the third candidate objects as objects to be matched, and taking the number of the third candidate objects corresponding to the objects to be matched as the weight of the objects to be matched;
s7, judging whether the maximum weight is greater than or equal to a set weight threshold valueP min [N/2]<P min ≤NThe method comprises the steps of carrying out a first treatment on the surface of the If yes, judging that the face to be recognized is the object to be matched corresponding to the maximum weight; and if not, judging that the face to be recognized does not exist in the face library.
Preferably, in S4,N≤K<N+2。
preferably, in the step S2, the similarity between the face to be recognized and the reference image is obtained through a face recognition model; the face recognition model is a neural network model obtained by learning a manual labeling sample; the input of the face recognition model is the face to be recognized and the reference images, and the output of the face recognition model is the similarity of the face to be recognized and each reference image.
Preferably, the face recognition model comprises a feature extraction module and a feature comparison module; the input of the feature extraction module is the input of the face recognition model, and the output of the feature extraction module is the input of the feature comparison module; the output of the feature comparison module is the output of the face recognition model; the feature extraction module adopts a neural network and is used for extracting features of the face to be identified and the reference image; the feature comparison module calculates the similarity between the face to be recognized and the reference image based on the features extracted by the feature extraction module.
The invention also provides a face recognition system, which realizes face recognition based on policy optimization and face similarity calculation, and has high accuracy and small calculated amount.
The face recognition system provided by the invention comprises: face library, image acquisition module, similarity calculation module and face comparison module
A plurality of face images serving as reference images are stored in the face library corresponding to different people;
the image acquisition module is used for acquiring a face to be identified;
the similarity calculation module is respectively connected with the face library and the image acquisition module and is used for calculating the similarity between the face to be recognized and each reference image;
the face comparison module is respectively connected with the similarity calculation module and the face library, and a maximum similarity threshold value is preset in the face comparison moduleTh max Setting valueKMinimum similarity thresholdTh min Threshold of numberL min And a weight thresholdP min
The face comparison module is used for comparing the maximum value in the similaritySim max And a maximum similarity thresholdTh max The method comprises the steps of carrying out a first treatment on the surface of the When (when)Sim max ≥Th max Face comparison module judges face to be recognizedSim max The corresponding reference images are the same person; when (when)Sim max <Th max The face comparison module judges whether the face to be recognized meets the following conditions 1-2;
condition 1: selecting K reference images according to the sequence of the similarity from large to small, wherein the selected reference images are not less thanL min The corresponding similarity is greater than or equal toTh min
Condition 2: in the selected reference images, the similarity corresponding to the same person is greater than or equal toTh min The number of reference images of (a) is recorded as the weight corresponding to the person, and at least one reference image not smaller thanP min Weights of (2);
the face comparison module is used for acquiring a person corresponding to the maximum weight as a recognition result of the face to be recognized when the condition 1-2 is met; otherwise, the face comparison module judges that the face to be recognized does not exist in the face library.
The invention also provides a face recognition system and a storage medium, which are used for bearing the face recognition method based on policy optimization.
The invention provides a face recognition system, which comprises a memory and a processor, wherein the memory stores a computer program, the processor is connected with the memory, and the processor is used for executing the computer program so as to realize the face recognition method based on policy optimization.
The storage medium is stored with a computer program, and the computer program is used for realizing the face recognition method based on policy optimization when being executed.
The invention also provides application of the face recognition method based on the policy optimization in various occasions so as to popularize the face recognition method based on the policy optimization.
The invention provides an application of a face recognition method based on policy optimization, which is used for realizing an access control management method based on face recognition, and the access control management method comprises the following steps:
SA1, constructing a face library, storing face images of all licensees in the face library, wherein the number of the face images corresponding to each licensee in the face library is equal;
SA2, acquiring a face image of a person to be identified as a face to be identified, executing the face identification method based on strategy optimization, and judging whether the face to be identified exists in a face library; if yes, opening the door control; if not, the entrance guard is not opened.
The application of the face recognition method based on policy optimization provided by the invention is used for realizing a sign-in statistical method based on face recognition, and the sign-in statistical method comprises the following steps:
SB1, constructing a face library, storing face images of all the field-oriented persons in the face library, wherein the number of the face images corresponding to each field-oriented person in the face library is equal;
SB2, obtaining face images of all present people as faces to be recognized, executing the face recognition method based on strategy optimization aiming at each face to be recognized, and judging whether the faces to be recognized exist in a face library; and counting the number of all faces to be recognized existing in the face library as the actual number of the people who arrive at the scene.
Preferably, in SB1, each face in the face library is labeled with a corresponding person; the SB1 also comprises a check-in table, wherein the statistics personnel in the check-in table are in one-to-one correspondence with the people in the face library, and the initial states of all the people in the check-in table are all non-check-in states; and in SB2, judging whether the face to be recognized exists in a face library by executing the face recognition method based on the strategy optimization, and when the face to be recognized exists in the face library, modifying the state of the person corresponding to the face to be recognized into a sign-in state in a sign-in table.
The invention provides an application of a face recognition method based on policy optimization, which is used for realizing a class attendance method based on face recognition, and the class attendance method comprises the following steps:
SC1, constructing a student library corresponding to different labels, wherein face images of students applied to a scene under the corresponding labels are stored in the student library;
SC2, selecting a student library as a face library one by one, acquiring face images of all present people as faces to be identified, executing the face identification method based on strategy optimization aiming at each face to be identified, and judging whether the faces to be identified exist in the face library; counting the number of all faces to be recognized existing in a face library as the actual number of people on the scene;
SC3, obtaining the corresponding actual number of the present persons of each student library, and taking the student library with the largest corresponding actual number of the present persons as a target library; and calculating the ratio of the actual number of the present people corresponding to the target library to the total number of the target library as the class attendance rate.
The invention has the advantages that:
(1) The invention provides a face recognition method based on strategy optimization, wherein each person stores a plurality of face images in a face library, reference images with low similarity are firstly removed according to the similarity between the face to be recognized and each reference image, and then the faces are further recognized by the weight, namely the number of the reference images with high similarity and corresponding to the same person in the face library. The invention can effectively avoid the situation that the face to be recognized is recognized as other people in the face library, and ensures the accuracy of face recognition; the number of face images required for comparison is greatly reduced, the number of face images in a face library and the data comparison workload are reduced, the face recognition efficiency and accuracy are greatly improved, and the face false recognition rate can be greatly reduced.
(2) The method and the device define the number of the second alternative objects, combine the number and the similarity to define the selection range of the third alternative objects, are favorable for avoiding the possibility of occurrence of a plurality of maximum weights caused by the large number of the third alternative objects, ensure the uniqueness of the finally obtained maximum weights, namely ensure that when the similarity between the face to be identified and the face images in the face library does not reach the maximum similarity threshold value, the number of the face images, namely the weights of the faces in the face library, of which the similarity between the faces to be identified and the face to be identified reaches the minimum similarity threshold value is obviously layered through policy optimization, so that the face images to be identified can be accurately identified according to the weights.
(3) In the invention, the setting is thatN≤K<N+2,[N/2]<L min ≤N,[N/2]<P min ≤NThe uniqueness of the maximum weight is further ensured.
(4) According to the invention, the similarity between the face to be identified and the reference image is obtained through the face identification model based on the neural network, and the neural network is combined with the strategy optimization, so that the face identification accuracy is ensured, and the data support required by the data network model is reduced. In the invention, the face recognition model comprises the feature extraction module and the feature comparison module, the feature extraction module is used for extracting image features, and the feature comparison module can calculate the similarity by adopting any existing feature comparison method such as space distance and the like according to the extracted features, so that the structure of the face recognition model can be flexibly adjusted according to the application situation requirements, and the corresponding technical purpose is met.
(5) The face recognition system and the storage medium provided by the invention provide a carrier for the face recognition method based on the strategy optimization, so that the face recognition method based on the strategy optimization can be further popularized.
(6) The invention also provides application of the face recognition method based on the strategy optimization, the face recognition method based on the strategy optimization can be applied to scenes such as entrance guard management, field sign-in and the like, and the face images acquired by the field cameras are compared with the face images in the face library through the face recognition method based on the strategy optimization, so that intelligent entrance guard management and field sign-in are realized, data support required by an entrance guard management system and a sign-in system is reduced, and the conditions such as sign-in the scene are solved. The face recognition method based on policy optimization is applied to the check-in scene, can accurately identify the person in the scene based on the face library in the occasion of people gathering, avoids the interference of other people on the check-in system, and realizes accurate intelligent check-in.
(7) The application of the face recognition method based on the strategy optimization provided by the invention can be used for attendance checking in lessons, and the student library corresponding to the lessons can be selected as the face library by comparing face recognition with the superposition number under the condition that the lessons are unknown, and then the attendance checking rate is counted according to the superposition rate of the on-site face and the face library. Therefore, the invention realizes the class attendance statistics suitable for the class in the class flow management state.
Drawings
Fig. 1 is a flowchart of a face recognition method based on policy optimization according to the present invention;
fig. 2 is an application flowchart of a first face recognition method based on policy optimization according to the present invention;
fig. 3 is an application flowchart of a second face recognition method based on policy optimization according to the present invention;
fig. 4 is an application flowchart of a third face recognition method based on policy optimization according to the present invention.
Detailed Description
Face recognition method based on strategy optimization
Referring to fig. 1, a face recognition method based on policy optimization according to the present embodiment includes the following steps S1 to S7.
S1, acquiring a face library, wherein the face library is stored withTThe face image is used as a reference image,Tzhang Canzhao image is assigned toSSets of face images, each set of face images including a corresponding personNA Zhang Canzhao image of the object,T=S×NS≥2N ≥2. Namely, the face library comprisesSIndividuals each having stored thereinNFace images are presented for comparison.
In this step, the face database is setSThe collection of individuals isPid
Pid={Pid 1 ,Pid 2 ,…,Pid s ,…,Pid S }
Pid s Representing the first in the face librarysIdentity of person, 1≤s≤S
S2, acquiring a face to be recognized, calculating the similarity between the face to be recognized and each reference image in a face library, and acquiring the maximum value in the similaritySim max The corresponding reference image is taken as a first candidate object. In specific implementation, any existing face recognition algorithm can be adopted in the step to calculate the similarity between the face to be recognized and the reference image.
Similarity set of face to be identified and each reference image obtained in the stepSimThe method comprises the following steps:
Sim={Sim 1 ,Sim 2 ,…,Sim t ,…,Sim T }
Sim t representing the first face in the face library to be identifiedtSimilarity of sheet reference image, 1≤t≤T
Sim max =max{Sim 1 ,Sim 2 ,…,Sim t ,…,Sim T }
max{ } means taking the maximum value.
S3, judgingSim max Whether greater than or equal to a set maximum similarity thresholdTh max The method comprises the steps of carrying out a first treatment on the surface of the If yes, judging the person to be identifiedThe face corresponds to the same person as the first alternative image; if not, the following step S4 is performed. That is, the first candidate object is made to correspond to the personPid max Pid max ∈PidThe method comprises the steps of carrying out a first treatment on the surface of the The face to be recognized isPid max
S4, selecting according to the sequence from high to low of similarity with the face to be identifiedKZhang Canzhao image as a second candidate;N≤K<2Nthe method comprises the steps of carrying out a first treatment on the surface of the Obtaining that the similarity with the face to be identified is larger than a minimum similarity threshold valueTh min As a third candidate object, counting the number of the third candidate objectsLTh min <Th max
Order theSim 1 ≥Sim 2 ≥…≥Sim t ≥…≥Sim T Then the similarity set corresponding to the second candidate objectSimKThe method comprises the following steps:SimK={Sim 1 ,Sim 2 ,…,Sim k ,…,Sim K },K<T
similarity set corresponding to third candidate objectSimLThe method comprises the following steps:
SimL={Sim 1 ,Sim 2 ,…,Sim l ,…,Sim L },L≤K
Sim L ≥Th min and (2) andSim L+1 <Th min or alternativelyL=K。
S5, judgingLWhether greater than or equal to a set quantity thresholdL min [N/2]<L min ≤NThe method comprises the steps of carrying out a first treatment on the surface of the If not, judging that the face to be recognized does not exist in the face library; if yes, the following step S6 is performed.
[N/2]Representation pairN/2 integer parts, i.eNIn the case of an even number of the number,[N/2]=N/2;Nwhen it is odd[N/2]=(N-1)/2。
S6, acquiring persons corresponding to the third candidate objects as objects to be matched, and taking the number of the third candidate objects corresponding to the objects to be matched as the weight of the objects to be matched.
S7, judging whether the maximum weight is greater than or equal to a set weight threshold valueP min [N/2]<P min ≤NThe method comprises the steps of carrying out a first treatment on the surface of the If yes, judging that the face to be recognized is the object to be matched corresponding to the maximum weight; and if not, judging that the face to be recognized does not exist in the face library.
In the present embodiment, ifNThe larger the value is, the smaller the weight equal probability of the plurality of objects to be matched appears in S7. In the concrete implementation, ifNThe value is smaller, can passKThe setting of the value ensures the uniqueness of the maximum weight, and can be specifically setN≤K< N+2。
The embodiment also provides a method for obtaining the similarity between the face to be identified and the reference image through the neural network model. Specifically, in this embodiment, a neural network model is trained by using a manual labeling sample as a face recognition model, the input of the neural network model is a face to be recognized and reference images, and the output of the neural network model is the similarity between the face to be recognized and each reference image; the manually marked sample can be recorded as(X,Y)
X={x;(x1,x2,x3,…,xi,…,xI)}
Y={y1,y2,y3,…,yi,…,yI}
xIn order for a face to be identified,xirepresenting the first of the known identitiesiThe image of the human face is displayed,yirepresenting face imagesxiAnd the face to be recognizedxIs a similarity of (3).
The neural network model specifically adopted in the embodiment comprises a feature extraction module and a feature comparison module, wherein the input of the feature extraction module is the input of the neural network model, and the output of the feature extraction module is the input of the feature comparison module; the output of the feature comparison module is the output of the neural network model. The feature extraction module adopts a neural network and is used for extracting features of the face to be identified and the reference image; the feature comparison module calculates the similarity between the face to be recognized and the reference image based on the features extracted by the feature extraction module, and the feature comparison module can specifically adopt a cosine distance algorithm, a Euclidean distance algorithm and the like.
Examples
In this embodiment, a face library including 20 people is constructed, and each person corresponds to 4 face images, that is, 80 face images are stored in total in the face library.
In this embodiment, 7 face images are randomly selected as faces to be recognized, and the faces to be recognized may be images of any person in a face library, and the faces to be recognized are not images directly extracted from the face library.
In this embodiment, the above face recognition method based on policy optimization is used to recognize whether 7 face images exist in the face library, and the correspondence between the faces to be recognized existing in the face library and 20 persons in the face library, i.e. the identities of the faces to be recognized, and the parameter setting and recognition result statistics are shown in the following table 1.
Table 1: example 1 data statistics
Figure SMS_1
Combining the above data, the accuracy and the accuracy of the algorithmTh min L min AndP min are in inverse proportion, and the false recognition rate of the algorithm is equal to that of the algorithmTh min L min AndP min are in inverse proportion, and the omission ratio of the algorithm is equal to that of the algorithmTh min L min AndP min are all in a proportional relationship.
The accuracy rate of more than 90% can be realized by only setting 4 face images for each person in the face library of the embodiment, and the more the face images are set for each person in the face library, the higher the identification accuracy rate is, so that the algorithm provided by the invention greatly saves the calculated amount required by face identification and improves the identification efficiency.
Face recognition system
The face recognition system provided in this embodiment includes: the system comprises a face library, an image acquisition module, a similarity calculation module and a face comparison module.
A plurality of face images serving as reference images are stored in the face library corresponding to different people;
the image acquisition module is used for acquiring a face to be identified;
the similarity calculation module is respectively connected with the face library and the image acquisition module and is used for calculating the similarity between the face to be recognized and each reference image;
the face comparison module is respectively connected with the similarity calculation module and the face library, and a maximum similarity threshold value is preset in the face comparison moduleTh max Setting valueKMinimum similarity thresholdTh min Threshold of numberL min And a weight thresholdP min
The face comparison module is used for comparing the maximum value in the similaritySim max And a maximum similarity thresholdTh max The method comprises the steps of carrying out a first treatment on the surface of the When (when)Sim max ≥Th max Face comparison module judges face to be recognizedSim max The corresponding reference images are the same person; when (when)Sim max <Th max The face comparison module is selected according to the sequence from big to smallKThe similarity is judged, and whether the face to be identified meets the following conditions 1-2 is judged;
condition 1: selected and selectedKGreater than or equal to in similarityTh min The number of similarity of (2) is greater than or equal toL min
Condition 2: making the corresponding similarity belong to the selectionKThe similarity is greater than or equal toTh min As third candidate objects, there are corresponding third candidate objects of which the number is equal to or greater thanP min Is a person of (2);
the face comparison module is used for acquiring the most people corresponding to the third alternative object as the recognition result of the face to be recognized when the condition 1-2 is met; otherwise, the face comparison module judges that the face to be recognized does not exist in the face library.
Examples
The embodiment provides an access control management method, which comprises the steps of firstly, collecting face images of all licensees to construct a face library, wherein each licensee corresponds to a set number of face images; then executing the face recognition method based on strategy optimization, if the face to be recognized exists in the face library, indicating that the face to be recognized is a licensor, and opening an access control; otherwise, if the face to be identified does not exist in the face library, the face to be identified is not a licensor, so that the face to be identified cannot be allowed to enter, namely, the entrance guard is not opened.
Examples
The embodiment provides a sign-in statistical method, which comprises the steps of firstly, integrating face images of all the persons in a field to construct a face library, wherein each person in the field corresponds to a set number of face images; then executing the face recognition method based on strategy optimization, and if the face to be recognized exists in the face library, indicating that the face to be recognized is a person in the field; otherwise, if the face to be identified does not exist in the face library, the face to be identified is not the person to be identified.
Therefore, the embodiment can intelligently identify whether the field personnel are the field personnel through the images acquired by the field cameras, and count the number of the field personnel on the field.
In the specific implementation, people corresponding to each face can be further marked in the face library, and the identity of the person who arrives at the scene in each position is determined according to the recognition result of the face to be recognized, so that a preset sign-in table is input, intelligent sign-in is realized, and the conditions of sign-in and the like are prevented.
Examples
The embodiment provides a class attendance checking method.
Many classrooms of schools, especially high-energy schools, are not fixed at present, and a corresponding face library is difficult to build for each classroom. Therefore, in this embodiment, a plurality of student libraries are first set, different student libraries correspond to different labels, the labels are used for labeling a fixed class student group, and the student libraries store face images corresponding to the set number of students under the labels in advance.
In this embodiment, the following steps are specifically executed during class attendance.
The first step: select the firstjThe personal student library is used as a face library;jan initial value of 1;
and a second step of: executing the face recognition method based on the strategy optimization, judging whether on-site students exist in a face library one by one, counting the coincidence quantity of the on-site students and the students in the face library, and recording the coincidence quantity as the actual number of the on-site students corresponding to the student library;
and a third step of: judgingjWhether the total number of the student libraries is set; if not, orderj=j+1, then returning to the second step; if yes, executing a fourth step;
fourth step: counting the number of actual arrival people corresponding to each student library, and taking the student library with the largest number of corresponding actual arrival people as a target library; and calculating the ratio of the actual number of the present people corresponding to the target library to the total number of the target library as the class attendance rate.
The method and system of the present invention may be implemented by software alone or as a combination of hardware and software. Furthermore, method portions of the present invention may be embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein, in the form of a computer program product; and may be implemented in various computer languages, such as, for example, object oriented programming language Java, and an transliterated scripting language JavaScript, etc.
Furthermore, embodiments of the present invention are described in connection with flowchart illustrations and/or block diagrams, and it is to be understood that each flowchart illustration and/or block diagram illustration of the present invention can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks and/or block diagram block or blocks.
Therefore, the above embodiments are only preferred embodiments of the present invention and are not intended to limit the present invention, and any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be considered as equivalent schemes of the present application, and are included in the protection scope of the present invention.

Claims (12)

1. A face recognition method based on policy optimization is characterized in that a maximum similarity threshold is firstly setTh max Setting valueKMinimum similarity thresholdTh min Threshold of numberL min And a weight thresholdP min The method comprises the steps of carrying out a first treatment on the surface of the Then obtaining the similarity between the face to be recognized and each reference image pre-stored in the constructed face library, wherein the reference images are face images;
if the maximum value in the similaritySim max Greater than or equal toEqual toTh max Judging the face to be recognizedSim max The corresponding reference images are the same person;
if it isSim max Less thanTh max Judging whether the human face library has the human being meeting the following condition 1-2;
condition 1: selecting K reference images according to the sequence of the similarity from large to small, wherein the selected reference images are not less thanL min The corresponding similarity is greater than or equal toTh min
Condition 2: in the selected reference images, the similarity corresponding to the same person is greater than or equal toTh min The number of reference images of (a) is recorded as the weight corresponding to the person, and at least one reference image not smaller thanP min Weights of (2);
and if the person meeting the condition 1-2 exists, judging that the face to be recognized is the person corresponding to the maximum weight.
2. The policy-based optimization face recognition method of claim 1, comprising the steps of:
s1, acquiring a face library, wherein the face library is stored withTThe face image is used as a reference image,Tzhang Canzhao image is assigned toSSets of face images, each set of face images including a corresponding personNA Zhang Canzhao image of the object,T=S×NS≥2N≥ 2
s2, acquiring a face to be recognized, calculating the similarity between the face to be recognized and each reference image in a face library, and acquiring the maximum value in the similaritySim max The corresponding reference image is taken as a first candidate object;
s3, judgingSim max Whether greater than or equal to a set maximum similarity thresholdTh max The method comprises the steps of carrying out a first treatment on the surface of the If yes, judging that the face to be recognized corresponds to the same person with the first alternative image; if not, executing the following step S4;
s4, according to the face to be recognizedSequential selection of similarity from high to lowKZhang Canzhao image as a second candidate;N≤K<2Nthe method comprises the steps of carrying out a first treatment on the surface of the Obtaining a minimum similarity threshold value with similarity to the face to be recognized being greater than or equal to the set minimum similarity threshold valueTh min As a third candidate object, counting the number of the third candidate objectsLTh min <Th max
S5, judgingLWhether greater than or equal to a set quantity thresholdL min [N/2]<L min ≤N[N/2]Representation pairN/2, taking an integer part; if not, judging that the face to be recognized does not exist in the face library; if yes, executing the following step S6;
s6, acquiring persons corresponding to the third candidate objects as objects to be matched, and taking the number of the third candidate objects corresponding to the objects to be matched as the weight of the objects to be matched;
s7, judging whether the maximum weight is greater than or equal to a set weight threshold valueP min [N/2]<P min ≤NThe method comprises the steps of carrying out a first treatment on the surface of the If yes, judging that the face to be recognized is the object to be matched corresponding to the maximum weight; and if not, judging that the face to be recognized does not exist in the face library.
3. The method for policy-based optimization of claim 2, wherein in S4,N≤K<N+2。
4. the face recognition method based on strategy optimization according to claim 2, wherein the similarity between the face to be recognized and the reference image is obtained in the step S2 through a face recognition model; the face recognition model is a neural network model obtained by learning a manual labeling sample; the input of the face recognition model is the face to be recognized and the reference images, and the output of the face recognition model is the similarity of the face to be recognized and each reference image.
5. The policy optimization-based face recognition method of claim 4, wherein the face recognition model comprises a feature extraction module and a feature comparison module; the input of the feature extraction module is the input of the face recognition model, and the output of the feature extraction module is the input of the feature comparison module; the output of the feature comparison module is the output of the face recognition model; the feature extraction module adopts a neural network and is used for extracting features of the face to be identified and the reference image; the feature comparison module calculates the similarity between the face to be recognized and the reference image based on the features extracted by the feature extraction module.
6. A face recognition system, comprising: the system comprises a face library, an image acquisition module, a similarity calculation module and a face comparison module;
a plurality of face images serving as reference images are stored in the face library corresponding to different people;
the image acquisition module is used for acquiring a face to be identified;
the similarity calculation module is respectively connected with the face library and the image acquisition module and is used for calculating the similarity between the face to be recognized and each reference image;
the face comparison module is respectively connected with the similarity calculation module and the face library, and a maximum similarity threshold value is preset in the face comparison moduleTh max Setting valueKMinimum similarity thresholdTh min Threshold of numberL min And a weight thresholdP min
The face comparison module is used for comparing the maximum value in the similaritySim max And a maximum similarity thresholdTh max The method comprises the steps of carrying out a first treatment on the surface of the When (when)Sim max Th max Face comparison module judges face to be recognizedSim max The corresponding reference images are the same person; when (when)Sim max <Th max The face comparison module judges whether the face to be recognized meets the following conditions 1-2;
condition 1: k reference images are selected according to the sequence of the similarity from large to small, and the selected reference images includeNot less thanL min The corresponding similarity is greater than or equal toTh min
Condition 2: in the selected reference images, the similarity corresponding to the same person is greater than or equal toTh min The number of reference images of (a) is recorded as the weight corresponding to the person, and at least one reference image not smaller thanP min Weights of (2);
the face comparison module is used for acquiring a person corresponding to the maximum weight as a recognition result of the face to be recognized when the condition 1-2 is met; otherwise, the face comparison module judges that the face to be recognized does not exist in the face library.
7. A face recognition system comprising a memory and a processor, the memory storing a computer program, the processor being coupled to the memory, the processor being configured to execute the computer program to implement the policy-based optimization face recognition method of any one of claims 1-5.
8. A storage medium, characterized in that a computer program is stored, which computer program, when executed, is adapted to implement the policy-based optimization method of face recognition according to any one of claims 1-5.
9. The application method of the face recognition method based on policy optimization is characterized by being used for realizing an access control method based on face recognition, and the access control method comprises the following steps:
SA1, constructing a face library, storing face images of all licensees in the face library, wherein the number of the face images corresponding to each licensee in the face library is equal;
SA2, acquiring a face image of a person to be identified as a face to be identified, executing the face identification method based on strategy optimization as set forth in any one of claims 1-5, and judging whether the face to be identified exists in a face library; if yes, opening the door control; if not, the entrance guard is not opened.
10. The application method of the face recognition method based on policy optimization is characterized by being used for realizing a sign-in statistical method based on face recognition, and the sign-in statistical method comprises the following steps of:
SB1, constructing a face library, storing face images of all the field-oriented persons in the face library, wherein the number of the face images corresponding to each field-oriented person in the face library is equal;
SB2, obtaining face images of all present people as faces to be recognized, executing a face recognition method based on strategy optimization according to any one of claims 1-5 for each face to be recognized, and judging whether the face to be recognized exists in a face library; and counting the number of all faces to be recognized existing in the face library as the actual number of the people who arrive at the scene.
11. The method for applying a policy optimization-based face recognition method according to claim 10, wherein in SB1, each face in the face library is labeled with a corresponding person; the SB1 also comprises a check-in table, wherein the statistics personnel in the check-in table are in one-to-one correspondence with the people in the face library, and the initial states of all the people in the check-in table are all non-check-in states; in SB2, by executing the policy optimization-based face recognition method according to any one of claims 1-5, it is determined whether a face to be recognized exists in the face library, and when the face to be recognized exists in the face library, the state of a person corresponding to the face to be recognized is also modified into a check-in state in the check-in table.
12. The application method of the face recognition method based on policy optimization is characterized by being used for realizing a class attendance method based on face recognition, and the class attendance method comprises the following steps of:
SC1, constructing a student library corresponding to different labels, wherein face images of students applied to a scene under the corresponding labels are stored in the student library;
SC2, selecting a student library as a face library one by one, acquiring face images of all present people as faces to be identified, executing the face identification method based on strategy optimization according to any one of claims 1-5 for each face to be identified, and judging whether the faces to be identified exist in the face library; counting the number of all faces to be recognized existing in a face library as the actual number of people on the scene;
SC3, obtaining the corresponding actual number of the present persons of each student library, and taking the student library with the largest corresponding actual number of the present persons as a target library; and calculating the ratio of the actual number of the present people corresponding to the target library to the total number of the target library as the class attendance rate.
CN202310087360.9A 2023-02-09 2023-02-09 Face recognition method, system, storage medium and application based on policy optimization Active CN115880761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310087360.9A CN115880761B (en) 2023-02-09 2023-02-09 Face recognition method, system, storage medium and application based on policy optimization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310087360.9A CN115880761B (en) 2023-02-09 2023-02-09 Face recognition method, system, storage medium and application based on policy optimization

Publications (2)

Publication Number Publication Date
CN115880761A CN115880761A (en) 2023-03-31
CN115880761B true CN115880761B (en) 2023-05-05

Family

ID=85760942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310087360.9A Active CN115880761B (en) 2023-02-09 2023-02-09 Face recognition method, system, storage medium and application based on policy optimization

Country Status (1)

Country Link
CN (1) CN115880761B (en)

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10489637B2 (en) * 2014-12-23 2019-11-26 Beijing Qihoo Technology Company Limited Method and device for obtaining similar face images and face image information
CN105868695B (en) * 2016-03-24 2019-04-02 北京握奇数据系统有限公司 A kind of face identification method and system
CN106203333A (en) * 2016-07-08 2016-12-07 乐视控股(北京)有限公司 Face identification method and system
CN106469296A (en) * 2016-08-30 2017-03-01 北京旷视科技有限公司 Face identification method, device and gate control system
CN109214273A (en) * 2018-07-18 2019-01-15 平安科技(深圳)有限公司 Facial image comparison method, device, computer equipment and storage medium
CN109117808B (en) * 2018-08-24 2020-11-03 深圳前海达闼云端智能科技有限公司 Face recognition method and device, electronic equipment and computer readable medium
CN109815845B (en) * 2018-12-29 2022-03-29 达闼机器人有限公司 Face recognition method and device and storage medium
CN109657652A (en) * 2019-01-16 2019-04-19 平安科技(深圳)有限公司 A kind of face identification method and device
CN109902644A (en) * 2019-03-07 2019-06-18 北京海益同展信息科技有限公司 Face identification method, device, equipment and computer-readable medium
CN110688901A (en) * 2019-08-26 2020-01-14 苏宁云计算有限公司 Face recognition method and device
CN110688941A (en) * 2019-09-25 2020-01-14 支付宝(杭州)信息技术有限公司 Face image recognition method and device
CN111985360A (en) * 2020-08-05 2020-11-24 上海依图网络科技有限公司 Face recognition method, device, equipment and medium
WO2022166207A1 (en) * 2021-02-07 2022-08-11 中国银联股份有限公司 Face recognition method and apparatus, device, and storage medium
CN113469015A (en) * 2021-06-29 2021-10-01 浙江大华技术股份有限公司 Face recognition method and device, electronic equipment and computer storage medium
CN113762106A (en) * 2021-08-23 2021-12-07 深圳云天励飞技术股份有限公司 Face recognition method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115880761A (en) 2023-03-31

Similar Documents

Publication Publication Date Title
US20160239520A1 (en) Biometric matching engine
CN109948447B (en) Character network relation discovery and evolution presentation method based on video image recognition
CN110851835A (en) Image model detection method and device, electronic equipment and storage medium
CN108563651B (en) Multi-video target searching method, device and equipment
CN112818995B (en) Image classification method, device, electronic equipment and storage medium
US20230135400A1 (en) Method and system for facial recognition
CN113269903A (en) Face recognition class attendance system
CN111783593A (en) Human face recognition method and device based on artificial intelligence, electronic equipment and medium
CN111382655A (en) Hand-lifting behavior identification method and device and electronic equipment
CN111444850A (en) Picture detection method and related device
Amaro et al. Evaluation of machine learning techniques for face detection and recognition
CN110096606B (en) Foreign roll personnel management method and device and electronic equipment
CN114639152A (en) Multi-modal voice interaction method, device, equipment and medium based on face recognition
TW202125323A (en) Processing method of learning face recognition by artificial intelligence module
CN112183167A (en) Attendance checking method, authentication method, living body detection method, device and equipment
CN114360182B (en) Intelligent alarm method, device, equipment and storage medium
CN115880761B (en) Face recognition method, system, storage medium and application based on policy optimization
CN109345427A (en) The classroom video point of a kind of combination recognition of face and pedestrian&#39;s identification technology is to method
CN113268870A (en) Monte Carlo-based image recognition reliability evaluation method under outdoor environment condition
CN110196924B (en) Method and device for constructing characteristic information base and method and device for tracking target object
CN116205723A (en) Artificial intelligence-based face tag risk detection method and related equipment
Vivek et al. A Way to Mark Attentance using Face Recognition using PL
Balkenius et al. Learning in visual attention
CN111160263B (en) Method and system for acquiring face recognition threshold
CN114359783A (en) Abnormal event detection method, device and equipment

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
GR01 Patent grant
GR01 Patent grant