Face image anonymization processing method and system
By combining an intelligent style library and a fast style transfer model, the face region is accurately located and rendered to generate anonymized images. This solves the contradiction between visual quality and anonymity intensity in existing technologies and achieves efficient and coordinated anonymization processing results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ENTREPRENEUR (LISHUI) INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2025-12-02
- Publication Date
- 2026-05-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies face challenges in handling facial anonymization in close-up single-person portrait scenarios, such as the trade-off between visual quality and anonymity strength, or the challenge between computational complexity and reliability, resulting in poor processing performance.
By constructing an intelligent style library, a pre-trained face detection model is used to accurately locate face regions. Based on a fast style transfer model and predefined artistic style templates, stylized rendering is performed to generate anonymized face image blocks, which are then seamlessly integrated back into the original image to achieve visual unity.
It achieves a balance between privacy protection and visual quality by completely eliminating identity information while maintaining the natural facial contours and facial features, thus enhancing the aesthetic value of the image.
Smart Images

Figure CN121962333A_ABST
Abstract
Description
A method and system for anonymizing facial images Technical Field
[0001] This invention relates to the field of privacy protection, specifically to a method and system for anonymizing facial images. Background Technology
[0002] Facial image anonymization is a key technology for balancing privacy protection and image use. In scenarios such as news reporting, documentary production, and street interviews, it is often necessary to protect the identity of specific individuals in front of the camera (such as interviewees or passersby) while ensuring the publishability and artistic value of the images.
[0003] Existing technologies commonly employ anonymization methods such as mosaic and Gaussian blur, achieving their purpose by drastically degrading the facial area. This method has significant drawbacks; it is not only visually intrusive, disrupting the overall aesthetics and narrative coherence of the image, but its crude processing also conveys strong negative psychological suggestions to the viewer. In recent years, some face replacement techniques based on generative adversarial networks have emerged, capable of generating virtual faces for replacement. However, such methods are computationally complex and time-consuming, and the generated faces may possess their own uncontrolled identity characteristics, posing a risk of triggering new identity confusion or ethical controversies. Their applicability is limited in scenarios requiring fast and reliable processing of close-up single-person portraits.
[0004] Therefore, existing technologies, when dealing with such single-person face anonymization needs, either sacrifice visual quality to ensure anonymity strength or introduce uncontrollable complex models that bring new uncertainties. Therefore, this paper proposes a face image anonymization processing method and system to address the aforementioned problems. Summary of the Invention
[0005] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a method and system for anonymizing facial images to solve the problems existing in the background technology.
[0006] This invention is implemented as follows: a method for anonymizing facial images, comprising the following steps: acquiring a user's image to be processed; using a pre-trained face detection model to locate and extract a single facial region image; selecting a target artistic style template from a predefined intelligent style library, wherein the intelligent style library stores multiple artistic style templates and rendering parameters for each template, and each artistic style template is associated with style metadata; inputting the facial region image into a pre-trained fast style transfer model to generate anonymized facial image blocks, wherein the fast style transfer model performs stylistic rendering on the input facial region image with the target artistic style template as the transfer target; and fusing the anonymized facial image blocks into the original position in the image to be processed to obtain an anonymized image, wherein the identity information of the anonymized image has been hidden and visually uniform.
[0007] As a further aspect of the present invention: the step of acquiring the user's image to be processed and using a pre-trained face detection model to locate and extract a single face region image specifically includes: based on the image to be processed, performing initial face region localization using multiple methods, including conventional face detection models based on visible light images, determining the head contour region using depth maps or heat maps, and calculating the face region based on human pose estimation to identify the head joint positions; performing collaborative verification based on the multiple results of the initial localization, and determining the target face region by judging overlapping areas; dynamically adjusting the size and aspect ratio of the bounding box for cropping the target face region based on the estimated face pose angle; and processing the determined target face region using a face parsing semantic segmentation model to obtain a face region image, wherein the face region image includes a complete facial semantic region and a polygonal mask that fits the facial contour.
[0008] As a further aspect of the present invention: the step of selecting a target art style template from a predefined intelligent style library specifically includes: analyzing the image to be processed to obtain estimated age group and expression classification labels, environmental scene labels, and main color scheme and color distribution, and integrating them into a feature vector; calculating the matching degree between the feature vector and the style metadata associated with each art style template in the intelligent style library; based on the matching degree calculation result, selecting multiple art styles with matching degrees higher than a set threshold to construct a style recommendation candidate set, and quickly generating a low-resolution preview image based on the corresponding rendering parameters; determining the style recommendation candidate set with the highest matching degree as the current target art style template, and outputting the corresponding style parameters.
[0009] As a further aspect of the present invention: the step of rapidly generating low-resolution preview images based on corresponding rendering parameters further includes: after showing multiple low-resolution preview images to the user, collecting and recording the art style template finally selected by the user; using the feature vector as input, using the art style template selected by the user as the target output, and constructing an optimized sample; based on the optimized sample, adjusting the style metadata of the relevant art style templates in the intelligent style library through an online learning algorithm.
[0010] As a further aspect of the present invention: the step of inputting a face region image into a pre-trained fast style transfer model to generate anonymized face image patches specifically includes: extracting dynamic feature parameters of expression, lip shape, and eyeballs from the face region image; inputting the face region image into an identity-independent basis generator to obtain a neutral image that preserves the geometric structure of the face but removes identity details; inputting the neutral image and a target artistic style template into the fast style transfer model for rendering to generate a basic stylized face image; and driving the basic stylized face image based on the extracted dynamic feature parameters to obtain anonymized face image patches.
[0011] Another objective of this invention is to provide a facial image anonymization processing system, the system comprising: an image acquisition and positioning module, used to acquire a user's image to be processed, and to locate and extract a single facial region image using a pre-trained face detection model; an intelligent style selection module, used to select a target artistic style template from a predefined intelligent style library, the intelligent style library storing multiple artistic style templates and rendering parameters of each template, and each artistic style template being associated with style metadata; a style transfer rendering module, used to input the facial region image into a pre-trained fast style transfer model to generate anonymized facial image blocks, the fast style transfer model performing stylistic rendering of the input facial region image with the target artistic style template as the transfer target; and an anonymization fusion module, used to fuse the anonymized facial image blocks into the original position in the image to be processed to obtain an anonymized image, wherein the identity information of the anonymized image has been hidden and visually uniform.
[0012] As a further aspect of the present invention: the image acquisition and localization module includes: an initial localization unit, used to perform initial localization of the face region based on the image to be processed using multiple methods, including a conventional face detection model based on visible light images, determining the head contour region using depth maps or heat maps, and calculating the face region based on human pose estimation to identify the head joint positions; a collaborative verification unit, used to perform collaborative verification based on the multiple results of the initial localization, and determine the target face region by judging overlapping areas; a dynamic cropping unit, used to dynamically adjust the size and aspect ratio of the cropping bounding box of the target face region based on the estimated results of the face pose angle; and a fine segmentation unit, used to process the determined target face region using a face parsing semantic segmentation model to obtain a face region image, the face region image including a complete facial semantic region and a polygonal mask that fits the facial contour.
[0013] As a further aspect of the present invention: the intelligent style selection module includes: a feature parsing unit, used to analyze the image to be processed to obtain estimated age group and expression classification labels, environmental scene labels, and main color system and color distribution, and integrate them into a feature vector; a metadata matching unit, used to calculate the matching degree between the feature vector and the style metadata associated with each art style template in the intelligent style library; a preview generation unit, used to select multiple art styles with matching degrees higher than a set threshold to construct a style recommendation candidate set based on the matching degree calculation results, and quickly generate a low-resolution preview image based on the corresponding rendering parameters; and a template determination unit, used to determine the one with the highest matching degree in the style recommendation candidate set as the current target art style template, and output the corresponding style parameters.
[0014] As a further aspect of the present invention: the style transfer rendering module includes: a feature extraction unit, used to extract dynamic feature parameters of expression, mouth shape and eyeballs from the face region image; a basis generation unit, used to input the face region image into an identity-independent basis generator to obtain a neutral image that retains the geometric structure of the face but removes identity details; a style rendering unit, used to input the neutral image and the target artistic style template into the fast style transfer model for rendering to generate a basic stylized face image; and a feature reproduction unit, used to drive the basic stylized face image based on the extracted dynamic feature parameters to obtain anonymized face image blocks.
[0015] Compared with existing technologies, the beneficial effects of this invention are as follows: By constructing an intelligent style library integrating multiple artistic style templates, corresponding rendering parameters, and style metadata, this invention achieves precise localization and extraction of a single facial region from the image to be processed. Based on an intelligent style selection mechanism, it determines the most suitable target artistic style template, thereby driving a fast style transfer model to perform efficient and coordinated stylized rendering of the facial region. Finally, the generated stylized facial image blocks are seamlessly integrated back into their original positions, forming a visually unified anonymized image. This invention, on the one hand, completely eliminates identifiable information in facial images, achieving the core objective of privacy protection; on the other hand, through artistic style transfer processing, it perfectly avoids the image fragmentation and visual intrusion caused by traditional methods such as mosaic and Gaussian blur, achieving a balance between the strength of privacy protection and visual fidelity. Furthermore, the output anonymized image not only maintains the natural contours and expression features of the face but also enhances the aesthetic value of the image through artistic expression, giving it a significant advantage in application scenarios with high requirements for visual quality and privacy protection, such as news reporting, documentary production, and street interviews. Attached Figure Description
[0016] Figure 1 is a flowchart of a face image anonymization processing method.
[0017] Figure 2 is a flowchart of a face image anonymization processing method for locating and extracting a single face region image.
[0018] Figure 3 is a flowchart of selecting a target artistic style template in a face image anonymization processing method.
[0019] Figure 4 is a flowchart of user feedback optimization in a face image anonymization processing method.
[0020] Figure 5 is a flowchart of a face image anonymization processing method for generating anonymized face image blocks.
[0021] Figure 6 is a schematic diagram of a face image anonymization processing system.
[0022] Figure 7 is a schematic diagram of the image acquisition and localization module in a face image anonymization processing system.
[0023] Figure 8 is a schematic diagram of the structure of an intelligent style selection module in a face image anonymization processing system.
[0024] Figure 9 is a schematic diagram of the style transfer rendering module in a face image anonymization processing system. Detailed Implementation
[0025] 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 and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0026] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0027] As shown in Figure 1, this embodiment of the invention provides a method for anonymizing facial images. The method includes the following steps: S100, acquiring a user's image to be processed, and using a pre-trained face detection model to locate and extract a single facial region image; S200, selecting a target artistic style template from a predefined intelligent style library, wherein the intelligent style library stores multiple artistic style templates and rendering parameters of each template, and each artistic style template is associated with style metadata; S300, inputting the facial region image into a pre-trained fast style transfer model to generate anonymized facial image blocks, wherein the fast style transfer model performs stylized rendering on the input facial region image with the target artistic style template as the transfer target; S400, fusing the anonymized facial image blocks into the original position in the image to be processed to obtain an anonymized image, wherein the identity information of the anonymized image has been hidden and visually unified.
[0028] It should be noted that, in step S400, the anonymized face image patch is precisely located to its original position in the image to be processed using intelligent fusion technology. First, it is aligned to a reference based on the bounding box coordinates obtained during the face detection stage. Then, a multi-scale feature matching algorithm is used to adaptively correct illumination, tone, and shadows, ensuring that the stylized face maintains harmony and uniformity with the lighting conditions of the original background environment. Finally, gradient domain fusion is performed on the connecting areas using edge transition processing technology to eliminate traces of manual processing, ultimately generating a visually coherent anonymized image. This method completely eliminates identity information while preserving the natural contours and expression features of the face, and through artistic processing, it creates a harmonious visual whole between the anonymized area and the original image.
[0029] In this embodiment of the invention, an intelligent style library integrating multiple artistic style templates, corresponding rendering parameters, and style metadata is constructed. This library accurately locates and extracts a single facial region from the image to be processed. Based on an intelligent style selection mechanism, the most suitable target artistic style template is determined, driving a fast style transfer model to perform efficient and coordinated stylized rendering of the facial region. Finally, the generated stylized facial image blocks are seamlessly integrated back into their original positions, forming a visually unified anonymized image. This invention, on the one hand, completely eliminates identifiable information in facial images, achieving the core objective of privacy protection; on the other hand, through artistic style transfer processing, it perfectly avoids the image fragmentation and visual intrusion caused by traditional methods such as mosaic and Gaussian blur, achieving a balance between privacy protection and visual fidelity. Furthermore, the output anonymized image not only maintains the natural contours and facial features but also enhances the aesthetic value of the image through artistic expression, giving it a significant advantage in application scenarios with high requirements for visual quality and privacy protection, such as news reporting, documentary production, and street interviews.
[0030] As shown in Figure 2, in a preferred embodiment of the present invention, the steps of acquiring the user's image to be processed and locating and extracting a single face region image using a pre-trained face detection model specifically include: S101, based on the image to be processed, performing initial face region localization using multiple methods, including conventional face detection models based on visible light images, determining the head contour region using depth maps or heat maps, and calculating the face region based on human pose estimation to identify the head joint positions; S102, performing collaborative verification based on the multiple results of the initial localization, and determining the target face region by judging overlapping areas; S103, dynamically adjusting the size and aspect ratio of the bounding box for cropping the target face region based on the estimated face pose angle; S104, based on the determined target face region, processing it using a face parsing semantic segmentation model to obtain a face region image, the face region image including a complete facial semantic region and a polygonal mask that fits the facial contour.
[0031] In this embodiment of the invention, a multimodal fusion technique is used to achieve accurate capture of target faces in complex scenes. First, three parallel initial localization techniques are employed: a conventional face detection model based on visible light images, head contour determination using depth maps or heatmaps, and head keypoint localization based on human pose estimation. This multi-source data verification effectively improves detection robustness in challenging environments such as occlusion and low light. Next, a collaborative verification mechanism is used to perform spatial overlap analysis on multiple initial localization results, using a consensus region as the high-confidence target face region, thus ensuring localization accuracy. Based on this, the size of the cropped bounding box is dynamically adjusted by estimating the face's pose angle in three-dimensional space, fully covering the visual range of faces facing different directions. Then, a face parsing semantic segmentation model is used to perform pixel-level fine processing on the determined face region, generating a semantic region containing complete facial elements such as skin, hair, eyebrows, and facial features, along with its corresponding polygonal mask. This mask accurately fits the facial contour, laying a high-quality image foundation for subsequent stylization processing, while ensuring the naturalness and integrity of the final anonymization effect.
[0032] As shown in Figure 3, in a preferred embodiment of the present invention, the step of selecting a target art style template from a predefined intelligent style library specifically includes: S201, analyzing the image to be processed to obtain estimated age group and expression classification labels, environmental scene labels, and main color scheme and color distribution, and integrating them into a feature vector; S202, calculating the matching degree between the feature vector and the style metadata associated with each art style template in the intelligent style library; S203, based on the matching degree calculation result, selecting multiple art styles with matching degrees higher than a set threshold to construct a style recommendation candidate set, and quickly generating a low-resolution preview image based on the corresponding rendering parameters; S204, determining the style recommendation candidate set with the highest matching degree as the current target art style template, and outputting the corresponding style parameters.
[0033] In this embodiment of the invention, style selection is automated and intelligently linked by establishing an intelligent association between image context features and artistic styles. First, the image to be processed undergoes multi-dimensional feature analysis. Using an age estimation model, expression recognition model, scene classification model, and color analysis algorithm, multimodal features including estimated age group, expression classification labels, environmental scene labels, and dominant color distribution are extracted and integrated into a feature vector representing the overall style tendency of the image. Then, this feature vector is compared with the style metadata associated with each artistic style template in the intelligent style library. The style metadata includes quantitative indicators for each artistic style in multiple dimensions such as age suitability, expression fit, scene coordination, and color compatibility. Based on the matching degree calculation results, multiple artistic styles with matching degrees higher than a preset threshold are constructed into a style recommendation candidate set. Low-resolution preview images are generated using the rendering parameters corresponding to each style through a fast rendering engine. Furthermore, the system determines the artistic style with the highest matching degree in the candidate set as the target artistic style template and outputs its complete style parameters to subsequent processing flows.
[0034] As shown in Figure 4, in a preferred embodiment of the present invention, the step of quickly generating low-resolution preview images based on corresponding rendering parameters further includes: S2031, after showing multiple low-resolution preview images to the user, collecting and recording the art style template finally selected by the user; S2032, using the feature vector as input, using the art style template selected by the user as the target output, and constructing an optimized sample; S2033, based on the optimized sample, adjusting the style metadata of the relevant art style templates in the intelligent style library through an online learning algorithm.
[0035] In this embodiment of the invention, the generated low-resolution preview images play a crucial role. Firstly, these low-resolution preview images are provided to users for viewing. Then, the user's final selected art style template is collected and recorded in real time, forming user preference data. Subsequently, the previously extracted image feature vectors are used as input features, and the user's actual selected art style template is used as the target output, together constructing optimized samples. Based on these continuously accumulated optimized samples, the style metadata of relevant art style templates in the intelligent style library is dynamically adjusted through an online learning algorithm. This ensures that the quantitative indicators of each art style in dimensions such as age suitability and scene coordination continuously adapt to the aesthetic preferences of the user group, thereby achieving continuous improvement in the system's recommendation accuracy and forming a complete self-optimization closed loop. This feedback optimization mechanism not only enhances the system's personalized service capabilities but also ensures that the style recommendation results remain highly consistent with user expectations through continuous learning.
[0036] As shown in Figure 5, in a preferred embodiment of the present invention, the step of inputting the face region image into a pre-trained fast style transfer model to generate anonymized face image patches specifically includes: S301, extracting dynamic feature parameters of expression, mouth shape, and eyeballs from the face region image; S302, inputting the face region image into an identity-independent basis generator to obtain a neutral image that retains the geometric structure of the face but removes identity details; S303, inputting the neutral image and the target artistic style template into the fast style transfer model for rendering to generate a basic stylized face image; S304, driving the basic stylized face image based on the extracted dynamic feature parameters to obtain anonymized face image patches.
[0037] In this embodiment of the invention, an innovative staged processing architecture is employed to balance identity concealment and dynamic feature preservation. Dynamic feature parameters such as expression intensity, lip shape, and eye orientation are precisely extracted from the original face region image through facial keypoint detection and an expression encoder. These parameters are specifically designed to describe dynamic facial changes but are unrelated to personal identity. The original face image is then input into an identity-independent basis generator. Feature decoupling technology removes texture details related to identity recognition while fully preserving the basic geometric structure of the face, generating a neutral image with universal facial features. This neutral image, along with a selected target artistic style template, is then input into a fast style transfer model for rendering, generating a basic stylized face that conforms to artistic style requirements but lacks real-world identity features. Finally, using the previously extracted dynamic feature parameters, feature remapping technology precisely drives the basic stylized face, re-imposing its original facial expressions, lip shape changes, and gaze direction, ultimately outputting an anonymized face image patch that achieves complete identity anonymity while fully preserving non-verbal communication information.
[0038] As shown in Figure 6, this embodiment of the invention also provides a face image anonymization processing system. The system includes: an image acquisition and positioning module 100, used to acquire the user's image to be processed, and use a pre-trained face detection model to locate and extract a single face region image; an intelligent style selection module 200, used to select a target artistic style template from a predefined intelligent style library, the intelligent style library storing multiple artistic style templates and rendering parameters of each template, and each artistic style template is associated with style metadata; a style transfer rendering module 300, used to input the face region image into a pre-trained fast style transfer model to generate anonymized face image blocks, the fast style transfer model performing stylistic rendering on the input face region image with the target artistic style template as the transfer target; and an anonymization fusion module 400, used to fuse the anonymized face image blocks into the original position in the image to be processed to obtain an anonymized image, the identity information of the anonymized image has been hidden and visually unified.
[0039] In this embodiment of the invention, the image acquisition and positioning module 100 is used to acquire input images and accurately locate and crop faces; the intelligent style selection module 200 automatically selects the most suitable target artistic style template from the intelligent style library by analyzing the matching relationship between image features and style metadata; the style transfer rendering module 300 performs artistic rendering processing on the cropped face region based on the selected artistic style template using a fast style transfer model; and the anonymization fusion module 400 seamlessly merges the rendered stylized face image with the original background, ultimately outputting an anonymized image that is visually unified and whose identity information is effectively hidden. This system achieves a unity of artistic expression and visual naturalness while ensuring identity anonymization.
[0040] As shown in Figure 7, in a preferred embodiment of the present invention, the image acquisition and positioning module 100 includes: an initial positioning unit 101, used to perform initial positioning of the face region based on the image to be processed using multiple methods, including a conventional face detection model based on visible light images, determining the head contour region using depth maps or heat maps, and calculating the face region based on human pose estimation to identify the head joint positions; a collaborative verification unit 102, used to perform collaborative verification based on the multiple results of the initial positioning, and determine the target face region by judging overlapping areas; a dynamic cropping unit 103, used to dynamically adjust the size and aspect ratio of the bounding box for cropping the target face region based on the estimated results of the face pose angle; and a fine segmentation unit 104, used to process the determined target face region using a face parsing semantic segmentation model to obtain a face region image, the face region image including a complete facial semantic region and a polygonal mask that fits the facial contour.
[0041] As shown in Figure 8, in a preferred embodiment of the present invention, the intelligent style selection module 200 includes: a feature parsing unit 201, used to analyze the image to be processed to obtain estimated age group and expression classification labels, environmental scene labels, and main color system and color distribution, and integrate them into a feature vector; a metadata matching unit 202, used to calculate the matching degree between the feature vector and the style metadata associated with each art style template in the intelligent style library; a preview generation unit 203, used to select multiple art styles with matching degrees higher than a set threshold to construct a style recommendation candidate set based on the matching degree calculation results, and quickly generate a low-resolution preview image based on the corresponding rendering parameters; and a template determination unit 204, used to determine the one with the highest matching degree in the style recommendation candidate set as the current target art style template, and output the corresponding style parameters.
[0042] As shown in Figure 9, in a preferred embodiment of the present invention, the style transfer rendering module 300 includes: a feature extraction unit 301, used to extract dynamic feature parameters of expression, mouth shape, and eyeballs from the face region image; a basis generation unit 302, used to input the face region image into an identity-independent basis generator to obtain a neutral image that retains the geometric structure of the face but removes identity details; a style rendering unit 303, used to input the neutral image and the target artistic style template into the fast style transfer model for rendering to generate a basic stylized face image; and a feature reproduction unit 304, used to drive the basic stylized face image based on the extracted dynamic feature parameters to obtain anonymized face image blocks.
[0043] The above description only details the preferred embodiments of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0044] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0045] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0046] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the disclosure in the specification and embodiments. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
Claims
1. A method for anonymizing facial images, characterized in that, The method includes the following steps: acquiring the user's image to be processed; using a pre-trained face detection model to locate and extract a single face region image; selecting a target art style template from a predefined intelligent style library, wherein the intelligent style library stores multiple art style templates and rendering parameters for each template, and each art style template is associated with style metadata; inputting the face region image into a pre-trained fast style transfer model to generate anonymized face image patches, wherein the fast style transfer model performs stylistic rendering on the input face region image with the target art style template as the transfer target; and fusing the anonymized face image patches into the original position in the image to be processed to obtain an anonymized image, wherein the identity information of the anonymized image has been hidden and visually uniform.
2. The face image anonymization processing method according to claim 1, characterized in that, The steps of acquiring the user's image to be processed and locating and extracting a single face region image using a pre-trained face detection model specifically include: based on the image to be processed, performing initial face region localization using multiple methods, including conventional face detection models based on visible light images, determining the head contour region using depth maps or heat maps, and calculating the face region based on human pose estimation to identify the head joint positions; performing collaborative verification based on the multiple results of the initial localization, and determining the target face region by judging overlapping areas; dynamically adjusting the size and aspect ratio of the bounding box for cropping the target face region based on the estimated face pose angle; and processing the determined target face region using a face parsing semantic segmentation model to obtain a face region image, wherein the face region image includes a complete facial semantic region and a polygonal mask that fits the facial contour.
3. The face image anonymization processing method according to claim 1, characterized in that, The step of selecting a target art style template from a predefined intelligent style library specifically includes: analyzing the image to be processed to obtain estimated age group and expression classification labels, environmental scene labels, and main color scheme and color distribution, and integrating them into a feature vector; calculating the matching degree between the feature vector and the style metadata associated with each art style template in the intelligent style library; selecting multiple art styles with matching degrees higher than a set threshold to construct a style recommendation candidate set based on the matching degree calculation results, and quickly generating a low-resolution preview image based on the corresponding rendering parameters; determining the style recommendation candidate with the highest matching degree as the current target art style template, and outputting the corresponding style parameters.
4. The face image anonymization processing method according to claim 3, characterized in that, The step of quickly generating low-resolution preview images based on corresponding rendering parameters further includes: after showing multiple low-resolution preview images to the user, collecting and recording the art style template finally selected by the user; using the feature vector as input, the art style template selected by the user as the target output, and constructing an optimized sample; and adjusting the style metadata of the relevant art style templates in the intelligent style library based on the optimized sample through an online learning algorithm.
5. The face image anonymization processing method according to claim 1, characterized in that, The step of inputting a face region image into a pre-trained fast style transfer model to generate anonymized face image patches specifically includes: extracting dynamic feature parameters of expression, lip shape, and eyeballs from the face region image; inputting the face region image into an identity-independent basis generator to obtain a neutral image that preserves the geometric structure of the face but removes identity details; inputting the neutral image and a target artistic style template into the fast style transfer model for rendering to generate a basic stylized face image; and driving the basic stylized face image based on the extracted dynamic feature parameters to obtain anonymized face image patches.
6. A facial image anonymization processing system, characterized in that, The system includes: an image acquisition and localization module for acquiring the user's image to be processed, locating and extracting a single face region image using a pre-trained face detection model; an intelligent style selection module for selecting a target artistic style template from a predefined intelligent style library, wherein the intelligent style library stores multiple artistic style templates and rendering parameters for each template, and each artistic style template is associated with style metadata; a style transfer rendering module for inputting the face region image into a pre-trained fast style transfer model to generate anonymized face image patches, wherein the fast style transfer model performs stylistic rendering on the input face region image with the target artistic style template as the transfer target; and an anonymization fusion module for fusing the anonymized face image patches into the original position in the image to be processed to obtain an anonymized image, wherein the identity information of the anonymized image has been hidden and visually uniform.
7. The face image anonymization processing system according to claim 6, characterized in that, The image acquisition and localization module includes: an initial localization unit, used to perform initial localization of the face region based on the image to be processed using multiple methods, including a conventional face detection model based on visible light images, determining the head contour region using depth maps or heat maps, and calculating the face region based on human pose estimation to identify the head joint positions; a collaborative verification unit, used to perform collaborative verification based on the multiple results of the initial localization, and determine the target face region by judging overlapping areas; a dynamic cropping unit, used to dynamically adjust the size and aspect ratio of the bounding box for cropping the target face region based on the estimated face pose angles; and a fine segmentation unit, used to process the determined target face region using a face parsing semantic segmentation model to obtain a face region image, the face region image including a complete facial semantic region and a polygonal mask that fits the facial contour.
8. The face image anonymization processing system according to claim 6, characterized in that, The intelligent style selection module includes: a feature parsing unit, used to analyze the image to be processed to obtain estimated age group and expression classification labels, environmental scene labels, and main color scheme and color distribution, and integrate them into a feature vector; a metadata matching unit, used to calculate the matching degree between the feature vector and the style metadata associated with each art style template in the intelligent style library; a preview generation unit, used to select multiple art styles with matching degrees higher than a set threshold to construct a style recommendation candidate set based on the matching degree calculation results, and quickly generate a low-resolution preview image based on the corresponding rendering parameters; and a template determination unit, used to determine the one with the highest matching degree in the style recommendation candidate set as the current target art style template, and output the corresponding style parameters.
9. The face image anonymization processing system according to claim 6, characterized in that, The style transfer rendering module includes: a feature extraction unit, used to extract dynamic feature parameters of expression, mouth shape, and eyeballs from the face region image; a basis generation unit, used to input the face region image into an identity-independent basis generator to obtain a neutral image that retains the geometric structure of the face but removes identity details; a style rendering unit, used to input the neutral image and the target artistic style template into the fast style transfer model for rendering to generate a basic stylized face image; and a feature reproduction unit, used to drive the basic stylized face image based on the extracted dynamic feature parameters to obtain anonymized face image blocks.