Attribute modification-based confrontation face image generation method

By extracting target facial features in a black box environment and combining it with an adversarial makeup transfer generation network, an adversarial face image with attack capabilities and visually imperceptible is generated, which solves the problems of poor image quality and low attack success rate in the existing technology. , significantly reducing the recognition accuracy of the face recognition network and protecting personal privacy.

CN118780973APending Publication Date: 2024-10-15BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410854979.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

In a black box environment, it is difficult for existing technologies to improve the attack capabilities of face recognition models while maintaining image quality, and the success rate of attacks on unseen target models is low, and it is difficult to balance concealment and attack intensity.

Method used

The generator extracts feature values ​​from the target image and performs a blur operation before adding the source image. Combined with the adversarial makeup transfer to generate the network structure, an adversarial face image with attack capabilities and visually imperceptible is generated, using the encoder, ID injection module and decoding The machine is trained and the loss function is optimized to ensure attack effect and image quality.

Benefits of technology

Under the black box setting, the recognition accuracy of unauthorized face recognition networks is significantly reduced, and the generated adversarial images are visually difficult to detect, while improving the transferability and concealment of attacks and protecting personal privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118780973A_ABST
    Figure CN118780973A_ABST
Patent Text Reader

Abstract

The invention provides a confrontation face image generation method based on attribute modification. The method comprises the following steps: extracting a feature value of a target face from a target image through a generator, performing fuzzy operation on the feature value, and changing the feature value into a source image to obtain a face-changed confrontation face image; and makeup transfer processing is carried out on the confrontation face image through a confrontation makeup transfer generation network structure, and a final confrontation face image of the target image is obtained. The confrontation image generated by the method can generate more attacks which are difficult to perceive visually under the condition that the attack capability is ensured. Meanwhile, a large number of quantitative experiments show that the recognition accuracy of the unauthorized face recognition network can be remarkably reduced under the setting of the black box, and then personal privacy is protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for generating adversarial face images based on attribute modification. Background Art

[0002] With the rapid development of deep neural networks, it has triggered a research boom in various fields of real artificial intelligence, especially in the field of computer vision. Currently, face recognition (FR) related applications are very common. Figure 1 FIG. 1 is a schematic diagram of an application scenario of a face recognition model in the prior art. Figure 1 As shown in the figure, many real-life situations require identity authentication, such as face unlocking and payment, which all rely on face recognition. However, overly powerful face recognition also poses a great threat to personal privacy. For example, face recognition models can identify a lot of private facial information on social media, and then analyze the acquired information to track user relationships. This information leakage is serious for individuals, so there is an urgent need to propose a method to help individuals protect their facial images that can interfere with the recognition of unauthorized FR systems.

[0003] With the rapid development of AI technology, the technology of generating adversarial faces has become simpler, such as Figure 2 Two types of adversarial faces generated using different generation techniques are shown, namely, adversarial faces generated based on gradients and adversarial faces generated based on attributes. It can be seen that, unlike the technique of generating adversarial faces based on gradients, the adversarial generation method based on attributes can more easily create more realistic and hidden adversarial face images. Therefore, the attribute-based method is used to generate adversarial faces to protect users' private photos.

[0004] The research problem of adversarial face generation technology is how to generate images with attack capabilities so that the FR face recognition model will misjudge it while ensuring a certain degree of concealment. A common attack on face recognition tasks is to combine the structure of the Generative Adversarial Network (GAN) and then generate adversarial faces based on noise methods. These attack methods add p-norm perturbations to single pixels, reduce the transferability of the attack, and are relatively vulnerable to denoising models. Some scholars use printed adversarial hats and printed glasses as physically realizable forms to attack real-world face recognition models. Some noise addition to digital images can also attack the real world. This attack method can pose a direct threat to real life. The attacker can mislead the corresponding FR face recognition model to make it misjudge by wearing glasses or hats, but this modification is essentially a modification at the pixel level, and the generated adversarial face image is very different from the original image in a large area, and it almost does not have the characteristic of concealment. It just explores the feasibility of adversarial samples in the physical real world. Some scholars first used a GAN-based framework to synthesize facial perturbations in salient facial areas. Some scholars also use GAN to create fake face images. Some scholars have designed a makeup generation framework to synthesize adversarial eyeshadow makeup for transferable attacks, and some scholars have designed a makeup generation framework to synthesize adversarial full-face makeup for transferable attacks. Recently, some scholars have explored a new form of attack - attribute-based adversarial attack. Through interpolation, adversarial clues can be encoded into a single facial attribute. However, its sample interpolation does not explore the use of attributes and may produce limited image quality. Some scholars generate attacks by perturbing high-level semantics instead of perturbing low-level pixels to improve the transferability of the attack. The framework creates adversarial noise and adds it to different attributes based on the difference between face recognition features and targets. Important perceptual attribute selection and multi-objective optimization strategies are introduced to further ensure the balance between stealth and attack strength. However, in the black box case, these current methods have poor attack effects, and their stealth is also good or bad, and they cannot achieve good results when attacking FR models.

[0005] The disadvantages of the above-mentioned prior art methods for generating adversarial face attack FR models include:

[0006] 1) Accessibility to the target model. Most existing solutions are white-box attacks, where the attacker has very specific knowledge of the target model to be attacked, which is not very realistic. Or they are query-based black-box attacks, where the attacker can query the target model arbitrarily. Since users do not know what kind of DNN the third-party tracker is running, it is not feasible to protect user privacy.

[0007] 2) Poor visual quality. As can be seen from the noise-based attacks described above, existing adversarial attacks against FR systems cannot preserve image quality in a black-box setting. Patch-based adversarial attacks usually cause rather strange and obvious changes to the source image.

[0008] 3) Weak transferability. The above also shows that the current technical level has a relatively low success rate in attacking black-box recognition models. The main reason is that the generated adversarial faces still need to be improved in terms of transferability, and the attack capability is greatly reduced when attacking unseen target models.

[0009] In summary, how to balance the visual quality and attack capability of adversarial face images in a black-box setting remains a challenge. Summary of the invention

[0010] The embodiment of the present invention provides an adversarial face image generation method based on attribute modification, so as to effectively improve the authenticity identification capability of a face recognition model.

[0011] In order to achieve the above object, the present invention adopts the following technical scheme.

[0012] A method for generating adversarial face images based on attribute modification, comprising:

[0013] The generator extracts the feature values ​​of the target face from the target image, blurs the feature values ​​and replaces them with the source image to obtain the adversarial face image after face swapping.

[0014] The adversarial face image is processed by performing makeup transfer on the adversarial face image through an adversarial makeup transfer generation network structure to obtain a final adversarial face image of the target image.

[0015] Preferably, the step of extracting the feature value of the target face from the target image by a generator, performing a fuzzy operation on the feature value and replacing it with the source image to obtain the face-swapped adversarial face image includes:

[0016] The generator is set to include an encoder, an ID injection module, a decoder and an eye information extraction module. The encoder extracts some feature values ​​of the target face from the target image Xt. The ID injection module transfers the identity information of Xt to the features extracted by the encoder. The decoder restores the modified features to the target image Xt to obtain the target image after identity transfer. The eye information extraction module extracts the eye mask area of ​​the target image after identity transfer, performs a blur operation and then replaces it with the source image Xs to obtain the adversarial face image Xr after face swapping.

[0017] The encoder, ID injection module and decoder are trained. The training loss function includes identity loss and reconstruction loss. Let the image output by the encoder be Xg, the eye mask defined be M, and Xs be the source image. The generated adversarial face image after face swapping is:

[0018] Xr=Xg∩M+Xs∩(255_M) (1)

[0019] The identity loss between Xr and Xt is defined as follows:

[0020] L id =1-cos[f(Xt),f(Xr)] (2)

[0021] The reconstruction loss between Xr and Xt is defined as follows:

[0022] L rec =||Xr-Xs||1 (3)

[0023] The matching loss function between Xr and Xs is extracted using the discriminator as follows:

[0024]

[0025] Where D(i) represents the i-th layer feature extractor of the discriminator D, Ni represents the number of elements in the i-th layer, and M represents the total number of layers;

[0026] So the total loss of the adversarial face image Xr is:

[0027] L total =λ id L id +λ rec L rec +λ oFM L oFM (5)

[0028] The three coefficients are hyperparameters of weight proportion;

[0029] According to the total loss L of the adversarial face image Xr total Adjust the parameters of the encoder, ID injection module and decoder, when the total loss L of the adversarial face image Xr total When the generated Xr image and Xt are recognized as the same person and Xr remains visually similar to Xs, the training ends and the parameters of the current encoder, ID injection module and decoder are retained to obtain the trained encoder, ID injection module and decoder.

[0030] Preferably, the step of performing makeup transfer processing on the adversarial face image by generating a network structure through adversarial makeup transfer to obtain a final adversarial face image of the target image comprises:

[0031] The makeup of Xr and the reference makeup y are extracted and exchanged by the makeup removal adversarial module H to obtain the final adversarial face image G(Xr, y) of the target image; G is the generator part of the makeup transfer PSGAN model, which realizes the makeup exchange of the two input faces; D is the discriminator part of the GAN structure;

[0032] The above generator G, makeup removal adversarial H and discriminator D are trained. The training loss functions include generator loss function, discriminator loss function, adversarial loss function and adversarial ensemble loss function. G and D are trained first. After reaching a balance according to the loss function, the parameters of the discriminator D are saved and do not participate in subsequent training. Then G and H are trained to continue to optimize the parameters. When the generated G(Xr, y) can be recognized as the target image and at the same time ensure visual consistency with the source image Xs, the training is completed, and the trained generator G, makeup removal adversarial H and discriminator D are obtained.

[0033] It can be seen from the technical solutions provided by the embodiments of the present invention that the adversarial images generated by the method of the present invention can generate more visually imperceptible attacks while ensuring the attack capability. At the same time, a large number of quantitative experiments show that under the black box setting, the present invention can significantly reduce the recognition accuracy of unauthorized face recognition networks, thereby protecting personal privacy.

[0034] Additional aspects and advantages of the present invention will be given in part in the following description, which will become obvious from the following description, or may be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0036] Figure 1 A schematic diagram of an application scenario of a face recognition model in the prior art;

[0037] Figure 2 Adversarial face images generated by two different methods in the prior art;

[0038] Figure 3 A face recognition model target attack process provided by an embodiment of the present invention;

[0039] Figure 4 A specific processing flow chart of a method for generating an adversarial face image based on attribute modification is provided for the present invention;

[0040] Figure 5 A schematic diagram of the first stage framework of Adv-Idmask provided in an embodiment of the present invention;

[0041] Figure 6 A schematic diagram of the second stage framework of Adv-Idmask provided in an embodiment of the present invention;

[0042] Figure 7 A schematic diagram of an adversarial face generated in two stages provided by an embodiment of the present invention;

[0043] Figure 8 A schematic diagram of a confidence score on Face++ provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0045] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or coupling. The term "and / or" used herein includes any unit and all combinations of one or more associated listed items.

[0046] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.

[0047] To facilitate understanding of the embodiments of the present invention, several specific embodiments will be further explained below with reference to the accompanying drawings, and each embodiment does not constitute a limitation on the embodiments of the present invention.

[0048] The present invention focuses on enhancing the ability to resist attacks, and proposes a face recognition resist attack algorithm based on attribute modification with good generalization ability for unknown FR models. The present invention provides a method for generating adversarial face images based on attribute modification. The method studies how to deceive the currently common CNN (Convolutional Neural Networks, CNN)-based recognition model in a black box situation. The algorithm goal is to generate adversarial face images so that they are recognized as target persons by the target recognition model while ensuring the image content and quality. In the black box situation, the structure and parameters of the target face recognition model cannot be obtained, and it is a model that has never been seen during training.

[0049] The present invention provides an implementation principle of a method for generating an adversarial face image based on attribute modification. Figure 3 As shown in Figure 2, this method uses the two-stage attack of Adv-Idmask to generate transferable and hidden adversarial face images. The specific processing flow is as follows: Figure 4 As shown, the processing steps include the following:

[0050] Step S10: extracting the feature values ​​of the target face from the target image through the generator, blurring the feature values ​​and replacing them with the source image to obtain the adversarial face image after the face-swap operation.

[0051] Step S20: performing makeup transfer processing on the adversarial face image through the structure of the adversarial makeup transfer generation network to obtain a final adversarial face image of the target image.

[0052] The attack is strengthened again and the makeup information transfer network is used to perform some image quality repair.

[0053] The above step S10 specifically includes: the first step is to add the eye information transfer network of part of the target face information. Because the purpose of attacking the FR model is to make it recognize as the target image target, the method of the present invention can add some target face information to the source image in advance to improve the final similarity score, and then the present invention adds makeup perturbation to attack again. The first step framework is as follows Figure 5 As shown in the figure, it is divided into two parts: the generator and the discriminator. The generator is mainly responsible for generating adversarial face images after exchanging eye information, and the discriminator ensures the visual quality of the generated image.

[0054] The generator consists of four parts, including an encoder, an ID injection module (optimized Residual Block), a decoder, and an eye information extraction module (Mask-eye module). The encoder extracts some feature values ​​of the target face from the target image Xt; the ID injection module transfers the identity information of Xt to the features extracted by the encoder; the decoder restores the modified features to the target image Xt to obtain the target image after identity transfer;

[0055] Mask-eye extracts the eye mask area of ​​the target image after identity transfer, performs a blur operation and then swaps it into the Xs source image to obtain the adversarial face image after face swap. The present invention uses reconstruction loss to ensure that the network generation of the present invention has a visually similar result to the Xs source face, and uses identity loss to ensure that the network generation of the present invention has an identity similar result to the Xt target image face. The two are balanced to achieve the effect of both. The discriminator uses the discriminator using the patchGAN version.

[0056] In the first stage, the encoder, identity embedding module and decoder are trained. The training ends when the generated Xr image and Xt are recognized as the same person by Arcface, and Xr remains visually similar to Xs. The following loss functions include identity loss and reconstruction loss. The identity loss is used to constrain Xr and Xt to be recognized as the same person as much as possible, and the reconstruction loss is to constrain Xr and Xs to remain visually similar.

[0057] Since the eye information of a face has a great influence on the identity and there will not be a big change visually, the method chooses to embed the eye information of the target face. The Mask-eye module is responsible for extracting the eye mask area of ​​the image after identity transfer, blurring it and then replacing it with the Xs source image.

[0058] Assume that the image output by the encoder is Xg, the eye mask is defined as M, and Xs is the source image. The generated adversarial face image after face swapping is:

[0059] Xr=Xg∩M+Xs∩(255-M) (1)

[0060] There is an identity loss between the generated Xr and Xt to ensure that the Xr generated by the network of this method has a similar identity to the target face Xt. The identity loss is defined as follows:

[0061] L id =1-cos[f(Xt),f(Xr)] (2)

[0062] There is a reconstruction loss between the generated Xr and Xs to ensure that the Xr generated by the network of this method has a visually similar result to the source face Xs. The reconstruction loss is defined as follows:

[0063] L rec =||Xr-Xs||1 (3)

[0064] The discriminator is used to extract multi-layer features from the real image and its generated output. Applied to the task of the present invention, the matching loss function between Xr and Xs is extracted using the discriminator as follows:

[0065]

[0066] Where D(i) represents the i-th layer feature extractor of the discriminator D, Ni represents the number of elements in the i-th layer, and M is the total number of layers. Ir is the generated output, and Is is its corresponding source image.

[0067] So the total loss of the adversarial face image Xr is:

[0068] L total =λ id L id +λ rec L rec +λ oFM L oFM (5)

[0069] The three coefficients are hyperparameters of weight ratio.

[0070] The above step S20 specifically includes: a makeup information transfer network that performs some repair on the image quality. Using the adversarial face image generated in the first step as input, while performing makeup transfer, the face is again adversarial, so that the face recognition model misjudges the generated adversarial face, and at the same time, the makeup is used to cover up some harsh areas.

[0071] Figure 6 A schematic diagram of the second stage framework of Adv-Idmask provided in an embodiment of the present invention, Figure 6 Where Xr is the adversarial face image output from the first stage, y is the reference makeup for makeup transfer, and target is the same target face as in the first stage. G is the generator structure of PSGAN, H is the makeup removal adversarial module used to ensure cycle consistency, D is the discriminator of the GAN structure to ensure that the generated image is more like a real face, and FR is the target face recognition model used to attack.

[0072] Because the first stage of the present invention modifies the eye information of the image, the generated image has certain target face information, which improves the recognition success rate. However, it will damage the visual quality of the image, specifically, there will be a rough area at the boundary of the eye. Therefore, the second stage of the present invention chooses to enhance the visual quality of the image and use the makeup transfer module of PSGAN to cover the rough area of ​​the image. The specific operation will extract and exchange the makeup of Xr and the reference makeup y. Because the difference between the image after makeup modification and the original image is too large to be constrained by the loss function, the cycle consistency loss is used to first remove the makeup and then the loss function is constrained, and then the entire process is trained.

[0073] In the second stage, the generator G, makeup removal adversarial H, and discriminator D are trained. G and D are trained first. After reaching a balance, the D parameters are saved and not involved in subsequent training. G and H are trained again to continue to optimize the parameters. The training ends when the generated G(Xr, y) can be recognized as the target by the recognition model and is visually consistent with the source image Xs. The following loss functions include loss functions that ensure target adversarial, loss functions that ensure visual effects, and cycle consistency loss using the CycleGAN structure to constrain the entire training process.

[0074] At present, in the field of face recognition, the research on adversarial attack methods has always attracted much attention. Many adversarial attack methods proposed in studies have good results in white box situations, but in black box situations, due to the influence of various factors, the effect of black box attacks is often poor. In addition, there are few existing studies on simultaneously attacking multiple different face recognition systems. Therefore, the present invention proposes a face recognition adversarial attack scheme with better effect, which enhances the transferability to solve the above problems.

[0075] A makeup information transfer network that repairs image quality and enhances anti-attack capabilities. It mainly uses the structure of AMT-GAN. The above-mentioned related structure and the setting of loss function are also similar.

[0076] Here are some loss functions for the generator G:

[0077] Generator loss function:

[0078]

[0079] Discriminator loss function:

[0080]

[0081] The adversarial loss function is generally defined as:

[0082] L adv=1-cos[f(x),f(Xt)] (8)

[0083] In order to improve the transferability of generating adversarial faces, this method also uses the idea of ​​ensemble attack, and the training process adopts the method of attacking multiple target FR models to improve the effect. At the same time, in the method of the present invention, inspired by input diversity, an ensemble training strategy with input diversity enhancement is used to encourage G to generate adversarial examples with high transferability and black-box attack success rate. The adversarial ensemble loss is defined as:

[0084]

[0085] where f i represents the feature extractor of the white-box model in the i-th training process, and the method uses cosine similarity as the distance function. T(·) represents the transformation function, and p is the predefined probability of whether G(Xr,y) is transformed.

[0086] The idea of ​​using this integrated attack is to make the generated adversarial faces more transferable and to better maintain the attack capability when encountering unseen FR face recognition models.

[0087] In order to ensure cycle consistency, a de-adversarial module H is introduced into the framework. The purpose of H is to generate a clean image H(G(Xr,y)) with the same content, style and size as G(Xr,y), but without adversarial nature. That is, H transforms the generated image G(Xr,y) from the adversarial domain yA to the clean domain y. G and H constitute such a cycle.

[0088] The cycle consistency loss is as follows:

[0089]

[0090] In addition, there is a makeup loss function for H:

[0091]

[0092] So the total G loss function is as follows:

[0093]

[0094] Four of the coefficients are hyperparameters of weight ratio.

[0095] The adversarial face generated after these two steps has a strong attack capability, causing the FR model to misjudge it as the target face, and it has a certain degree of concealment.

[0096] Dataset:

[0097] Phase 1: A large face dataset VGGFace2 was selected as the training set for the method of the present invention, and 10 face images were downloaded from the Internet as target images. In order to improve the quality of the training set, the images were aligned and cropped to a standard size of 224×224.

[0098] Phase 2: Use the Makeup Transfer (MT) dataset as the training dataset, which consists of 1,115 non-makeup images and 2,719 makeup images. The method selects a dataset different from the training dataset for testing, namely a subset of CelebA-HQ, which contains 1,000 face images of different identities to generate adversarial faces.

[0099] The hyperparameters are set as follows:

[0100] Phase 1: For the training process, all three hyperparameters are set to 1. The network of the present invention is trained using the Adam optimizer, (β1, β2) = (0, 0.999).

[0101] Phase 2: For the training process, the four hyperparameters are set to 10, 10, 5, and 2 respectively. The Adam optimizer is used to train the second phase, the learning rate is set to 0.0002, and the exponential decay rate is set to (β1, β2) = (0.5, 0.999).

[0102] Target FR model:

[0103] We conduct extensive experiments and attack four popular black-box FR models, including IR152, IRSE50, Facenet and Mobileface, as well as a commercial FR API.

[0104] The present invention uses attack success rate (ASR) to evaluate previous methods and the method proposed by the present invention. The present invention calculates ASR at FAR@0.01 for black box testing. For commercial APIs, the present invention directly records the confidence score returned by the FR API. The higher the confidence score, the higher the probability that the victim FR API believes that the two input images are of the same person. The method of the present invention uses feature distance (FID), peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) to measure the quality of the image.

[0105] In order to effectively illustrate the performance of the present invention, the experimental results are displayed and analyzed using the accompanying drawings and table data to prove that the present invention has excellent performance.

[0106] The present invention compares the proposed method with the classic method of generating adversarial faces. First, we demonstrate the performance and visual effects of the present invention in generating adversarial faces in the CelebA-HQ dataset. In order to improve the transferability of generating adversarial faces, the method also uses the idea of ​​ensemble attack, and the training process adopts the method of attacking multiple target FR models to improve the effect. At the same time, in the method of the present invention, inspired by input diversity, an ensemble training strategy with input diversity enhancement is used to encourage G to generate adversarial examples with high transferability and black-box attack success rate.

[0107] Table 1. Success rate of two-stage black-box attack

[0108]

[0109] According to Table 1, it can be seen that the method proposed in the present invention has significantly improved the success rate of black box attacks. In the method, the best results were achieved on the three FRs IRSE50, Facenet and Mobileface by training on the other three models respectively and then performing a black box attack on another one. Among them, Mobileface has been greatly improved. The highest attack success rate of the previous method is 50.71%, and the method of the present invention has increased it to 79.38%. On the FR model IR152, the attack effect of the present invention is also the second highest.

[0110] Figure 7 The two rightmost columns are adversarial samples generated by the method of the present invention. The second column on the right is the adversarial face generated after the first step of eye information transfer, and the first column on the right is the adversarial face generated after the second step of makeup information transfer. It can be seen that the visual effect is not much different from the source image, and the modification is hidden to a certain extent.

[0111] Table 2 Quantitative evaluation of image quality

[0112]

[0113] According to Table 2, it can be seen that the method proposed in the present invention has the best effect in terms of FID, PSNR and SSIM indicators, which are 25.30, 27.94 and 0.84 respectively. The FID of the generated adversarial face image and the source image is reduced from 34.44 of AMT-GAN to 25.30, the PSNR value is increased from 19.50 of AMT-GAN to 27.94, and the SSIM value is increased from 0.78 to 0.84 compared with AMT-GAN. The improved indicators are relatively large. It is worth noting that compared with TIP-IM, although the method of the present invention performs poorly in terms of PSNR (db) and SSIM, it performs better in terms of FID results. This shows that the adversarial face images generated by the method of the present invention have a more natural appearance than TIP-IM, although it produces more information changes. This confirms that the method of the present invention, that is, the modification of the generated attributes rather than simply adding noise to restrict them, is more important.

[0114] For comparison on commercial APIs, this method uses Face++. Figure 8 is the confidence of the generated adversarial face on Face++, (a) is the source image source and the target face, and the confidence score of the two is 35.392;

[0115] (b) is the adversarial face and target face generated after the first step of eye information transfer, and their confidence scores are 51.534; (c) is the adversarial face and target face generated after the second step of makeup information transfer, and their confidence scores are 68.667. The present invention selected 1000 adversarial faces to test the confidence scores on Face++, and the confidence scores of the adversarial face images and target faces generated in the end were 67.562 on average, which is a certain improvement compared with previous methods.

[0116] It can be seen that even on commercial APIs, the attack method proposed in the present invention has a certain attack capability. The confidence of the source image and the target is only 35.392. After the first step of eye information transfer, the confidence is increased to 51.534, and then after the second step of makeup transfer, the confidence is increased to 68.667. It can be seen that the improvement effect is also relatively large, which further confirms the attack capability of the method of the present invention.

[0117] In summary, the present invention can effectively interfere with the results of the face recognition network, protect the user's private facial information from being recognized by the recognition network, and thus avoid possible subsequent personal privacy leakage.

[0118] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.

[0119] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.

[0120] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0121] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for generating adversarial face images based on attribute modification, characterized in that: include: The generator extracts the feature values ​​of the target face from the target image, blurs the feature values ​​and replaces them with the source image to obtain the adversarial face image after face swapping. The adversarial face image is processed by performing makeup transfer on the adversarial face image through an adversarial makeup transfer generation network structure to obtain a final adversarial face image of the target image.

2. The method according to claim 1, characterized in that The method of extracting the feature value of the target face from the target image through the generator, performing a fuzzy operation on the feature value and replacing it with the source image to obtain the face-changed adversarial face image includes: The generator is set to include an encoder, an ID injection module, a decoder and an eye information extraction module. The encoder extracts some feature values ​​of the target face from the target image Xt. The ID injection module transfers the identity information of Xt to the features extracted by the encoder. The decoder restores the modified features to the target image Xt to obtain the target image after identity transfer. The eye information extraction module extracts the eye mask area of ​​the target image after identity transfer, performs a blur operation and then replaces it with the source image Xs to obtain the adversarial face image Xr after face swapping. The encoder, ID injection module and decoder are trained. The training loss function includes identity loss and reconstruction loss. Let the image output by the encoder be Xg, the eye mask defined be M, and Xs be the source image. The generated adversarial face image after face swapping is: Xr=Xg∩M+Xs∩(255-M) (1) The identity loss between Xr and Xt is defined as follows: L id =1-cos[f(Xt),f(Xr)] (2) The reconstruction loss between Xr and Xt is defined as follows: L rec =||Xr-Xs||1 (3) The matching loss function between Xr and Xs is extracted using the discriminator as follows: Where D(i) represents the i-th layer feature extractor of the discriminator D, Ni represents the number of elements in the i-th layer, and M represents the total number of layers; So the total loss of the adversarial face image Xr is: L total =λ id L id +λ rec L rec +λ oFM L oFM (5) The three coefficients are hyperparameters of weight proportion; According to the total loss L of the adversarial face image Xr total Adjust the parameters of the encoder, ID injection module and decoder, when the total loss L of the adversarial face image Xr total When the generated Xr image and Xt are recognized as the same person and Xr remains visually similar to Xs, the training ends and the parameters of the current encoder, ID injection module and decoder are retained to obtain the trained encoder, ID injection module and decoder.

3. The method according to claim 2, characterized in that The method of performing makeup transfer processing on the adversarial face image by generating a network structure through adversarial makeup transfer to obtain a final adversarial face image of the target image includes: The makeup of Xr and the reference makeup y are extracted and exchanged by the makeup removal adversarial module H to obtain the final adversarial face image G(Xr, y) of the target image; G is the generator part of the makeup transfer PSGAN model, which realizes the makeup exchange of the two input faces; D is the discriminator part of the GAN structure; The above generator G, makeup removal adversarial H and discriminator D are trained. The training loss functions include generator loss function, discriminator loss function, adversarial loss function and adversarial ensemble loss function. G and D are trained first. After reaching a balance according to the loss function, the parameters of the discriminator D are saved and do not participate in subsequent training. Then G and H are trained to continue to optimize the parameters. When the generated G(Xr, y) can be recognized as the target image and at the same time ensure visual consistency with the source image Xs, the training is completed, and the trained generator G, makeup removal adversarial H and discriminator D are obtained.