CN115761842A - Automatic updating method and device for human face base - Google Patents

Automatic updating method and device for human face base Download PDF

Info

Publication number
CN115761842A
CN115761842A CN202211361240.5A CN202211361240A CN115761842A CN 115761842 A CN115761842 A CN 115761842A CN 202211361240 A CN202211361240 A CN 202211361240A CN 115761842 A CN115761842 A CN 115761842A
Authority
CN
China
Prior art keywords
face
samples
library
bottom library
updating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211361240.5A
Other languages
Chinese (zh)
Inventor
郑洁
崔刚
雷霓
王书诚
王浩
李欢
沈欢
方书雅
羿舒文
陈祖刚
黄亮
叶荣军
刘剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
722th Research Institute of CSIC
Original Assignee
722th Research Institute of CSIC
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 722th Research Institute of CSIC filed Critical 722th Research Institute of CSIC
Priority to CN202211361240.5A priority Critical patent/CN115761842A/en
Publication of CN115761842A publication Critical patent/CN115761842A/en
Pending legal-status Critical Current

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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a method and a device for automatically updating a human face base library, belonging to the technical field of image recognition, wherein in the prior art, the technical problem that the recognition degree is difficult to improve again exists; the invention provides an automatic updating device of a human face bottom library, which comprises: the face detection module, the face recognition module and the face bottom library automatic updating module have obvious effect on improving the face recognition accuracy.

Description

Automatic updating method and device for human face base
Technical Field
The invention belongs to the technical field of image recognition, and particularly relates to a method and a device for automatically updating a human face base.
Background
The human face bottom library plays a key role in human face recognition, and the quality of samples in the bottom library determines the accuracy rate of human face recognition to a certain extent. In some application scenarios, such as intelligent video monitoring and attendance checking, input data is continuous, some of the data are more suitable for being used as a face base for judgment, and how to utilize the continuously input data to improve the recognition accuracy again in the application scenario, that is, how to automatically update the base in the face recognition application process to improve the recognition accuracy, is a problem to be solved urgently.
Disclosure of Invention
In view of one or more of the above drawbacks or needs for improvement in the prior art, the present invention provides a method for automatically updating a face base library, comprising the steps of:
step 1: determining an initial face base, and acquiring face feature vectors corresponding to all samples of all classes in the face base by using a face detection algorithm and a face recognition algorithm;
step 2: sequentially inputting pictures or images to be recognized, detecting the positions of all face frames by using the face detection algorithm, and extracting feature vectors corresponding to all faces in the images by using the face recognition algorithm;
and step 3: respectively calculating Euclidean distances between the face feature vectors and the face feature vectors in the bottom library one by one to obtain the recognition probability of the faces to be recognized and each category in the face bottom library;
and 4, step 4: if a certain face belongs to a certain category in the bottom library, updating the global feature center of the category by using the face features, otherwise, not processing;
judging whether the human faces belonging to the base class accord with the condition for updating the same class samples of the base, if not, not performing any treatment; if the condition of updating the same type samples of the bottom library is met, temporarily adding the samples into the same type samples of the bottom library, judging whether the number of the samples of the type of the bottom library exceeds a threshold value, and if the number of the samples of the type of the bottom library does not exceed the threshold value, directly updating the samples of the type of the bottom library;
if the number of the samples exceeds the threshold value, firstly, generating a plurality of combinations of the samples of the class in the bottom library, taking the number of the samples of each combination as the threshold value, then respectively calculating the conditional constraint function value of each combination, and selecting the combination with the minimum value as the new sample of the class in the face bottom library, thereby completing the process of automatically updating the face bottom library once.
Preferably, in step 4, the updating the global feature center of the category specifically includes:
when a certain face in the input picture or image belongs to a certain category in the base library, the global feature center of the category is updated by using the features of the face, and the specific formula is as follows:
Figure BDA0003918543640000021
in the above formula, V' is the global center, V is the current face feature vector, and n is the number of samples that have participated in the calculation of the global center.
Preferably, in step 4, the condition of meeting the requirement of updating the base library of the same category samples specifically includes:
the method comprises the steps that the class of a face to be recognized can be judged by obtaining the recognition probability of the face to be recognized and each class in a face bottom library, and the face belonging to the class of the bottom library can be used for updating the bottom library only if the following conditions are met;
(1) If the recognition probability is greater than 0.7, the face can be considered to belong to a certain class and used for updating the face of the base library, and the recognition probability is greater than 0.8;
(2) The underlying library samples of the same category are updated at most once in a short time.
Preferably, in step 4, the method for calculating the conditional constraint function includes:
the conditional constraint function L for the updated sample is as follows:
Figure BDA0003918543640000022
Figure BDA0003918543640000023
in the above formula, V m The local center is used for the bottom library samples, m is the number of the bottom library samples, if m =10, 10 pictures are used for judgment at most, when the bottom library is updated subsequently, a new picture is selected and one picture is removed from the new picture, and V is used for judging whether the current picture is a new picture or not i And the face feature vector corresponding to the ith sample is obtained. V 'is the global center, threshold is the discrimination threshold, d (V', V) m ) Is the Euclidean distance between the global center and the local center, d (V', V) i ) The Euclidean distance between the face feature vector corresponding to the ith sample and the global center is represented, beta is a hyper parameter, and the value range is 0.5-0.55.
The invention also provides a device for automatically updating the human face base library, which is used for realizing the method and comprises the following steps:
and the face detection module is used for detecting all face targets in the input picture or image to be recognized.
The face recognition module is used for recognizing the detected face to acquire the figure information of the face, namely the category of the bottom library to which the face belongs;
and the face bottom library self-updating module is used for processing the input picture or image, judging whether the input picture or image meets the condition of updating the bottom library or not, and updating according to a set flow under the condition that the input picture or image meets the condition.
The invention also provides a server, which comprises a processor and a memory, wherein the memory is provided with at least one program code, and the program code is loaded and executed by the processor to realize the automatic updating method of the human face bottom library.
Generally, compared with the prior art, the technical scheme conceived by the invention has the following beneficial effects:
(1) The updating method and the updating device provided by the invention have obvious effect on improving the face recognition accuracy;
(2) According to the global center algorithm provided by the invention, when n is less than 100, the formula is equivalent to the average value of n eigenvectors; when n is more than or equal to 100, the moving weighted average value is used for replacing the arithmetic average value, so that the influence of early face data can be gradually reduced;
(3) Updating the conditions of the samples of the same category of the base library, wherein the identification probability is greater than 0.7, namely the samples belong to a certain category, but the identification probability is greater than 0.8 when the samples are used for updating the face of the base library, so that the face features which are possibly identified incorrectly or positioned at the boundary can be further filtered;
(4) The conditional constraint function provided by the invention has obvious effect on improving the face recognition accuracy.
Drawings
Fig. 1 is a flowchart of an automatic update method for a human face base library according to an embodiment of the present invention;
FIG. 2 is a graph showing the results of simulation tests performed by the embodiment of the present invention;
FIG. 3 is a diagram illustrating the results of simulation tests according to an embodiment of the present invention;
fig. 4 is a block diagram of an automatic face base database updating apparatus according to an embodiment of the present invention:
fig. 5 is a block diagram of a server according to an embodiment of the present invention.
In all the figures, the same reference numerals denote the same features, in particular: 401. the system comprises a face detection module 402, a face recognition module 403, a face bottom library self-updating module 501, a processor 502 and a memory.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example (b):
as shown in fig. 1, it is a flowchart of automatic update of a face base library provided in an embodiment of the present invention, where the method includes:
step 101: and determining an initial face base, and acquiring face feature vectors corresponding to all samples of all classes in the face base by using a face detection algorithm and a face recognition algorithm.
In the embodiment of the present invention, the samples of each category in the initial face base may be one or more pictures, or one or more video frame images captured by a monitoring device (such as a camera) acquired by a server, and the data content stored in the face base is a set of all face feature vectors of all categories.
Step 102: and sequentially inputting the pictures to be recognized or each frame of pictures, acquiring all face frames by using a face detection algorithm, and extracting corresponding face features by using a face recognition algorithm.
In the embodiment of the invention, a face detection algorithm and a face feature extraction algorithm are respectively performed by the face detection module and the face recognition module provided by the invention and executed in the device or the server provided by the invention.
Step 103: and respectively comparing the extracted human face features with the features of the human face bottom library to determine the probability of each class in the bottom library to which each human face belongs.
That is, it is determined whether the face to be recognized belongs to the person in the face bottom library, and if the face to be recognized belongs to the person in the face bottom library, the specific identity information of the person is determined, such as the name and the like.
Step 104: and if a certain face belongs to a certain category of the bottom library, using the face features to update the global feature center of the category, otherwise, not processing.
In this embodiment, the global center of a certain class of features refers to that a suitable face feature vector of the class is continuously collected while face recognition is performed, and the global center of the class is calculated by the following formula.
Figure BDA0003918543640000051
In the above formula, V' is the global center, V is the current face feature vector, and n is the number of samples already participating in the calculation of the global center. When n <100, the formula is equivalent to averaging n eigenvectors; when n is more than or equal to 100, the influence of the early face data can be gradually reduced by using the moving weighted average value to replace the arithmetic average value.
Step 105: and judging whether the human faces belonging to the bottom library type accord with the condition for updating the same type samples of the bottom library, and if so, temporarily adding the human faces into the same type samples of the bottom library.
In this embodiment, the condition for updating the base library includes: firstly, increasing a recognition probability threshold, for example, in the case of face recognition, if the recognition probability is greater than 0.7, it can be considered as belonging to a certain class, but if the recognition probability is used for updating the face of the base library, the recognition probability must be greater than 0.8, so that the face features which are possibly recognized incorrectly or located at the boundary can be further filtered; secondly, only the high-quality pictures are updated to a base by adopting picture quality indexes such as information entropy and the like; thirdly, time limitation is added, for example, the bottom library samples in the same category are updated at most once a day, so that meaningless repeated updating in a short time is avoided.
Step 106: and judging whether the number of the samples of the bottom library exceeds a threshold value or not, and if not, directly updating the bottom library.
In this embodiment, if the number of samples of a certain category in the base library is less than the maximum number of samples of the category, the pictures meeting the condition for updating the base library are directly added to the base library.
Step 107: if the number of the samples exceeds the limit, a plurality of combinations are generated for the class samples in the bottom library, the conditional constraint function value of each combination is calculated respectively, and the combination with the minimum value is selected to be used for updating the class samples of the face bottom library.
In the present embodiment, the conditional constraint function expression is as follows:
Figure BDA0003918543640000061
Figure BDA0003918543640000062
in the above formula, V m The local center is used for the bottom library samples, m is the number of the bottom library samples, if m =10, 10 pictures are used for judgment at most, when the bottom library is updated subsequently, a new picture is selected and one picture is removed from the new picture, and V is used for judging whether the current picture is a new picture or not i And the face feature vector corresponding to the ith sample is obtained. V 'is the global center, threshold is the discrimination threshold, d (V', V) m ) Is the Euclidean distance between the global center and the local center, d (V', V) i ) And (4) the Euclidean distance between the face feature vector corresponding to the ith sample and the global center, wherein beta is a hyper parameter, and 0.5-0.55 is recommended.
In a simulation test, under the condition that the initial base sample number is 1 and 10 respectively, the method of the invention and the method which is not used are used for repeatedly testing 80 times, the TP (True Positive) index results and FP (False Positive) index results obtained in a verification set are respectively shown in fig. 2 and fig. 3, the average TP value by adopting the method of the invention is respectively improved by 7.80 percent and 1.59 percent, the average FP value is respectively improved by 2.91 percent and reduced by 0.14 percent, and the effect of improving the face recognition accuracy by adopting the method is obvious in whole.
As shown in fig. 4, it is a block diagram of a structure of an automatic human face base database updating apparatus provided in an embodiment of the present invention, where the apparatus includes: a face detection module 401, a face recognition module 402 and an automatic face base update module 403.
The face detection module 401 is configured to detect a face in a base sample or an input picture, and generate a specific face detection frame; a face recognition module 402, configured to extract a face feature vector, compare a face to be recognized with a face in the base, and calculate a final recognition probability; and the automatic face bottom library updating module executes face bottom library updating operation according to the flow from 101 to 107.
As shown in fig. 5, which is a block diagram of a server according to an embodiment of the present invention, the server generally includes: processor 501 and memory 502.
The processor 501 may include one or more Processing cores, and may be implemented in at least one hardware form of a CPU (central Processing Unit), a GPU (Graphics Processing Unit), a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), and a PLA (Programmable Logic Array).
Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices or the like.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (6)

1. A method for automatically updating a human face base library is characterized by comprising the following steps: the method comprises the following steps:
step 1: determining an initial face base, and acquiring face feature vectors corresponding to all samples of all classes in the face base by using a face detection algorithm and a face recognition algorithm;
step 2: sequentially inputting pictures or images to be recognized, detecting the positions of all face frames by using the face detection algorithm, and extracting feature vectors corresponding to all faces in the images by using the face recognition algorithm;
and step 3: respectively calculating Euclidean distances between the face feature vectors and the face feature vectors in the bottom library one by one to obtain the recognition probability of the faces to be recognized and each category in the face bottom library;
and 4, step 4: if a certain face belongs to a certain category in the bottom library, updating the global feature center of the category by using the face features, otherwise, not processing;
judging whether the face belongs to the category of the base library or not, if not, carrying out no treatment; if the condition of updating the same type samples of the bottom library is met, temporarily adding the samples into the same type samples of the bottom library, judging whether the number of the samples of the type of the bottom library exceeds a threshold value, and if the number of the samples of the type of the bottom library does not exceed the threshold value, directly updating the samples of the type of the bottom library;
if the number of the samples exceeds the threshold value, firstly, generating a plurality of combinations of the samples of the class in the bottom library, taking the number of the samples of each combination as the threshold value, then respectively calculating the conditional constraint function value of each combination, and selecting the combination with the minimum value as the new sample of the class in the face bottom library, thereby completing the process of automatically updating the face bottom library once. .
2. The method for automatically updating a face bottom library according to claim 1, wherein in step 4, the updating of the global feature center of the category specifically comprises:
when a certain face in the input picture or image belongs to a certain category in the base library, the global feature center of the category is updated by using the features of the face, and the specific formula is as follows:
V'=αV'+(1-α)V
Figure FDA0003918543630000011
in the above formula, V' is the global center, V is the current face feature vector, and n is the number of samples that have participated in the calculation of the global center.
3. The method according to claim 1, wherein in step 4, the condition that the same type of samples in the face base database are updated specifically includes:
the method comprises the steps that the class of a face to be recognized can be judged by obtaining the recognition probability of the face to be recognized and each class in a face bottom library, and the face belonging to the class of the bottom library can be used for updating the bottom library only if the following conditions are met;
(1) If the recognition probability is greater than 0.7, the face can be considered to belong to a certain class and used for updating the face of the base library, and the recognition probability is greater than 0.8;
(2) The base library samples of the same class are updated at most once in a short time.
4. The method for automatically updating the human face base library according to claim 1, wherein in step 4, the method for calculating the conditional constraint function comprises:
the conditional constraint function L for the updated sample is as follows:
Figure FDA0003918543630000021
Figure FDA0003918543630000022
in the above formula, V m The local center is used for the bottom library samples, m is the number of the bottom library samples, if m =10, 10 pictures are used for judgment at most, when the bottom library is updated subsequently, a new picture is selected and one picture is removed from the new picture, and V is used for judging whether the current picture is a new picture or not i And the face feature vector corresponding to the ith sample is obtained. V 'is the global center, threshold is the discrimination threshold, d (V', V) m ) Is the Euclidean distance between the global center and the local center, d (V', V) i ) Is the Euclidean distance, beta, between the face feature vector corresponding to the ith sample and the global centerThe value range is 0.5-0.55.
5. An automatic updating device of a human face base library for realizing the method of claims 1-4, which is characterized by comprising:
and the face detection module is used for detecting all face targets in the input picture or image to be recognized.
The face recognition module is used for recognizing the detected face to acquire the figure information of the face, namely the category of the bottom library to which the face belongs;
and the face bottom library self-updating module is used for processing the input picture or image, judging whether the input picture or image meets the condition of updating the bottom library or not, and updating according to a set flow under the condition that the input picture or image meets the condition.
6. A server, characterized in that the server comprises a processor and a memory, the memory has at least one program code, the program code is loaded and executed by the processor to realize the automatic update method of the human face base library according to any one of claims 1 to 4.
CN202211361240.5A 2022-10-31 2022-10-31 Automatic updating method and device for human face base Pending CN115761842A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211361240.5A CN115761842A (en) 2022-10-31 2022-10-31 Automatic updating method and device for human face base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211361240.5A CN115761842A (en) 2022-10-31 2022-10-31 Automatic updating method and device for human face base

Publications (1)

Publication Number Publication Date
CN115761842A true CN115761842A (en) 2023-03-07

Family

ID=85355270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211361240.5A Pending CN115761842A (en) 2022-10-31 2022-10-31 Automatic updating method and device for human face base

Country Status (1)

Country Link
CN (1) CN115761842A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117011922A (en) * 2023-09-26 2023-11-07 荣耀终端有限公司 Face recognition method, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117011922A (en) * 2023-09-26 2023-11-07 荣耀终端有限公司 Face recognition method, device and storage medium
CN117011922B (en) * 2023-09-26 2024-03-08 荣耀终端有限公司 Face recognition method, device and storage medium

Similar Documents

Publication Publication Date Title
CN107423690B (en) Face recognition method and device
CN110020592B (en) Object detection model training method, device, computer equipment and storage medium
US9652694B2 (en) Object detection method, object detection device, and image pickup device
CN113793336A (en) Method, device and equipment for detecting blood cells and readable storage medium
CN111738120B (en) Character recognition method, character recognition device, electronic equipment and storage medium
JP2010231254A (en) Image analyzing device, method of analyzing image, and program
CN111539456A (en) Target identification method and device
CN115761842A (en) Automatic updating method and device for human face base
CN110276252B (en) Anti-expression-interference face recognition method based on generative countermeasure network
CN111126112B (en) Candidate region determination method and device
CN115187924A (en) Target detection method, device, terminal and computer readable storage medium
CN110826390A (en) Video data processing method based on face vector characteristics
CN113763331A (en) Coronary artery dominant type determination method, device, storage medium, and electronic apparatus
CN111476059A (en) Target detection method and device, computer equipment and storage medium
CN113780145A (en) Sperm morphology detection method, sperm morphology detection device, computer equipment and storage medium
CN115424253A (en) License plate recognition method and device, electronic equipment and storage medium
CN113762136A (en) Face image occlusion judgment method and device, electronic equipment and storage medium
CN113554685A (en) Method and device for detecting moving target of remote sensing satellite, electronic equipment and storage medium
CN109614893B (en) Intelligent abnormal behavior track identification method and device based on situation reasoning
CN112651996A (en) Target detection tracking method and device, electronic equipment and storage medium
CN111695404A (en) Pedestrian falling detection method and device, electronic equipment and storage medium
WO2020139071A1 (en) System and method for detecting aggressive behaviour activity
CN116311080B (en) Monitoring image detection method and device
CN114760484B (en) Live video identification method, live video identification device, computer equipment and storage medium
CN112788331B (en) Video recompression detection method, terminal equipment and storage medium

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