A face image processing method and device

By combining generative adversarial network models with saliency detection and facial feature extraction, the generator produces anonymized facial images, solving the problem in existing technologies that it is difficult to remove identity information while maintaining facial saliency features, thus achieving a balance between privacy and image usability.

CN117238009BActive Publication Date: 2026-02-17CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310822929.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2026-02-17
Estimated Expiration
2043-07-05

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively remove identity information from facial images while preserving the salient features of the real face, making it difficult to balance privacy and image usability.

Method used

A generative adversarial network model is used in combination with saliency detection and face feature extraction. The generator generates anonymized face images from face background images and grayscale images. The loss function of the generator is used to optimize the model parameters to retain salient features and remove identity information.

Benefits of technology

The generated anonymized face images retain the salient features of real faces while effectively removing identity information, achieving a balance between privacy and image usability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117238009B_ABST
    Figure CN117238009B_ABST
Patent Text Reader

Abstract

The application discloses a face image processing method and device. The method comprises the following steps: obtaining a first face image, the first face image being associated with identity information; obtaining a face background image and a first grayscale image by covering the facial feature part of the first face image according to the first face image, the first grayscale image being used for representing the saliency feature of the first face image; and generating a second face image according to the face background image and the first grayscale image, the second face image being an anonymized face image. According to the method, the anonymized face image can be generated according to the face background image and the first grayscale image. Since the first grayscale image can represent the saliency feature of the first face image (i.e. the real face image), the saliency information of the real face is considered when the anonymized face image is generated, so that the generated face image can remove the identity information while keeping part of the attributes of the real face, thereby balancing the privacy and the usability of the face image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more particularly to a method and apparatus for processing human face images. Background Technology

[0002] With the development of internet technology and the widespread application of facial recognition technology in identity verification, video surveillance, and social networks, real facial images can be easily used by others, potentially infringing on user privacy and causing unnecessary trouble. Therefore, when using facial images in non-identification scenarios, it is necessary to de-identify the facial images.

[0003] Currently, the method for de-identifying facial images is face anonymization technology, which can be categorized into traditional methods and deep learning-based methods. Traditional face anonymization methods include blurring and occlusion, which can largely eliminate the identity of a given person, but these methods severely degrade image quality and usability. Deep learning-based face anonymization methods, such as adding adversarial random noise to face images to deceive classifiers, still allow human perception to identify the true identity of the face.

[0004] In conclusion, further research is needed on how to de-identify facial images. Summary of the Invention

[0005] This invention provides a face image processing method and apparatus, which removes identity information while preserving some attributes of a real face, thus balancing privacy and the usability of the face image.

[0006] In a first aspect, embodiments of the present invention provide a face image processing method applicable to a face image processing device. The method includes acquiring a first face image, wherein the first face image is associated with identity information; obtaining a face background image and a first grayscale image that obscure the facial features of the first face image based on the first face image, wherein the first grayscale image is used to characterize the salient features of the first face image; and generating a second face image based on the face background image and the first grayscale image, wherein the second face image is an anonymized face image.

[0007] Using the above method, the face image processing device generates an anonymized face image based on the face background image and the first grayscale image. Since the first grayscale image can represent the salient features of the real face image, that is, when generating the anonymized face image, the salient information of the real face is considered, so that the generated anonymized face image can remove identity information while maintaining some attributes of the real face, which is convenient for balancing privacy and the usability of the face image.

[0008] In one possible implementation, a second face image is generated based on the face background image and the first grayscale image. The method further includes: inputting the face background image and the first grayscale image into the generator of a generative adversarial network model to generate the second face image.

[0009] In one possible implementation, the method further includes: obtaining a second grayscale image based on the second face image, the second grayscale image being used to characterize the saliency features of the second face image; obtaining a loss function of the generator based on the difference between the first grayscale image and the second grayscale image; and updating the model parameters of the generator based on the loss function of the generator.

[0010] In one possible implementation, the method further includes: extracting facial features from the first face image to obtain a first feature vector; and extracting facial features from the second face image to obtain a second feature vector; obtaining a loss function of the generator based on the Euclidean distance between the first feature vector and the second feature vector; and updating the model parameters of the generator based on the loss function of the generator.

[0011] Secondly, embodiments of the present invention provide a face image processing apparatus, the apparatus comprising: an acquisition module for acquiring a first face image, wherein the first face image is associated with identity information; a processing module for obtaining a face background image and a first grayscale image that obscure the facial features of the first face image based on the first face image, wherein the first grayscale image is used to characterize the salient features of the first face image; and a generation module for generating a second face image based on the face background image and the first grayscale image, wherein the second face image is an anonymized face image.

[0012] In one possible implementation, a second face image is generated based on the face background image and the first grayscale image. The generation module is further configured to: input the face background image and the first grayscale image into the generator of the generative adversarial network model to generate the second face image.

[0013] In one possible implementation, the processing module is further configured to: obtain a second grayscale image based on the second face image, the second grayscale image being used to characterize the saliency features of the second face image; obtain a loss function of the generator based on the difference between the first grayscale image and the second grayscale image; and update the model parameters of the generator based on the loss function of the generator.

[0014] In one possible implementation, the processing module is further configured to: extract facial features from the first face image to obtain a first feature vector; and extract facial features from the second face image to obtain a second feature vector; obtain a loss function of the generator based on the Euclidean distance between the first feature vector and the second feature vector; and update the model parameters of the generator based on the loss function of the generator.

[0015] Thirdly, embodiments of this application also provide a computing device, including a memory and a processor, wherein the memory is used to store computer programs or instructions, and the processor is used to invoke the computer programs or instructions stored in the memory to execute the method described in any possible design of the first aspect.

[0016] Fourthly, this application provides a computer-readable storage medium storing computer-readable instructions that, when read and executed by a computer, cause the computer to perform any of the possible designs in the first aspect described above.

[0017] Fifthly, this application provides a computer program product that, when read and executed by a computer, causes the computer to perform any of the possible design methods of the first aspect described above. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used 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 those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 A system diagram for face image processing provided in an embodiment of the present invention;

[0020] Figure 2 This invention provides an operation flowchart for a third-party trusted platform targeting real faces.

[0021] Figure 3 A structural diagram of an improved generative adversarial network model provided in an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram of a face image processing device provided in an embodiment of this application;

[0023] Figure 5 This is another structural schematic diagram of the face image processing apparatus provided in the embodiments of this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0025] Figure 1 This is a schematic diagram of a system architecture provided for an embodiment of this application. Figure 1 As shown, the system architecture may include user-end devices, system-end devices, and third-party devices.

[0026] The user-end device can be a mobile phone, laptop computer, tablet, or other possible device. The system-end device can be a device that uses facial images for non-identity authentication scenarios. The third-party device can be a device that anonymizes the facial images uploaded by the user-end device; the third-party device can also be called a third-party trusted platform. For example, non-identity authentication scenarios refer to scenarios that do not require identity information, such as creating public facial datasets or analyzing facial images (e.g., object detection, tracking, segmentation).

[0027] Specifically, the user-end device can send a real facial image to a third-party device. This real facial image is associated with the user's identity information; that is, by recognizing the real facial image, the user's identity information can be obtained. Correspondingly, after receiving the real facial image, the third-party device can anonymize it to obtain an anonymized facial image. Then, the system-end device can retrieve the anonymized facial image from the third-party device for use in non-authentication scenarios.

[0028] Currently, third-party devices process real facial images in two ways: traditional methods and deep learning-based methods. Traditional methods primarily blur and obscure real facial images. While this can largely hide the identity information of the face, it reduces the clarity of the processed image, severely impacting its practicality. Deep learning-based methods involve adding adversarial random noise to the real facial image, but the processed image still allows for human recognition of the face's true identity.

[0029] Based on this, embodiments of the present invention provide a face image processing method for removing identity information while retaining the salient features of a real face image, thereby balancing privacy and the usability of the face image.

[0030] For example, the face image processing method provided in this application embodiment can be applied to Figure 1 The third-party devices or trusted third-party platforms shown in the illustrated system architecture can also be applied to other possible devices. The following description will use the application of this face image processing method to a trusted third-party platform as an example.

[0031] Figure 2 This is a flowchart illustrating the face image processing method provided in an embodiment of the present invention. Figure 2 As shown, the process may include:

[0032] Step 201: A trusted third-party platform obtains the first face image.

[0033] Here, the first face image is associated with identity information, meaning the first face image is a real face image.

[0034] There are several ways for a trusted third-party platform to obtain the first facial image. For example, the user's device can upload an image (referred to as image I for ease of description) to a trusted third-party platform. real Image I real It may include real facial images, and optionally, other body parts (such as hair, neck, shoulders, etc.), clothing accessories (such as hats, earrings, etc.) or background elements (such as landscapes, buildings, streets, etc.); accordingly, the third-party trusted platform receives image I real Then, image I can be processed. real The image is processed to obtain a realistic facial image. For example, a trusted third-party platform can process the image I... real Face detection is performed to obtain the first face image; or, see [link to relevant documentation]. Figure 3 As shown, a trusted third-party platform can transmit image I real The image is input into a face detection model, which outputs a first face image, which can then be obtained by a trusted third-party platform.

[0035] The first face image can be a facial region image I. rect In other words, the first face image includes real face images, but excludes other body parts, clothing, accessories, or backgrounds.

[0036] Step 202: The third-party trusted platform obtains a background image of the face that obscures the facial features of the first face image and a first grayscale image based on the first face image. The first grayscale image is used to characterize the salient features of the first face image.

[0037] For example, a trusted third-party platform can perform facial landmark detection on the first face image, thereby obtaining the face background image I. bgOr, see Figure 3 As shown, a trusted third-party platform can input the first face image into a facial landmark detection model, and then the facial landmark detection model can output a face background image I. bg Among them, the face background image I bg It refers to the part of the face that is not included.

[0038] For example, a trusted third-party platform can perform saliency detection on the first face image, thereby obtaining a first grayscale image, which can also be called a face saliency map S. real Or, see Figure 3 As shown, a trusted third-party platform can input the first face image into a saliency detection model, which can then output a face saliency map S. real In addition, trusted third-party platforms can also analyze facial saliency maps (S). real The values ​​of each pixel are normalized.

[0039] Saliency detection, in particular, simulates human visual mechanisms to filter out the most attention-grabbing salient parts in a scene. For example, the most attention-grabbing salient part of a face is the distance between the eyes. Exemplarily, saliency detection includes bottom-up and top-down modes. In this embodiment, the third-party trusted platform can employ any of the following saliency detection algorithms when performing saliency detection: Itti algorithm, Residual Spectrum (SR) algorithm, Histogram-based Contrast (HC) algorithm, Graph-Based Visual Saliency (GBVS) model, Frequency-Tuned Saliency (FTS) model, and Context-Aware Saliency Detection (CASD) model, etc.

[0040] A grayscale image can be an image represented by different shades of gray. There are 256 gray levels, with level 0 representing black and level 255 representing white. Values ​​between 0 and 255 represent different shades of gray. The higher the gray level, the closer the gray is to white. Grayscale values, from smallest to largest, correspond to increasing saliency. For example, the most noticeable salient part of a face is the distance between the eyes; that is, the distance between the eyes has the highest saliency. Since grayscale values, from smallest to largest, correspond to increasing saliency, the grayscale value at the distance between the eyes is the largest. And because a higher gray level represents a gray closer to white, if we use grayscale images to represent the saliency of a face, the color at the distance between the eyes is closest to white.

[0041] Step 203: The trusted third-party platform generates a second face image based on the face background image and the first grayscale image.

[0042] Here, the second face image is an anonymized face image, meaning it is not associated with any identity information. The second face image can also be called a generated face image or a fake face image.

[0043] Using the above method, the trusted third-party platform generates anonymized face images based on the face background image and the first grayscale image. Since the first grayscale image can represent the salient features of the real face image, the salient information of the real face is considered when generating the anonymized face image. This allows the generated anonymized face image to retain some attributes of the real face while removing identity information, thus balancing privacy and the usability of the face image.

[0044] In S203 above, there are multiple ways for a trusted third-party platform to generate a second face image based on the face background image and the first grayscale image. For example, see... Figure 3 As shown, a trusted third-party platform can input a face background image and a first grayscale image into the generator of a generative adversarial network model to generate a second face image.

[0045] It is understood that S201 to S203 described above can be applied to the training phase of the generative adversarial network (GAN) model, or it can be applied to the phase after the GAN model has been trained, where the trained GAN model is used to generate face images that can be called by system-side devices. This application does not limit the specific application scenarios.

[0046] The following description uses the example of S201 to S203 being applicable to the training phase of a generative adversarial network model. In this case, see... Figure 3 As shown, a generative adversarial network model can include a generator and a discriminator, and may also include a saliency detector and / or a face feature extractor. After a trusted third-party platform generates a second face image, it can further calculate the loss function of the generator and the loss function of the discriminator to update the model parameters of the generator and the discriminator, thereby continuously optimizing the model.

[0047] (1) Loss function of generator

[0048] The generator has a loss function L(G), which represents the difference between the second face image and the first face image. The larger the loss function value, the larger the difference between the second face image and the first face image; conversely, the smaller the loss function value, the smaller the difference between the second face image and the first face image.

[0049] For example, the loss function L(G) includes at least one of an adversarial loss function, a first loss function, and a second loss function. For instance, the loss function L(G) can be obtained from the adversarial loss function, the first loss function, and the second loss function, and the loss function L(G) can conform to the following formula:

[0050]

[0051] in, It is the adversarial loss function, L sal It is the first loss function, L i λ1 is the coefficient of the first loss function, and λ2 is the coefficient of the second loss function.

[0052] (1.1) Adversarial loss function

[0053] Adversarial loss function This is used to learn and generate samples that more closely resemble real data, ensuring that the second face image generated by the generator is as close as possible to the first face image, so that the discriminator can identify the second face image as real. For example, the adversarial loss function can conform to the following formula:

[0054]

[0055] Where E is the expectation, z ~ p z G(z) is the probability density function that random noise z follows, G(z) is the result of the generator acting on random noise z, D(G(z)) is the result of the discriminator acting on G(z), and c is a variable.

[0056] (1.2) First Loss Function

[0057] First loss function L sal This is used to ensure that the second face image generated by the generator retains as many saliency features as possible from the first face image. After the trusted third-party platform generates the second face image, it can be input into the saliency detector to obtain a second grayscale image. Then, based on the difference between the first and second grayscale images, the specific calculation formula can be:

[0058] L sal =D KL (S real ||S fake )

[0059] Among them, S real It is the first grayscale image, S fake It is the second grayscale image, using KL divergence D. KL (·) The difference in distribution between the two is measured by the following method:

[0060] (1.3) Second Loss Function

[0061] Second loss function L i This is used to ensure that the identity corresponding to the second face image is different from the identity corresponding to the first face image, thus achieving anonymization. After the trusted third-party platform generates the second face image, it can input the first face image into a face feature extractor to extract face features, obtaining a first feature vector, and then input the second face image into the face feature extractor to extract face features, obtaining a second feature vector. The Euclidean distance d is then calculated based on the first and second feature vectors. If the threshold for the Euclidean distance in the generator's model parameters is m, then the specific formula for calculating the second loss function is:

[0062]

[0063] in, is the coefficient, N is the dimension of the feature vector, and max indicates taking the maximum value.

[0064] Thus, after a trusted third-party platform generates a second face image, the generator's loss function L(G) can be obtained using the above method. A larger value for L(G) reflects a greater difference between the generated second face image and the first face image, indicating a weaker ability of the generator to produce an image identical to the first face image. The generator's model parameters can be updated based on the value of L(G), thereby optimizing the generator and improving its ability to generate images identical to the input first face image. Through training with multiple face images, the generator can be made to generate face images as similar as possible to those in the real face dataset.

[0065] (2) Loss function of the discriminator

[0066] A trusted third-party platform can input real face datasets and second face images into the discriminator of a generative adversarial network (GAN) model to obtain the discrimination results for the real face datasets and the second face images. Then, based on the discrimination results for the real face datasets and the second face images, the discriminator's loss function L(D) can be obtained. The specific formula for calculating the loss function L(D) is as follows:

[0067]

[0068] Where E is the expectation, x represents the real face dataset, and x ~ p data Let x be the probability density function of the real face dataset x, and let D(x) be the discriminator's judgment of whether the real face data is a real face. If the judgment is true, D(x) is 1; if the judgment is false, D(x) is 0. z represents random noise, z ~ p. z(z) is the probability density function of random noise z, G(z) is the result of the generator acting on the random noise output, and D(G(z)) is the discriminator's judgment on whether the second face image generated by the generator is a real face. If the judgment is true, D(G(z)) is 1; if the judgment is false, D(G(z)) is 0. b and a are variables, and the variable c in the adversarial loss function with the above loss function satisfies bc = 1 and ba = 2.

[0069] In this way, a trusted third-party platform can update the discriminator's model parameters based on the discriminator's loss function, thereby training the discriminator with a large number of real face datasets and second face images, so that the discriminator can identify as accurately as possible whether an image comes from a real face dataset or a face image generated by the generator.

[0070] Thus, the generator parameters are kept constant first, and the discriminator is trained to improve its discrimination ability; then, the discriminator parameters are kept constant, and the generator is trained; after the generator training is completed, the generator parameters are kept constant again, and the discriminator is trained. This process is repeated until the set number of training iterations is met. At this point, the generative adversarial network model can be considered to have been trained successfully. The face images generated by the generator are close to real face images, and the discriminator has a better ability to distinguish between real and fake faces.

[0071] This application's embodiment modifies the standard generative adversarial network (GAN) model structure by adding a saliency detector and a face feature extractor. The saliency detector ensures that the second face image generated by the generator possesses the saliency features of the first face image, while the face feature extractor ensures that the identity information corresponding to the second face image is different from the identity information corresponding to the first face image. Therefore, the improved GAN model retains the saliency features of the real face while removing the real face's identity information, achieving an anonymization effect.

[0072] Based on the above description of the face image processing method, this application also provides a face image processing apparatus. This face image processing apparatus can... Figure 1 The third-party trusted platform shown may also be any other device capable of implementing the above method flow, without any specific limitation.

[0073] Figure 4 This is a schematic diagram of a face image processing apparatus provided in an embodiment of this application. Figure 4 As shown, the device may include: an acquisition module 401, a processing module 402, and a generation module 403.

[0074] The acquisition module 401 is used to acquire a first face image, which is associated with identity information; the processing module 402 is used to obtain a face background image and a first grayscale image that obscure the facial features of the first face image based on the first face image, wherein the first grayscale image is used to characterize the salient features of the first face image; and the generation module 403 is used to generate a second face image based on the face background image and the first grayscale image, wherein the second face image is an anonymized face image.

[0075] In one possible implementation, the generation module 403 is specifically used to: input the face background image and the first grayscale image into the generator of the generative adversarial network model to generate the second face image.

[0076] In one possible implementation, the processing module 402 is further configured to: obtain a second grayscale image based on the second face image, the second grayscale image being used to characterize the saliency features of the second face image; obtain the loss function of the generator based on the difference between the first grayscale image and the second grayscale image; and update the model parameters of the generator based on the loss function of the generator.

[0077] In one possible implementation, the processing module 402 is further configured to: extract facial features from the first face image to obtain a first feature vector; and extract facial features from the second face image to obtain a second feature vector; obtain the loss function of the generator based on the Euclidean distance between the first feature vector and the second feature vector; and update the model parameters of the generator based on the loss function of the generator.

[0078] Figure 5 This is another schematic diagram of the face image processing apparatus provided in the embodiments of this application. For example... Figure 5 As shown, it includes at least one processor 501 and a memory 502 connected to at least one processor. In this embodiment, the specific connection medium between the processor 501 and the memory 502 is not limited. Figure 5 Taking the connection between processor 501 and memory 502 via a bus as an example, the bus can be divided into address bus, data bus, control bus, etc.

[0079] In this embodiment of the application, the memory 502 stores instructions that can be executed by at least one processor 501. By executing the instructions stored in the memory 502, the at least one processor 501 can implement the steps of the above-described face image processing method.

[0080] The processor 501 is the control center of the computer device, capable of connecting various parts of the computer device via various interfaces and lines. It performs resource configuration by running or executing instructions stored in the memory 502 and accessing data stored in the memory 502. Optionally, the processor 501 may include one or more processing units. The processor 501 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles wireless communication. It is understood that the modem processor may not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 may be implemented on the same chip; in other embodiments, they may be implemented on separate chips.

[0081] Processor 501 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0082] Memory 502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 502 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 502 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 502 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0083] Based on the same technical concept, embodiments of this application also provide a computer-readable storage medium storing computer-readable instructions, which, when read and executed by a computer, enable the method in the above-described method embodiments to be implemented.

[0084] Based on the same technical concept, embodiments of this application also provide a computer program product, including computer-readable instructions, which, when executed by a processor, cause the method in the above method embodiments to be implemented.

[0085] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0086] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0088] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0089] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A face image processing method, characterized by, The method comprises: obtaining a first face image, the first face image being associated with identity information; obtaining, according to the first face image, a face background image and a first grayscale image that mask the facial feature parts of the first face image, the first grayscale image being used to represent the saliency feature of the first face image, the grayscale values of the first grayscale image corresponding to the saliency from low to high; the saliency feature being the most noticeable part determined by simulating the human visual mechanism; inputting the face background image and the first grayscale image into a generator of a generative adversarial network model to generate a second face image, the second face image being an anonymized face image; obtaining, according to the second face image, a second grayscale image, the second grayscale image being used to represent the saliency feature of the second face image; obtaining a first loss function according to the difference between the first grayscale image and the second grayscale image; obtaining a loss function of the generator according to the first loss function; updating the model parameters of the generator according to the loss function of the generator.

2. The method of claim 1, wherein, The method further comprises: performing face feature extraction on the first face image to obtain a first feature vector, and performing face feature extraction on the second face image to obtain a second feature vector; obtaining the loss function of the generator according to the Euclidean distance between the first feature vector and the second feature vector; updating the model parameters of the generator according to the loss function of the generator.

3. A face image processing apparatus, characterized by comprising: The device comprises: an obtaining module configured to obtain a first face image, the first face image being associated with identity information; a processing module configured to obtain, according to the first face image, a face background image and a first grayscale image that mask the facial feature parts of the first face image, the first grayscale image being used to represent the saliency feature of the first face image, the grayscale values of the first grayscale image corresponding to the saliency from low to high; the saliency feature being the most noticeable part determined by simulating the human visual mechanism; a generating module configured to input the face background image and the first grayscale image into a generator of a generative adversarial network model to generate a second face image, the second face image being an anonymized face image; the processing module is further configured to obtain, according to the second face image, a second grayscale image, the second grayscale image being used to represent the saliency feature of the second face image; obtaining a first loss function according to the difference between the first grayscale image and the second grayscale image; and obtaining a loss function of the generator according to the first loss function; updating the model parameters of the generator according to the loss function of the generator.

4. The apparatus of claim 3, wherein, The processing module is further configured to: perform face feature extraction on the first face image to obtain a first feature vector, and perform face feature extraction on the second face image to obtain a second feature vector; obtaining the loss function of the generator according to the Euclidean distance between the first feature vector and the second feature vector; updating the model parameters of the generator according to the loss function of the generator.

5. A face image processing apparatus characterized by comprising: comprise: a memory for storing computer programs or instructions; a processor for invoking the computer programs or instructions stored in the memory to execute the method according to any one of claims 1 to 2.

6. A computer-readable storage medium, characterized in that, The storage medium stores computer programs or instructions, and when the computer programs or instructions are executed by a computer, the method according to any one of claims 1 to 2 is implemented.

7. A computer program product, characterised in that, The computer program product stores instructions, and when the instructions are executed by a computer, the method according to any one of claims 1 to 2 is executed.

Citation Information

Patent Citations

  • Face image generation method and device, computer readable medium and electronic equipment

    CN114550249A