CN-115761842-B - Automatic updating method and device for face database
Abstract
The invention discloses an automatic updating method and device for a face database, which belong to the technical field of image recognition, and have the technical problem that recognition degree is difficult to improve again in the prior art; the invention provides an automatic updating device of a face database, which comprises the following components: the face detection module, the face recognition module and the automatic face database updating module have obvious effect of improving the face recognition accuracy.
Inventors
- ZHENG JIE
- CHEN ZUGANG
- HUANG LIANG
- YE RONGJUN
- LIU JIAN
- CUI GANG
- LEI NI
- WANG SHUCHENG
- WANG HAO
- LI HUAN
- SHEN HUAN
- FANG SHUYA
- YI SHUWEN
Assignees
- 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所)
Dates
- Publication Date
- 20260512
- Application Date
- 20221031
Claims (4)
- 1. The automatic updating method of the face database is characterized by comprising the following steps: Step 1, determining an initial face base, and obtaining face feature vectors corresponding to all samples of all categories in the face base by using a face detection algorithm and a face recognition algorithm; step 2, inputting pictures or images to be recognized in sequence, detecting the positions of all face frames by using the face detection algorithm, and extracting face feature vectors corresponding to all faces in the images by using the face recognition algorithm; Step 3, respectively calculating Euclidean distances from the face feature vectors to the face feature vectors in the face base one by one, and obtaining the recognition probabilities of the faces to be recognized and the categories in the face base; Step 4, if a certain face in the input picture or image belongs to a certain category in the face base, the global feature center of the category is updated by the face feature vector, otherwise, the processing is not performed, and the formula is passed through , Calculating a global feature center for the category; as a center of the global feature, As the current face feature vector, Calculating the number of samples of the global feature center for which participation has occurred; Judging whether the face belongs to the face base class and accords with the condition of updating the face base class sample, if not, not doing any processing, if so, temporarily adding the face belongs to the face base class sample, judging whether the number of the face base class sample exceeds a threshold value, and if not, directly updating the face base class sample, wherein the condition of updating the face base class sample comprises the steps of improving the recognition probability threshold value, adopting picture quality indexes and increasing time limit; if the number of the samples exceeds the threshold value, firstly generating a plurality of combinations of the samples in the face database, wherein the number of the samples in each combination is the threshold value, respectively calculating the condition constraint function value of each combination, and selecting the combination with the minimum value as the new sample in the face database, thereby completing the process of automatically updating the face database once; Conditional constraint function The method comprises the following steps: ; ; Wherein, the The local feature center is used for a face bottom library sample; The number of the face bottom library samples; is the first Face feature vectors corresponding to the sheet samples; the value range is 0.5-0.55 for super parameters; Refers to the Euclidean distance between the global feature center and the local feature center; is the first The Euclidean distance between the face feature vector corresponding to the sample and the global feature center; is a discrimination threshold.
- 2. The automatic face database updating method according to claim 1, wherein in step 4, The conditions conforming to the updating of the same class sample of the face database specifically comprise that the class of the face to be identified is judged by acquiring the identification probability of the face to be identified and each class in the face database, and the face belonging to the class of the face database must meet the following conditions to be used for updating the face database; (1) The recognition probability is larger than 0.7, and the recognition probability is larger than 0.8, so that the human face can be considered to belong to a certain class and is used for updating the human face of the human face base; (2) The face database samples of the same class are updated at most once in a short time.
- 3. An automatic face-pool updating apparatus for implementing the method of any one of claims 1-2, the apparatus comprising: the face detection module is used for detecting all face targets in the inputted picture or image to be identified; The face recognition module is used for recognizing the detected face and acquiring the character information of the face, namely the category of the face base to which the face belongs; the self-updating module of the face base is used for processing the input picture or image, judging whether the picture or image meets the condition of updating the face base, and updating according to the set flow under the condition of meeting the condition.
- 4. A server comprising a processor and a memory, the memory having at least one piece of program code, the program code being loaded and executed by the processor to implement the automatic face-based library updating method of any one of claims 1 to 2.
Description
Automatic updating method and device for face database 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 face database. Background The human face base plays a key role in human face recognition, and the accuracy of human face recognition is determined to a certain extent by the quality of samples in the base. In some application scenarios, such as intelligent video monitoring and attendance checking, the input data are continuous, some of the data are more suitable for being used as a face base for discrimination, and how to utilize the continuously input data to improve the recognition accuracy again in the application scenarios, namely how to automatically update the base in the face recognition application process so as to improve the recognition accuracy is a problem to be solved urgently. Disclosure of Invention In response to one or more of the above-mentioned drawbacks or improvements of the prior art, the present invention provides an automatic updating method for a face-based database, the method comprising the steps of: Step 1, determining an initial face base, and obtaining face feature vectors corresponding to all samples of all categories in the face base by using a face detection algorithm and a face recognition algorithm; Step 2, inputting pictures or images to be recognized in sequence, 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; step 3, respectively calculating Euclidean distances from the face feature vectors to the face feature vectors in the face base one by one, and obtaining the recognition probabilities of the faces to be recognized and the categories in the face base; Step 4, if a certain face belongs to a certain category in the base, updating the global feature center of the category by using the face feature, otherwise, not processing; Judging whether the face belongs to the class of the base or not according to the condition of updating the class sample of the base or not, if not, not performing any processing, if so, temporarily adding the face into the class sample of the base, judging whether the number of the class sample of the base exceeds a threshold value or not, and if not, directly updating the class sample of the base; if the number of the samples exceeds the threshold value, firstly generating a plurality of combinations of the samples in the face database, wherein the number of the samples in each combination is the threshold value, respectively calculating the condition constraint function value of each combination, and selecting the combination with the minimum value as the new sample in the face database, thereby completing the process of automatically updating the face database once. Preferably, in step 4, the updating the global feature center of the category specifically includes: when a certain face in the inputted picture or image belongs to a certain category in the base, the global feature center of the category is updated by the feature of the face, and the specific formula is as follows: 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 calculating the global center. Preferably, in step 4, the condition that the update of the base same-class sample is met specifically includes: the identification probability of the face to be identified and each category in the face base is obtained, so that the category to which the face to be identified belongs can be judged, and the face belonging to the base category can be used for updating the base only if the following conditions are met; (1) The recognition probability is larger than 0.7, and the recognition probability is larger than 0.8, so that the human face belongs to a certain class and is used for updating the base; (2) The bottom library samples of the same class are updated at most once in a short time. Preferably, in step 4, the method for calculating a conditional constraint function includes: the conditional constraint function L of the update samples is as follows: In the above formula, V m refers to the local center of the base sample, m is the number of base samples, for example, when m=10, at most 10 pictures are used for judgment, when the base is updated subsequently, a new picture is selected and a new picture is removed from the base, and V i is the face feature vector corresponding to i Zhang Yangben. 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 between the face feature vector corresponding to i Zhang Yangben and the global center, beta is the super-parameter, and the value range is 0.5-0.55. The i