Method and device for generating mixed attack style face pictures

By generating hybrid attack-style face images through generator inverse mapping and hybrid algorithms, the problem of insufficient training of new material masks in face recognition systems is solved, which improves system security, reduces costs, and protects privacy.

CN116935461BActive Publication Date: 2025-11-11BEIJING XUEZHITU NETWORK TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310673375.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2025-11-11
Estimated Expiration
2043-06-07

AI Technical Summary

Technical Problem

In existing technologies, facial recognition systems face challenges from attacks using new materials or processes, making it difficult to effectively train facial liveness detection models. This leads to reduced reliability of the models, and the production of individual resin masks is costly and infringes on the privacy of the data collectors.

Method used

By inversely mapping face image samples with various attack styles to latent codes using a generator, attack style mixing is performed to generate face images with mixed attack styles, thus enriching the training data of the face liveness detection model.

Benefits of technology

It improves the security and reliability of facial recognition systems, reduces the cost of generating offensive facial images, and protects the privacy of data collectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116935461B_ABST
    Figure CN116935461B_ABST
Patent Text Reader

Abstract

This application relates to the field of face recognition technology and discloses a method and device for generating face images with mixed attack styles. The generation method includes: using a pre-trained generator to inversely map face image samples containing multiple attack styles into corresponding latent coding samples; mixing the attack styles of the latent coding samples to obtain latent codes with mixed attack styles; and inputting the latent codes with mixed attack styles into the generator to obtain a target face image with mixed attack styles output by the generator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of facial recognition technology, and for example to a method and apparatus for generating facial images with hybrid attack styles. Background Technology

[0002] Currently, facial recognition systems have been applied in many areas of people's lives, such as unlocking electronic devices, access control, and financial payments. At the same time, facial recognition systems also face many security risks, such as attacks using printed face images, playing face videos on electronic devices, and wearing masks. To address this challenge, training a face liveness detection model is essential. For a real face, the face liveness detection model outputs a true result; for an attacked face, the face liveness detection model outputs a false result. In addition, training a face liveness detection model usually requires a large amount of real face datasets and attack face data. In related technologies, the process of obtaining attack face data is generally as follows: (1) Obtain 3D point cloud data of the subject's face; (2) Print a corresponding 3D mask using a specific material; (3) Have the attacker wear the mask and then take a photo of the person to obtain a face image of the masked person.

[0003] In the process of implementing the embodiments of this disclosure, at least the following problems were found in the related art:

[0004] In practical applications, the attack challenges faced by facial recognition systems are an open-set problem, meaning that new attack masks made of new materials or using new processes are constantly emerging on the market, such as resin masks, plaster masks, and silicone headgear masks. This means that the data from these attacked faces is not used in the training of facial liveness detection models. Furthermore, the cost of producing a single resin mask is typically over two thousand RMB, and it does not adequately protect the privacy of the user's facial biometric information. Therefore, generating facial images with hybrid attack styles is of significant importance for facial liveness detection models.

[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.

[0007] This disclosure provides a method and apparatus for generating face images with hybrid attack styles, a computing device and a storage medium, which can generate face images with hybrid attack styles, greatly enriching the training data of the face liveness detection model and improving the security of the entire face recognition system.

[0008] In some embodiments, the method for generating hybrid attack-style face images includes:

[0009] The generator obtained through pre-training can inversely map face image samples containing various attack styles into corresponding latent encoded samples.

[0010] The potential coding samples are subjected to attack style mixing to obtain potential coding with mixed attack styles;

[0011] The latent encoding of the hybrid attack style is input into the generator to obtain the target face image with the hybrid attack style output by the generator.

[0012] Optionally, the generator obtained through pre-training inversely maps face image samples containing multiple attack styles to corresponding latent encoded samples, including:

[0013] Obtain multiple facial images with the same identity identifier, where each facial image corresponds to a different attack style;

[0014] A face image sample is composed of face images with at least two different attack styles;

[0015] The generator obtained through pre-training is used to inversely map the face image samples into corresponding latent encoded samples.

[0016] Optionally, the step of mixing attack styles on the potential coding pairs to obtain potential codes with mixed attack styles includes:

[0017] Obtain each latent code from the latent coding sample;

[0018] By using a preset hybrid algorithm, each potential code is subjected to hybrid calculation to generate a potential code with a hybrid attack style.

[0019] Optionally, the face image samples include two face images with two different attack styles; the generator obtained through pre-training inversely maps the face image samples to corresponding latent encoded samples, including:

[0020] The generator uses the GANInversion algorithm to convert any face image in the face image sample into its corresponding first latent code m1.

[0021] The generator uses the GANInversion algorithm to convert another face image in the face image sample into the corresponding second latent code m2.

[0022] The first latent code m1 and the second latent code m2 are constructed as latent code samples.

[0023] Optionally, the step of performing hybrid calculations on each potential code using a preset hybrid algorithm to generate potential codes with hybrid attack styles includes:

[0024] Using a weighted average algorithm, each row of the first latent code m1 and each row of the second latent code m2 are weighted and averaged to obtain the latent code m3 with a hybrid attack style. The formula for calculating the weighted average is as follows:

[0025] m3=λ1×m1+λ2×m2

[0026] Wherein, λ1 and λ2 are two 16-dimensional vectors, and their values ​​are preset values.

[0027] Optionally, before using the pre-trained generator to inversely map face image samples containing various attack styles to their corresponding latent encoded samples, the method further includes:

[0028] Collect multiple real face images from the same batch, with each real face image corresponding to a different attack style;

[0029] A generative adversarial network (GAN) is trained using multiple real-world face images with aggressive styles, and the generator in the GAN is retained.

[0030] Optionally, the attack styles include print attacks on paper, face mask attacks made of plaster, face mask attacks made of resin, and replay attacks displayed on electronic screens.

[0031] In some embodiments, the apparatus for generating hybrid attack-style facial images includes:

[0032] The sample construction module is configured to use a pre-trained generator to inversely map face image samples containing multiple attack styles into corresponding latent encoded samples.

[0033] The style mixing module is configured to perform attack style mixing on the potential coding sample to obtain potential coding with mixed attack styles;

[0034] The image generation module is configured to input the potential encoding of the hybrid attack style into the generator to obtain a target face image with a hybrid attack style output by the generator.

[0035] In some embodiments, the computing device includes a processor and a memory storing program instructions, the processor being configured to, when executing the program instructions, perform the method for generating hybrid attack-style face images as described in this application.

[0036] In some embodiments, the storage medium stores program instructions that, when executed, perform the method for generating hybrid attack-style face images as described in this application.

[0037] The method and apparatus for generating hybrid attack-style face images, computing devices, and storage media provided in this disclosure can achieve the following technical effects:

[0038] This application employs techniques applied in the field of machine learning. By selecting face images with different target attack styles to form face image samples, a trained generator is used to inversely map the face image samples into corresponding latent coding samples. Then, the latent coding samples are mixed with attack styles, and a mixing algorithm is used to obtain the latent codes of mixed attack styles. This enables the output of face images with mixed attack styles, greatly enriching the training data of the face liveness detection model and improving the security and reliability of the entire face recognition system.

[0039] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description

[0040] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein:

[0041] Figure 1 This is a schematic diagram of the system architecture of a generative adversarial network;

[0042] Figure 2 This is a schematic diagram illustrating the working principle of an encoder;

[0043] Figure 3 This is a schematic diagram of a method for generating face images with hybrid attack styles provided in an embodiment of this disclosure;

[0044] Figure 4 This is a schematic diagram of another method for generating face images with hybrid attack styles provided in this disclosure embodiment;

[0045] Figure 5 This is a schematic diagram of another method for generating face images with hybrid attack styles provided in this disclosure embodiment;

[0046] Figure 6 This is a schematic diagram of a specific application process provided in an embodiment of this disclosure;

[0047] Figure 7 This is a schematic diagram of an apparatus for generating hybrid attack-style face images provided in an embodiment of this disclosure;

[0048] Figure 8 This is a schematic diagram of a computing device provided in an embodiment of this disclosure. Detailed Implementation

[0049] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.

[0050] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.

[0051] Unless otherwise stated, the term "multiple" means two or more.

[0052] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.

[0053] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0054] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.

[0055] Combination Figure 1As shown, a Generative Adversarial Network (GAN) is a neural network learning model that learns the distribution of data through a continuous game between a generator and a discriminator. During training, the generator aims to generate realistic images to deceive the discriminator, while the discriminator aims to distinguish between real and fake images generated by the generator. This creates a dynamic "game" between the generator and the discriminator. Ultimately, the generator's fake samples become almost indistinguishable from real samples, rendering the discriminator unable to differentiate between them. At this point, the generator and discriminator reach equilibrium, and the training process ends.

[0056] In related technologies, numerous GAN models, such as PCGAN, BigGAN, and StyleGAN, have been developed to generate high-quality, diverse images from random noise input. Recent research has shown that GANs can effectively encode rich semantic information in intermediate features and hidden space. These theories suggest that images with diverse characteristics can be synthesized by altering the encoding in the hidden space. However, because GANs lack inference capabilities and encoders, this processing can only be applied to images generated by GANs, not to real-world images.

[0057] Combination Figure 2 As shown, the goal of an encoder is to encode input images, text, or audio into low-dimensional latent codes or feature representations. Encoders are typically implemented using neural networks, including convolutional layers, pooling layers, and batch normalization layers. Convolutional layers are responsible for acquiring local features of the image, pooling layers downsample the image and pass scale-invariant features to the next layer, and batch normalization layers primarily normalize the distribution of training images and accelerate learning. Taking the encoding of a face image as an example, the encoder extracts features from the face image to form a latent code, which contains the main information of the face image. For example, the elements of this vector might represent skin color, eyebrow position, eye size, etc.

[0058] In related technologies, facial recognition systems face numerous security risks. To address this challenge, training a facial liveness detection model is objectively valuable. For a real face, the liveness detection model outputs a true result; however, for an attacked face, the model outputs a false result. Therefore, training a facial liveness detection model typically requires a large dataset of both real and attacked faces. However, the cost of producing a single resin mask is usually over 2,000 RMB, and it cannot adequately protect the privacy of the user's facial biometric information. This means that once new materials or processes for attacking masks emerge, the reliability of existing facial liveness detection models will decrease. Therefore, how to generate new attack-style facial mask images at low cost using existing attack-style face images is of significant importance for facial liveness detection tasks.

[0059] Therefore, in combination Figure 3 As shown, this disclosure provides a method for generating face images with hybrid attack styles, including:

[0060] Step 301: Using the pre-trained generator, face image samples containing various attack styles are inversely mapped to corresponding latent encoded samples.

[0061] Step 302: Perform attack style mixing on the potential coding sample to obtain potential coding with mixed attack styles.

[0062] Step 303: Input the potential encoding of the hybrid attack style into the generator to obtain the target face image with the hybrid attack style output by the generator.

[0063] The method for generating face images with mixed attack styles provided in this disclosure selects face images with different target attack styles to form face image samples. The trained generator is used to inversely map the face image samples into corresponding latent coding samples. Then, the attack styles of the latent coding samples are mixed, and the latent coding with mixed attack styles is obtained through the mixing algorithm. This enables the output of face images with mixed attack styles, which greatly enriches the training data of the face liveness detection model and improves the security and reliability of the entire face recognition system.

[0064] Optionally, combined Figure 4 As shown, the step of training a generative adversarial network (GAN) based on a preset set of facial data samples and retaining the generator in the GAN includes:

[0065] Step 401: Collect multiple real face images from the same batch, and multiple face images with preset attack styles corresponding to each real face image.

[0066] Step 402: Using the multiple real face images and multiple face images with preset attack styles, a generative adversarial network is trained based on the StyleGAN architecture, and the generator in the generative adversarial network is retained.

[0067] In the embodiments of this application, the face recognition system of this application can collect a batch of face images with multiple preset attack styles, including real face images M1 of the same group of people, face images M2 printed on paper in the style of print attack, face images M3 made of plaster mask, face images M4 made of resin mask, and face images M5 displayed on an electronic screen in the style of replay attack.

[0068] Furthermore, the face recognition system of this application is based on the StyleGAN architecture. Using the data in step 402, a generative adversarial network is trained. This generative adversarial network includes an generator G and a discriminator D. After training, the generator G of the network is retained. Here, the generator G is a neural network whose input is a latent code, for example, a matrix with a dimension of 16×512. The output of the generator G is a face image, such as a 3×512×512 RGB image.

[0069] This ensures better generalization ability of the generator and guarantees the quality and reliability of subsequent hybrid attack style face images.

[0070] In the embodiments of this application, combined with Figure 6 As shown, for face images with the same identity identifier, images of two different attack types are selected to form samples. For example, face images from a replay attack on an electronic screen and face images from a resin mask attack are selected. Using the generator G obtained from the above training, each face image is converted into a corresponding latent code through the GANInversion algorithm, thereby constructing a latent code sample including a first latent code m1 and a second latent code m2.

[0071] Optionally, combined Figure 5 As shown in the embodiments of this disclosure, another method for generating face images with hybrid attack styles is provided, including:

[0072] Step 501: Obtain multiple face images with the same identity identifier, where each face image corresponds to a different attack style.

[0073] Step 502: Select at least two different attack styles of face images to form a face image sample.

[0074] Step 503: Using the pre-trained generator, the face image samples are inversely mapped to the corresponding latent encoded samples.

[0075] Step 504: Obtain each potential code in the potential coding sample.

[0076] Step 505: Using a preset hybrid algorithm, perform hybrid calculations on each potential code to generate a potential code with a hybrid attack style.

[0077] Step 506: Input the latent encoding of the hybrid attack style into the generator to obtain the target face image with the hybrid attack style output by the generator.

[0078] In this way, generating target face images with hybrid attack styles through a generator can greatly reduce the cost of obtaining target face images with hybrid attack styles. It eliminates the need to print corresponding 3D masks using materials such as plaster, resin, and silicone, then have the attacker wear the mask, and then take a photo of the person to obtain a face image of the person wearing the mask. This makes the application highly feasible and versatile, and can effectively protect the privacy of the collector's facial biometric information.

[0079] In the embodiments of this application, specifically, in conjunction with Figure 6 As shown, the face image sample may include two face images with two different attack styles, such as face images from an electronic screen attack and a resin mask attack. Using the generator, the GANInversion algorithm is used to convert any one face image in the face image sample into a corresponding first latent code m1. Similarly, using the generator, the GANInversion algorithm is used to convert the other face image in the face image sample into a corresponding second latent code m2. The first latent code m1 and the second latent code m2 are then used to construct a latent code sample.

[0080] Then, using a weighted average algorithm, each row of the first latent code m1 and each row of the second latent code m2 are weighted and averaged to obtain the latent code m3 with a hybrid attack style. The formula for calculating the weighted average is as follows:

[0081] m3=λ1×m1+λ2×m2

[0082] Wherein, λ1 and λ2 are two 16-dimensional vectors, and their values ​​are preset values.

[0083] In this way, the algorithm that uses mixed attack style face images can generate multiple styles of attack faces, which greatly enriches the training data of the face liveness detection model, improves the accuracy of the face liveness detection model, and thus ensures the security of the entire face recognition system.

[0084] Combination Figure 7 As shown, this disclosure provides an apparatus for generating hybrid attack-style face images, comprising:

[0085] The sample construction module 701 is configured to use a pre-trained generator to inversely map face image samples containing multiple attack styles into corresponding latent encoded samples.

[0086] The style mixing module 702 is configured to perform attack style mixing on the potential coding sample to obtain a potential coding with a mixed attack style;

[0087] Image generation module 703 is configured to input the latent encoding of the hybrid attack style into the generator to obtain a target face image with a hybrid attack style output by the generator.

[0088] Optionally, the sample construction module 701 is specifically configured as follows:

[0089] Obtain multiple facial images with the same identity identifier, where each facial image corresponds to a different attack style;

[0090] A face image sample is composed of face images with at least two different attack styles;

[0091] The generator obtained through pre-training is used to inversely map the face image samples into corresponding latent encoded samples.

[0092] Optionally, the style mixing module 702 is specifically configured as follows:

[0093] Obtain each latent code from the latent coding sample;

[0094] By using a preset hybrid algorithm, each potential code is subjected to hybrid calculation to generate a potential code with a hybrid attack style.

[0095] The apparatus for generating face images with mixed attack styles provided in this disclosure selects face images with different target attack styles to form face image samples. The trained generator is used to inversely map the face image samples into corresponding latent coding samples. Then, the attack styles of the latent coding samples are mixed, and the latent coding with mixed attack styles is obtained through the mixing algorithm. This enables the output of face images with mixed attack styles, which greatly enriches the training data of the face liveness detection model and improves the security and reliability of the entire face recognition system.

[0096] Combination Figure 8 As shown, this embodiment of the present disclosure provides a computing device including a processor 800 and a memory 801. Optionally, the device may further include a communication interface 802 and a bus 803. The processor 800, communication interface 802, and memory 801 can communicate with each other via the bus 803. The communication interface 802 can be used for information transmission. The processor 800 can call logical instructions in the memory 801 to execute the method for generating hybrid attack-style face images described in the above embodiment.

[0097] Furthermore, the logic instructions in the aforementioned memory 801 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0098] The memory 801, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 800 executes functional applications and data processing by running the program instructions / modules stored in the memory 801, thereby implementing the method for generating hybrid attack-style face images in the above embodiments.

[0099] The memory 801 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 801 may include high-speed random access memory and may also include non-volatile memory.

[0100] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to perform the above-described method for generating hybrid attack-style face images.

[0101] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0102] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code; it can also be a transient storage medium.

[0103] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

[0104] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0105] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. Furthermore, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

Claims

1. A method for generating face images with hybrid attack styles, characterized in that, include: The generator obtained through pre-training can inversely map face image samples containing various attack styles into corresponding latent encoded samples. Specifically, this includes: acquiring multiple face images with the same identity identifier, where each face image corresponds to a different attack style; and selecting face images with at least two different attack styles to form a face image sample. The potential coding samples are subjected to attack style mixing to obtain potential coding with mixed attack styles; The latent encoding of the hybrid attack style is input into the generator to obtain the target face image with the hybrid attack style output by the generator.

2. The generation method according to claim 1, characterized in that, The generator obtained through pre-training inversely maps face image samples containing various attack styles to corresponding latent encoded samples, including: Obtain multiple facial images with the same identity identifier, where each facial image corresponds to a different attack style; A face image sample is composed of face images with at least two different attack styles; The generator obtained through pre-training is used to inversely map the face image samples into corresponding latent encoded samples.

3. The generation method according to claim 2, characterized in that, The step of mixing attack styles on the potential coding pairs to obtain potential codes with mixed attack styles includes: Obtain each latent code from the latent coding sample; By using a preset hybrid algorithm, each potential code is subjected to hybrid calculation to generate a potential code with a hybrid attack style.

4. The generation method according to claim 3, characterized in that, The face image sample includes two face images with two different attack styles; The generator obtained through pre-training inversely maps the face image samples to corresponding latent encoded samples, including: The generator uses the GAN Inversion algorithm to convert any face image in the face image sample into its corresponding first latent code m1. The generator uses the GAN Inversion algorithm to convert another face image in the face image sample into the corresponding second latent code m2. The first latent code m1 and the second latent code m2 are constructed as latent code samples.

5. The generation method according to claim 4, characterized in that, The process of generating hybrid attack style potential codes by performing hybrid calculations on each potential code using a preset hybrid algorithm includes: Using a weighted average algorithm, each row of the first latent code m1 and each row of the second latent code m2 are weighted and averaged to obtain the latent code m3 with a hybrid attack style. The formula for calculating the weighted average is as follows: m3 = λ1×m1 + λ2×m2 Wherein, λ1 and λ2 are two 16-dimensional vectors, and their values ​​are preset values.

6. The generation method according to any one of claims 1 to 5, characterized in that, Before the generator, which is obtained through pre-training, inversely maps face image samples containing various attack styles to their corresponding latent encoded samples, the process also includes: Collect multiple real face images from the same batch, with each real face image corresponding to a different attack style; A generative adversarial network (GAN) is trained using multiple real-world face images with aggressive styles, and the generator in the GAN is retained.

7. The generation method according to any one of claims 1 to 5, characterized in that, The attack styles include print attacks on paper, attacks using plaster masks, attacks using resin masks, and replay attacks displayed on electronic screens.

8. An apparatus for generating facial images with hybrid attack styles, characterized in that, include: The sample construction module is configured to use a pre-trained generator to inversely map face image samples containing multiple attack styles into corresponding latent encoded samples; specifically, it includes: acquiring multiple face images with the same identity identifier, wherein each face image corresponds to one attack style; and selecting face images with at least two different attack styles to form a face image sample; The style mixing module is configured to perform attack style mixing on the potential coding sample to obtain potential coding with mixed attack styles; The image generation module is configured to input the potential encoding of the hybrid attack style into the generator to obtain a target face image with a hybrid attack style output by the generator.

9. A computing device, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to, when executing the program instructions, perform the method for generating hybrid attack-style face images as described in any one of claims 1 to 7.

10. A storage medium storing program instructions, characterized in that, When the program instructions are executed, they perform the method for generating hybrid attack-style face images as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Face recognition data set generation method and device, electronic equipment and storage medium

    CN114612989A

  • Virtual face image generation method and device and electronic equipment

    CN115953821A