CN115880761A - Face recognition method, system, storage medium and application based on strategy optimization - Google Patents

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

Info

Publication number
CN115880761A
CN115880761A CN202310087360.9A CN202310087360A CN115880761A CN 115880761 A CN115880761 A CN 115880761A CN 202310087360 A CN202310087360 A CN 202310087360A CN 115880761 A CN115880761 A CN 115880761A
Authority
CN
China
Prior art keywords
face
recognized
library
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.)
Granted
Application number
CN202310087360.9A
Other languages
Chinese (zh)
Other versions
CN115880761B (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

Abstract

The invention relates to the technical field of face recognition, in particular to a face recognition method, a face recognition system, a storage medium and application based on strategy optimization. The human face recognition method provided by the invention has the advantages that each person stores a plurality of human face images in a human face library, the human face to be recognized is compared with the human face images in the human face library by combining strategy optimization, the reference images with low similarity are firstly eliminated according to the similarity between the human face to be recognized and each reference image, and then the human face is further recognized through the weight, namely the number of the reference images which are high in similarity and correspond to the same person in the human 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 face misrecognition rate while ensuring the face recognition accuracy.

Description

Face recognition method, system, storage medium and application based on strategy 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 storage medium and application based on strategy optimization.
Background
Face recognition is an indispensable technical means in the monitoring field, and currently, the face recognition adopts a mode of comparing with a face image with a known identity prestored in a face library.
Machine learning is a common technical means of 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 to judge whether the person is a certain person in the face library. The comparison method has the advantages that the face data information contained by each person is less, and the confusion condition is easy to occur. In addition, for the occasions where people gather, such as class student class scenes, more face information exists in the camera picture, and similar faces also exist in the face images in the face library, especially, certain schools require uniform hair styles and clothes of students, face recognition is performed on the face images in the camera picture at this time, and when identity comparison is performed on the face images in the face library, the face misrecognition condition is more likely to occur.
Disclosure of Invention
In order to solve the defect that face misrecognition or large face recognition calculation amount easily occurs in the prior art, the invention provides a face recognition method based on strategy optimization.
The invention provides a face recognition method based on strategy optimizationMethod, first setting the maximum similarity thresholdTh max The set valueKMinimum similarity thresholdTh min Number thresholdL min And a weight thresholdP min (ii) a Then, acquiring the similarity between the face to be recognized and each reference image prestored in a constructed face library, wherein the reference images are face images;
if the maximum value among the similarity degreesSim max Greater than or equal toTh max Then judge the face to be recognized andSim max the corresponding reference images are of the same person;
if it is usedSim max Is less thanTh max Judging whether a person meeting the following conditions 1-2 exists in the face library;
condition 1: selecting K reference images according to the sequence of similarity from large to small, wherein the selected reference images have no less thanL min The corresponding similarity is greater than or equal toTh min
Condition 2: in the selected reference image, the similarity corresponding to the same person is greater than or equal toTh min The number of reference images of (a) is taken as a weight corresponding to the person, there being at least one of not less thanP min The weight of (c);
and if the person meeting the conditions 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, obtaining a face library, wherein the face library stores face informationTOne of the face images is used as a reference image,Tsheet reference image attributionSSets of facial images, each set of facial images including images corresponding to the same personNZhang Canzhao the image,T=S×NS≥2N ≥2
s2, obtaining the face to be recognized, calculating the similarity between the face to be recognized and each reference image in the face library, and obtaining the maximum value in the similaritySim max The corresponding reference image is used as a first candidate object;
s3, judgingSim max Whether the maximum similarity is larger than or equal to the set maximum similarity threshold valueTh max (ii) a If yes, judging that the face to be recognized corresponds to the same person as the first alternative image; if not, executing the following step S4;
s4, selecting from high to low according to the similarity of the human face to be recognizedKZhang Canzhao as a second candidate;N≤K<2N(ii) a Obtaining the threshold value of the similarity between the human face to be recognized and the obtained human face to be recognized and larger than the set minimum similarityTh min The second candidate is used as a third candidate, and the number of the third candidate is countedLTh min <Th max
S5, judgingLWhether or not it is greater than or equal to the set number thresholdL min [N/2]<L min ≤N[N/2]Presentation 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 people corresponding to each third candidate object 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 larger than or equal to the set weight threshold valueP min [N/2]<P min ≤N(ii) a 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 the step 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 the face recognition model; the face recognition model is a neural network model obtained by learning an artificial labeling sample; the input of the face recognition model is a face to be recognized and a reference image, and the output of the face recognition model is the similarity between 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 characteristic comparison module is the output of the face recognition model; the characteristic extraction module adopts a neural network and is used for extracting the characteristics of the face to be recognized 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 strategy optimization and face similarity calculation and has high accuracy and small calculation amount.
The invention provides a face recognition system, which 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 recognized;
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 The set valueKMinimum similarity thresholdTh min Quantity thresholdL 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 (ii) a When in useSim max ≥Th max The face comparison module judges the face to be identified andSim max the corresponding reference images are the same person; when in useSim 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 similarity from big to smallThe selected reference image has at leastL min The corresponding similarity is greater than or equal toTh min
Condition 2: in the selected reference image, the similarity corresponding to the same person is greater than or equal toTh min The number of reference images of (2) is recorded as a weight corresponding to the person, there being at least one ofP min The weight of (c);
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 the strategy 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 strategy optimization.
The invention provides a storage medium, which stores a computer program, and the computer program is used for realizing the human face recognition method based on strategy optimization when being executed.
The invention also provides the application of the face recognition method based on the strategy optimization in various occasions so as to promote the face recognition method based on the strategy optimization.
The invention provides application of a face recognition method based on strategy optimization, which is used for realizing a face recognition-based access control management method, and the access control management method comprises the following steps:
SA1, constructing a face library, and storing face images of all permitted persons in the face library, wherein the number of the face images corresponding to each permitted person in the face library is equal;
SA2, acquiring a face image of a person to be recognized as a face to be recognized, executing the face recognition method based on strategy optimization, and judging whether the face to be recognized exists in a face library; if yes, opening the access control; otherwise, the entrance guard is not opened.
The invention provides application of another face recognition method based on strategy optimization, which is used for realizing a check-in statistical method based on face recognition, and the check-in statistical method comprises the following steps:
SB1, constructing a face library, and storing face images of all persons to be attended in the face library, wherein the number of the face images corresponding to the persons to be attended in the face library is equal;
SB2, acquiring face images of all persons in the field 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 face to be recognized exists in a face library; and counting the number of all the faces to be recognized in the face library as the actual number of the persons in the field.
Preferably, in SB1, each face in the face library is labeled with a corresponding person; the SB1 also comprises a check-in table, statistical personnel in the check-in table correspond to people in the face library one by one, and the initial states of all people in the check-in table are non-check-in states; in SB2, whether the face to be recognized exists in the face library is judged by executing the face recognition method based on the strategy optimization, and when the face to be recognized exists in the face library, the state of the person corresponding to the face to be recognized is modified into a check-in state in a check-in table.
The invention provides application of a face recognition method based on strategy 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 who are to be present under the corresponding labels are stored in the student library;
SC2, selecting student libraries one by one as a face library, acquiring face images of all persons in the field 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 the face library or not; counting the number of all faces to be recognized in the face library as the actual number of people arriving at the scene;
SC3, acquiring the actual number of the persons arriving at the site corresponding to each student library, and taking the student library with the maximum actual number of the persons arriving at the site as a target library; and calculating the ratio of the actual number of the persons who arrive at the place to the total number of the persons in 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, firstly, reference images with low similarity are eliminated according to the similarity between the face to be recognized and each reference image, and then, the face is further recognized through 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 condition that the face to be recognized is recognized as other people in the face library, and the face recognition accuracy is ensured; the number of the face images needing to be used for comparison is greatly reduced, the number of the 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 number of the second alternative objects is limited, the selection range of the third alternative objects is limited by combining the number and the similarity, the possibility of a plurality of maximum weights caused by a large number of the third alternative objects is avoided, the uniqueness of the finally obtained maximum weights is ensured, namely, the number of the face images of which the similarity between the person to be recognized and the face to be recognized in the face library reaches the minimum similarity threshold value, namely the weights of the person in the face library are obviously layered by strategy optimization when the similarity between the person to be recognized and the face image in the face library does not reach the maximum similarity threshold value, and therefore the face image to be recognized can be precisely recognized according to the weights.
(3) In the invention, setting isN≤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 recognized and the reference image is obtained through the face recognition model based on the neural network, and the neural network is combined with strategy optimization, so that the face recognition accuracy is ensured, and the data support required by the data network model is reduced. In the invention, the face recognition model comprises a feature extraction module and a 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 one of the existing feature comparison methods 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 scene 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, and are convenient for further popularization of the face recognition method based on the strategy optimization.
(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 check-in and the like, the face image acquired by the field camera is compared with the face image in the face library through the face recognition method based on the strategy optimization, intelligent entrance guard management and field check-in are realized, data support required by an entrance guard management system and a check-in system is reduced, and the situations of substitute check-in and the like in the check-in scene are solved. The face recognition method based on the strategy optimization is applied to the check-in scene, and can accurately recognize the person on the spot based on the face library in the occasion of gathering the person, so that the interference of other persons to the check-in system is avoided, and the accurate intelligent check-in is realized.
(7) The invention also provides application of another face recognition method based on strategy optimization, which can be used for attendance checking in class, and can select a student library corresponding to a person to be attended as a face library by face recognition and coincidence quantity comparison under the condition that the person to be attended is unknown, and then the attendance checking rate is counted according to the coincidence rate of the on-site face and the face library. Therefore, the invention realizes class attendance statistics suitable for the flow management state of classrooms and classes.
Drawings
FIG. 1 is a flow chart of a face recognition method based on policy optimization according to the present invention;
FIG. 2 is a flowchart of a first strategy optimization-based face recognition method according to the present invention;
FIG. 3 is a flowchart illustrating an application of a second face recognition method based on policy optimization according to the present invention;
fig. 4 is an application flowchart of a third method for face recognition based on policy optimization according to the present invention.
Detailed Description
Face recognition method based on strategy optimization
Referring to fig. 1, the face recognition method based on policy optimization according to this embodiment includes the following steps S1 to S7.
S1, obtaining a face library, wherein the face library stores face informationTOne of the face images is used as a reference image,Tsheet reference image belonging toSSets of facial images, each set of facial images including images corresponding to the same personNZhang Canzhao the image,T=S×NS≥2N ≥2. I.e. the face library comprisesSIndividuals, each person having stored thereonNAnd (5) opening the face image for comparison.
In this step, it is assumed that the face library includesSThe collection of individuals isPid
Pid={Pid 1 ,Pid 2 ,…,Pid s ,…,Pid S }
Pid s Representing the first in a face librarysIdentity of the individual, 1≤s≤S
S2, obtaining the face to be recognized, calculating the similarity between the face to be recognized and each reference image in the face library, and obtaining the maximum value in the similaritySim max The corresponding reference image serves as a first candidate. In specific implementation, the similarity between the face to be recognized and the reference image can be calculated by adopting any existing face recognition algorithm in the step.
The similarity between the face to be recognized and each reference image obtained in the stepCollection ofSimComprises the following steps:
Sim={Sim 1 ,Sim 2 ,…,Sim t ,…,Sim T }
Sim t representing the face to be recognized and the first in the face librarytSimilarity of sheet reference image, 1≤t≤T
Sim max =max{Sim 1 ,Sim 2 ,…,Sim t ,…,Sim T }
maxMeans take the maximum value.
S3, judgingSim max Whether the maximum similarity is larger than or equal to the set maximum similarity threshold valueTh max (ii) a If yes, judging that the face to be recognized and the first alternative image correspond to the same person; otherwise, the following step S4 is performed. I.e. the person corresponding to the first candidatePid max Pid max ∈Pid(ii) a The face to be recognized isPid max
S4, selecting from high to low according to the similarity of the human face to be recognizedKZhang Canzhao image as a second candidate;N≤K<2N(ii) a Obtaining the similarity of the face to be recognized which is greater than the minimum similarity thresholdTh min The second candidate is used as a third candidate, and the number of the third candidate is countedLTh min <Th max
Order toSim 1 ≥Sim 2 ≥…≥Sim t ≥…≥Sim T Then the similarity set corresponding to the second candidate objectSimKComprises the following steps:SimK={Sim 1 ,Sim 2 ,…,Sim k ,…,Sim K },K<T
similarity set corresponding to third candidate objectSimLComprises the following steps:
SimL={Sim 1 ,Sim 2 ,…,Sim l ,…,Sim L },L≤K
Sim L ≥Th min and is andSim L+1 <Th min orL=K。
S5, judgingLWhether it is greater than or equal to a set quantity thresholdL min [N/2]<L min ≤N(ii) a 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]Presentation pairN/2 is an integer part, i.e.NIn the case of an even number, the number of the first,[N/2]=N/2;Nwhen it is odd[N/2]=(N-1)/2。
S6, acquiring people 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 larger than or equal to the set weight threshold valueP min [N/2]<P min ≤N(ii) a 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 this embodiment, ifNThe larger the value is, the smaller the weight equality probability of the plurality of objects to be matched in S7 is. When in specific implementation, ifNThe value is small and can be obtained throughKThe setting of the value ensures the uniqueness of the maximum weight, which can be set in particularN≤K< N+2。
The embodiment also provides a method for acquiring the similarity between the face to be recognized and the reference image through the neural network model. Specifically, in this embodiment, the neural network model is trained by manually labeling the sample as the face recognition model, the input of the neural network model is the face to be recognized and the reference image, and the neural network model is used for recognizing the face and the reference imageThe output of the model is the similarity between the face to be recognized and each reference image; the manually labeled sample can be recorded(X,Y)
X={x;(x1,x2,x3,…,xi,…,xI)}
Y={y1,y2,y3,…,yi,…,yI}
xIn order to identify the face of a person to be identified,xirepresents a known identityiA human face image is displayed on the screen,yirepresenting images of human facesxiAnd face to be identifiedxThe similarity of (c).
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 characteristic 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 a face to be recognized and a 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 specifically, the feature comparison module can adopt a cosine distance algorithm, an Euclidean distance algorithm and the like.
Examples
In this embodiment, a face library including 20 persons is constructed, each person corresponds to 4 face images, that is, the face library stores 80 face images in total.
In this embodiment, 7 face images are randomly selected as the face to be recognized, the face to be recognized may be an image of any person in a face library, and the face to be recognized is not an image directly extracted from the face library.
In this embodiment, the policy optimization-based face recognition method 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, that is, the identities of the faces to be recognized, the parameter settings, and the recognition result statistics are shown in table 1 below.
Table 1: example 1 data statistics
Figure SMS_1
By combining the above data, the accuracy of the algorithm can be foundTh min L min AndP min are all in inverse proportion relation, and the error recognition rate of the algorithm isTh min L min AndP min are all in inverse proportion relation, the missing rate of the algorithm andTh min L min andP min are all in direct proportion.
In the embodiment, each person in the face library only needs to set 4 face images, so that the accuracy rate can be more than 90%, and it is foreseeable that the more face images are set by each person in the face library, the higher the recognition accuracy rate is, so that the calculation amount required by face recognition is greatly saved by the algorithm provided by the invention, and the recognition efficiency is improved.
Face recognition system
The face recognition system provided by the embodiment includes: the system comprises a face library, an image acquisition module, a similarity calculation module and a face comparison module.
Storing a plurality of face images as reference images in a face library corresponding to different people;
the image acquisition module is used for acquiring a face to be recognized;
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 The set valueKMinimum similarity thresholdTh min Number thresholdL 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 (ii) a When in useSim max ≥Th max The face comparison module judges the face to be identified andSim max the corresponding reference images are the same person; when in useSim max <Th max The human face comparison module selects according to the sequence from big to smallKJudging whether the face to be recognized meets the following conditions 1-2 or not;
condition 1: selected byKGreater than or equal toTh min Is greater than or equal toL min
Condition 2: making the corresponding similarity belong toKThe similarity is more than or equal toTh min As third candidates, there are corresponding third candidates equal to or more thanP min (ii) a person of (a);
the face comparison module is used for acquiring the person most 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 permitted persons to construct a face library, wherein each permitted person corresponds to a set number of face images; then, executing the face recognition method based on the strategy optimization, and if the face to be recognized exists in the face library, indicating that the face to be recognized is a permitted person and opening the access control; on the contrary, if the face to be recognized does not exist in the face library, it indicates that the face to be recognized is not an authorized person, so that the person cannot be allowed to enter, that is, the entrance guard is not opened.
Examples
The embodiment provides a check-in statistical method, which comprises the steps of firstly, collecting face images of all persons who should be present to construct a face library, wherein each person who should be present corresponds to a set number of face images; then executing the face recognition method based on the 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 corresponding place; on the contrary, if the face to be recognized does not exist in the face library, the face to be recognized is not the person to be recognized.
Therefore, whether the field personnel are the field personnel or not can be intelligently identified through the images collected by the field camera, and the number of the field personnel is counted.
During specific implementation, people corresponding to each face can be further marked in the face library, and the corresponding field personnel identity of each field is determined according to the recognition result of the face to be recognized, so that a preset check-in table is input, intelligent check-in is realized, and the situations such as sign substitution are prevented.
Examples
The embodiment provides a class attendance checking method.
At present, classrooms of many schools, particularly high-energy schools, are not fixed, and a corresponding face library is difficult to establish for each classroom. Therefore, in the embodiment, a plurality of student libraries are firstly set, different student libraries correspond to different labels, the labels are used for labeling a fixed classroom student group, and the student libraries pre-store the set number of face images of students under the corresponding labels.
In this embodiment, the following steps are specifically executed during class attendance.
The first step is as follows: select the firstjThe student library is used as a face library;jis 1;
the second step is that: executing the face recognition method based on the strategy optimization, judging whether field students exist in a face library one by one, counting the coincidence quantity of the field students and the students in the face library, and recording the coincidence quantity as the actual number of the arriving persons corresponding to the face library;
the third step: judgment ofjWhether the set total number of student libraries is reached; otherwise, it ordersj=j+1, and then returning to the second step; if yes, executing the fourth step;
the fourth step: counting the actual number of the students in the student storehouses, and taking the student storehouse with the largest number of the corresponding actual persons in the student storehouses as a target storehouse; and calculating the ratio of the actual number of people arriving at the place corresponding to the target library to the total number of people in the target library as the class attendance rate.
The method and system of the present invention can be implemented by software alone or in combination of software and hardware. Furthermore, portions of the methods 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 object-oriented programming language Java and transliterated scripting language JavaScript, for example.
Furthermore, embodiments of the present invention are described in conjunction with flow diagrams and/or block diagrams, it being understood that each flow and/or block in the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, 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 flow or flows of the present invention 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 in the flowchart 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 of the flowchart and/or block diagram block or blocks of the invention.
Therefore, the invention should not be limited to the above-described preferred embodiments, but should be construed to cover all modifications, equivalents, and improvements that may fall within the spirit and scope of the invention.

Claims (12)

1. A face recognition method based on strategy optimization is characterized in that a maximum similarity threshold value is set firstlyTh max The set valueKMinimum similarity thresholdTh min Number thresholdL min And a weight thresholdP min (ii) a Then, acquiring the similarity between the face to be recognized and each reference image prestored in a constructed face library, wherein the reference images are face images;
if the maximum value among the similarity degreesSim max Is greater than or equal toTh max Then, the face to be recognized is judged andSim max the corresponding reference images are of the same person;
if it is usedSim max Is less thanTh max Judging whether a person meeting the following conditions 1-2 exists in the face library;
condition 1: selecting K reference images according to the sequence of similarity from large to small, wherein the selected reference images have no less thanL min The corresponding similarity is greater than or equal toTh min
Condition 2: in the selected reference image, the similarity corresponding to the same person is greater than or equal toTh min The number of reference images of (a) is taken as a weight corresponding to the person, there being at least one of not less thanP min The weight of (c);
and if the person meeting the conditions 1-2 exists, judging that the face to be recognized is the person corresponding to the maximum weight.
2. The strategy optimization-based face recognition method according to claim 1, comprising the following steps:
s1, acquiring a face library, wherein the face library stores face informationTOne of the face images is used as a reference image,Tsheet reference image belonging toSSets of facial images, each set of facial images including images corresponding to the same personNZhang Canzhao the image,T=S×NS≥2N≥ 2
s2, obtaining the face to be recognized, calculating the similarity between the face to be recognized and each reference image in the face library, and obtaining the maximum value in the similaritySim max The corresponding reference image is taken as a first candidate object;
s3, judgingSim max Whether the maximum similarity is larger than or equal to the set maximum similarity threshold valueTh max (ii) a If yes, judging that the face to be recognized corresponds to the same person as the first alternative image; if not, executing the following step S4;
s4, selecting from high to low according to the similarity of the human face to be recognizedKZhang Canzhao as a second candidate;N≤K<2N(ii) a Obtaining the threshold value of the similarity between the human face to be recognized and the obtained human face to be recognized and larger than the set minimum similarityTh min The second candidate is used as a third candidate, and the number of the third candidate is countedLTh min <Th max
S5, judgingLWhether or not it is greater than or equal to the set number thresholdL min [N/2]<L min ≤N[N/2]Presentation 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 people corresponding to each third candidate object 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 larger than or equal to the set weight threshold valueP min [N/2]<P min ≤N(ii) a 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 strategy optimization-based face recognition method according to claim 2, wherein, in S4,N≤K<N+2。
4. the strategy optimization-based face recognition method according to claim 2, wherein in 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 an artificial labeling sample; the input of the face recognition model is a face to be recognized and a reference image, and the output of the face recognition model is the similarity between the face to be recognized and each reference image.
5. The strategy optimization-based face recognition method according to 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 characteristic comparison module is the output of the face recognition model; the characteristic extraction module adopts a neural network and is used for extracting the characteristics of the face to be recognized 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;
storing a plurality of face images as reference images in a face library corresponding to different people;
the image acquisition module is used for acquiring a face to be recognized;
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 The set valueKMinimum similarity thresholdTh min Number thresholdL 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 (ii) a When in useSim max Th max The face comparison module judges the face to be identified andSim max the corresponding reference images are the same person; when in useSim 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 similarity from large to small, wherein the selected reference images have no less thanL min The corresponding similarity is greater than or equal toTh min
Condition 2: in the selected reference image, the similarity corresponding to the same person is greater than or equal toTh min The number of reference images of (2) is recorded as a weight corresponding to the person, there being at least one ofP min The weight of (c);
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 storing a computer program and a processor coupled to the memory for executing the computer program to implement the policy optimization based face recognition method according to any one of claims 1-5.
8. A storage medium, characterized in that a computer program is stored, which when executed is adapted to implement the policy optimization based face recognition method according to any one of claims 1-5.
9. The application of the face recognition method based on the strategy optimization is characterized in that the face recognition method is used for realizing the entrance guard management method based on the face recognition, and the entrance guard management method comprises the following steps:
SA1, constructing a face library, and storing face images of all permitted persons in the face library, wherein the number of the face images corresponding to each permitted person in the face library is equal;
SA2, acquiring a face image of a person to be recognized as a face to be recognized, executing the face recognition method based on strategy optimization according to any one of claims 1-5, and judging whether the face to be recognized exists in a face library; if yes, opening the access control; otherwise, the entrance guard is not opened.
10. An application of a face recognition method based on policy optimization is characterized in that the face recognition method is used for realizing a check-in statistical method based on face recognition, and the check-in statistical method comprises the following steps:
SB1, constructing a face library, and storing face images of all persons who should be present in the face library, wherein the number of the face images corresponding to the persons who should be present in the face library is equal;
SB2, acquiring face images of all persons in the field as faces to be recognized, executing the face recognition method based on strategy optimization according to any one of claims 1-5 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 the faces to be recognized in the face library as the actual number of the persons in the field.
11. The application of the 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, statistical personnel in the check-in table correspond to people in the face library one by one, and the initial states of all people in the check-in table are non-check-in states; in SB2, by performing the policy-optimization-based face recognition method according to any one of claims 1 to 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 the person corresponding to the face to be recognized is also modified to the check-in state in the check-in table.
12. The application of the face recognition method based on the strategy optimization is characterized in that the face recognition method is used for realizing a class attendance method based on the face recognition, and the class attendance method comprises the following steps:
SC1, building a student library corresponding to different labels, wherein face images of students who should be present under the corresponding labels are stored in the student library;
SC2, selecting student libraries one by one as a face library, acquiring face images of all persons in the field as faces to be recognized, executing the face recognition method based on strategy optimization according to any one of claims 1 to 5 aiming at each face to be recognized, and judging whether the face to be recognized exists in the face library; counting the number of all faces to be recognized in the face library as the actual number of people in the scene;
SC3, acquiring the actual number of the persons arriving at the site corresponding to each student library, and taking the student library with the maximum actual number of the persons arriving at the site as a target library; and calculating the ratio of the actual number of the persons who arrive at the place to the total number of the persons in 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 true CN115880761A (en) 2023-03-31
CN115880761B 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)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868695A (en) * 2016-03-24 2016-08-17 北京握奇数据系统有限公司 Human face recognition 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
US20180005022A1 (en) * 2014-12-23 2018-01-04 Beijing Qihoo Technology Company Limited Method and device for obtaining similar face images and face image information
CN109214273A (en) * 2018-07-18 2019-01-15 平安科技(深圳)有限公司 Facial image comparison method, device, computer equipment and storage medium
CN109815845A (en) * 2018-12-29 2019-05-28 深圳前海达闼云端智能科技有限公司 Face recognition method and device and storage medium
CN109902644A (en) * 2019-03-07 2019-06-18 北京海益同展信息科技有限公司 Face identification method, device, equipment and computer-readable medium
CN110688941A (en) * 2019-09-25 2020-01-14 支付宝(杭州)信息技术有限公司 Face image recognition method and device
CN110688901A (en) * 2019-08-26 2020-01-14 苏宁云计算有限公司 Face recognition method and device
WO2020038136A1 (en) * 2018-08-24 2020-02-27 深圳前海达闼云端智能科技有限公司 Facial recognition method and apparatus, electronic device and computer-readable medium
WO2020147257A1 (en) * 2019-01-16 2020-07-23 平安科技(深圳)有限公司 Face recognition method and apparatus
CN111985360A (en) * 2020-08-05 2020-11-24 上海依图网络科技有限公司 Face recognition method, device, equipment and 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
WO2022166207A1 (en) * 2021-02-07 2022-08-11 中国银联股份有限公司 Face recognition method and apparatus, device, and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180005022A1 (en) * 2014-12-23 2018-01-04 Beijing Qihoo Technology Company Limited Method and device for obtaining similar face images and face image information
CN105868695A (en) * 2016-03-24 2016-08-17 北京握奇数据系统有限公司 Human face recognition 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
WO2020038136A1 (en) * 2018-08-24 2020-02-27 深圳前海达闼云端智能科技有限公司 Facial recognition method and apparatus, electronic device and computer-readable medium
CN109815845A (en) * 2018-12-29 2019-05-28 深圳前海达闼云端智能科技有限公司 Face recognition method and device and storage medium
WO2020147257A1 (en) * 2019-01-16 2020-07-23 平安科技(深圳)有限公司 Face recognition method and apparatus
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

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曾青松;: "基于群正则化相似性度量的人脸识别方法", 现代计算机(专业版) *

Also Published As

Publication number Publication date
CN115880761B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
CN109858365A (en) A kind of special population Assembling Behavior analysis method, device and electronic equipment
CN109948447B (en) Character network relation discovery and evolution presentation method based on video image recognition
CN108563651B (en) Multi-video target searching method, device and equipment
CN111126122B (en) Face recognition algorithm evaluation method and device
CN109902681B (en) User group relation determining method, device, equipment and storage medium
CN111291887A (en) Neural network training method, image recognition method, device and electronic equipment
CN110096606B (en) Foreign roll personnel management method and device and electronic equipment
Sapkota et al. Large scale unconstrained open set face database
Amaro et al. Evaluation of machine learning techniques for face detection and recognition
CN113268870B (en) Monte Carlo-based image recognition reliability evaluation method under outdoor environment condition
CN114140663A (en) Multi-scale attention and learning network-based pest identification method and system
CN110196924B (en) Method and device for constructing characteristic information base and method and device for tracking target object
CN115880761B (en) Face recognition method, system, storage medium and application based on policy optimization
CN111539390A (en) Small target image identification method, equipment and system based on Yolov3
CN111160263B (en) Method and system for acquiring face recognition threshold
CN110969209B (en) Stranger identification method and device, electronic equipment and storage medium
CN111382628B (en) Method and device for judging peer
CN113689613A (en) Access control system, access control method, and storage medium
CN111652160A (en) Data processing method, device, equipment and storage medium
CN112669509A (en) Access control management method, system, electronic device and storage medium
CN112200698A (en) Campus social relationship big data analysis system based on artificial intelligence
CN111696220A (en) Sign-in method and device
CN111191563A (en) Face recognition method and system based on data sample and test data set training
CN109582408A (en) Data display method, device and equipment
CN113688784B (en) Face recognition-based medical insurance card embezzlement risk recognition method and related equipment thereof

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