A controllable method, system, device, and medium for facial anonymization
By setting different levels of privacy protection strength and identity mapping models, and combining them with reversible neural networks, controllable face anonymization template images are generated. This solves the problems of single and uncontrollable anonymization methods in existing technologies, and achieves flexible anonymization and restoration effects.
Patent Information
- Application Number
- CN202411713831.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing face anonymization methods fail to fully consider users' actual application scenarios, typically employing a single protection method that cannot control the anonymization results, thus limiting user access.
By setting different levels of privacy protection strength, identity mapping model, and face-swapping model, controllable face anonymization template images are generated, and semantic information is embedded using a reversible neural network to achieve dynamically adjustable anonymization and restoration.
It achieves dynamically adjustable anonymization for both human and machine vision, improving the usability and reversibility of anonymized images and solving the limitations of user use.
Smart Images

Figure CN119785394B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of facial recognition technology, specifically to a controllable facial anonymization method, system, device, and medium. Background Technology
[0002] Facial recognition, as a crucial biometric authentication technology, has been widely applied in numerous fields, including military, finance, public security, and daily life. However, while enjoying the convenience brought by facial recognition, people also face the risk of personal privacy information leakage. Because the rich personal information contained in facial images may be leaked or misused during the facial recognition process, and because facial images are a visual medium that directly exposes personal identity information, once leaked, they cannot be recovered. Therefore, protecting facial privacy is essential.
[0003] In the field of facial privacy protection, facial anonymization is one of the main protection methods. Its core idea is to use techniques such as de-identification to eliminate or hide sensitive identity information in images. Facial anonymization can be divided into two categories based on the target audience: anonymization methods for human vision and anonymization methods for machine vision. Examples of anonymization methods for human vision include: a model based on conditional generative adversarial networks proposed by Hukkelas et al. at the Norwegian University of Science and Technology, which generates anonymized facial images that retain the pose and background information of the original image; and a facial de-identification method proposed by Li et al. from the Department of Computer Science at Purdue University, which measures the degree of anonymization. This method includes four stages: facial attribute estimation, privacy-oriented face obfuscation, orientation to natural images, and adversarial perturbation. By using the GoogLeNet network to extract facial features and employing the Privacy-Preserving Attribute Selection (PPAS) algorithm, this method improves the usability of anonymization and enhances privacy. When generating realistic and natural facial images, the team used the StarGAN model and added attribute classification loss and image reconstruction loss to constrain the quality of the anonymized images.
[0004] Anonymization methods for machine vision include: a research team at Aristotle University in Thessaloniki proposed a novel adversarial example generation method to counter face recognition systems. This method, called the penalized fast gradient value method, aims to deceive face recognition systems with minimal distortion, protecting identity privacy while maintaining visual content consistency before and after anonymization. Additionally, You et al. first proposed a reversible privacy-preserving recognition framework that converts the original image into a pixelated form, which can then be used to reconstruct the image using different network structures.
[0005] A team from Shanghai Jiao Tong University has proposed a recoverable privacy protection method based on a deep generative model. Borrowing the feature deconstruction idea of the IdentityDP model, this method preserves detailed attribute features such as expression, pose, and lighting in anonymized images by decoupling identity features and attribute features, while maintaining the consistency of identity between the deanonymized image and the original image. The network structure includes an encoder, a generator, and an identity modification module. The encoder extracts identity and attribute features of the face, the identity modification module calculates the protected identity features, and finally, the generator produces the de-identification result based on the identity and attribute features.
[0006] Currently, most facial anonymization methods do not fully consider the actual application scenarios of users. They are basically one method for one type of protection (AI, human vision) and cannot control the anonymization results, which greatly limits the use by users.
[0007] Therefore, the present invention aims to provide a controllable method, system, device, and medium for facial anonymization to solve the aforementioned problems. Summary of the Invention
[0008] The technical problem this invention aims to solve is that most current face anonymization methods do not fully consider users' actual application scenarios. They are generally one method for one type of protection and lack control over the anonymization results, which greatly limits user usability. The invention aims to provide a controllable face anonymization method, system, device, and medium. By setting different levels of privacy protection strength, identity mapping models, and face-swapping models, face anonymization template images with corresponding privacy protection strengths can be obtained. The degree of protection against human visual recognition increases with the protection strength, achieving dynamically adjustable anonymization oriented towards human vision. Simultaneously, to improve the usability of the face anonymization template images... By using an availability-conditional coding network, the final anonymized target image can choose whether to retain the identity features of the original image, thus achieving dynamically adjustable anonymization for machine vision. Simultaneously, by embedding the semantic information of the original face image into the face anonymization template image through a reversible neural network, the final anonymized target image can be restored to the original face image using the reversible neural network, achieving dynamically reversible anonymization. This addresses the problem that most current face anonymization methods do not fully consider the actual application scenarios of users, are basically one method for one type of protection, and cannot control the anonymization result, thus greatly limiting user usage.
[0009] This invention is achieved through the following technical solution:
[0010] A controllable method for facial anonymization, comprising:
[0011] The facial attribute features of the original face image are identified using an attribute recognition model, and the facial attribute features are modified and spliced according to a preset privacy protection strength sequence to obtain the processed facial attribute prediction vector.
[0012] The face attribute prediction vector is input into the identity mapping model to obtain the face identity feature vector. Then, the face identity feature vector and the original face image are both input into the face swapping model for processing to obtain the face anonymization template image.
[0013] A availability vector representing the availability of the original face image is constructed, and the availability vector is transformed into availability conditions through a conditional encoder network;
[0014] The original face image is embedded into a face anonymization template image using a reversible neural network. At the same time, the reversible neural network is controlled by availability conditions to generate the final target anonymized image.
[0015] Furthermore, the availability vector adopts a one-hot vector, which includes both available and unavailable vectors; the reversible neural network adopts a flow-based generative model, which uses a set of bidirectional mapping functions to achieve reversible transformation between input and output, and controls the reversible transformation process through availability conditions.
[0016] Furthermore, the attribute recognition model includes an age recognition model and a gender recognition model, both of which are trained using a binary classification model. Facial attribute features include age features and gender features; the identity mapping model is trained using a fully connected neural network.
[0017] Furthermore, facial attribute features are extracted from the original face image using an attribute recognition model, and then modified and concatenated according to a preset privacy protection strength sequence to obtain the processed attribute prediction vector, specifically:
[0018] The original face image is input into the age recognition model and the gender recognition model respectively to obtain age features and gender features;
[0019] A privacy protection strength sequence is set based on facial attribute features, wherein the privacy protection strength sequence contains at least one level of privacy protection strength;
[0020] The age and gender features are modified and concatenated based on the privacy protection strength sequence to obtain the processed attribute prediction vector.
[0021] Furthermore, the preset privacy protection strength sequence includes four levels of privacy protection strength.
[0022] The present invention also includes a controllable face anonymization system, which is used in any of the controllable face anonymization methods described above, the system comprising:
[0023] The prediction vector generation module is used to identify the facial attribute features of the original face image using the attribute recognition model, and to modify and splice the facial attribute features according to the preset privacy protection strength sequence to obtain the processed facial attribute prediction vector.
[0024] The template image generation module is used to input the face attribute prediction vector into the identity mapping model to obtain the face identity feature vector, and then input both the face identity feature vector and the original face image into the face swapping model for processing to obtain the face anonymization template image.
[0025] The availability condition generation module is used to construct an availability vector representing the availability of the original face image, and converts the availability vector into availability conditions through a conditional encoder network;
[0026] The target image generation module is used to embed the original face image into the face anonymization template image using a reversible neural network, and at the same time, the reversible neural network is controlled by availability conditions to generate the final target anonymized image.
[0027] Furthermore, the availability vector adopts a one-hot vector, which includes both available and unavailable vectors; the reversible neural network adopts a flow-based generative model, which uses a set of bidirectional mapping functions to achieve reversible transformation between input and output, and controls the reversible transformation process through availability conditions.
[0028] The present invention also includes a computer device comprising a system memory and a processor, the system memory storing a computer program, wherein the processor executes the computer program to implement the steps of any of the methods described above.
[0029] The present invention also includes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described above.
[0030] The present invention also includes a computer program product containing instructions that, when executed by a cluster of computer devices, cause the cluster of computer devices to perform the method described in any of the preceding claims.
[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0032] In this invention, by setting different levels of privacy protection strength, identity mapping model, and face-swapping model, a face anonymization template image with a corresponding privacy protection strength can be obtained. The degree of protection for human visual recognition of this image increases with the increase of the protection strength, realizing dynamically adjustable anonymization oriented towards human visual perception. At the same time, in order to improve the usability of the face anonymization template image, an usability conditional coding network is used, so that the final generated target anonymized image can choose whether to retain the identity features of the original image, thereby realizing dynamically adjustable anonymization oriented towards machine vision. Furthermore, the semantic information of the original face image is embedded into the face anonymization template image through a reversible neural network, so that the final generated target anonymized image can also be restored to the original face image with the help of the reversible neural network, realizing dynamically reversible anonymization. This solves the problem that most current face anonymization methods do not fully consider the actual application scenarios of users, and are basically one method for one type of protection, and cannot control the anonymization results, which brings great limitations to the use of users. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0034] Figure 1 This is a flowchart of a controllable face anonymization method in this embodiment;
[0035] Figure 2 This is a schematic diagram of a controllable face anonymization platform in this embodiment;
[0036] Figure 3 This is a schematic diagram of a controllable face anonymization system in this embodiment;
[0037] Figure 4 This is a schematic diagram of the structure of a computer device in this embodiment. Detailed Implementation
[0038] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0039] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.
[0040] The terminology used in the description of the various examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.
[0041] Example 1
[0042] See Figure 1 As shown, this embodiment provides a controllable face anonymization method, the method including:
[0043] S1: Use an attribute recognition model to identify the facial attribute features of the original face image, and modify and stitch the facial attribute features according to a preset privacy protection strength sequence to obtain the processed facial attribute prediction vector.
[0044] The attribute recognition model includes an age recognition model and a gender recognition model. Both models are trained using deep neural networks with good generalization capabilities to ensure the accuracy and usability of the facial attribute prediction vectors. The facial attribute features include age and gender features, specifically:
[0045] The original facial image is acquired through an image acquisition device, which can be a camera, a camera or other device capable of capturing facial images, without much restriction here;
[0046] The original face image is input into the age recognition model and the gender recognition model respectively to obtain age features and gender features;
[0047] A privacy protection strength sequence is set based on facial attribute features, which includes four levels of privacy protection strength.
[0048] It should be noted that in this embodiment, the privacy protection strength is set based on human visual perception and facial attribute features (age and gender). The four levels of privacy protection strength are specifically: I: same gender and same age, II: same gender but different age, III: different genders but same age, and IV: different genders but different age.
[0049] The age and gender features are modified and concatenated based on the privacy protection strength sequence to obtain the processed attribute prediction vector.
[0050] S2: Input the face attribute prediction vector into the identity mapping model to obtain the face identity feature vector, and then input both the face identity feature vector and the original face image into the face swapping model to obtain the face anonymization template image.
[0051] It should be noted that in this embodiment, the identity mapping model is obtained by training a fully connected neural network. The identity mapping model is used to map the face attribute prediction vector to the corresponding face identity feature vector. This face identity feature vector can be effectively used for identity in face swapping. The face swapping model uses the Simswap face swapping program.
[0052] S3: Construct a usability vector representing the usability of the original face image, and transform the usability vector into usability conditions through a conditional encoder network;
[0053] It should be noted that, in this embodiment, the availability of the original face image refers to whether the image utility is preserved. The availability vector adopts a two-dimensional one-hot vector, which includes a usable vector and an unusable vector. The dimension is expanded using a conditional encoder network, which affects whether the final generated target anonymized image retains the facial identity features of the original image, thereby achieving face privacy protection for machine vision.
[0054] S4: The original face image is embedded into the face anonymization template image using a reversible neural network. At the same time, the reversible neural network is controlled by availability conditions to generate the final target anonymized image.
[0055] It should be noted that, in this embodiment, the reversible neural network adopts a flow-based generative model. In the reversible neural network, a set of bidirectional mapping functions is used to realize reversible transformation between input and output. The reversible transformation process is controlled by availability conditions. The construction process of the reversible neural network is as follows: multiple arbitrary networks are formed into a reversible block by alternating coupling. The input and output of the reversible block are divided into two parts. Multiple reversible blocks are combined to construct a reversible neural network for identity transformation. The reversible neural network composed of multiple reversible blocks performs reversible transformation between the original features of the input and the new features of the output through a set of bidirectional mapping functions.
[0056] Specifically, in this embodiment, by setting different levels of privacy protection strength, identity mapping model, and face-swapping model, a face anonymization template image with a corresponding privacy protection strength can be obtained. The degree of protection for human visual recognition of this image increases with the increase of the protection strength, realizing dynamically adjustable anonymization oriented towards human visual perception. At the same time, in order to improve the usability of the face anonymization template image, an usability conditional coding network is used so that the final generated target anonymization image can choose whether to retain the identity features of the original image, thereby realizing dynamically adjustable anonymization oriented towards machine vision. Meanwhile, the semantic information of the original face image is embedded into the face anonymization template image through a reversible neural network, so that the final generated target anonymization image can also be restored to the original face image with the help of the reversible neural network, realizing dynamically reversible anonymization.
[0057] Therefore, the face anonymization method provided by this invention has multiple privacy protection features (reversibility, usability, diversity, etc.), and can be flexibly applied in different real-world scenarios. This solves the problem that most current face anonymization methods do not fully consider the actual application scenarios of users, and are basically one method for one type of protection, and cannot control the anonymization results, which greatly limits the use of the method.
[0058] In another embodiment, the identity mapping model is trained using adversarial training. The identity mapping model is used as a generator, and a binary recognition model is constructed as the first discriminator to distinguish between real and fake identity features. An attribute recognition model is used as the second discriminator. A loss function is used to update the parameters of the identity mapping model. First, the existing image feature set is input into the binary recognition model to optimize its ability to distinguish between real and fake identity features. The existing image feature set includes real face images and facial identity features of real face images. The first loss function is specifically the loss between the facial attribute prediction vector extracted by the attribute recognition model and the facial identity feature vector. The first loss function is used to update the parameters of the identity mapping model. The second loss function is specifically the loss between the facial identity features of real face images and the facial identity features generated by the generator. The second loss function is used to update the parameters of the binary recognition model, specifically:
[0059] The expression for the first loss function is as follows:
[0060]
[0061] in, This represents the total loss function of the generator; To counteract the loss, this is used to measure the ability of the identity feature vectors generated by the identity mapping model to "deceive" the discriminator; The L1-norm loss function is used to measure the similarity between the attribute prediction vector and the identity feature vector; λ1 and λ2 are respectively... The weights, where, and They are:
[0062]
[0063]
[0064] z represents a random face attribute prediction vector sampled from the latent distribution; G(z) represents a face identity feature vector generated by the generator based on the random face attribute prediction vector z; D(G(z)) represents the discriminator's score for the generated face identity vector G(z); ‖·,·‖1 represents the L1 distance between two face attribute features, F(∶)=E()+M() is the concatenated face attribute prediction vector; E() represents the pre-trained face age recognition model; M() represents the pre-trained face gender recognition model.
[0065] The expression for the second loss function is as follows:
[0066]
[0067] in, This represents the total loss function of the binary recognition model; For binary cross-entropy loss, The loss function for binary recognition models to identify real facial features. The loss function is used to generate facial identity features for the binary recognition model, where, and They are:
[0068]
[0069]
[0070] Where x represents a real face image; Q(x) represents the face identity features extracted from the real face image x using the common face recognition model (FaceNet model); D(Q(x)) represents the score of the binary recognition model on the real face identity vector; z represents a random face attribute prediction vector sampled from the latent distribution; G(z) represents the face identity vector generated by the generator based on the random face attribute prediction vector z; and D(G(z)) represents the score of the discriminator on the generated face identity vector G(z).
[0071] In another embodiment, to ensure the similarity between the final generated target anonymized image and the face anonymized template image, and to leverage the control effect of the availability vector, a third loss function is used to update the parameters of the invertible neural network and the encoder network. This third loss function includes at least: the perceptual loss between the generated target anonymized image and the face anonymized template image, the facial identity information loss between the target anonymized image and the original face image under different availability vectors, and the reconstruction loss between the reconstructed face image from the target anonymized image and the original face image. Specifically:
[0072] Third loss function:
[0073]
[0074] in, Represents the total loss function; The perceptual loss between the generated target anonymized image and the face anonymized template image; This represents the loss of facial identity information between the target anonymized image and the original face image under different availability vectors; λ1, λ2, and λ3 represent the reconstruction loss between the restored face image and the original face image, respectively. The weights, where, Specifically:
[0075]
[0076] Among them, X proc X represents the input face anonymization template image. out Represents the target anonymized image; This is used to measure the visual similarity between a face anonymization template image and a target anonymization image. and Specifically:
[0077]
[0078]
[0079] Where f() represents the features extracted from the pre-trained deep neural network; f(X) out f(X) represents the features of the target anonymized image in a deep network; proc ) represents the features of the face anonymization template image in the deep network; ‖·,·‖2 is used to measure the difference between two features; It is a traditional Euclidean loss function used to measure the pixel-level differences between the template image and the output image;
[0080] Among them, under the condition of preserving usability, the loss of facial identity information between the target anonymized image and the face anonymization template image. Represented as:
[0081]
[0082] Under the condition of removing usability, the loss of facial identity information between the target anonymized image and the face anonymized template image. Represented as:
[0083]
[0084] Among them, X orig F represents the original face image; F() represents the existing face feature extraction model; For feature difference loss, Specifically:
[0085]
[0086] Wherein, F1 and F2 represent the feature representations of the anonymized image and the anonymized face template image;
[0087]
[0088] Among them, X rec This represents the face image recovered from the anonymized target image using a reversible neural network. The loss function is used to measure the difference between the recovered face image and the original face image. L1-norm is used as the metric to ensure that the recovered face image is as consistent as possible with the original face image, thus ensuring the reversibility of the face image.
[0089] Example 2
[0090] See Figure 2 As shown, this embodiment also provides a controllable face anonymization system application platform, including an image acquisition terminal, a server terminal, and a user terminal. The image acquisition terminal is used to acquire original face images, the server terminal is used to embed the controllable face anonymization system to complete face image anonymization processing, and the user terminal is used to display the target anonymized image; see also Figure 3 As shown, this embodiment provides a controllable face anonymization system, which includes:
[0091] The prediction vector generation module 100 is used to identify the facial attribute features of the original face image using an attribute recognition model, and to modify and splice the facial attribute features according to a preset privacy protection strength sequence to obtain the processed facial attribute prediction vector.
[0092] The template image generation module 200 is used to input the face attribute prediction vector into the identity mapping model to obtain the face identity feature vector, and then input both the face identity feature vector and the original face image into the face swapping model for processing to obtain the face anonymization template image.
[0093] The availability condition generation module 300 is used to construct an availability vector representing the availability of the original face image, and convert the availability vector into availability conditions through a conditional encoder network;
[0094] The target image generation module 400 is used to embed the original face image into the face anonymization template image using a reversible neural network, and to control the reversible neural network through availability conditions to generate the final target anonymization image.
[0095] Furthermore, the availability vector adopts a one-hot vector, which includes both available and unavailable vectors; the reversible neural network adopts a flow-based generative model, which uses a set of bidirectional mapping functions to achieve reversible transformation between input and output, and controls the reversible transformation process through availability conditions.
[0096] It should be noted that the modules in the system of Embodiment 2 correspond to the steps in the method of Embodiment 1. The steps in the method of Embodiment 1 have been described in detail in Embodiment 1, and the module content in the system will not be described in detail in this Embodiment 2.
[0097] Example 3
[0098] See Figure 4 As shown, this embodiment also provides a computer device, including a system memory 1005 and a processor 1001. The system memory 1005 stores a computer program, and the processor 1001 executes the computer program to implement the steps of any of the methods described above.
[0099] It should be noted that the processor 1001 is used to execute the steps in the above method embodiments according to the instructions in the program code. Alternatively, when the processor 1001 executes the computer program, it implements the functions of each module / unit in the above system / device embodiments.
[0100] Specifically, in this embodiment, the computer program can be divided into one or more modules / units. One or more modules / units are stored in the system memory 1005 and executed by the processor 1001 to complete this application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the terminal device.
[0101] The terminal device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor 1001 and a system memory 1005. Those skilled in the art will understand that this does not constitute a limitation on the terminal device, and it may include more or fewer components than shown in the figures, or a combination of certain components, or different components. For example, the terminal device may also include an input / output device 1003, a network access device 1002, a bus 1006, etc.
[0102] The processor 1001 can be a Central Processing Unit (CPU), or other general-purpose processors 1001, digital signal processors 1001 (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 1001 can be a microprocessor or any conventional processor, etc.
[0103] System memory 1005 can be an internal storage unit of the terminal device, such as a hard drive or RAM. System memory 1005 can also be a storage device 1004 of the terminal device, such as an external hard drive, SmartMedia Card (SMC), Secure Digital (SD) card, or FlashCard. Furthermore, system memory 1005 can include both internal storage units and storage device 1004. System memory 1005 is used to store computer programs and other programs and data required by the terminal device. System memory 1005 can also be used to temporarily store data that has been output or will be output.
[0104] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0105] Example 4
[0106] This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0107] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), registers, hard disks, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof, or any other form of computer-readable storage medium in the art.
[0108] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside within an application-specific integrated circuit (ASIC). In embodiments of the invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device.
[0109] Example 5
[0110] This embodiment also provides a computer program product containing instructions that, when executed by a cluster of computer devices, cause the cluster of computer devices to perform the method described in Embodiment 1.
[0111] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A controllable method for facial anonymization, characterized in that, The methods include: The facial attribute features of the original face image are identified using an attribute recognition model, and the facial attribute features are modified and spliced according to a preset privacy protection strength sequence to obtain the processed facial attribute prediction vector. The face attribute prediction vector is input into the identity mapping model to obtain the face identity feature vector. Then, the face identity feature vector and the original face image are both input into the face swapping model for processing to obtain the face anonymization template image. A availability vector representing the availability of the original face image is constructed, and the availability vector is transformed into availability conditions through a conditional encoder network; The original face image is embedded into the face anonymization template image using a reversible neural network, and the reversible neural network is controlled by availability conditions to generate the final target anonymized image. Specifically, the reversible neural network is controlled by availability conditions to generate the final target anonymized image. This involves updating the parameters of both the reversible neural network and the encoder network using a third loss function. This third loss function includes at least: the perceptual loss between the generated target anonymized image and the face anonymization template image; the loss of facial identity information between the target anonymized image and the original face image under different availability conditions; and the reconstruction loss between the reconstructed face image and the original face image. The third loss function is: ,in, Represents the third loss function; The perceptual loss between the generated target anonymized image and the face anonymized template image; This represents the loss of facial identity information between the anonymized target image and the original face image under different availability conditions. This represents the reconstruction loss between the restored face image and the original face image from the anonymized target image. They are respectively The weights; Specifically, this refers to the loss of facial identity information between the target anonymized image and the original face image while preserving usability. Represented as: ,in, Represents the original human face image; Represents the target anonymized image; This represents an existing facial feature extraction model; For feature difference loss; Under the condition of removing usability, the loss of facial identity information between the target anonymized image and the face anonymized template image. Represented as: ,in, This represents the input face anonymization template image; Specifically: ,in, , The feature representations of the target anonymized image and the original face image or the face anonymization template image.
2. The controllable face anonymization method according to claim 1, characterized in that, The availability vector adopts a one-hot vector, which includes both available and unavailable vectors; the reversible neural network adopts a flow-based generative model, which uses a set of bidirectional mapping functions to achieve reversible transformation between input and output, and controls the reversible transformation process through availability conditions.
3. The controllable face anonymization method according to claim 1, characterized in that, The attribute recognition model includes an age recognition model and a gender recognition model. Both the age recognition model and the gender recognition model are trained using a binary classification model. Facial attribute features include age features and gender features. The identity mapping model is obtained by training a fully connected neural network.
4. The controllable face anonymization method according to claim 3, characterized in that, Facial attribute features are extracted from the original face image using an attribute recognition model. These features are then modified and concatenated according to a preset privacy protection strength sequence to obtain the processed attribute prediction vector. Specifically: The original face image is input into the age recognition model and the gender recognition model respectively to obtain age features and gender features; A privacy protection strength sequence is set based on facial attribute features, wherein the privacy protection strength sequence contains at least one level of privacy protection strength; The age and gender features are modified and concatenated based on the privacy protection strength sequence to obtain the processed attribute prediction vector.
5. A controllable face anonymization method according to claim 4, characterized in that, The preset privacy protection strength sequence includes four levels of privacy protection strength.
6. A controllable face anonymization system, characterized in that, This system is used in a controllable face anonymization method according to any one of claims 1-5, the system comprising: The prediction vector generation module is used to identify the facial attribute features of the original face image using the attribute recognition model, and to modify and splice the facial attribute features according to the preset privacy protection strength sequence to obtain the processed facial attribute prediction vector. The template image generation module is used to input the face attribute prediction vector into the identity mapping model to obtain the face identity feature vector, and then input both the face identity feature vector and the original face image into the face swapping model for processing to obtain the face anonymization template image. The availability condition generation module is used to construct an availability vector representing the availability of the original face image, and converts the availability vector into availability conditions through a conditional encoder network; The target image generation module is used to embed the original face image into the face anonymization template image using a reversible neural network, and at the same time, the reversible neural network is controlled by availability conditions to generate the final target anonymized image.
7. A controllable face anonymization system according to claim 6, characterized in that, The availability vector adopts a one-hot vector, which includes both available and unavailable vectors; the reversible neural network adopts a flow-based generative model, which uses a set of bidirectional mapping functions to achieve reversible transformation between input and output, and controls the reversible transformation process through availability conditions.
8. A computer device comprising a system memory and a processor, wherein the system memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 5.
10. A computer program product containing instructions, characterized in that, When the instructions are executed by a cluster of computer devices, the cluster of computer devices causes the cluster of computer devices to perform the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Face data identity recognition method based on generative adversarial network
CN112949535A
Picture anonymization method based on semantic and attitude graph guidance
CN113919998A