CN111666925B - Training method and device for face recognition model - Google Patents

Training method and device for face recognition model Download PDF

Info

Publication number
CN111666925B
CN111666925B CN202010633995.0A CN202010633995A CN111666925B CN 111666925 B CN111666925 B CN 111666925B CN 202010633995 A CN202010633995 A CN 202010633995A CN 111666925 B CN111666925 B CN 111666925B
Authority
CN
China
Prior art keywords
face image
face
shielding
training data
full
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010633995.0A
Other languages
Chinese (zh)
Other versions
CN111666925A (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.)
Beijing Aibee Technology Co Ltd
Original Assignee
Beijing Aibee Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aibee Technology Co Ltd filed Critical Beijing Aibee Technology Co Ltd
Priority to CN202010633995.0A priority Critical patent/CN111666925B/en
Publication of CN111666925A publication Critical patent/CN111666925A/en
Application granted granted Critical
Publication of CN111666925B publication Critical patent/CN111666925B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques

Abstract

The application discloses a training method of a face recognition model, which comprises the following steps: full training process and feedback learning process, feedback learning process includes: acquiring target full-quantity training data in the full-quantity training process, and calculating the similarity between each face registration in the target full-quantity training data and the rest face images in the target full-quantity training data; selecting a human face image pair with similarity smaller than a preset similarity threshold value from the target total training data as feedback target training data; and feeding back the feedback target data to the face recognition model subjected to full training to perform feedback learning. In the training method, the feedback learning is performed by selecting the feedback target training data from the target full-quantity training data and feeding the feedback target training data to the full-quantity training face recognition model, and compared with the full-quantity training data feedback learning, the full-quantity training is performed similarly, and on the premise of ensuring the calculation accuracy, the data quantity of the feedback learning is reduced, and the training period is shortened.

Description

Training method and device for face recognition model
Technical Field
The application relates to the technical field of data processing, in particular to a training method and device of a face recognition model.
Background
In the training process of the face recognition model, in order to increase the accuracy of recognition of the face recognition model, the training data generally at least comprise hundreds of millions of face images, and in the training process based on the training data, not only the full training data is required to be sent to the face recognition model for training, but also the full training data is required to be subjected to feedback learning.
The inventor researches the existing training process to find that the full training data is subjected to feedback learning, the data size is large, and the training period of the face recognition model is long.
Disclosure of Invention
In view of the above, the application provides a training method and device for a face recognition model, which are used for solving the problems of indistinguishable feedback learning of full training data and long training period of large data volume in the existing face recognition model training process. The specific scheme is as follows:
a training method of a face recognition model, the training method comprising: a full-scale training process and a feedback learning process, wherein the feedback learning process comprises:
obtaining target full-volume training data in the full-volume training process, wherein the target full-volume training data comprises at least one face image pair, and the face image pair comprises: a face registration photo and a face comparison photo;
aiming at each face registration, calculating the similarity between each face registration and the rest face images in the target full-scale training data;
selecting a face image pair with similarity smaller than a preset similarity threshold value from the target total training data as feedback target training data;
and feeding the feedback target data back to the face recognition model subjected to full training to perform feedback learning.
In the above method, optionally, the face image pair includes: the method comprises the steps of respectively taking a face image without shielding as a first type face image pair formed by registration illumination and comparison illumination, a second type face image pair formed by the face image without shielding and the face image with shielding as the registration illumination and the comparison illumination, and a third type face image pair formed by the face image with shielding and the face image with shielding as the registration illumination and the comparison illumination, wherein the face image with shielding is generated based on the corresponding face image without shielding.
The method, optionally, includes that the face image with occlusion is generated based on the corresponding face image without occlusion, including:
determining a transformation matrix;
acquiring coordinate values and pixel values of all points in the shielding object;
mapping each coordinate value into the face image without shielding based on the transformation matrix based on affine transformation to obtain projection coordinate values;
and covering each pixel value into the face image without shielding according to the corresponding projection coordinate value to obtain the face image with shielding.
The method, optionally, further comprises:
determining preset proportions of face image pairs of different types based on the types of the face image pairs;
and selecting different types of face image pairs with preset proportions from the face image pairs based on the preset proportions, and adding the different types of face image pairs into the target total training data.
The method, optionally, calculates, for each face registration, a similarity between the face registration and the rest face images in the target full training data, including:
acquiring feature vectors of all face images in the target full-scale training data;
and calculating cosine similarity between the corresponding feature vector and the rest feature vectors in the target full-scale training data according to each face registration.
A training device of a face recognition model, the training device comprising: a full-scale training process and a feedback learning process, wherein the feedback learning process comprises:
the data acquisition module is used for acquiring target full-volume training data in the full-volume training process, wherein the target full-volume training data comprises at least one face image pair, and the face image pair comprises: a face registration photo and a face comparison photo;
the computing module is used for computing the similarity between each face registration photo and the rest face images in the target full training data;
the selecting module is used for selecting a face image pair with similarity smaller than a preset similarity threshold value from the target total training data as feedback target training data;
and the feedback learning module is used for feeding the feedback target data back to the face recognition model subjected to full training to perform feedback learning.
The above device, optionally, the face image pair includes: the method comprises the steps of respectively taking a face image without shielding as a first type face image pair formed by registration illumination and comparison illumination, a second type face image pair formed by the face image without shielding and the face image with shielding as the registration illumination and the comparison illumination, and a third type face image pair formed by the face image with shielding and the face image with shielding as the registration illumination and the comparison illumination, wherein the face image with shielding is generated based on the corresponding face image without shielding.
The above apparatus, optionally, in which the generating the face image with occlusion based on the corresponding face image without occlusion includes:
a matrix determining unit configured to determine a transformation matrix;
the first acquisition unit is used for acquiring coordinate values and pixel values of all points in the shielding object;
the mapping unit is used for mapping each coordinate value into the face image without shielding based on the transformation matrix based on affine transformation to obtain projection coordinate values;
and the covering unit is used for covering each pixel value into the face image without shielding according to the corresponding projection coordinate value of the pixel value to obtain the face image with shielding.
The above device, optionally, further comprises:
a proportion determining unit, configured to determine preset proportions of face image pairs of different types based on types of the face image pairs;
and the selecting unit is used for selecting different types of face image pairs with preset proportions from the face image pairs based on the preset proportions and adding the different types of face image pairs with the preset proportions into the target total training data.
The above apparatus, optionally, the computing module includes:
the second acquisition unit is used for acquiring the feature vector of each face image in the target full-scale training data;
and the computing unit is used for computing cosine similarity between the corresponding feature vector and the rest feature vectors in the target total training data aiming at each face registration.
Compared with the prior art, the application has the following advantages:
the application discloses a training method and a training device of a face recognition model, wherein the training method comprises the following steps: a full-scale training process and a feedback learning process, wherein the feedback learning process comprises: acquiring target full-volume training data in the full-volume training process, wherein the target full-volume training data comprises at least one face image pair, and the face image pair comprises: a face registration photo and a face comparison photo; aiming at each face registration, calculating the similarity between the face registration and the rest face images in the target full-scale training data; selecting a human face image pair with similarity smaller than a preset similarity threshold value from the target total training data as feedback target training data; and feeding back the feedback target data to the face recognition model subjected to full training to perform feedback learning. In the training method, the feedback learning is performed by selecting the feedback target training data from the target full-quantity training data and feeding the feedback target training data to the full-quantity training face recognition model, and compared with the full-quantity training data feedback learning, the full-quantity training is performed similarly, and on the premise of ensuring the calculation accuracy, the data quantity of the feedback learning is reduced, and the training period is shortened.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a training method of a face recognition model according to an embodiment of the present application;
FIG. 2 is a flowchart of another training method of a face recognition model according to an embodiment of the present application;
fig. 3 is a block diagram of a training device for a face recognition model according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The application discloses a training method and a device of a face recognition model, which are applied to the training process of the face recognition model, in the existing training process of the face recognition model, the full quantity of training data is subjected to feedback learning, the data quantity is large, the training period of the face recognition model is long, and based on the problems, the application provides the training method of the face recognition model, which is used for solving the problems, and the training method comprises the following steps: the full training process and the feedback learning process, wherein the full training process is the same as the prior art, the selected target full training data is sent to the face recognition model for training, the execution flow of the feedback learning process in the training method is shown in the figure 1, and the method comprises the following steps:
s101, acquiring target full-quantity training data in the full-quantity training process, wherein the target full-quantity training data comprises at least one face image pair, and the face image pair comprises: a face registration photo and a face comparison photo;
in the embodiment of the application, when the face recognition faces the sudden demands inconsistent with the common situations, such as wearing masks, sunglasses, hats and other shielding objects, in order to cope with the sudden demands, such as wearing masks, sunglasses, hats and other shielding situations, the target full-volume training data comprises not only face images without shielding but also face images with shielding, the face images in the target full-volume training data exist in the form of face image pairs, and the face image pairs comprise: the face registration photo and the face comparison photo can be a face image with shielding or a face image without shielding, and the face image pair comprises: the method comprises the steps of respectively taking a face image without shielding as a first type face image pair formed by registration illumination and comparison illumination, a second type face image pair formed by the face image without shielding and the face image with shielding as the registration illumination and the comparison illumination, and a third type face image pair formed by the face image with shielding and the face image with shielding as the registration illumination and the comparison illumination, wherein the face image with shielding is generated based on the corresponding face image without shielding. The face registration is used for training the face recognition model, and the face comparison is used for verifying the training result
S102, calculating the similarity of each face registration photo and the rest face comparison photo in the target full training data;
in the embodiment of the present application, assuming that n pairs of face image pairs are included in the target full-scale training data, there are n face registration shots and n Zhang Ren face comparison shots, for each face registration shot, except for the corresponding comparison shot, the similarity between the n face registration shots and the remaining face comparison shots in the target full-scale training data is calculated, and the calculation process is as follows, firstly, feature vectors of the n face registration shots and the n Zhang Ren face comparison shots in the target full-scale training data are extracted based on a depth model, for each face registration shot, the cosine similarity between the corresponding feature vectors and the feature vectors of the remaining face comparison shots in the target full-scale training data is calculated, preferably, a similarity matrix is constructed based on each similarity, and the registration shots and the comparison shots in rows and columns of the similarity matrix are sequentially arranged according to the corresponding face image pairs, for example, the face registration shots are respectively 1-1, 2, 3-4, and the corresponding face comparison shots are respectively 1-1, 2-2, 3-4, and the longitudinal similarity matrix is 1-2, and the longitudinal similarity matrix is 2-3, and the longitudinal similarity matrix is 2-4, and the similarity matrix is 1-2-and the longitudinal similarity matrix is 4. Wherein the cosine similarity calculating method is shown in a formula (1),
cos=a·b/(norm(a)*norm(b)) (1)
the feature vector of the a-face image registration picture;
b-feature vectors of the face image contrast;
cos-similarity;
norm (x) is the normalization operation, even though the sum of squares of the elements of the feature vector=1.
S103, selecting a face image pair with similarity smaller than a preset similarity threshold value from the target total training data as feedback target training data;
in the embodiment of the application, the similarity is compared with a preset similarity threshold, and the face image pair with the similarity smaller than the preset similarity threshold is used as the feedback target training data, preferably, if the feedback target training data contains the face image pair corresponding to the diagonal position in the similarity matrix, the face image pair is deleted. The preset similarity threshold may be set according to experience or specific situations, and in the embodiment of the present application, the value of the preset similarity threshold is not limited.
Further, as the similarity is lower, the difficulty in identifying the corresponding face comparison and face registration is higher, and the feedback learning is carried out on the face image pair with low similarity as the feedback target training data, so that the generalization capability of the face recognition model is improved.
S104, feeding the feedback target data back to the face recognition model subjected to full training to perform feedback learning.
In the embodiment of the application, in the training process of the face recognition model, the target full-quantity training data is firstly sent to the face recognition model for training, and then the feedback learning is carried out by selecting the feedback target training data from the target full-quantity training data. Preferably, the target full-quantity training data is classified into test target full-quantity training data and verification target full-quantity training data, training is firstly performed based on the test target full-quantity verification data, statistics is performed on the accuracy of a recognition result according to corresponding face comparison of each face registration, and training is completed when the recognition accuracy meets a preset accuracy threshold, wherein the preset accuracy threshold can be set according to experience or specific conditions.
The application discloses a training method of a face recognition model, which comprises the following steps: a full-scale training process and a feedback learning process, wherein the feedback learning process comprises: acquiring target full-volume training data in the full-volume training process, wherein the target full-volume training data comprises at least one face image pair, and the face image pair comprises: a face registration photo and a face comparison photo; aiming at each face registration, calculating the similarity between the face registration and the rest face images in the target full-scale training data; selecting a human face image pair with similarity smaller than a preset similarity threshold value from the target total training data as feedback target training data; and feeding back the feedback target data to the face recognition model subjected to full training to perform feedback learning. In the training method, the feedback learning is performed by selecting the feedback target training data from the target full-quantity training data and feeding the feedback target training data to the full-quantity training face recognition model, and compared with the full-quantity training data feedback learning, the full-quantity training is performed similarly, and on the premise of ensuring the calculation accuracy, the data quantity of the feedback learning is reduced, and the training period is shortened.
In the embodiment of the present application, the execution flow of the determining process of the target full-scale training data is shown in fig. 2, and includes the steps of:
s201, generating a face image with shielding based on the face image without shielding in the training data;
in the embodiment of the application, because different angles may exist in the face image without shielding, in order to ensure the covering and more fitting of the shielding object, the face image without shielding is selected from the catenary book by adopting affine transformation, and the face image with shielding is determined to exist based on the face image without shielding. The training data is a pre-stored face image database, the selection principle can be set based on specific conditions, and the process of determining that the face image is blocked is as follows: firstly, determining a transformation matrix, wherein the transformation matrix is based on an average face and coordinate values of all key points in a face registration picture, the average face is based on big data to carry out statistical analysis to obtain the average coordinate values of all the key points, and the coordinate values of all the key points in the face registration picture have a corresponding relation with the average coordinate values, wherein the number of the coordinate values in the two is the same.
Based on each key point coordinate value and the corresponding average coordinate value, the process of determining the transformation matrix is as follows: assuming that the coordinate value of the key point is a= (x, y), the average coordinate value is b= (u, v), the affine transformation is performed by converting a into a B point satisfying the affine relation through matrix operation, the existing coordinate point is the coordinate value of the key point of each face of the face image, the desired coordinate point is the average coordinate value of each corresponding face key point of the average face, and the transformation matrix is H, the formula (1) is followed
B=H*A (1)
And fitting a transformation matrix H through all the coordinate values of the key points and the average coordinate value.
Further, according to the type of the shielding object, coordinate values and pixel values of all points in the shielding object are obtained, each coordinate value is mapped into the face image without shielding based on the transformation matrix based on affine transformation, projection coordinate values are obtained, and the specific mapping process is mapped based on the formula (1) and is not repeated. And covering each pixel value into the face image without shielding according to the corresponding projection coordinate value to obtain the face image with shielding.
S202, forming face images without shielding and/or face images with shielding into face image pairs, and taking the face image pairs as the target total training data.
In the embodiment of the application, aiming at the face images with shielding, the method has timeliness, for example, mask is needed in winter or in haze weather, sunglasses are needed to be worn when the light is strong, and the face images without shielding are needed to be recognized in most cases, if all face images with shielding are adopted for face recognition model training, the face images without shielding cannot be recognized. Therefore, in order to ensure that the face images without occlusion are identified, the existence proportion of the face images with occlusion in the target full-scale training data needs to be controlled, wherein the existence proportion can be determined based on analysis, specific conditions or experience of big data.
Specifically, the existence proportion of the face image pairs of different types is set preferentially, and the face image pairs are selected according to the existence proportion, namely, two different face images of the same person are selected as input. When a face image pair is selected, taking a mask as an example, the types of the face image pair comprise: a) The mask is opposite to the mask; b) Mask-free versus mask, c) mask-free versus mask-free three types, wherein the presence ratio is a: b: c=2:1:7, as an example. The face image without shielding accounts for more than 70 percent. Based on the sample equalization described above, a trade-off of short term and long term effects can be achieved.
Further, after training based on the target total training data, it is found that there are undesirably much face images which are blocked, after all, a certain gap is left between the face images and the real data, and the data deviation after the too much face images can bring a certain influence to the final recognition result.
In the embodiment of the application, based on the training process, an n-pair loss function is taken as an example for explanation, and each face id in the training stage takes two face images, one is used as registration, and the other is used as comparison. After extracting features through the depth model, we compare the similarity of one registration photo and other n-1 comparison, and after each registration photo is processed, the registration photo with n x n latitude and the similarity matrix of comparison are adopted. The difficulty mining is performed based on the similarity matrix, and the difficulty mining standard is that the front part of the non-diagonal element values (the diagonal is the similarity of the registration and comparison, and the non-diagonal is the image similarity of two face ids) in the similarity matrix is screened, and the more similar and more difficult the different face images are in a certain range. Experimental results show that when the range is limited to 800 face ids considered at a time, the off-diagonal screening proportion is reasonably controlled to be about 0.002-0.005. The ratio is far lower than the original data amount, and the effectiveness of experimental results further illustrates the degree and effectiveness of difficult mining.
The n-pair is used as a main loss function in the training process of the face recognition model, and the specific method comprises the following steps: each time a plurality of image pairs are input, each image pair is a face image of the same person, the face image is taken as a positive sample, the face images of the same person are not taken as other image pairs, the face image is taken as a negative sample, and the main purpose of the n-pair is to make the similarity between the image pairs of the positive sample as large as possible and the similarity between the negative samples as small as possible.
In the process, feedback learning is performed on the selected part of training data through difficult case mining, so that feedback learning is performed on the selected part of training data, and compared with full training data, feedback learning is performed, the degradation of a face recognition model is avoided, and the generalization effect is ensured.
Based on the above-mentioned training method of a face recognition model, in an embodiment of the present application, a training device of a face recognition model is provided, where the training device includes: the full-scale training process and the feedback learning process, wherein the feedback learning process comprises a structural block diagram as shown in fig. 3, and comprises the following steps:
a data acquisition module 301, a calculation module 302, a selection module 303 and a feedback learning module 304.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the data obtaining module 301 is configured to obtain target full-dose training data in the full-dose training process, where the target full-dose training data includes at least one face image pair, and the face image pair includes: a face registration photo and a face comparison photo;
the computing module 302 is configured to compute, for each face registration, a similarity between the face registration and the rest of face images in the target full-scale training data;
the selecting module 303 is configured to select, from the target total training data, a face image pair with a similarity less than a preset similarity threshold as feedback target training data;
the feedback learning module 304 is configured to feedback the feedback target data to a full-scale trained face recognition model for feedback learning.
The application discloses a training device of a face recognition model, which comprises: a full-scale training process and a feedback learning process, wherein the feedback learning process comprises: acquiring target full-volume training data in the full-volume training process, wherein the target full-volume training data comprises at least one face image pair, and the face image pair comprises: a face registration photo and a face comparison photo; aiming at each face registration, calculating the similarity between the face registration and the rest face images in the target full-scale training data; selecting a human face image pair with similarity smaller than a preset similarity threshold value from the target total training data as feedback target training data; and feeding back the feedback target data to the face recognition model subjected to full training to perform feedback learning. In the training device, the target full-quantity training data is selected and can be fed back to the face recognition model subjected to full-quantity training for feedback learning, and compared with the full-quantity training data feedback learning, the full-quantity training is performed similarly, the data quantity of feedback learning is reduced and the training period is shortened on the premise of ensuring the calculation accuracy.
In an embodiment of the present application, the face image pair in the training device includes: the method comprises the steps of respectively taking a face image without shielding as a first type face image pair formed by registration illumination and comparison illumination, a second type face image pair formed by the face image without shielding and the face image with shielding as the registration illumination and the comparison illumination, and a third type face image pair formed by the face image with shielding and the face image with shielding as the registration illumination and the comparison illumination, wherein the face image with shielding is generated based on the corresponding face image without shielding.
In the embodiment of the application, the generating the face image with shielding based on the corresponding face image without shielding in the device comprises the following steps:
a matrix determination unit 305, a first acquisition unit 306, a mapping unit 307, and a coverage unit 308.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the matrix determining unit 305 is configured to determine a transformation matrix;
the first obtaining unit 306 is configured to obtain coordinate values and pixel values of each point in the occlusion object;
the mapping unit 307 is configured to map each coordinate value to the face image without shielding based on the transformation matrix based on affine transformation, so as to obtain a projection coordinate value;
the covering unit 308 is configured to cover each pixel value to the face image without occlusion according to the corresponding projection coordinate value, so as to obtain the face image with occlusion.
In an embodiment of the present application, the apparatus further includes:
a proportion determination unit 309 and a selection unit 310.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the proportion determining unit 309 is configured to determine a preset proportion of the face image pairs of different types based on the types of the face image pairs;
the selecting unit 310 is configured to select, from the face image pairs, a face image pair of a different type with a preset ratio based on the preset ratio, and add the face image pair to the target total training data.
In the embodiment of the present application, the calculating module 303 includes:
a second acquisition unit 311 and a calculation unit 312.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
the second obtaining unit 311 is configured to obtain feature vectors of each face image in the target full-scale training data;
the calculating unit 312 is configured to calculate, for each face registration, cosine similarity between the corresponding feature vector and the rest feature vectors in the target full-scale training data.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present application.
The training method and device of the face recognition model provided by the application are described in detail, and specific examples are applied to explain the principle and the implementation mode of the application, and the description of the above examples is only used for helping to understand the method and the core idea of the application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (6)

1. A training method of a face recognition model, the training method comprising: a full-scale training process and a feedback learning process, wherein the feedback learning process comprises:
obtaining target full-volume training data in the full-volume training process, wherein the target full-volume training data comprises at least one face image pair, and the face image pair comprises: a face registration photo and a face comparison photo;
aiming at each face registration, calculating the similarity between each face registration and the rest face images in the target full-scale training data;
selecting a face image pair with similarity larger than a preset similarity threshold value from the target total training data as feedback target training data;
the feedback target training data is fed back to a face recognition model subjected to full training to perform feedback learning;
the face image pair includes: the method comprises the steps of respectively taking a face image without shielding as a first type face image pair formed by registration illumination and comparison illumination, a second type face image pair formed by the face image without shielding and the face image with shielding as the registration illumination and the comparison illumination, and a third type face image pair formed by the face image with shielding and the face image with shielding as the registration illumination and the comparison illumination, wherein the face image with shielding is generated based on the corresponding face image without shielding;
the face image with occlusion is generated based on the corresponding face image without occlusion, comprising:
determining a transformation matrix;
acquiring coordinate values and pixel values of all points in the shielding object;
mapping each coordinate value into the face image without shielding based on the transformation matrix based on affine transformation to obtain projection coordinate values;
and covering each pixel value into the face image without shielding according to the corresponding projection coordinate value to obtain the face image with shielding.
2. The method as recited in claim 1, further comprising:
determining preset proportions of face image pairs of different types based on the types of the face image pairs;
and selecting different types of face image pairs with preset proportions from the face image pairs based on the preset proportions, and adding the different types of face image pairs into the target total training data.
3. The method of claim 1, wherein for each face registration photo, calculating its similarity to the rest of the face images in the target full training data comprises:
acquiring feature vectors of all face images in the target full-scale training data;
and calculating cosine similarity between the corresponding feature vector and the rest feature vectors in the target full-scale training data according to each face registration.
4. A training device for a face recognition model, the training device comprising: a full-scale training process and a feedback learning process, wherein the feedback learning process comprises:
the data acquisition module is used for acquiring target full-volume training data in the full-volume training process, wherein the target full-volume training data comprises at least one face image pair, and the face image pair comprises: a face registration photo and a face comparison photo;
the computing module is used for computing the similarity between each face registration photo and the rest face images in the target full training data;
the selecting module is used for selecting a face image pair with similarity larger than a preset similarity threshold value from the target total training data as feedback target training data;
the feedback learning module is used for feeding the feedback target training data back to the face recognition model subjected to full training to perform feedback learning;
the face image pair includes: the method comprises the steps of respectively taking a face image without shielding as a first type face image pair formed by registration illumination and comparison illumination, a second type face image pair formed by the face image without shielding and the face image with shielding as the registration illumination and the comparison illumination, and a third type face image pair formed by the face image with shielding and the face image with shielding as the registration illumination and the comparison illumination, wherein the face image with shielding is generated based on the corresponding face image without shielding;
the device generates a face image with shielding based on a corresponding face image without shielding, and comprises:
a matrix determining unit configured to determine a transformation matrix;
the first acquisition unit is used for acquiring coordinate values and pixel values of all points in the shielding object;
the mapping unit is used for mapping each coordinate value into the face image without shielding based on the transformation matrix based on affine transformation to obtain projection coordinate values;
and the covering unit is used for covering each pixel value into the face image without shielding according to the corresponding projection coordinate value of the pixel value to obtain the face image with shielding.
5. The apparatus as recited in claim 4, further comprising:
a proportion determining unit, configured to determine preset proportions of face image pairs of different types based on types of the face image pairs;
and the selecting unit is used for selecting different types of face image pairs with preset proportions from the face image pairs based on the preset proportions and adding the different types of face image pairs with the preset proportions into the target total training data.
6. The apparatus of claim 4, wherein the computing module comprises:
the second acquisition unit is used for acquiring the feature vector of each face image in the target full-scale training data;
and the computing unit is used for computing the cosine similarity between the corresponding feature vector and the rest feature vectors in the target full-scale training data aiming at each face registration.
CN202010633995.0A 2020-07-02 2020-07-02 Training method and device for face recognition model Active CN111666925B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010633995.0A CN111666925B (en) 2020-07-02 2020-07-02 Training method and device for face recognition model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010633995.0A CN111666925B (en) 2020-07-02 2020-07-02 Training method and device for face recognition model

Publications (2)

Publication Number Publication Date
CN111666925A CN111666925A (en) 2020-09-15
CN111666925B true CN111666925B (en) 2023-10-17

Family

ID=72391002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010633995.0A Active CN111666925B (en) 2020-07-02 2020-07-02 Training method and device for face recognition model

Country Status (1)

Country Link
CN (1) CN111666925B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112149601A (en) * 2020-09-30 2020-12-29 北京澎思科技有限公司 Occlusion-compatible face attribute identification method and device and electronic equipment
CN113159085A (en) * 2020-12-30 2021-07-23 北京爱笔科技有限公司 Training of classification model, image-based classification method and related device
CN113746899B (en) * 2021-07-29 2023-04-07 济南浪潮数据技术有限公司 Cloud platform access method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202256A (en) * 2016-06-29 2016-12-07 西安电子科技大学 Propagate based on semanteme and mix the Web graph of multi-instance learning as search method
CN107103281A (en) * 2017-03-10 2017-08-29 中山大学 Face identification method based on aggregation Damage degree metric learning
CN108647577A (en) * 2018-04-10 2018-10-12 华中科技大学 A kind of pedestrian's weight identification model that adaptive difficult example is excavated, method and system
CN109919041A (en) * 2019-02-16 2019-06-21 天津大学 A kind of face identification method based on intelligent robot
CN109948478A (en) * 2019-03-06 2019-06-28 中国科学院自动化研究所 The face identification method of extensive lack of balance data neural network based, system
WO2019134327A1 (en) * 2018-01-03 2019-07-11 东北大学 Facial expression recognition feature extraction method employing edge detection and sift
CN110276252A (en) * 2019-05-15 2019-09-24 北京大学 A kind of face identification method of the anti-expression interference based on production confrontation network
CN110443207A (en) * 2019-08-07 2019-11-12 哈尔滨工业大学 A kind of gradual detection recognition method of target based on graded features tensor
CN110826582A (en) * 2018-08-10 2020-02-21 阿里巴巴集团控股有限公司 Image feature training method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382934B (en) * 2007-09-06 2010-08-18 华为技术有限公司 Search method for multimedia model, apparatus and system
JP2018142097A (en) * 2017-02-27 2018-09-13 キヤノン株式会社 Information processing device, information processing method, and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106202256A (en) * 2016-06-29 2016-12-07 西安电子科技大学 Propagate based on semanteme and mix the Web graph of multi-instance learning as search method
CN107103281A (en) * 2017-03-10 2017-08-29 中山大学 Face identification method based on aggregation Damage degree metric learning
WO2019134327A1 (en) * 2018-01-03 2019-07-11 东北大学 Facial expression recognition feature extraction method employing edge detection and sift
CN108647577A (en) * 2018-04-10 2018-10-12 华中科技大学 A kind of pedestrian's weight identification model that adaptive difficult example is excavated, method and system
CN110826582A (en) * 2018-08-10 2020-02-21 阿里巴巴集团控股有限公司 Image feature training method, device and system
CN109919041A (en) * 2019-02-16 2019-06-21 天津大学 A kind of face identification method based on intelligent robot
CN109948478A (en) * 2019-03-06 2019-06-28 中国科学院自动化研究所 The face identification method of extensive lack of balance data neural network based, system
CN110276252A (en) * 2019-05-15 2019-09-24 北京大学 A kind of face identification method of the anti-expression interference based on production confrontation network
CN110443207A (en) * 2019-08-07 2019-11-12 哈尔滨工业大学 A kind of gradual detection recognition method of target based on graded features tensor

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Deep embedding learning with adaptive large margin N-pair loss for image retrieval and clustering;B Chen等;《Pattern Recognition》;20190502;第353-364页 *
分段仿射变换下基于泊松融合的正面人脸合成;仪晓斌等;《计算机工程与应用》;20150428(第15期);第176-181页 *
图像检索中基于记忆与半监督的主动相关反馈算法;周艺华等;《北京理工大学学报》;20060128(第01期);第48-51页 *
图像检索中语义映射方法综述;李志欣等;《计算机辅助设计与图形学学报》;20080815(第08期);第131-142页 *
基于深度学习的人脸识别技术在课堂签到上的应用;张成成等;《时代汽车》;20190405(第04期);第28-29页 *

Also Published As

Publication number Publication date
CN111666925A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN111666925B (en) Training method and device for face recognition model
US11416781B2 (en) Image processing method and apparatus, and computer-readable medium, and electronic device
CN109858461B (en) Method, device, equipment and storage medium for counting dense population
CN110110601B (en) Video pedestrian re-recognition method and device based on multi-time space attention model
CN109978893A (en) Training method, device, equipment and the storage medium of image, semantic segmentation network
CN104023230B (en) A kind of non-reference picture quality appraisement method based on gradient relevance
CN110084603A (en) Method, detection method and the corresponding intrument of training fraudulent trading detection model
Zhu et al. Blind image splicing detection via noise level function
US20190034704A1 (en) Method and apparatus for face classification
CN111429267A (en) Face examination risk control method and device, computer equipment and storage medium
CN113810611B (en) Data simulation method and device for event camera
US20190244030A1 (en) Object tracking in video using better object area
CN108109121A (en) A kind of face based on convolutional neural networks obscures quick removing method
CN109949200B (en) Filter subset selection and CNN-based steganalysis framework construction method
Xu et al. Bottom-up saliency detection with sparse representation of learnt texture atoms
CN113177559B (en) Image recognition method, system, equipment and medium combining breadth and dense convolutional neural network
CN108171689A (en) A kind of identification method, device and the storage medium of the reproduction of indicator screen image
CN108280480A (en) A kind of hidden image vector safety evaluation method based on residual error symbiosis probability
CN111507416B (en) Smoking behavior real-time detection method based on deep learning
Wu et al. Blind quality assessment for screen content images by combining local and global features
Fang et al. Visual acuity inspired saliency detection by using sparse features
CN109377516B (en) Optical flow calculation method using dynamic visual data
CN114202473A (en) Image restoration method and device based on multi-scale features and attention mechanism
CN112989932A (en) Improved prototype network-based less-sample forest fire smoke identification method and device
CN112348808A (en) Screen perspective detection method and device

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