Movatterモバイル変換


[0]ホーム

URL:


CN111783505B - Method, device and computer-readable storage medium for identifying forged human faces - Google Patents

Method, device and computer-readable storage medium for identifying forged human faces
Download PDF

Info

Publication number
CN111783505B
CN111783505BCN201910387689.0ACN201910387689ACN111783505BCN 111783505 BCN111783505 BCN 111783505BCN 201910387689 ACN201910387689 ACN 201910387689ACN 111783505 BCN111783505 BCN 111783505B
Authority
CN
China
Prior art keywords
face
model
images
parameters
counterfeiting
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
CN201910387689.0A
Other languages
Chinese (zh)
Other versions
CN111783505A (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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co LtdfiledCriticalBeijing Jingdong Century Trading Co Ltd
Priority to CN201910387689.0ApriorityCriticalpatent/CN111783505B/en
Priority to PCT/CN2020/086952prioritypatent/WO2020228515A1/en
Priority to KR1020217040310Aprioritypatent/KR20220007130A/en
Priority to JP2021566527Aprioritypatent/JP7520888B2/en
Publication of CN111783505ApublicationCriticalpatent/CN111783505A/en
Application grantedgrantedCritical
Publication of CN111783505BpublicationCriticalpatent/CN111783505B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The present disclosure relates to a method and apparatus for recognizing a fake face, and a computer-readable storage medium, and relates to the field of computer technology. The method comprises the steps of obtaining a small sample set of a new type of fake face image, updating parameters of a pre-trained face anti-fake model by using the small sample set of the new type of fake face image, wherein the parameters of the pre-trained face anti-fake model are respectively determined according to a plurality of tasks and are redetermined according to the plurality of groups of parameters, the tasks comprise one or more small sample sets formed by the existing type of fake face image and a real face image, and the face image to be identified is input into the updated face anti-fake model to determine whether the face image to be identified is the fake face image.

Description

Method, apparatus and computer readable storage medium for recognizing fake human face
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for recognizing a fake face, and a computer readable storage medium.
Background
The anti-counterfeiting face recognition refers to effective discrimination of counterfeit face features, for example, in a face recognition system, people can make some counterfeit faces (such as videos, photos, masks and the like) to attack the face recognition system, and the anti-counterfeiting face recognition refers to discrimination of the counterfeit face features. In a face recognition system, a user needs to detect through face anti-counterfeiting recognition, which may also be referred to as in-vivo detection.
The inventor knows a method for recognizing the fake face, which is to perform deep learning training on a classification model based on a large number of fake face images in known classes, and the trained classification model can recognize the fake face which belongs to the same class as the fake face image for training.
Disclosure of Invention
The inventor finds that the existing fake face recognition methods all need to train a model by using a large number of samples, and the trained model can accurately recognize the fake face. When the novel class of false face images appear, the number of false face image samples is very small, and the model cannot be retrained, so that the model cannot timely identify the novel class of false faces, and the attack of the novel class of false faces cannot be effectively prevented in time.
The technical problem to be solved by the method is how to realize timely and effective identification of the novel class of fake face images and improve the safety of a face recognition system under the condition that a small number of novel class of fake face images appear.
According to some embodiments of the present disclosure, a method for recognizing a fake face is provided, which includes obtaining a small sample set of a new type of fake face image, updating parameters of a pre-trained face anti-fake model by using the small sample set of the new type of fake face image, wherein the parameters of the pre-trained face anti-fake model are multiple groups of parameters of the face anti-fake model determined according to multiple tasks respectively, and are redetermined according to the multiple groups of parameters, the tasks include one or more small sample sets formed by the existing type of fake face image and a real face image, inputting the face image to be recognized into the updated face anti-fake model, and determining whether the face image to be recognized is a fake face image.
In some embodiments, updating parameters of the face anti-counterfeiting model by using a small sample set of the new class of false face images comprises updating the parameters of the face anti-counterfeiting model according to the false face images in the small sample set of the new class and corresponding fine classification labels when the face anti-counterfeiting model is a classification model, or updating the parameters of the face anti-counterfeiting model according to the false face images in the small sample set of the new class and corresponding coarse classification labels when the face anti-counterfeiting model is a regression model, wherein the fine classification labels are used for labeling the class of the false face images, and the coarse classification labels are used for labeling the false face images as positive samples or negative samples.
In some embodiments, updating the parameters of the face anti-counterfeiting model according to the fake face image in the new class of small sample set and the corresponding fine classification label when the face anti-counterfeiting model is the classification model comprises inputting the fake face image in the new class of small sample set into the face anti-counterfeiting model to obtain probabilities that the fake face images respectively belong to different classes, determining a first gradient according to the probabilities that the fake face images respectively belong to different classes and the corresponding fine classification label, and updating the parameters of the face anti-counterfeiting model according to the first gradient, or updating the parameters of the face anti-counterfeiting model according to the fake face image in the new class of small sample set and the corresponding coarse classification label when the face anti-counterfeiting model is the regression model, wherein the step of inputting the fake face image in the new class of small sample set into the face anti-counterfeiting model to obtain corresponding output values of the fake face images and determining the second gradient according to the corresponding output values of the fake face images and the corresponding coarse classification label when the face anti-counterfeiting model is the regression model.
In some embodiments, the method further comprises dividing the existing classified fake face image and the real face image into a plurality of tasks, wherein each task comprises a real face image class and a first preset number of existing classes, each class comprises a small sample set formed by a second preset number of support sample images and a third preset number of inquiry sample images, each task of a fourth preset number is selected to form a batch, the batch is input into the face anti-counterfeiting model, multiple groups of parameters of the face anti-counterfeiting model are respectively determined according to the multiple tasks of the batch, the parameters of the face anti-counterfeiting model are redetermined according to the multiple groups of parameters, and the pre-training of the face anti-counterfeiting model is completed until the face anti-counterfeiting model reaches a convergence condition.
In some embodiments, determining multiple groups of parameters of the face anti-counterfeiting model according to multiple tasks of the batch respectively, and redefining parameters of the face anti-counterfeiting model according to the multiple groups of parameters comprises determining a third gradient corresponding to each task in the batch according to the support sample image and the corresponding label, determining a group of parameters of the face anti-counterfeiting model according to the third gradient, determining multiple groups of parameters according to multiple tasks in the batch respectively, querying sample images and labels corresponding to the query sample images of the multiple tasks, determining a fourth gradient corresponding to the batch, and redefining parameters of the face anti-counterfeiting model according to the fourth gradient corresponding to the batch.
In some embodiments, for each task in the batch, determining the third gradient corresponding to the task according to the support sample image and the corresponding label includes determining, for each task in the batch, the third gradient corresponding to the task according to the support sample image and the corresponding fine classification label if the face anti-counterfeiting model is a classification model, or determining, for each task in the batch, the third gradient corresponding to the task according to the support sample image and the corresponding coarse classification label if the face anti-counterfeiting model is a regression model, wherein the fine classification label is used for labeling the class of the counterfeit face image and the coarse classification label is used for labeling the counterfeit face image as a positive sample or a negative sample.
In some embodiments, the initial parameters of the face anti-counterfeiting model prior to pre-training are determined according to a deep learning training method.
In some embodiments, the existing class comprises at least one of a photo class, a video class and a mask class, the existing class of fake face images comprises existing class fake face images of at least one of a depth mode, a near infrared mode and a red, green and blue (RGB) mode, the real face images comprise real face images of at least one of a depth mode, a near infrared mode and a red, green and blue (RGB) mode, and the mode of the new class fake face images is different from the mode of the existing class fake face images and the real face images.
According to other embodiments of the present disclosure, a recognition device for a fake face is provided, which includes a small sample acquiring module configured to acquire a small sample set of a new type of fake face image, and a model adjusting module configured to update parameters of a pre-trained face anti-fake model by using the small sample set of the new type of fake face image, where the parameters of the pre-trained face anti-fake model are respectively determined according to a plurality of tasks and are redetermined according to the plurality of sets of parameters, the tasks include one or more small sample sets formed by an existing type of fake face image and a real face image, and the face recognition module is configured to input the face image to be recognized into the updated face anti-fake model, and determine whether the face image to be recognized is a fake face image.
In some embodiments, the model adjustment module is configured to update parameters of the face anti-counterfeiting model according to a fake face image in a new class of small sample set and a corresponding fine classification label when the face anti-counterfeiting model is a classification model, or update parameters of the face anti-counterfeiting model according to a fake face image in a new class of small sample set and a corresponding coarse classification label when the face anti-counterfeiting model is a regression model, wherein the fine classification label is used for labeling a class of the fake face image, and the coarse classification label is used for labeling whether the fake face image is a positive sample or a negative sample.
In some embodiments, the model adjustment module is configured to input the false face images in the small sample set of the new class into the face anti-counterfeiting model to obtain probabilities that the false face images belong to different classes respectively when the face anti-counterfeiting model is a classification model, determine a first gradient according to the probabilities that the false face images belong to different classes respectively and the corresponding fine classification labels, and update parameters of the face anti-counterfeiting model according to the first gradient, or input the false face images in the small sample set of the new class into the face anti-counterfeiting model to obtain output values corresponding to the false face images when the face anti-counterfeiting model is a regression model, determine a second gradient according to the output values corresponding to the false face images and the corresponding coarse classification labels, and update parameters of the face anti-counterfeiting model according to the second gradient.
In some embodiments, the device further comprises a pre-training module for dividing the existing classified fake face image and the real face image into a plurality of tasks, wherein each task comprises a real face image class and a first preset number of existing classes, each class comprises a small sample set formed by a second preset number of support sample images and a third preset number of inquiry sample images, each task of a fourth preset number is selected to form a batch, the batch is input into the face anti-counterfeiting model, multiple groups of parameters of the face anti-counterfeiting model are respectively determined according to the multiple tasks of the batch, the parameters of the face anti-counterfeiting model are redetermined according to the multiple groups of parameters, and the pre-training of the face anti-counterfeiting model is completed until the face anti-counterfeiting model reaches a convergence condition.
In some embodiments, the pre-training module is configured to determine, for each task in a batch, a third gradient corresponding to the task according to the support sample image and the corresponding label, determine a set of parameters of the face anti-counterfeiting model according to the third gradient, determine a plurality of sets of parameters according to a plurality of tasks in the batch, determine a fourth gradient corresponding to the batch according to the query sample image and the label corresponding to the query sample image of the plurality of tasks, and redetermine parameters of the face anti-counterfeiting model according to the fourth gradient corresponding to the batch.
In some embodiments, the pre-training module is configured to determine, for each task in the batch, a third gradient corresponding to the task according to the support sample image and a corresponding fine classification label if the face anti-counterfeiting model is a classification model, or determine, for each task in the batch, a third gradient corresponding to the task according to the support sample image and a corresponding coarse classification label if the face anti-counterfeiting model is a regression model, wherein the fine classification label is used for labeling a class of a fake face image, and the coarse classification label is used for labeling whether the fake face image is a positive sample or a negative sample.
In some embodiments, the initial parameters of the face anti-counterfeiting model prior to pre-training are determined according to a deep learning training method.
In some embodiments, the existing class comprises at least one of a photo class, a video class and a mask class, the existing class of fake face images comprises existing class fake face images of at least one of a depth mode, a near infrared mode and a red, green and blue (RGB) mode, the real face images comprise real face images of at least one of a depth mode, a near infrared mode and a red, green and blue (RGB) mode, and the mode of the new class fake face images is different from the mode of the existing class fake face images and the real face images.
According to still further embodiments of the present disclosure, there is provided a fake face recognition apparatus including a memory, and a processor coupled to the memory, the processor configured to perform the steps of the fake face recognition method of any of the previous embodiments based on instructions stored in the memory.
According to still further embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the steps of the fake face recognition method of any of the previous embodiments.
In the method, the parameters of the pre-trained face anti-counterfeiting model are updated by directly utilizing the small sample set of the new-class fake face images, and the updated face anti-counterfeiting model can identify various fake face images of the existing class and the new class. The pre-trained face anti-counterfeiting model is trained by using one or more small sample sets consisting of the existing class of fake face images and real face images, a plurality of tasks respectively determine a plurality of groups of parameters of the face anti-counterfeiting model in the training process, and then the parameters of the face anti-counterfeiting model are redetermined according to the plurality of groups of parameters. The training process comprises two stages, namely a stage of training a human face anti-counterfeiting model by utilizing a plurality of small sample sets of the existing class of false human face images and real human face images respectively, wherein the stage is a stage of learning the characteristics of the small sample sets or a stage of learning and identifying the false human face and the real human face, and a stage of updating parameters of the human face anti-counterfeiting model again according to a plurality of training results in a summarizing way, wherein the stage is a stage of learning the characteristics of the small sample sets or a stage of learning and identifying the false human face and the real human face.
Therefore, after the human face anti-counterfeiting model learns a plurality of tasks of a small sample set containing the existing class of fake human face images and real human face images, a method for learning the small sample set is mastered, or a method for learning and identifying the fake human face and the real human face or learning and searching fake clues is mastered, and good initialization parameters are obtained. When the novel class of false face images are in a small sample set, the face anti-counterfeiting model is updated, and the novel class of false face features can be quickly learned due to the quick learning ability of the prior learning, so that the novel class of false face images can be effectively updated timely, the novel class of false face images can be effectively identified timely, and attacks of the novel class of false faces can be effectively defended timely.
Other features of the present disclosure and its advantages will become apparent from the following detailed description of exemplary embodiments of the disclosure, which proceeds with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure 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 below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 illustrates a flow diagram of a method of recognizing a counterfeit face in accordance with some embodiments of the present disclosure.
Fig. 2 shows a flow diagram of a method of recognizing a counterfeit face in accordance with further embodiments of the present disclosure.
Fig. 3 illustrates a schematic structure of a counterfeit face recognition device of some embodiments of the present disclosure.
Fig. 4 is a schematic structural view illustrating a counterfeit face recognition device according to other embodiments of the present disclosure.
Fig. 5 shows a schematic structural diagram of a counterfeit face recognition device of further embodiments of the present disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
The scheme is provided for solving the problems that when the novel class of fake face images appear and the number of samples is very small, the model cannot be used for timely and effectively identifying the novel class of fake faces and the attack of the novel class of fake faces cannot be timely and effectively prevented. Some embodiments of the identification method of counterfeit faces of the present disclosure are described below in conjunction with fig. 1.
Fig. 1 is a flow chart of some embodiments of a method of recognizing a counterfeit face of the present disclosure. As shown in FIG. 1, the method of the embodiment includes steps S102-S106.
In step S102, a small sample set of counterfeit face images of a new class is acquired.
The number of images in a small sample set in the present disclosure is less than a threshold, e.g., 10. The threshold value enables the human face anti-counterfeiting model to be updated by adopting a small sample set according to the training method of deep learning, the model can not be converged, the new type of false human face image is different from the type of the false human face image used in the process of pre-training the human face anti-counterfeiting model, and the type of the false human face image used in the process of pre-training the human face anti-counterfeiting model can be called as the existing type. For example, the existing categories include at least one of photo category, video category, mask category. The new class may then be a fake face of another class.
In step 104, parameters of the pre-trained face anti-counterfeiting model are updated with a small sample set of new classes of counterfeited face images. The parameters of the pre-trained face anti-counterfeiting model are respectively determined according to a plurality of tasks, and are redetermined according to the plurality of groups of parameters, wherein the tasks comprise one or more small sample sets formed by the existing type of fake face images and real face images.
The false face image in the new class of small sample set can be input into the pre-trained face anti-counterfeiting model, the gradient of the parameters of the face anti-counterfeiting model is determined according to the output result, the label corresponding to the false face image and the preset loss function, and the parameters of the pre-trained face anti-counterfeiting model are updated according to the gradient. In the case that the face anti-counterfeiting model is a classification model, the preset loss function may employ an MSE (mean square error) loss function. In the case that the face anti-counterfeiting model is a regression model, the preset loss function may be a cross entropy loss function, which is not limited to the illustrated example. The method for updating the parameters of the pre-trained face anti-counterfeiting model according to the gradient can select the existing gradient descent method according to the requirement, and will not be described in detail here.
A task may be constructed from a small sample set of new class of counterfeited face images, and the counterfeited face images in the small sample set of new class are used as support sample images for the task, similar to the setting form of the task in the pretraining method of the face counterfeiting model to be described later, which will be described later in detail. One or more different new categories may be included in the task, each new category having a corresponding small sample set. A small sample set of real face images, etc. may also be included in the task.
In some embodiments, the face anti-counterfeiting model may adopt a classification model, and parameters of the face anti-counterfeiting model may be updated according to the forged face image in the new class of small sample set and the corresponding fine classification label. The fine classification labels are used for labeling the types of the fake face images. For example, the fine classification label of a real face image is 0, the fine classification label of a fake face image of a mask class is 1, and the fine classification label of a new class is 2.
In the process of updating parameters of the face anti-counterfeiting model, the fine classification labels can be adopted to calculate loss function values, gradient values and the like, so that the accuracy of the model can be improved. When the face anti-counterfeiting model classifies and outputs the image, the image can be divided into two categories, namely a real face image and a fake face image. In the testing process after the face anti-counterfeiting model is pre-trained, the rough classification labels can be utilized to test the false or real accuracy of the face anti-counterfeiting model identification image. The rough classification labels are used for labeling the forged face image as a positive sample or a negative sample. For example, the rough classification label indicating a counterfeit face image is 0, and the rough classification label indicating a genuine face image is 1.
Further, under the condition that the face anti-counterfeiting model is a classification model, the false face images in the small sample set of the new class are input into the face anti-counterfeiting model, the probability that each false face image belongs to different classes is obtained, a first gradient is determined according to the probability that each false face image belongs to different classes and the corresponding fine classification label, and parameters of the face anti-counterfeiting model are updated according to the first gradient.
In some embodiments, the face anti-counterfeiting model may adopt a regression model, and parameters of the face anti-counterfeiting model may be updated according to the fake face image in the new class small sample set and the corresponding rough class label. The regression model outputs a value for the input image, and a corresponding threshold value can be set, if the value is higher than the threshold value, the image is represented as a real face image, and if the value is lower than the threshold value, the image is represented as a fake face image. Thus, a coarse classification label of the image may be employed in the regression model.
Further, under the condition that the face anti-counterfeiting model is a regression model, the false face images in the new class of small sample set are input into the face anti-counterfeiting model to obtain output values corresponding to the false face images, a second gradient is determined according to the output values corresponding to the false face images and the corresponding rough classification labels, and parameters of the face anti-counterfeiting model are updated according to the second gradient.
The parameters of the pre-trained face anti-counterfeiting model are obtained by training by respectively determining multiple groups of parameters of the face anti-counterfeiting model according to multiple tasks and then redetermining the parameters of the face anti-counterfeiting model according to the multiple groups of parameters. The task includes one or more small sample sets of existing classes of counterfeit face images and real face images. That is, small sample sets composed of existing fake face images and real face images are distributed to a plurality of tasks, different small sample sets are used for training the face anti-fake model, but parameters of the face anti-fake model are redetermined according to a plurality of training results after training. The process of training the human face anti-counterfeiting model by different small sample sets is a model learning process, and the process of redetermining parameters according to a plurality of training results is a model learning process.
Through two processes, the model learns not only the characteristics of the small sample set, but also the method how to learn the characteristics of the small sample set, or the human face anti-counterfeiting model finally learns how to learn and identify the fake human face and the real human face, and learns how to learn and look for fake clues, instead of only learning how to identify the fake human face and the real human face, or only learning fake clues. Therefore, when the novel class of fake face images are small sample sets, the face fake model can be quickly converged, and the novel class of fake face features can be quickly learned, so that effective and timely defense is performed.
In step S106, the face image to be recognized is input into the updated face anti-fake model, and it is determined whether the face image to be recognized is a fake face image.
The face image to be identified can be a new type or a fake face image of a known type, and can be identified by the face anti-fake model.
According to the method, the parameters of the pre-trained face anti-counterfeiting model are updated directly by using the small sample set of the new type of forged face image, and the updated face anti-counterfeiting model can identify various forged face images of the existing type and the new type. The pre-trained face anti-counterfeiting model is trained by using one or more small sample sets consisting of the existing class of fake face images and real face images, a plurality of tasks respectively determine a plurality of groups of parameters of the face anti-counterfeiting model in the training process, and then the parameters of the face anti-counterfeiting model are redetermined according to the plurality of groups of parameters. The training process comprises two stages, namely a stage of training a human face anti-counterfeiting model by utilizing a plurality of small sample sets of the existing class of false human face images and real human face images respectively, wherein the stage is a stage of learning the characteristics of the small sample sets or a stage of learning and identifying the false human face and the real human face, and a stage of updating parameters of the human face anti-counterfeiting model again according to a plurality of training results in a summarizing way, wherein the stage is a stage of learning the characteristics of the small sample sets or a stage of learning and identifying the false human face and the real human face.
Therefore, after the human face anti-counterfeiting model learns a plurality of tasks of a small sample set containing the existing class of fake human face images and real human face images, a method for learning the small sample set is mastered, or a method for learning and identifying the fake human face and the real human face or learning and searching fake clues is mastered, and good initialization parameters are obtained. When the novel class of false face images are in a small sample set, the face anti-counterfeiting model is updated, and the novel class of false face features can be quickly learned due to the quick learning ability of the prior learning, so that the novel class of false face images can be effectively updated timely, the novel class of false face images can be effectively identified timely, and attacks of the novel class of false faces can be effectively defended timely.
Further embodiments of the identification method of counterfeit faces of the present disclosure are described below in conjunction with fig. 2. The embodiment comprises a pre-training method, a using method and the like of the face anti-counterfeiting model.
Fig. 2 is a flowchart of other embodiments of a method for recognizing a fake face according to the present disclosure. As shown in FIG. 2, the method of this embodiment includes steps S202-S214.
In step S202, the face anti-counterfeiting model is initially trained according to the training method of deep learning by using the existing class of fake face images and real face images, and initial parameters of the face anti-counterfeiting model before pre-training are determined.
The training method comprises the steps of firstly adopting the existing deep learning training method to perform initial training on the face anti-counterfeiting model, and then performing a subsequent pre-training process, so that the face anti-counterfeiting model has good discriminant and generalization after double training. Because the training method of deep learning enables the face anti-counterfeiting model to judge the image more accurately, the pre-training method in the present disclosure can generalize the model in different types of fake face images. After the human face anti-counterfeiting model is trained twice, the human face anti-counterfeiting model can be rapidly adapted to new tasks, and has good discrimination capability on known tasks or similar tasks.
In step S204, the forged face image and the real face image of the existing category are divided into a plurality of tasks, wherein each task includes a real face image category and a first preset number of existing categories, and each category includes a small sample set composed of a second preset number of supporting sample images and a third preset number of inquiry sample images.
One Task (Task) includes multiple categories (which may also be referred to as paths (Way)) including both a real face image category and one or more existing categories. Each category includes a second preset number of Support (Support) sample images and a third preset number of Query (Query) sample images. The support sample images form a small sample set, i.e. the support sample images for each category in each task are smaller than a threshold, e.g. 10. The number of images in the small sample set that support the formation of sample images during the pre-training process may be the same or different than the number of images in the new class of small sample set. Under the condition that the number of images in the small sample set formed by the support sample images in the pre-training process is smaller than or equal to the number of images in the small sample set of the new class, the recognition effect of the model is better after the human face anti-counterfeiting model is updated according to the small sample set of the new class. The method is characterized in that the pre-training process of the human face anti-counterfeiting model learns how to learn a smaller amount of samples, and the parameter updating of the model can be completed better when the number of images of a new class is larger during updating.
The first preset number of existing categories can be randomly selected each time, then the second preset number of support sample images and the third preset number of inquiry sample images are randomly extracted from the forged face images and the real face images which are selected from the existing categories respectively, a task is generated, and the images in different tasks cannot be completely identical.
In step S206, a fourth preset number of tasks are selected to form a batch, the batch is input into the face anti-counterfeiting model, multiple groups of parameters of the face anti-counterfeiting model are respectively determined according to the multiple tasks of the batch, and the parameters of the face anti-counterfeiting model are redetermined according to the multiple groups of parameters.
The fourth predetermined number of tasks may be randomly selected as a Batch (Batch), e.g., 5 tasks are selected as a Batch. The parameters of the face anti-counterfeiting model are updated twice for each batch. The first updating is to update parameters of the face anti-counterfeiting model by using supporting sample images in each task. And the second updating is to update the parameters of the face anti-counterfeiting model by using the query sample set in each task. I.e. the aforementioned learning process, and the "learn how to learn". Different from the existing deep learning method, each batch is directly input into a model to update parameters once.
In some embodiments, for each task in the batch, a third gradient (first gradient update) corresponding to the task is determined from the support sample image and the corresponding label, and a set of parameters of the face anti-counterfeiting model is determined from the third gradient. The multiple groups of parameters determined by the tasks belong to intermediate parameters, so that the parameters of the face anti-counterfeiting model cannot be truly updated and can be stored for next updating. Further, a plurality of groups of parameters are respectively determined according to a plurality of tasks in the batch, query sample images of the plurality of tasks and labels corresponding to the query sample images are determined, and a fourth gradient (second gradient update) corresponding to the batch is determined. And re-determining parameters of the face anti-counterfeiting model according to the fourth gradient corresponding to the batch. The parameters of the face anti-counterfeiting model determined for the second time are used for updating the parameters of the face anti-counterfeiting model.
For example, a plurality of tasks τi e T in one lot, i being a positive integer representing a task number, T being a task set of one lot. For each task taui, calculating a third gradient of the parameters of the face anti-counterfeiting model corresponding to the taskΘ represents the current parameters of the face anti-counterfeiting model,Representing a loss function calculated with support sample images for task τiGradient with respect to the current parameter θ. The parameters of the face anti-counterfeiting model determined for the task τi can be expressed asAlpha represents a first step size. Multiple tasks in a batch may determine multiple θ 'i (which may be a matrix of weight parameters) and multiple θ'i are stored.
Further, determining for a lot a fourth gradient corresponding to the lot may be expressed asMeaning that the losses of multiple tasks for the batch are summed prior to the gradient. The loss and fourth gradient are calculated from the query sample image of task τi and the corresponding θ'i. Updating parameters of face anti-counterfeiting model for the batchBeta is the second step size. It can be seen that θ'i belongs to the intermediate variable used to calculate the fourth gradient, and that the parameters of the model are updated for each batch based on θ at the start of the batch. The query sample image is utilized to update the human face anti-counterfeiting model, so that the generalization capability of the model on tasks can be enhanced, and the support sample image is prevented from being overfitted.
And under the condition that the human face anti-counterfeiting model is a classification model, determining a third gradient corresponding to each task in the batch according to the support sample image and the corresponding fine classification label. Or under the condition that the face anti-counterfeiting model is a regression model, determining a third gradient corresponding to each task in the batch according to the support sample image and the corresponding rough classification label.
In step S208, it is determined whether the face anti-counterfeiting model reaches the convergence condition, if so, the pre-training of the face anti-counterfeiting model is performed, otherwise, the step S206 is returned to restart the execution.
The convergence condition is, for example, that the loss function value reaches the minimum or reaches a preset loss function value, etc. If the loss function value does not meet the convergence condition, the step S206 can be returned to select a batch again, and training of the face anti-counterfeiting model is performed.
The steps belong to the pre-training process of the face anti-counterfeiting model. It should be noted that although the number of the supported sample images of each category in each task is very small, a large number of samples (including a large number of sample images of the existing category and the real face category) are used in the whole pre-training process, and the larger the number of samples is, the better the model is, and only a plurality of tasks and a plurality of small sample sets are divided, so that the model can learn how to learn in the pre-training process, and the accuracy of the model is improved.
In step S210, a small sample set of counterfeit face images of a new class is acquired.
A small sample set of new classes of counterfeited face images can be used as a supporting sample image in one task. A task may include one or more new categories, each corresponding to a small sample set.
In step S212, parameters of the pre-trained face anti-counterfeiting model are updated with a small sample set of new classes of counterfeited face images.
The method of updating the parameters of the pre-trained face anti-counterfeiting model using the small sample set of the new class of counterfeit face images is similar to the process of determining the parameters θ'i of the face anti-counterfeiting model using the supporting sample image of one task τi in step S206. For example, a small sample set of a new class of fake face images is used as a support sample set of the task τj, and a third gradient of the parameters of the face anti-counterfeiting model corresponding to the task τj is calculatedThe parameters of the face anti-counterfeiting model determined for the task τj can be expressed asAlpha represents a first step size. The updated face anti-counterfeiting model has a parameter of theta'j. The process of updating with the query sample image is no longer performed.
In step S214, the face image to be recognized is input into the updated face anti-counterfeiting model, and it is determined whether the face image to be recognized is a fake face image.
The scheme disclosed by the invention not only can be used for identifying the forged face images of new types, but also can be used for identifying the forged face images of new modes. When the face anti-counterfeiting model is pre-trained, the task can comprise fake face images and real face images of the existing modes, such as a Depth mode, a Near Infrared (NIR) mode and a red, green and blue (RGB) mode.
In some embodiments, a small sample set of counterfeit face images of a new modality is acquired. And updating parameters of the pre-trained face anti-counterfeiting model by using a small sample set of the fake face image of the new mode. The parameters of the pre-trained face anti-counterfeiting model are respectively determined according to a plurality of tasks, and are redetermined according to the plurality of groups of parameters, wherein the tasks comprise one or more small sample sets formed by the fake face image of the existing mode and the real face image of the existing mode, the face image to be identified is input into the updated face anti-counterfeiting model, and whether the face image to be identified is the fake face image is determined.
The forged face image of the new modality may be the same or different in category as the forged face image of the existing modality, for example, a forged face image of the new modality and of a new category. The pre-training process is similar to that in the previous embodiment. In the pre-training process, one task can comprise a real face image category and a first preset number of existing categories, wherein each category comprises a small sample set formed by a second preset number of support sample images and a third preset number of inquiry sample images. The real face image and the counterfeit face image may belong to a fifth preset number of modalities. For example, there are three known modalities, three known classes and real class face images, and a maximum of twelve small sample sets may be included in a task generated. Of course, a task may also include a real face class and an existing class, each class corresponding to images of multiple existing modalities, and the new small sample set includes images of the same existing class as the small sample set in the pre-training process but belonging to the new modality.
In the above embodiment, the pre-trained face anti-counterfeiting model is trained by using one or more small sample sets formed by the forged face image and the real face image of the existing mode, and a plurality of tasks respectively determine a plurality of groups of parameters of the face anti-counterfeiting model in the training process, and then redetermine the parameters of the face anti-counterfeiting model according to the plurality of groups of parameters. The training process comprises two stages, namely a stage of training a human face anti-counterfeiting model by utilizing a plurality of small sample sets of the existing class of false human face images and real human face images respectively, wherein the stage is a stage of learning the characteristics of the small sample sets, or a stage of learning and identifying the false human faces and the real human faces in different modes, and a stage of updating parameters of the human face anti-counterfeiting model again according to a plurality of training results in a summarizing way, namely a stage of learning how the model learns the characteristics of the small sample sets, or a stage of learning and identifying the false human faces and the real human faces in different modes.
Therefore, the human face anti-counterfeiting model is pre-trained, so that a method for learning a small sample set is mastered, or a method for learning and identifying the fake human face and the real human face in different modes is mastered, and good initialization parameters are obtained. When the fake face image of the new mode is a small sample set, the fake face model is updated, and the fake face model can be quickly converged due to the quick learning capability learned before, so that the fake face characteristic of the new mode can be quickly learned, the fake face model can be timely and effectively updated, the fake face image of the new mode can be timely and effectively identified, and attack of the fake face of the new mode can be timely and effectively defended.
The present disclosure also provides a counterfeit face recognition device, described below in conjunction with fig. 3.
Fig. 3 is a block diagram of some embodiments of a face-counterfeit identification device of the present disclosure. As shown in fig. 3, the apparatus 30 of this embodiment includes a small sample acquisition module 302, a model adjustment module 304, and a face recognition module 306.
A small sample acquiring module 302, configured to acquire a small sample set of the new class of forged face images.
The model adjustment module 304 is configured to update parameters of the pre-trained face anti-counterfeiting model by using a small sample set of new types of fake face images, where the parameters of the pre-trained face anti-counterfeiting model are respectively determined according to a plurality of tasks, and redetermined according to the plurality of groups of parameters, and the tasks include one or more small sample sets formed by the existing types of fake face images and real face images.
In some embodiments, the model adjustment module 304 is configured to update parameters of the face anti-counterfeiting model according to the fake face image in the new class of small sample set and the corresponding fine classification label in case the face anti-counterfeiting model is a classification model, or update parameters of the face anti-counterfeiting model according to the fake face image in the new class of small sample set and the corresponding coarse classification label in case the face anti-counterfeiting model is a regression model. The fine classification labels are used for labeling the types of the fake face images, and the coarse classification labels are used for labeling whether the fake face images are positive samples or negative samples.
In some embodiments, the model adjustment module 304 is configured to input the false face images in the new class of small sample set into the face anti-counterfeiting model to obtain probabilities that the false face images belong to different classes respectively when the face anti-counterfeiting model is a classification model, determine a first gradient according to the probabilities that the false face images belong to different classes respectively and corresponding fine classification labels, and update parameters of the face anti-counterfeiting model according to the first gradient, or input the false face images in the new class of small sample set into the face anti-counterfeiting model to obtain output values corresponding to the false face images when the face anti-counterfeiting model is a regression model, determine a second gradient according to the output values corresponding to the false face images and corresponding coarse classification labels, and update parameters of the face anti-counterfeiting model according to the second gradient.
The face recognition module 306 is configured to input the face image to be recognized into the updated face anti-counterfeiting model, and determine whether the face image to be recognized is a fake face image.
In some embodiments, the apparatus 30 further includes a pre-training module 308. The pre-training module 308 is configured to divide the existing type of fake face image and the real face image into a plurality of tasks, where each task includes a real face image type and a first preset number of existing types, each type includes a small sample set formed by a second preset number of supporting sample images and a third preset number of querying sample images, select a fourth preset number of tasks each time to form a batch, input the batch into the face anti-counterfeiting model, respectively determine a plurality of groups of parameters of the face anti-counterfeiting model according to the plurality of tasks of the batch, and redetermine the parameters of the face anti-counterfeiting model according to the plurality of groups of parameters until the face anti-counterfeiting model reaches a convergence condition, and complete pre-training of the face anti-counterfeiting model.
In some embodiments, the pre-training module 308 is configured to determine, for each task in a batch, a third gradient corresponding to the task according to the support sample image and the corresponding label, determine a set of parameters of the face anti-counterfeiting model according to the third gradient, determine a plurality of sets of parameters according to a plurality of tasks in the batch, determine a fourth gradient corresponding to the batch according to the query sample image and the label corresponding to the query sample image of the plurality of tasks, and redetermine parameters of the face anti-counterfeiting model according to the fourth gradient corresponding to the batch.
In some embodiments, the pre-training module 308 is configured to determine, for each task in the batch, a third gradient corresponding to the task according to the support sample image and the corresponding fine classification label if the face anti-counterfeiting model is a classification model, or determine, for each task in the batch, a third gradient corresponding to the task according to the support sample image and the corresponding coarse classification label if the face anti-counterfeiting model is a regression model. The fine classification labels are used for labeling the types of the fake face images, and the coarse classification labels are used for labeling whether the fake face images are positive samples or negative samples.
In some embodiments, the initial parameters of the face anti-counterfeiting model prior to pre-training are determined according to a deep learning training method.
In some embodiments, the existing categories include at least one of photo categories, video categories, mask categories. The forged face image of the existing category comprises forged face images of the existing category of at least one of a depth mode, a near infrared mode and a red, green and blue (RGB) mode. The real face image comprises a real face image of at least one of a depth mode, a near infrared mode and a red, green and blue (RGB) mode. The mode of the fake face image of the new category is different from the mode of the fake face image and the real face image of the existing category.
The identification means of counterfeited faces in embodiments of the present disclosure may each be implemented by various computing devices or computer systems, as described below in connection with fig. 4 and 5.
Fig. 4 is a block diagram of some embodiments of a face-counterfeit identification device of the present disclosure. As shown in fig. 4, the apparatus 40 of this embodiment includes a memory 410 and a processor 420 coupled to the memory 410, the processor 420 being configured to perform the method of recognizing a fake face in any of the embodiments of the present disclosure based on instructions stored in the memory 410.
The memory 410 may include, for example, system memory, fixed nonvolatile storage media, and the like. The system memory stores, for example, an operating system, application programs, boot Loader (Boot Loader), database, and other programs.
Fig. 5 is a block diagram of other embodiments of a face counterfeit identification device of the present disclosure. As shown in FIG. 5, the apparatus 50 of this embodiment includes a memory 510 and a processor 520, similar to the memory 410 and the processor 420, respectively. Input/output interface 530, network interface 540, storage interface 550, and the like may also be included. These interfaces 530,540,550 and the memory 510 and processor 520 may be connected by, for example, a bus 560. The input/output interface 530 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, a touch screen, etc. The network interface 540 provides a connection interface for various networking devices, such as may be connected to a database server or cloud storage server, or the like. The storage interface 550 provides a connection interface for external storage devices such as SD cards, U discs, and the like.
It will be appreciated by those skilled in the art that embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the disclosure, but rather to enable any modification, equivalent replacement, improvement or the like, which fall within the spirit and principles of the present disclosure.

Claims (16)

Translated fromChinese
1.一种伪造人脸的识别方法,包括:1. A method for identifying a forged face, comprising:将已有类别的伪造人脸图像和真实人脸图像划分为多个任务,其中,每个任务包括真实人脸图像类别和第一预设数量已有类别,每个类别包括第二预设数量的支持样本图像组成的小样本集和第三预设数量的查询样本图像;Divide the fake face images and real face images of existing categories into multiple tasks, wherein each task includes a real face image category and a first preset number of existing categories, and each category includes a small sample set consisting of a second preset number of support sample images and a third preset number of query sample images;每次选取第四预设数量的任务成一个批次,将该批次输入人脸防伪模型,针对该批次中的每个任务,根据支持样本图像和对应的标签,确定该任务对应的第三梯度,根据所述第三梯度确定所述人脸防伪模型的一组参数;Each time, a fourth preset number of tasks are selected into a batch, the batch is input into the face anti-counterfeiting model, for each task in the batch, a third gradient corresponding to the task is determined according to the supporting sample images and the corresponding labels, and a set of parameters of the face anti-counterfeiting model is determined according to the third gradient;根据该批次中多个任务分别确定多组参数,多个任务的查询样本图像和查询样本图像对应的标签,确定该批次对应的第四梯度;Determine multiple groups of parameters, query sample images of multiple tasks and labels corresponding to the query sample images according to the multiple tasks in the batch, and determine a fourth gradient corresponding to the batch;根据该批次对应的第四梯度,重新确定所述人脸防伪模型的参数;Re-determining the parameters of the face anti-counterfeiting model according to the fourth gradient corresponding to the batch;直至所述人脸防伪模型达到收敛条件,完成所述人脸防伪模型的预训练。Until the face anti-counterfeiting model reaches a convergence condition, the pre-training of the face anti-counterfeiting model is completed.2.根据权利要求1所述的识别方法,还包括:2. The identification method according to claim 1, further comprising:获取新类别的伪造人脸图像的小样本集;Obtain a small sample set of fake face images of a new category;利用所述新类别的伪造人脸图像的小样本集对预训练的人脸防伪模型的参数进行更新;其中,所述预训练的人脸防伪模型的参数是根据多个任务分别确定所述人脸防伪模型的多组参数,并根据所述多组参数重新确定的;所述任务包括:已有类别的伪造人脸图像和真实人脸图像组成的一个或多个小样本集;The parameters of the pre-trained face anti-counterfeiting model are updated using the small sample set of the new category of forged face images; wherein the parameters of the pre-trained face anti-counterfeiting model are determined by respectively determining multiple groups of parameters of the face anti-counterfeiting model according to multiple tasks, and are re-determined according to the multiple groups of parameters; the tasks include: one or more small sample sets consisting of forged face images and real face images of existing categories;将待识别的人脸图像输入更新后的所述人脸防伪模型,确定所述待识别的人脸图像是否为伪造人脸图像。The face image to be identified is input into the updated face anti-counterfeiting model to determine whether the face image to be identified is a forged face image.3.根据权利要求2所述的识别方法,其中,3. The identification method according to claim 2, wherein:所述利用所述新类别的伪造人脸图像的小样本集对所述人脸防伪模型的参数进行更新包括:The updating of the parameters of the face anti-counterfeiting model using the small sample set of the new category of forged face images includes:在所述人脸防伪模型为分类模型的情况下,根据所述新类别的小样本集中的伪造人脸图像和对应的细分类标签,对所述人脸防伪模型的参数进行更新;In the case where the face anti-counterfeiting model is a classification model, updating the parameters of the face anti-counterfeiting model according to the forged face images in the small sample set of the new category and the corresponding detailed classification labels;或者,在所述人脸防伪模型为回归模型的情况下,根据所述新类别的小样本集中的伪造人脸图像和对应的粗分类标签,对所述人脸防伪模型的参数进行更新;Alternatively, when the face anti-counterfeiting model is a regression model, the parameters of the face anti-counterfeiting model are updated according to the forged face images in the small sample set of the new category and the corresponding coarse classification labels;其中,所述细分类标签用于标注所述伪造人脸图像的类别,所述粗分类标签用于标注所述伪造人脸图像为正样本或负样本。The fine classification label is used to mark the category of the forged face image, and the coarse classification label is used to mark the forged face image as a positive sample or a negative sample.4.根据权利要求3所述的识别方法,其中,4. The identification method according to claim 3, wherein:所述在所述人脸防伪模型为分类模型的情况下,根据所述新类别的小样本集中的伪造人脸图像和对应的细分类标签,对所述人脸防伪模型的参数进行更新包括:When the face anti-counterfeiting model is a classification model, updating the parameters of the face anti-counterfeiting model according to the forged face images in the small sample set of the new category and the corresponding detailed classification labels includes:在所述人脸防伪模型为分类模型的情况下,将所述新类别的小样本集中的伪造人脸图像输入所述人脸防伪模型,得到各个伪造人脸图像分别属于不同类别的概率,根据各个伪造人脸图像分别属于不同类别的概率和对应的细分类标签确定第一梯度,根据所述第一梯度对所述人脸防伪模型的参数进行更新;In the case where the face anti-counterfeiting model is a classification model, forged face images in the small sample set of the new category are input into the face anti-counterfeiting model to obtain the probability that each forged face image belongs to a different category, determine a first gradient according to the probability that each forged face image belongs to a different category and the corresponding detailed classification label, and update the parameters of the face anti-counterfeiting model according to the first gradient;或者,所述在所述人脸防伪模型为回归模型的情况下,根据所述新类别的小样本集中的伪造人脸图像和对应的粗分类标签,对所述人脸防伪模型的参数进行更新包括:Alternatively, when the face anti-counterfeiting model is a regression model, updating the parameters of the face anti-counterfeiting model according to the forged face images in the small sample set of the new category and the corresponding coarse classification labels includes:在所述人脸防伪模型为回归模型的情况下,将所述新类别的小样本集中的伪造人脸图像输入所述人脸防伪模型,得到各个伪造人脸图像对应的输出值,根据各个伪造人脸图像对应的输出值和对应的粗分类标签确定第二梯度,根据所述第二梯度对所述人脸防伪模型的参数进行更新。When the face anti-counterfeiting model is a regression model, the forged face images in the small sample set of the new category are input into the face anti-counterfeiting model to obtain output values corresponding to each forged face image, and a second gradient is determined according to the output values corresponding to each forged face image and the corresponding coarse classification labels, and the parameters of the face anti-counterfeiting model are updated according to the second gradient.5.根据权利要求1所述的识别方法,其中,5. The identification method according to claim 1, wherein:所述针对该批次中的每个任务,根据支持样本图像和对应的标签,确定该任务对应的第三梯度包括:For each task in the batch, determining the third gradient corresponding to the task according to the supporting sample images and the corresponding labels includes:在所述人脸防伪模型为分类模型的情况下,所述针对该批次中的每个任务,根据支持样本图像和对应的细分类标签,确定该任务对应的第三梯度;In the case where the face anti-counterfeiting model is a classification model, for each task in the batch, determining a third gradient corresponding to the task according to the supporting sample images and the corresponding fine classification labels;或者,在所述人脸防伪模型为回归模型的情况下,所述针对该批次中的每个任务,根据支持样本图像和对应的粗分类标签,确定该任务对应的第三梯度;Alternatively, when the face anti-counterfeiting model is a regression model, for each task in the batch, a third gradient corresponding to the task is determined according to the supporting sample images and the corresponding coarse classification labels;其中,所述细分类标签用于标注所述伪造人脸图像的类别,所述粗分类标签用于标注所述伪造人脸图像为正样本或负样本。The fine classification label is used to mark the category of the forged face image, and the coarse classification label is used to mark the forged face image as a positive sample or a negative sample.6.根据权利要求1所述的识别方法,其中,6. The identification method according to claim 1, wherein:所述人脸防伪模型进行预训练之前的初始参数是根据深度学习训练方法确定的。The initial parameters of the face anti-counterfeiting model before pre-training are determined according to a deep learning training method.7.根据权利要求2-4任一项所述的识别方法,其中,7. The identification method according to any one of claims 2 to 4, wherein:所述已有类别包括:照片类别、视频类别、面具类别中至少一种;The existing categories include: at least one of a photo category, a video category, and a mask category;所述已有类别的伪造人脸图像包括:深度模态、近红外模态、红绿蓝RGB模态中至少一种模态的已有类别伪造人脸图像;The existing categories of forged face images include: existing categories of forged face images of at least one of the depth modality, near infrared modality, and red, green, and blue (RGB) modality;真实人脸图像包括:深度模态、近红外模态、红绿蓝RGB模态中至少一种模态的真实人脸图像;The real face image includes: a real face image of at least one of a depth modality, a near infrared modality, and a red, green, and blue (RGB) modality;所述新类别的伪造人脸图像的模态与所述已有类别的伪造人脸图像和真实人脸图像的模态不同。The modality of the new category of forged face images is different from the modalities of the existing categories of forged face images and real face images.8.一种伪造人脸的识别装置,包括:8. A forged face recognition device, comprising:预训练模块,用于将已有类别的伪造人脸图像和真实人脸图像划分为多个任务,其中,每个任务包括真实人脸图像类别和第一预设数量已有类别,每个类别包括第二预设数量的支持样本图像组成的小样本集和第三预设数量的查询样本图像;每次选取第四预设数量的任务成一个批次,将该批次输入人脸防伪模型,针对该批次中的每个任务,根据支持样本图像和对应的标签,确定该任务对应的第三梯度,根据所述第三梯度确定所述人脸防伪模型的一组参数;根据该批次中多个任务分别确定多组参数,多个任务的查询样本图像和查询样本图像对应的标签,确定该批次对应的第四梯度;根据该批次对应的第四梯度,重新确定所述人脸防伪模型的参数;直至所述人脸防伪模型达到收敛条件,完成所述人脸防伪模型的预训练。A pre-training module is used to divide the forged face images and real face images of existing categories into multiple tasks, wherein each task includes a real face image category and a first preset number of existing categories, and each category includes a small sample set composed of a second preset number of supporting sample images and a third preset number of query sample images; each time a fourth preset number of tasks are selected into a batch, and the batch is input into a face anti-counterfeiting model, for each task in the batch, a third gradient corresponding to the task is determined according to the supporting sample images and the corresponding labels, and a set of parameters of the face anti-counterfeiting model is determined according to the third gradient; multiple sets of parameters are determined respectively according to multiple tasks in the batch, and a fourth gradient corresponding to the batch is determined according to the query sample images of the multiple tasks and the labels corresponding to the query sample images; the parameters of the face anti-counterfeiting model are re-determined according to the fourth gradient corresponding to the batch; until the face anti-counterfeiting model reaches the convergence condition, the pre-training of the face anti-counterfeiting model is completed.9.根据权利要求8所述的识别装置,还包括:9. The identification device according to claim 8, further comprising:小样本获取模块,用于获取新类别的伪造人脸图像的小样本集;A small sample acquisition module, used to obtain a small sample set of forged face images of a new category;模型调整模块,用于利用所述新类别的伪造人脸图像的小样本集对预训练的人脸防伪模型的参数进行更新;其中,所述预训练的人脸防伪模型的参数是根据多个任务分别确定所述人脸防伪模型的多组参数,并根据所述多组参数重新确定的;所述任务包括:已有类别的伪造人脸图像和真实人脸图像组成的一个或多个小样本集;A model adjustment module, used to update the parameters of the pre-trained face anti-counterfeiting model using the small sample set of the new category of forged face images; wherein the parameters of the pre-trained face anti-counterfeiting model are determined according to multiple tasks, respectively, and are re-determined according to the multiple sets of parameters; the tasks include: one or more small sample sets consisting of forged face images and real face images of existing categories;人脸识别模块,用于将待识别的人脸图像输入更新后的所述人脸防伪模型,确定所述待识别的人脸图像是否为伪造人脸图像。The face recognition module is used to input the face image to be recognized into the updated face anti-counterfeiting model to determine whether the face image to be recognized is a forged face image.10.根据权利要求9所述的识别装置,其中,10. The identification device according to claim 9, wherein:所述模型调整模块用于在所述人脸防伪模型为分类模型的情况下,根据所述新类别的小样本集中的伪造人脸图像和对应的细分类标签,对所述人脸防伪模型的参数进行更新;或者,在所述人脸防伪模型为回归模型的情况下,根据所述新类别的小样本集中的伪造人脸图像和对应的粗分类标签,对所述人脸防伪模型的参数进行更新;The model adjustment module is used to update the parameters of the face anti-counterfeiting model according to the forged face images in the small sample set of the new category and the corresponding fine classification labels when the face anti-counterfeiting model is a classification model; or, if the face anti-counterfeiting model is a regression model, update the parameters of the face anti-counterfeiting model according to the forged face images in the small sample set of the new category and the corresponding coarse classification labels;其中,所述细分类标签用于标注所述伪造人脸图像的类别,所述粗分类标签用于标注所述伪造人脸图像为正样本或负样本。The fine classification label is used to mark the category of the forged face image, and the coarse classification label is used to mark the forged face image as a positive sample or a negative sample.11.根据权利要求10所述的识别装置,其中,11. The identification device according to claim 10, wherein:所述模型调整模块用于在所述人脸防伪模型为分类模型的情况下,将所述新类别的小样本集中的伪造人脸图像输入所述人脸防伪模型,得到各个伪造人脸图像分别属于不同类别的概率,根据各个伪造人脸图像分别属于不同类别的概率和对应的细分类标签确定第一梯度,根据所述第一梯度对所述人脸防伪模型的参数进行更新;或者,在所述人脸防伪模型为回归模型的情况下,将所述新类别的小样本集中的伪造人脸图像输入所述人脸防伪模型,得到各个伪造人脸图像对应的输出值,根据各个伪造人脸图像对应的输出值和对应的粗分类标签确定第二梯度,根据所述第二梯度对所述人脸防伪模型的参数进行更新。The model adjustment module is used to, when the face anti-counterfeiting model is a classification model, input the forged face images in the small sample set of the new category into the face anti-counterfeiting model to obtain the probability that each forged face image belongs to different categories, determine a first gradient according to the probability that each forged face image belongs to different categories and the corresponding detailed classification labels, and update the parameters of the face anti-counterfeiting model according to the first gradient; or, when the face anti-counterfeiting model is a regression model, input the forged face images in the small sample set of the new category into the face anti-counterfeiting model to obtain the output values corresponding to each forged face image, determine a second gradient according to the output values corresponding to each forged face image and the corresponding coarse classification labels, and update the parameters of the face anti-counterfeiting model according to the second gradient.12.根据权利要求8所述的识别装置,其中,12. The identification device according to claim 8, wherein:所述预训练模块用于在所述人脸防伪模型为分类模型的情况下,所述针对该批次中的每个任务,根据支持样本图像和对应的细分类标签,确定该任务对应的第三梯度;或者,在所述人脸防伪模型为回归模型的情况下,所述针对该批次中的每个任务,根据支持样本图像和对应的粗分类标签,确定该任务对应的第三梯度;The pre-training module is used for determining, for each task in the batch, the third gradient corresponding to the task according to the supporting sample images and the corresponding fine classification labels when the face anti-counterfeiting model is a classification model; or, for each task in the batch, the third gradient corresponding to the task according to the supporting sample images and the corresponding coarse classification labels when the face anti-counterfeiting model is a regression model;其中,所述细分类标签用于标注所述伪造人脸图像的类别,所述粗分类标签用于标注所述伪造人脸图像为正样本或负样本。The fine classification label is used to mark the category of the forged face image, and the coarse classification label is used to mark the forged face image as a positive sample or a negative sample.13.根据权利要求8所述的识别装置,其中,13. The identification device according to claim 8, wherein:所述人脸防伪模型进行预训练之前的初始参数是根据深度学习训练方法确定的。The initial parameters of the face anti-counterfeiting model before pre-training are determined according to a deep learning training method.14.根据权利要求9-11任一项所述的识别装置,其中,14. The identification device according to any one of claims 9 to 11, wherein:所述已有类别包括:照片类别、视频类别、面具类别中至少一种;The existing categories include: at least one of a photo category, a video category, and a mask category;所述已有类别的伪造人脸图像包括:深度模态、近红外模态、红绿蓝RGB模态中至少一种模态的已有类别伪造人脸图像;The existing categories of forged face images include: existing categories of forged face images of at least one of the depth modality, near infrared modality, and red, green, and blue (RGB) modality;真实人脸图像包括:深度模态、近红外模态、红绿蓝RGB模态中至少一种模态的真实人脸图像;The real face image includes: a real face image of at least one of a depth modality, a near infrared modality, and a red, green, and blue (RGB) modality;所述新类别的伪造人脸图像的模态与所述已有类别的伪造人脸图像和真实人脸图像的模态不同。The modality of the new category of forged face images is different from the modalities of the existing categories of forged face images and real face images.15.一种伪造人脸的识别装置,包括:15. A forged face recognition device, comprising:存储器;以及Memory; and耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如权利要求1-7任一项所述的伪造人脸的识别方法。A processor coupled to the memory, the processor being configured to execute the forged face recognition method according to any one of claims 1 to 7 based on instructions stored in the memory.16.一种计算机可读存储介质,其上存储有计算机程序,其中,该程序被处理器执行时实现权利要求1-7任一项所述方法的步骤。16. A computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
CN201910387689.0A2019-05-102019-05-10 Method, device and computer-readable storage medium for identifying forged human facesActiveCN111783505B (en)

Priority Applications (4)

Application NumberPriority DateFiling DateTitle
CN201910387689.0ACN111783505B (en)2019-05-102019-05-10 Method, device and computer-readable storage medium for identifying forged human faces
PCT/CN2020/086952WO2020228515A1 (en)2019-05-102020-04-26Fake face recognition method, apparatus and computer-readable storage medium
KR1020217040310AKR20220007130A (en)2019-05-102020-04-26 Counterfeit face recognition method, device and non-transitory computer readable storage medium
JP2021566527AJP7520888B2 (en)2019-05-102020-04-26 Method, apparatus, and non-transitory computer-readable storage medium for recognizing fake faces

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910387689.0ACN111783505B (en)2019-05-102019-05-10 Method, device and computer-readable storage medium for identifying forged human faces

Publications (2)

Publication NumberPublication Date
CN111783505A CN111783505A (en)2020-10-16
CN111783505Btrue CN111783505B (en)2025-01-03

Family

ID=72755586

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910387689.0AActiveCN111783505B (en)2019-05-102019-05-10 Method, device and computer-readable storage medium for identifying forged human faces

Country Status (4)

CountryLink
JP (1)JP7520888B2 (en)
KR (1)KR20220007130A (en)
CN (1)CN111783505B (en)
WO (1)WO2020228515A1 (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114663985B (en)*2020-12-232025-02-07北京眼神智能科技有限公司 Method, device, readable storage medium and equipment for silent face liveness detection
CN112329745A (en)*2021-01-042021-02-05北京沃东天骏信息技术有限公司Training method, face anti-counterfeiting detection method, related equipment and storage medium
CN113014914B (en)*2021-01-272022-11-01北京市博汇科技股份有限公司Neural network-based single face-changing short video identification method and system
CN112784790B (en)*2021-01-292022-05-10厦门大学 A meta-learning-based method for generalized fake face detection
CN114863470B (en)*2021-02-082024-11-22中国科学技术大学 Training Methods for Fake Portrait Detection Models
CN113205044B (en)*2021-04-302022-09-30湖南大学Deep fake video detection method based on characterization contrast prediction learning
CN113221786A (en)*2021-05-212021-08-06深圳市商汤科技有限公司Data classification method and device, electronic equipment and storage medium
CN113792581B (en)*2021-08-022025-06-17深圳市一心视觉科技有限公司 A method, device and electronic device for detecting living body
CN113723295B (en)*2021-08-312023-11-07浙江大学 A face forgery detection method based on image domain frequency domain dual-stream network
CN114120315A (en)*2021-09-132022-03-01海南大学Method and device for identifying electron microscope viruses based on small sample
CN113807281B (en)*2021-09-232024-03-29深圳信息职业技术学院Image detection model generation method, detection method, terminal and storage medium
CN114925748B (en)*2022-04-202024-05-24北京市商汤科技开发有限公司Model training and modal information prediction method, related device, equipment and medium
CN114821825B (en)*2022-06-302022-12-06广州中平智能科技有限公司Multi-granularity face forgery detection method, system, equipment and medium
CN116824710B (en)*2023-05-232025-04-29中国科学院自动化研究所Fake face identification method, fake face identification device, fake face identification equipment and storage medium
CN116740782B (en)*2023-05-302025-07-22北京百度网讯科技有限公司Image processing and model acquisition method and device, electronic equipment and storage medium
CN117496118B (en)*2023-10-232024-06-04浙江大学 A method and system for analyzing theft vulnerability of target detection model
CN117854159B (en)*2023-12-132024-09-03中国科学院自动化研究所 Face anti-counterfeiting recognition method and device
CN117611923B (en)*2024-01-082024-08-13北京锐融天下科技股份有限公司Identification method and system for identity document authenticity
CN118711231B (en)*2024-06-142025-05-30蚂蚁区块链科技(上海)有限公司Identity authentication model training method, identity authentication method, device and equipment
CN119006932B (en)*2024-10-212025-03-18南昌大学 A deep fake image detection method based on two-stage learning
CN120220216B (en)*2025-05-282025-07-29齐鲁工业大学(山东省科学院)Zero sample depth forging attribution method based on bimodal guidance

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108229331A (en)*2017-03-162018-06-29北京市商汤科技开发有限公司Face false-proof detection method and system, electronic equipment, program and medium
CN108776786A (en)*2018-06-042018-11-09北京京东金融科技控股有限公司Method and apparatus for generating user's truth identification model

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101464950B (en)*2009-01-162011-05-04北京航空航天大学Video human face identification and retrieval method based on on-line learning and Bayesian inference
US9104908B1 (en)*2012-05-222015-08-11Image Metrics LimitedBuilding systems for adaptive tracking of facial features across individuals and groups
KR102462818B1 (en)*2015-07-082022-11-04주식회사 케이티Method of motion vector and feature vector based fake face detection and apparatus for the same
CN107871100B (en)*2016-09-232021-07-06北京眼神科技有限公司 Face model training method and device, face authentication method and device
JP7040457B2 (en)2016-10-312022-03-23日本電気株式会社 Image processing device, image processing method, face recognition system and program
CN107506717B (en)*2017-08-172020-11-27南京东方网信网络科技有限公司Face recognition method based on depth transformation learning in unconstrained scene
CN108229120B (en)2017-09-072020-07-24北京市商汤科技开发有限公司Face unlocking method, face unlocking information registration device, face unlocking information registration equipment, face unlocking program and face unlocking information registration medium
CN109214414B (en)*2018-07-182022-02-22广东工业大学 A multi-task positive semidefinite constraint metric learning method for face recognition
CN109359541A (en)*2018-09-172019-02-19南京邮电大学 A sketch face recognition method based on deep transfer learning
CN109522798A (en)*2018-10-162019-03-26平安科技(深圳)有限公司Video anticounterfeiting method, system, device based on vivo identification and can storage medium
CN109697469A (en)*2018-12-262019-04-30西北工业大学A kind of self study small sample Classifying Method in Remote Sensing Image based on consistency constraint
CN109670491A (en)*2019-02-252019-04-23百度在线网络技术(北京)有限公司Identify method, apparatus, equipment and the storage medium of facial image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108229331A (en)*2017-03-162018-06-29北京市商汤科技开发有限公司Face false-proof detection method and system, electronic equipment, program and medium
CN108776786A (en)*2018-06-042018-11-09北京京东金融科技控股有限公司Method and apparatus for generating user's truth identification model

Also Published As

Publication numberPublication date
CN111783505A (en)2020-10-16
WO2020228515A1 (en)2020-11-19
JP2022532177A (en)2022-07-13
KR20220007130A (en)2022-01-18
JP7520888B2 (en)2024-07-23

Similar Documents

PublicationPublication DateTitle
CN111783505B (en) Method, device and computer-readable storage medium for identifying forged human faces
CN109766872B (en) Image recognition method and device
CN110741388B (en) Adversarial sample detection method, device, computing device and computer storage medium
CN111160102B (en)Training method of face anti-counterfeiting recognition model, face anti-counterfeiting recognition method and device
CN113449725B (en)Object classification method, device, equipment and storage medium
KR101993266B1 (en)method for designing and learning varying model and method for detecting video forgeries therewith
CN112381775A (en)Image tampering detection method, terminal device and storage medium
CN108710893B (en) A Feature Fusion-Based Classification Method for Digital Image Camera Source Models
CN110472494A (en)Face feature extracts model training method, facial feature extraction method, device, equipment and storage medium
US11645836B1 (en)Adversarial detection using discriminator model of generative adversarial network architecture
US11403560B2 (en)Training apparatus, image recognition apparatus, training method, and program
WO2020093303A1 (en)Processing method and apparatus based on facial recognition, and device and readable storage medium
CN113033305B (en)Living body detection method, living body detection device, terminal equipment and storage medium
CN108681735A (en)Optical character recognition method based on convolutional neural networks deep learning model
Mazumdar et al.Universal image manipulation detection using deep siamese convolutional neural network
Lv et al.Chinese character CAPTCHA recognition based on convolution neural network
US20170039451A1 (en)Classification dictionary learning system, classification dictionary learning method and recording medium
CN107203763A (en)Character recognition method and device
Prabu et al.Robust attack identification strategy to prevent document image forgeries by using Enhanced Learning Methodology
JP6573233B2 (en) Recognizability index calculation apparatus, method, and program
CN113505784A (en)Automatic nail annotation analysis method and device, electronic equipment and storage medium
CN114782853A (en)Video data processing method, device, computer equipment and storage medium
WO2018137226A1 (en)Fingerprint extraction method and device
CN112434547A (en)User identity auditing method and device
CN113158838B (en) Face Representation Attack Detection Method Based on Full-Size Depth Map Supervision

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp