Intelligent beauty feature optimization processing method and system for high-definition face changing
Through the nonlinear feature decoupling and quantum entangled state coding methods, combined with diffusion probability field and complex domain convolution technology, the problem of difficulty in feature decoupling and high computational complexity in high-definition face-changing beauty treatment is solved, and high quality is achieved HD face swap results.
Patent Information
- Application Number
- CN202510007100.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-02-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the high-definition face-changing beauty treatment, there are problems such as difficulty in decoupling identity characteristics and expression characteristics, artifacts and discontinuities occurring when the characteristics are fusion, beauty treatment lacks the ability to maintain global structure, and high computational complexity.
Using nonlinear feature decoupling and quantum entangled state coding methods, the precise decoupling and fusion of features is achieved through diffusion probability fields and stochastic differential equations, complex domain convolution and subband decomposition maintain the balance between facial structure and details, and through quantum Entangled state coding and fractional-order partial differential equations achieve efficient feature optimization.
It achieves high-quality results in high-definition face-changing beauty treatment, avoids the problems of identity leakage, unnatural expressions, imbalance in facial features and high computational complexity, and improves the naturalness and authenticity of face-changing effects.
Smart Images

Figure CN119399080A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an intelligent beauty feature optimization processing method and system for high-definition face swapping. Background Art
[0002] With the development of artificial intelligence and computer vision technology, face swapping and beautification technologies have been widely used in social media, short video production and other fields. Existing face swapping technologies mainly extract facial features through deep learning models and complete identity and expression migration in feature space. Beauty processing optimizes skin texture, facial features and other contours through image enhancement algorithms to improve visual effects. Current technologies mainly focus on three aspects: feature extraction, feature fusion and image enhancement.
[0003] However, the existing technology still has the following problems: traditional feature decoupling methods are difficult to accurately separate identity features and expression features, resulting in identity leakage or unnatural expressions in face-changing results; conventional feature fusion methods do not consider the probability distribution relationship between features, and are prone to artifacts and discontinuities; existing beauty processing methods are mainly based on local feature optimization, lack the ability to maintain global structure, and are prone to cause disproportionate facial features; when processing high-resolution images, the computational complexity is high and it is difficult to maintain the authenticity of details.
[0004] In summary, there is an urgent need for a face-changing and beautifying processing method based on nonlinear feature decoupling and quantum entangled state coding. The accurate decoupling and fusion of features are achieved through diffusion probability fields and stochastic differential equations, the balance between facial structure and details is maintained by using complex domain convolution and subband decomposition, and efficient feature optimization is achieved by using quantum entangled state coding and fractional-order partial differential equations, and finally high-quality face-changing and beautifying results are output. The present invention can solve the problems in the prior art. Summary of the invention
[0005] The embodiments of the present invention provide a method and system for optimizing and processing intelligent beauty features for high-definition face swapping, which can solve the problems in the prior art.
[0006] According to a first aspect of the embodiments of the present invention, Provided is an intelligent beauty feature optimization processing method for high-definition face swapping, comprising: Input the source face image and the target face image to the nonlinear feature decoupler, decouple and generate the source face feature group and the target face feature group respectively, wherein each feature group includes identity features, expression features and texture features; calculate the mapping relationship between the source face feature group and the target face feature group to generate a feature mapping group; construct a diffusion probability field to modulate the feature mapping group, fuse the expression features of the source face with the identity features of the target face through a stochastic differential equation, and obtain an initial fused feature; reconstruct the initial fused feature by using Monte Carlo sampling, and maintain the topological structure of the facial features through homotopy mapping to generate a basic face-changing feature; Convert the basic face-changing features to the spectral domain space, extract the spectral domain face-changing features through complex domain convolution; perform sub-band decomposition on the spectral domain face-changing features to separate the contour features of the target face and the detail features of the source face; perform subspace projection on the contour features of the target face to obtain the structure mapping features, perform directional filtering transformation on the detail features of the source face to obtain the texture enhancement features; fuse the structure mapping features and the texture enhancement features to generate a fused face-changing feature; The fused face-changing features are subjected to high-order tensor decomposition to extract core beautification features; the feature tensors of the core beautification features are compressed to obtain compressed beautification features, the compressed beautification features are input into a quantum entangled state coding network, adaptive beautification of facial areas is achieved through a non-local attention mechanism to obtain enhanced beautification features, non-integer-order derivative operations are performed on the enhanced beautification features using fractional-order partial differential equations, and a final high-definition face-changing beautification image is output.
[0007] In an optional embodiment, Input the source face image and the target face image to the nonlinear feature decoupler, decouple and generate the source face feature group and the target face feature group, respectively, where each feature group includes identity features, expression features and texture features; calculate the mapping relationship between the source face feature group and the target face feature group, and generate a feature mapping group including: Inputting the source face image and the target face image into a feature decoupler respectively, wherein the feature decoupler includes an identity branch, an expression branch, and a texture branch; Through the identity branch with a multi-level residual structure, shallow feature extraction, multiple sets of serial residual block feature extraction and high-level feature fusion are performed on the image in sequence to obtain an initial identity feature; the initial identity feature is subjected to global average pooling and full connection mapping to obtain an identity feature vector; Through the expression branch with channel attention mechanism, a multi-level expression feature map is extracted, and the inter-channel response strength of the expression feature map is calculated by using a soft maximization function to generate a channel attention weight map; the channel attention weight map is adaptively weighted fused with the expression feature map, and an expression feature vector is obtained through a feature aggregation network; Through the texture branch of the multi-scale pyramid structure, the feature pyramid is constructed layer by layer for the image to obtain image levels with different resolutions, extract local texture information and global texture information, establish a horizontal feature transfer path between adjacent levels of the pyramid, perform feature fusion of local texture information and global texture information, and generate a texture feature vector; Calculate the absolute value of the inner product between the identity feature vector, expression feature vector and texture feature vector, and construct the sum of the absolute values of the inner products as the orthogonal constraint loss function; iteratively optimize the network parameters through back propagation to minimize the orthogonal constraint loss, ensure the decoupled independence between feature vectors, and finally output the source face feature group and the target face feature group; Based on each feature point in the source face feature group and the target face feature group, a kernel density function is constructed with the feature point as the center, and the kernel density functions of all feature points are accumulated and normalized to obtain a probability distribution model; a transmission matrix from the source feature point to the target feature point is constructed, and the optimal transmission cost is calculated based on the transmission matrix, and the optimal transmission cost is used as the optimization target of the feature mapping function; the network parameters of the feature mapping function are iteratively optimized by the gradient descent method until the mapping error from the source face feature group to the target face feature group converges, and a feature mapping group is generated.
[0008] In an optional embodiment, Constructing a diffusion probability field to modulate the feature mapping group, fusing the expression features of the source face with the identity features of the target face through a stochastic differential equation to obtain an initial fusion feature; reconstructing the initial fusion feature by using Monte Carlo sampling, and maintaining the topological structure of the facial features through homotopy mapping to generate basic face-changing features including: Input the feature mapping group into the probability density estimation network, calculate the probability density function of the feature distribution, and obtain the probability representation of the feature distribution; Constructing a discretized time step sequence, setting a corresponding diffusion coefficient for each time step, wherein the diffusion coefficient decreases as the evolution time increases, and obtaining a time-varying diffusion coefficient sequence; The identity feature item and the expression feature item of the source face are generated by performing probability gradient calculation on the identity feature of the target face and the expression feature of the source face through a dual-branch drift network; Calculating a first time-varying weight coefficient and a second time-varying weight coefficient based on the time-varying diffusion coefficient sequence, multiplying the identity feature item by the first time-varying weight coefficient, and multiplying the expression feature item by the second time-varying weight coefficient to obtain a weighted feature item; The probability representation, the time-varying diffusion coefficient sequence and the weighted feature item are combined to construct the drift function; in each time step, the deterministic evolution increment is calculated according to the drift function, and the Brownian motion random increment corresponding to the diffusion coefficient is generated, and the deterministic evolution increment and the Brownian motion random increment are superimposed to update the feature state; this is repeated for all time steps to generate the initial fusion feature; Constructing a Markov sampling chain with the target distribution as a stationary distribution for the initial fusion feature to obtain a feature state sequence, applying Gaussian random perturbation to the current feature state based on the feature state sequence to generate candidate features, calculating the ratio of the probability density values of the candidate features and the current feature state under the target distribution to obtain the state transition probability; using the state transition probability for acceptance-rejection judgment to update the feature state sequence; Based on the preset facial key points, deformation constraints are constructed to obtain a constraint set; based on the constraint set, based on the constraint set and the corresponding features of the target face, a continuous deformation path is constructed and parameterized as a continuous function of time to obtain a parameterized deformation path; the current feature state is input into the velocity field prediction network, and the instantaneous deformation direction and amplitude of the feature are calculated in combination with the parameterized deformation path to obtain a deformation velocity field; based on the velocity field and the constraint set, the feature is deformed, and the connection relationship of the facial key points is maintained through interpolation operations to obtain the deformed feature state; the deformed feature state is added to the feature state sequence, and the execution is repeated until the feature distribution converges and the deformation path is completed, and the basic face-changing feature is output.
[0009] In an optional embodiment, Converting the basic face-changing features to the spectral domain space, extracting the spectral domain face-changing features through complex domain convolution; performing subband decomposition on the spectral domain face-changing features to separate the contour features of the target face and the detail features of the source face; performing subspace projection on the contour features of the target face to obtain structure mapping features, performing directional filtering transformation on the detail features of the source face to obtain texture enhancement features; fusing the structure mapping features and the texture enhancement features to generate fused face-changing features includes: Constructing a first convolution kernel for extracting feature amplitude using the real part and a second convolution kernel for extracting feature phase using the imaginary part, and combining the first convolution kernel as the real part and the second convolution kernel as the imaginary part to generate a complex domain convolution kernel, wherein the complex domain convolution kernel simultaneously extracts feature amplitude information and phase information; The basic face-changing features are converted into spectral domain space through two-dimensional Fourier transform to obtain spectral domain features, and the spectral domain features are subjected to complex domain convolution operation using the complex domain convolution kernel to obtain spectral domain face-changing features containing amplitude information and phase information; Constructing a first bandpass filter for extracting low-frequency structure and a second bandpass filter for extracting high-frequency details, combining the first bandpass filter and the second bandpass filter to generate a subband decomposition filter group, using the subband decomposition filter group to perform subband decomposition on the spectral domain face-changing features, separating the contour features of the target face through the first bandpass filter, and separating the detail features of the source face through the second bandpass filter; Constructing a basis vector matrix of a feature space, orthogonalizing the basis vector matrix to generate an orthogonal basis matrix, performing a subspace projection operation on the contour features of the target face using the orthogonal basis matrix, and projecting the contour features of the target face into the feature space to obtain a structure mapping feature; Constructing a plurality of directional selective filters at different angles, combining the plurality of directional selective filters at different angles to generate a directional filter group, and using the directional filter group to perform directional filtering transformation on the detail features of the source face to obtain texture enhancement features; An adaptive learning method is adopted to calculate the fusion weight of the structure mapping feature and the texture enhancement feature, and the structure mapping feature and the texture enhancement feature are weightedly fused according to the fusion weight to generate a fused face-changing feature with the target face contour and the source face details.
[0010] In an optional embodiment, Constructing a plurality of directional selective filters at different angles, combining the plurality of directional selective filters at different angles to generate a directional filter group, and using the directional filter group to perform directional filtering transformation on the detail features of the source face, to obtain texture enhancement features including: Obtaining an edge direction histogram of detail features of a source face, and determining a main direction angle set according to the edge direction histogram; Based on the main direction angle set, an integral transformation kernel is constructed, and a tensor product operation is performed on the integral transformation kernel and a preset direction waveform function to generate a plurality of direction basis functions at different angles; Performing orthogonalization processing on the directional basis function to obtain an orthogonal directional basis, and expanding the orthogonal directional basis in the frequency domain to obtain an anisotropic directional filter; Constructing transformation basis functions with different scales and curvatures, and adaptively combining the transformation basis functions with the anisotropic directional filters based on an energy maximization criterion to generate an adaptive directional filter group with directional selectivity and curvature adaptability; Calculating a structure tensor of detail features of the source face, and performing eigenvalue decomposition on the structure tensor to obtain a eigenvector representing a main direction of the local features and an eigenvalue representing a degree of local anisotropy; Calculating an anisotropy coefficient according to the ratio of the eigenvalues, and adaptively adjusting the filtering parameters of the adaptive directional filter group using the anisotropy coefficient; The adaptive directional filter group is used to filter and enhance the detail features of the source face to obtain texture enhancement features.
[0011] In an optional embodiment, The fused face-changing features are subjected to high-order tensor decomposition to extract core beautification features; the feature tensors of the core beautification features are compressed to obtain compressed beautification features, the compressed beautification features are input into a quantum entangled state coding network, adaptive beautification of facial regions is achieved through a non-local attention mechanism, enhanced beautification features are obtained, non-integer-order derivative operations are performed on the enhanced beautification features using fractional-order partial differential equations, and the final high-definition face-changing beautification images are outputted, including: Expand the fused face-changing features into the product form of a core tensor and three core matrices, determine the optimal decomposition rank by minimizing the reconstruction error, determine the dimensions of the core tensor and the core matrix based on the optimal decomposition rank, and obtain the core beauty features; Sparsely compressing the feature tensor of the core beautification feature, determining an adaptive threshold by calculating the tensor spectrum distribution of the feature tensor, and performing threshold truncation on elements of the feature tensor using the adaptive threshold to obtain a compressed beautification feature; Constructing a quantum entangled state coding network, mapping the compressed beauty features to the quantum state space through a quantum state mapping matrix to obtain an initial quantum state, and using a first quantum Hamiltonian operator and a second quantum Hamiltonian operator to exponentially evolve the initial quantum state to obtain a quantum entangled state; A non-local attention mechanism is constructed based on the quantum entangled state, the feature dimensions of the compressed beauty feature are mapped into a query matrix and a key value matrix, the similarity score of the query matrix and the key value matrix is calculated, and the attention weight matrix is obtained by normalization processing, and a tensor product operation is performed on the attention weight matrix and the quantum entangled state to perform adaptive beauty on the facial area and obtain an enhanced beauty feature; Constructing a fractional-order partial differential equation, inputting the enhanced beauty feature into the fractional-order partial differential equation, solving the fractional-order partial differential equation using a splitting operator iteration method, and performing a non-integer-order derivative operation on the enhanced beauty feature to obtain a nonlinear enhanced feature; The nonlinear enhancement features are decoded and mapped to output a final high-definition face-changing and beautifying image.
[0012] In an optional embodiment, Constructing a fractional-order partial differential equation, inputting the enhanced beauty feature into the fractional-order partial differential equation, solving the fractional-order partial differential equation using a splitting operator iteration method, and performing a non-integer-order derivative operation on the enhanced beauty feature to obtain a nonlinear enhanced feature includes: Constructing a fractional-order partial differential equation including a fractional-order diffusion term and a nonlinear convection term, and decomposing the fractional-order partial differential equation into a linear diffusion operator and a nonlinear convection operator; Inputting the enhanced beauty feature into the fractional-order partial differential equation, performing Fourier transform on the enhanced beauty feature by using a spectral decomposition method of a fractional-order Laplace operator on the linear diffusion operator to obtain a frequency domain feature; Obtaining a first eigenvalue of the fractional-order Laplace operator by fractional-order derivative calculation, and constructing an anisotropic diffusion matrix based on the first eigenvalue; Expanding the nonlinear convection operator under an eigenvector basis, and obtaining an evolution mode by solving a second eigenvalue of the nonlinear convection operator; Determine an adaptive time step based on the numerical values of the first eigenvalue and the second eigenvalue; Decomposing the enhanced beauty features at different scales to obtain multi-scale facial feature components, and performing the linear diffusion operator solution and the nonlinear convection operator solution on the multi-scale facial feature components respectively; In the adaptive time step, the facial feature solution at the previous moment is converted into the frequency domain by Fourier transform, and the frequency spectrum response of the fractional-order Laplace operator is calculated to obtain an intermediate facial feature solution; Calculating a nonlinear source term based on the intermediate facial feature solution, obtaining an evolution mode of the nonlinear source term through feature decomposition, and updating the facial feature solution at the current moment; Perform multi-scale reconstruction on the facial feature solutions corresponding to the multi-scale facial feature components to obtain nonlinear enhanced features; The relative error between the facial feature solutions of two adjacent iterations is calculated, and when the relative error is less than a preset threshold, the nonlinear enhanced feature is output.
[0013] According to a second aspect of the embodiments of the present invention, Provided is an intelligent beauty feature optimization processing system for high-definition face swapping, including: The first unit is used to input the source face image and the target face image into the nonlinear feature decoupler, decouple and generate a source face feature group and a target face feature group, each of which includes identity features, expression features and texture features; calculate the mapping relationship between the source face feature group and the target face feature group to generate a feature mapping group; construct a diffusion probability field to modulate the feature mapping group, fuse the expression features of the source face with the identity features of the target face through a stochastic differential equation, and obtain an initial fused feature; reconstruct the initial fused feature by using Monte Carlo sampling, and maintain the topological structure of the facial features through homotopy mapping to generate a basic face-changing feature; The second unit is used to convert the basic face-changing features into a spectral domain space, extract the spectral domain face-changing features through complex domain convolution; perform sub-band decomposition on the spectral domain face-changing features to separate the contour features of the target face and the detail features of the source face; perform sub-space projection on the contour features of the target face to obtain a structural mapping feature, perform directional filtering transformation on the detail features of the source face to obtain a texture enhancement feature; fuse the structural mapping feature and the texture enhancement feature to generate a fused face-changing feature; The third unit is used to perform high-order tensor decomposition on the fused face-changing features to extract core beautification features; compress the feature tensor of the core beautification features to obtain compressed beautification features, input the compressed beautification features into the quantum entangled state coding network, realize adaptive beautification of the facial area through the non-local attention mechanism, obtain enhanced beautification features, use fractional-order partial differential equations to perform non-integer-order derivative operations on the enhanced beauty features, and output the final high-definition face-changing beautification image.
[0014] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0015] A fourth aspect of the embodiments of the present invention is: A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0016] In an embodiment of the present invention, through nonlinear feature decoupling, diffusion probability field modulation and homotopy mapping and other technologies, the expression of the source face and the identity features of the target face can be more effectively fused, and the topological structure of the facial features can be maintained, thereby generating a more natural and realistic face-changing effect and avoiding problems such as facial distortion or distortion; by using spectral domain feature extraction, subband decomposition, directional filtering transformation and other technologies, the contour features of the target face and the detail features of the source face can be extracted and enhanced, and the core beauty features can be extracted through high-order tensor decomposition to achieve adaptive beauty of the facial area, and finally generate a high-definition face-changing beauty image; by compressing the feature tensor of the beauty feature and the quantum entangled state coding network, the computational complexity can be reduced and the processing efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of the process flow of an intelligent beauty feature optimization processing method for high-definition face swapping according to an embodiment of the present invention; Figure 2The present invention is a schematic diagram of the structure of an intelligent beauty feature optimization processing system for high-definition face swapping according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0020] Figure 1 FIG. 1 is a flow chart of an intelligent beauty feature optimization processing method for high-definition face swapping according to an embodiment of the present invention. Figure 1 As shown, the method includes: S101. Input the source face image and the target face image to the nonlinear feature decoupler, decouple and generate a source face feature group and a target face feature group, each of which includes identity features, expression features and texture features; calculate the mapping relationship between the source face feature group and the target face feature group to generate a feature mapping group; construct a diffusion probability field to modulate the feature mapping group, fuse the expression features of the source face with the identity features of the target face through a stochastic differential equation, and obtain an initial fused feature; reconstruct the initial fused feature by using Monte Carlo sampling, and maintain the topological structure of the facial features through homotopy mapping to generate a basic face-changing feature; In this embodiment, the expression features of the source face and the identity features of the target face are fully integrated through nonlinear feature decoupling and mapping relationship calculation, thereby achieving accurate and efficient face-changing feature generation; in the decoupling process, the identity, expression and texture features are processed independently to ensure the independence and integrity of each feature, so that the face-changing results can be close to reality in both details and overall performance; the feature mapping group is modulated by the diffusion probability field so that the fused features have rich local details and natural transition effects; the initial fused features are reconstructed through Monte Carlo sampling to enhance the stability and consistency of face-changing feature generation and reduce the impact of randomness on the results; homotopic mapping is used to ensure the integrity of the generated face-changing features in the facial topology structure to avoid deformation or unnatural phenomena; the whole process from feature fusion to result reconstruction is optimized to ensure that the final face-changing effect is natural and smooth, and the visual realism is enhanced.
[0021] S102. Convert the basic face-changing features to the spectral domain space, extract the spectral domain face-changing features through complex domain convolution; perform sub-band decomposition on the spectral domain face-changing features to separate the contour features of the target face and the detail features of the source face; perform sub-space projection on the contour features of the target face to obtain the structure mapping features, perform directional filtering transformation on the detail features of the source face to obtain the texture enhancement features; fuse the structure mapping features and the texture enhancement features to generate a fused face-changing feature; In this embodiment, by converting the basic face-changing features into the spectral domain space and utilizing complex domain convolution, the frequency domain features can be extracted more accurately and the expressiveness of the face-changing features can be improved; through sub-band decomposition, the contour features of the target face are separated from the detail features of the source face, providing a clearer feature basis for subsequent fusion; subspace projection is used to enhance the structural features of the target face, and directional filtering transformation is used to enhance the texture details of the source face, making the face-changing effect more natural in terms of overall structure and detail expression; by fusing the structural mapping features and the texture enhancement features, the generated face-changing features are more visually coordinated, ensuring the naturalness and consistency of the face-changing results.
[0022] S103. Perform high-order tensor decomposition on the fused face-changing features to extract core beautification features; compress the feature tensor of the core beautification features to obtain compressed beautification features, input the compressed beautification features into a quantum entangled state coding network, implement adaptive beautification of facial areas through a non-local attention mechanism, obtain enhanced beautification features, perform non-integer derivative operations on the enhanced beautification features using fractional-order partial differential equations, and output a final high-definition face-changing beautification image.
[0023] In this embodiment, the core beautification features are extracted by high-order tensor decomposition to effectively capture key information related to beautification and improve the accuracy of feature extraction. The core beautification features are compressed by tensors to reduce redundant information, optimize feature representation, and improve computing efficiency. The quantum entangled state coding network and non-local attention mechanism are used to adaptively adjust the beautification effect of the facial area to enhance the personalization and naturalness of the image. The detail processing capability is further enhanced through non-integer derivative operations of fractional partial differential equations to generate high-definition and delicate face-changing beauty images.
[0024] In an optional implementation, a source face image and a target face image are input to a nonlinear feature decoupler, and decoupled to generate a source face feature group and a target face feature group, respectively, wherein each feature group includes identity features, expression features, and texture features; a mapping relationship between the source face feature group and the target face feature group is calculated, and the feature mapping group is generated, including: Inputting the source face image and the target face image into a feature decoupler respectively, wherein the feature decoupler includes an identity branch, an expression branch, and a texture branch; Through the identity branch with a multi-level residual structure, shallow feature extraction, multiple sets of serial residual block feature extraction and high-level feature fusion are performed on the image in sequence to obtain an initial identity feature; the initial identity feature is subjected to global average pooling and full connection mapping to obtain an identity feature vector; Through the expression branch with channel attention mechanism, a multi-level expression feature map is extracted, and the inter-channel response strength of the expression feature map is calculated by using a soft maximization function to generate a channel attention weight map; the channel attention weight map is adaptively weighted fused with the expression feature map, and an expression feature vector is obtained through a feature aggregation network; Through the texture branch of the multi-scale pyramid structure, the feature pyramid is constructed layer by layer for the image to obtain image levels with different resolutions, extract local texture information and global texture information, establish a horizontal feature transfer path between adjacent levels of the pyramid, perform feature fusion of local texture information and global texture information, and generate a texture feature vector; Calculate the absolute value of the inner product between the identity feature vector, expression feature vector and texture feature vector, and construct the sum of the absolute values of the inner products as the orthogonal constraint loss function; iteratively optimize the network parameters through back propagation to minimize the orthogonal constraint loss, ensure the decoupled independence between feature vectors, and finally output the source face feature group and the target face feature group; Based on each feature point in the source face feature group and the target face feature group, a kernel density function is constructed with the feature point as the center, and the kernel density functions of all feature points are accumulated and normalized to obtain a probability distribution model; a transmission matrix from the source feature point to the target feature point is constructed, and the optimal transmission cost is calculated based on the transmission matrix, and the optimal transmission cost is used as the optimization target of the feature mapping function; the network parameters of the feature mapping function are iteratively optimized by the gradient descent method until the mapping error from the source face feature group to the target face feature group converges, and a feature mapping group is generated.
[0025] In a specific implementation, first, a feature decoupler is constructed, which includes an identity branch, an expression branch, and a texture branch, and is used to extract the identity, expression, and texture features of a face image respectively.
[0026] In the identity branch, after the face image is input, shallow feature extraction is first performed, such as using a convolutional layer to extract basic information such as edges and textures. Then, multiple groups of residual blocks connected in series are used to perform deeper feature extraction. Each group of residual blocks contains multiple convolutional layers and jump connections to learn more complex feature representations. Finally, the extracted multi-level features are fused, such as by splicing or weighted averaging, to obtain the initial identity feature. The initial identity feature is subjected to global average pooling, and the feature map is converted into a vector of fixed length, which is then mapped through a fully connected layer to obtain the final identity feature vector. For example, if a face image of size 112×112 is input, a 512-dimensional identity feature vector can be obtained after passing through the identity branch.
[0027] In the expression branch, the channel attention mechanism is used to extract multi-level expression feature maps. First, multiple convolutional layers are used to extract expression feature maps of different scales. Then, the soft maximization function is used to calculate the response strength of each channel to generate a channel attention weight map. For example, for a 64-channel feature map, a 64-dimensional weight vector is generated to represent the importance of each channel. The channel attention weight map is element-wise multiplied with the expression feature map to achieve adaptive weighted fusion. Finally, the weighted fused feature map is passed through a feature aggregation network, such as global average pooling and a fully connected layer, to obtain the final expression feature vector. For example, a 112×112 face image can obtain a 256-dimensional expression feature vector after passing through the expression branch.
[0028] In the texture branch, a multi-scale pyramid structure is used to extract texture features. First, a feature pyramid is constructed layer by layer for the input image, for example, using convolution kernels of different sizes and step sizes to obtain image levels of different resolutions. Then, a lateral feature transfer path is established between adjacent levels of the pyramid, for example, using upsampling and downsampling operations to fuse local texture information with global texture information. Finally, the fused features are passed through a feature aggregation network, such as using global average pooling and fully connected layers, to generate the final texture feature vector. For example, a 112×112 face image can obtain a 1024-dimensional texture feature vector after passing through the texture branch.
[0029] The source face image and the target face image are input into the feature decoupler respectively to obtain the source face feature group and the target face feature group. Each feature group contains the identity feature vector, the expression feature vector and the texture feature vector. In order to ensure the decoupled independence between the feature vectors, the absolute value of the inner product between the identity, expression and texture feature vectors is calculated, and the sum of the absolute values of these inner products is constructed as the orthogonal constraint loss function. The network parameters are iteratively optimized through the back propagation algorithm to minimize the orthogonal constraint loss. For example, when the loss function value is less than 0.01, it is considered that the features have been fully decoupled.
[0030] Next, a mapping relationship from the source facial feature group to the target facial feature group is constructed. Based on each feature point in the source facial feature group and the target facial feature group, a kernel density function is constructed with the feature point as the center, for example, using a Gaussian kernel function. The kernel density functions of all feature points are accumulated and normalized to obtain a probability distribution model. A transfer matrix from the source feature point to the target feature point is constructed, for example, the transfer matrix is calculated using an optimal transfer algorithm. The optimal transfer cost is calculated based on the transfer matrix, and the optimal transfer cost is used as the optimization target of the feature mapping function. For example, a fully connected neural network is used as the feature mapping function. The network parameters of the feature mapping function are iteratively optimized by the gradient descent method, for example, using the Adam optimizer, until the mapping error from the source facial feature group to the target facial feature group converges. For example, when the mapping error is less than 0.05, it is considered that the mapping relationship has been established. Finally, a feature mapping group is generated, which includes identity feature mapping, expression feature mapping, and texture feature mapping.
[0031] In this embodiment, the identity, expression and texture features of the face are extracted respectively through a multi-level residual structure, a channel attention mechanism and a multi-scale pyramid structure, and the decoupled independence between the features is ensured through an orthogonal constraint loss function, so as to more effectively separate the features of different attributes and avoid mutual interference between the features; based on kernel density estimation and optimal transmission theory, a mapping relationship from source features to target features is constructed, which can more accurately capture the correspondence between features and improve the accuracy of feature mapping; by mapping the features of the source face to the target face, a more natural face editing effect can be achieved, such as changing the expression and texture of the face while keeping the identity information unchanged.
[0032] In an optional implementation, a diffusion probability field is constructed to modulate the feature mapping group, and the expression features of the source face and the identity features of the target face are fused by a stochastic differential equation to obtain an initial fused feature; the initial fused feature is reconstructed by Monte Carlo sampling, and the topological structure of the facial features is maintained by homotopy mapping, and the basic face-changing features are generated, including: Input the feature mapping group into the probability density estimation network, calculate the probability density function of the feature distribution, and obtain the probability representation of the feature distribution; Constructing a discretized time step sequence, setting a corresponding diffusion coefficient for each time step, wherein the diffusion coefficient decreases as the evolution time increases, and obtaining a time-varying diffusion coefficient sequence; The identity feature item and the expression feature item of the source face are generated by performing probability gradient calculation on the identity feature of the target face and the expression feature of the source face through a dual-branch drift network; Calculating a first time-varying weight coefficient and a second time-varying weight coefficient based on the time-varying diffusion coefficient sequence, multiplying the identity feature item by the first time-varying weight coefficient, and multiplying the expression feature item by the second time-varying weight coefficient to obtain a weighted feature item; The probability representation, the time-varying diffusion coefficient sequence and the weighted feature item are combined to construct the drift function; in each time step, the deterministic evolution increment is calculated according to the drift function, and the Brownian motion random increment corresponding to the diffusion coefficient is generated, and the deterministic evolution increment and the Brownian motion random increment are superimposed to update the feature state; this is repeated for all time steps to generate the initial fusion feature; Constructing a Markov sampling chain with the target distribution as a stationary distribution for the initial fusion feature to obtain a feature state sequence, applying Gaussian random perturbation to the current feature state based on the feature state sequence to generate candidate features, calculating the ratio of the probability density values of the candidate features and the current feature state under the target distribution to obtain the state transition probability; using the state transition probability for acceptance-rejection judgment to update the feature state sequence; Based on the preset facial key points, deformation constraints are constructed to obtain a constraint set; based on the constraint set, based on the constraint set and the corresponding features of the target face, a continuous deformation path is constructed and parameterized as a continuous function of time to obtain a parameterized deformation path; the current feature state is input into the velocity field prediction network, and the instantaneous deformation direction and amplitude of the feature are calculated in combination with the parameterized deformation path to obtain a deformation velocity field; based on the velocity field and the constraint set, the feature is deformed, and the connection relationship of the facial key points is maintained through interpolation operations to obtain the deformed feature state; the deformed feature state is added to the feature state sequence, and the execution is repeated until the feature distribution converges and the deformation path is completed, and the basic face-changing feature is output.
[0033] In a specific implementation, first, the feature mapping group extracted from the source face and the target face is input into a probability density estimation network. This network can be similar to a variational autoencoder or a flow-based model, which is used to learn the probability density function of the feature distribution and convert the feature mapping group into a representation of the probability distribution, such as the parameters of a Gaussian distribution. Assuming that the input feature mapping group dimension is 256×256×3, the probability density estimation network can output a vector with a dimension of 1024, representing the probability representation of the feature distribution.
[0034] Next, construct a discretized time step sequence, for example, divide the time step from 0 to 1 evenly into 1000 steps. For each time step, set a corresponding diffusion coefficient. The diffusion coefficient controls the randomness of the feature during the diffusion process, and its value decreases as the evolution time increases. For example, a linear decay function can be used with an initial value of 0.02 and a final value of 0.0001.
[0035] Then, the two-branch drift network is used to perform probability gradient calculation on the identity features of the target face and the expression features of the source face, respectively, to generate identity feature items and expression feature items. The two branches can share some network structures, such as convolutional layers, to extract common features. Assuming that the dimensions of the identity features and expression features are both 512, the dimensions of the identity feature items and expression feature items are also 512.
[0036] According to the diffusion coefficient corresponding to each time step in the time step sequence, two time-varying weight coefficients are calculated. These two weight coefficients control the proportion of identity features and expression features in the fusion process. For example, a sigmoid function can be used so that in the initial stage, the weight of expression features is larger, while in the later stage, the weight of identity features is larger. Multiply the identity feature term with the first time-varying weight coefficient, and multiply the expression feature term with the second time-varying weight coefficient to obtain the weighted feature term.
[0037] The probability representation, the time-varying diffusion coefficient sequence, and the weighted feature terms are combined to construct a drift function. In each time step, the deterministic evolution increment is calculated according to the drift function. At the same time, a Brownian motion random increment corresponding to the diffusion coefficient is generated, which obeys a Gaussian distribution with a mean of 0 and the current diffusion coefficient as the variance. The deterministic evolution increment is superimposed with the Brownian motion random increment to update the feature state. This process is repeated for all time steps to generate the initial fused features.
[0038] Construct a Markov sampling chain with the target distribution as the stationary distribution for the initial fusion features. For each time step, a Gaussian random perturbation is applied based on the current feature state to generate candidate features. Calculate the ratio of the probability density values of the candidate features and the current feature state under the target distribution (defined by the probability density estimation network) to obtain the state transition probability. The state transition probability is used for acceptance-rejection judgment and the feature state sequence is updated.
[0039] Based on the preset facial key points (such as eyes, nose, mouth, etc.), deformation constraints are constructed, such as the distance and angle between key points. Based on these constraints and the corresponding features of the target face, a continuous deformation path is constructed and parameterized as a continuous function of time. The current feature state is input into the velocity field prediction network, and the instantaneous deformation direction and amplitude of the feature are calculated in combination with the parameterized deformation path to obtain the deformation velocity field. The feature is deformed based on the velocity field and the constraint set, and the connection relationship of the facial key points is maintained through interpolation operations to obtain the deformed feature state. The deformed feature state is added to the feature state sequence, and the execution is repeated until the feature distribution converges and the deformation path is completed, and the final face-changing feature is output.
[0040] In this embodiment, by using the diffusion probability field and Monte Carlo sampling, a more natural and realistic face-changing result can be generated, effectively avoiding the common artifacts and distortions in traditional methods. At the same time, the introduction of homotopic mapping ensures the topological structure of facial features, making the generated face more coordinated and consistent; by separately modeling and fusing the expression features of the source face and the identity features of the target face, fine control of the expression can be achieved, making the generated facial expression more vivid and natural. The introduction of time-varying weight coefficients can flexibly adjust the proportion of identity features and expression features in the fusion process, thereby controlling the degree of face-changing; based on preset facial key points and deformation constraints, the deformation of the face can be accurately controlled to ensure that the generated face meets the expected shape and structure. The introduction of the velocity field prediction network can achieve a smoother and more natural deformation effect, avoiding the problem of excessive or small local deformation.
[0041] In an optional implementation, the basic face-changing features are converted to a spectral domain space, and spectral domain face-changing features are extracted by complex domain convolution; sub-band decomposition is performed on the spectral domain face-changing features to separate contour features of the target face and detail features of the source face; sub-space projection is performed on the contour features of the target face to obtain structure mapping features, and directional filtering transformation is performed on the detail features of the source face to obtain texture enhancement features; and fusing the structure mapping features and the texture enhancement features to generate a fused face-changing feature includes: Constructing a first convolution kernel for extracting feature amplitude using the real part and a second convolution kernel for extracting feature phase using the imaginary part, and combining the first convolution kernel as the real part and the second convolution kernel as the imaginary part to generate a complex domain convolution kernel, wherein the complex domain convolution kernel simultaneously extracts feature amplitude information and phase information; The basic face-changing features are converted into spectral domain space through two-dimensional Fourier transform to obtain spectral domain features, and the spectral domain features are subjected to complex domain convolution operation using the complex domain convolution kernel to obtain spectral domain face-changing features containing amplitude information and phase information; Constructing a first bandpass filter for extracting low-frequency structure and a second bandpass filter for extracting high-frequency details, combining the first bandpass filter and the second bandpass filter to generate a subband decomposition filter group, using the subband decomposition filter group to perform subband decomposition on the spectral domain face-changing features, separating the contour features of the target face through the first bandpass filter, and separating the detail features of the source face through the second bandpass filter; Constructing a basis vector matrix of a feature space, orthogonalizing the basis vector matrix to generate an orthogonal basis matrix, performing a subspace projection operation on the contour features of the target face using the orthogonal basis matrix, and projecting the contour features of the target face into the feature space to obtain a structure mapping feature; Constructing a plurality of directional selective filters at different angles, combining the plurality of directional selective filters at different angles to generate a directional filter group, and using the directional filter group to perform directional filtering transformation on the detail features of the source face to obtain texture enhancement features; An adaptive learning method is adopted to calculate the fusion weight of the structure mapping feature and the texture enhancement feature, and the structure mapping feature and the texture enhancement feature are weightedly fused according to the fusion weight to generate a fused face-changing feature with the target face contour and the source face details.
[0042] In a specific implementation, first, basic face-changing features are prepared. The basic face-changing features can be a preliminary face-changing result generated by an existing face-changing algorithm, or a combination of a target face and a source face image, such as splicing two face images together. Here, taking an image of 256×256 pixels as an example, the basic face-changing features can be represented as a 256×256 three-dimensional tensor, in which each element represents the color value of a pixel.
[0043] Then, the basic face-changing features are transformed into the frequency domain space. Specifically, a two-dimensional Fourier transform is performed on the basic face-changing features to transform the image from the spatial domain to the frequency domain to obtain the spectral domain features.
[0044] Next, extract the spectral domain face-changing features. Construct a first convolution kernel for extracting feature amplitude and a second convolution kernel for extracting feature phase. For example, the first convolution kernel can be a 3×3 all-1 matrix for extracting feature amplitude; the second convolution kernel can be a 3×3 matrix in which the element values vary linearly from -1 to 1 for extracting feature phase. The first convolution kernel is used as the real part and the second convolution kernel is used as the imaginary part to generate a complex domain convolution kernel. The complex domain convolution kernel is used to perform a convolution operation on the spectral domain features to obtain spectral domain face-changing features containing amplitude information and phase information.
[0045] Perform sub-band decomposition on the spectral domain face-swapping features. Construct a first bandpass filter, such as a 5×5 Gaussian filter, to extract low-frequency structures; construct a second bandpass filter, such as a Laplacian operator, to extract high-frequency details. Combine these two filters to generate a sub-band decomposition filter bank. Use this filter bank to filter the spectral domain face-swapping features, separate the contour features of the target face through the first bandpass filter, and separate the detail features of the source face through the second bandpass filter.
[0046] Perform subspace projection on the contour features of the target face. Construct a basis vector matrix of the feature space, such as a matrix composed of 10 random vectors, each of which has a dimension of 256×256. Orthogonalize the basis vector matrix, such as using the Schmidt orthogonalization method, to generate an orthogonal basis matrix. Use the orthogonal basis matrix to perform a projection operation on the contour features of the target face, project the contour features into the feature space, and obtain the structure mapping features.
[0047] Perform directional filtering transformation on the detail features of the source face. Construct multiple directional selection filters at different angles, such as four directional filters of 0 degrees, 45 degrees, 90 degrees, and 135 degrees. Combine these filters to generate a directional filter group. Use this filter group to filter the detail features of the source face to obtain texture enhancement features.
[0048] Fusion of structure mapping features and texture enhancement features. Adaptive learning is used to calculate the fusion weights of structure mapping features and texture enhancement features. For example, the weights can be adaptively adjusted according to the variance of the features, and features with large variances are given greater weights. The structure mapping features and texture enhancement features are weighted fused according to the fusion weights to generate fused face-changing features with the target face contour and source face details. The final fused face-changing feature is still a 256×256 three-dimensional tensor, which can be converted into an image for display.
[0049] In this embodiment, by performing feature extraction and processing in the frequency domain, the contour information of the target face and the detailed texture of the source face can be better preserved, thereby generating a more natural and realistic face-changing result; the filtering transformation can enhance the texture details of the source face, making the generated face-changing result more delicate and expressive; the adaptive learning fusion weight can dynamically adjust the fusion strategy according to the characteristics of different facial images, thereby improving the robustness and adaptability of the algorithm.
[0050] In an optional implementation, a plurality of directional selective filters at different angles are constructed, and a plurality of directional selective filters at different angles are combined to generate a directional filter group. The directional filter group is used to perform directional filtering transformation on the detail features of the source face to obtain texture enhancement features, including: Obtaining an edge direction histogram of detail features of a source face, and determining a main direction angle set according to the edge direction histogram; Based on the main direction angle set, an integral transformation kernel is constructed, and a tensor product operation is performed on the integral transformation kernel and a preset direction waveform function to generate a plurality of direction basis functions at different angles; Performing orthogonalization processing on the directional basis function to obtain an orthogonal directional basis, and expanding the orthogonal directional basis in the frequency domain to obtain an anisotropic directional filter; Constructing transformation basis functions with different scales and curvatures, and adaptively combining the transformation basis functions with the anisotropic directional filters based on an energy maximization criterion to generate an adaptive directional filter group with directional selectivity and curvature adaptability; Calculating a structure tensor of detail features of the source face, and performing eigenvalue decomposition on the structure tensor to obtain a eigenvector representing a main direction of the local features and an eigenvalue representing a degree of local anisotropy; Calculating an anisotropy coefficient according to the ratio of the eigenvalues, and adaptively adjusting the filtering parameters of the adaptive directional filter group using the anisotropy coefficient; The adaptive directional filter group is used to filter and enhance the detail features of the source face to obtain texture enhancement features.
[0051] First, the input source face image is preprocessed, such as grayscale, histogram equalization and other operations, to improve the robustness of subsequent processing. Then, edge detection operators such as Sobel operator and Canny operator are used to extract the detailed features of the source face image, such as edge, texture and other information. Taking a face image with a resolution of 256×256 as an example, after being processed by the Sobel operator, an edge image of the same size is obtained, in which the pixel value represents the edge strength.
[0052] Calculate the edge direction histogram and determine the main direction angle set. Calculate the edge direction histogram based on the extracted detail features. Specifically, quantize the edge direction into several intervals, count the number of edge pixels in each interval, and obtain the edge direction histogram. According to the edge direction histogram, determine the main direction angle set, for example, select the angle corresponding to the peak in the histogram as the main direction angle. Assuming that the number of quantization intervals is 8, the edge number statistics in 8 directions can be obtained. If two peaks appear at 0 degrees and 45 degrees, add 0 degrees and 45 degrees to the main direction angle set.
[0053] Construct an integral transform kernel and generate directional basis functions. Select a suitable integral transform kernel, such as a Gaussian kernel, a Laplace kernel, etc. Perform a tensor product operation on the integral transform kernel and a preset directional waveform function (such as a sine function, a cosine function, etc.) to generate directional basis functions of multiple different angles. For example, perform a tensor product operation on the Gaussian kernel and the cosine function to generate a 0-degree directional basis function. Assuming that the main direction angle set includes 0 degrees, 45 degrees, 90 degrees, and 135 degrees, it is necessary to generate directional basis functions of four different angles.
[0054] Orthogonalize the directional basis functions and obtain an anisotropic directional filter. Orthogonalize the generated directional basis functions, such as Gram-Schmidt orthogonalization, to obtain an orthogonal directional basis. Expand the orthogonal directional basis in the frequency domain, such as through Fourier transform, to obtain an anisotropic directional filter. Taking the 0-degree directional basis function as an example, after Gram-Schmidt orthogonalization and Fourier transform, an anisotropic directional filter corresponding to the 0-degree direction is obtained.
[0055] Construct transformation basis functions and generate adaptive directional filter groups. Construct transformation basis functions with different scales and curvatures, such as Gabor functions, wavelet functions, etc. Based on the energy maximization criterion, the transformation basis functions are adaptively combined with anisotropic directional filters to generate an adaptive directional filter group with directional selectivity and curvature adaptability. For example, a Gabor function is combined with an anisotropic directional filter corresponding to the 0 degree direction to obtain an adaptive directional filter. Assuming that 4 Gabor functions of different scales and curvatures are used, 4 adaptive directional filters are finally obtained to form an adaptive directional filter group.
[0056] Calculate the structure tensor and perform eigenvalue decomposition. Calculate the structure tensor of the source face detail features, for example, using gradient information to calculate the structure tensor. Perform eigenvalue decomposition on the structure tensor to obtain the eigenvector representing the main direction of the local feature and the eigenvalue representing the degree of local anisotropy. For example, for a pixel in the image, calculate its structure tensor and perform eigenvalue decomposition to obtain two eigenvalues and the corresponding eigenvector.
[0057] Calculate the anisotropy coefficient and adjust the filter parameters. Calculate the anisotropy coefficient based on the ratio of the eigenvalues. Use the anisotropy coefficient to adaptively adjust the filter parameters of the adaptive directional filter group, such as adjusting the bandwidth, direction and other parameters of the filter. For example, if the anisotropy coefficient of a certain pixel is large, increase the bandwidth of the corresponding filter.
[0058] Perform filtering enhancement to obtain texture enhancement features. Use an adaptive directional filter group to filter and enhance the detail features of the source face to obtain texture enhancement features. Specifically, convolve each adaptive directional filter with the detail feature, and then fuse the results to obtain the final texture enhancement feature. For example, convolve 4 adaptive directional filters with the detail feature respectively, and then add the 4 convolution results to obtain the final texture enhancement feature.
[0059] In this embodiment, the texture details of the face image can be effectively enhanced, making the face image clearer and the texture richer; the enhanced texture features can better express the individual differences of the face, thereby improving the accuracy and robustness of the face recognition algorithm; by enhancing the texture details, the visual quality of the face image can be improved, making it more beautiful and natural.
[0060] In an optional implementation, the fused face-changing feature is subjected to high-order tensor decomposition to extract core beautification features; the feature tensor of the core beautification feature is compressed to obtain compressed beautification features, the compressed beautification features are input into a quantum entangled state coding network, adaptive beautification of the facial area is achieved through a non-local attention mechanism to obtain enhanced beautification features, non-integer-order derivative operations are performed on the enhanced beautification features using fractional-order partial differential equations, and the final high-definition face-changing beautification image is output, which includes: Expand the fused face-changing features into the product form of a core tensor and three core matrices, determine the optimal decomposition rank by minimizing the reconstruction error, determine the dimensions of the core tensor and the core matrix based on the optimal decomposition rank, and obtain the core beauty features; Sparsely compressing the feature tensor of the core beautification feature, determining an adaptive threshold by calculating the tensor spectrum distribution of the feature tensor, and performing threshold truncation on elements of the feature tensor using the adaptive threshold to obtain a compressed beautification feature; Constructing a quantum entangled state coding network, mapping the compressed beauty features to the quantum state space through a quantum state mapping matrix to obtain an initial quantum state, and using a first quantum Hamiltonian operator and a second quantum Hamiltonian operator to exponentially evolve the initial quantum state to obtain a quantum entangled state; A non-local attention mechanism is constructed based on the quantum entangled state, the feature dimensions of the compressed beauty feature are mapped into a query matrix and a key value matrix, the similarity score of the query matrix and the key value matrix is calculated, and the attention weight matrix is obtained by normalization processing, and a tensor product operation is performed on the attention weight matrix and the quantum entangled state to perform adaptive beauty on the facial area and obtain an enhanced beauty feature; Constructing a fractional-order partial differential equation, inputting the enhanced beauty feature into the fractional-order partial differential equation, solving the fractional-order partial differential equation using a splitting operator iteration method, and performing a non-integer-order derivative operation on the enhanced beauty feature to obtain a nonlinear enhanced feature; The nonlinear enhancement features are decoded and mapped to output a final high-definition face-changing and beautifying image.
[0061] The decomposition rank specifically refers to the size of each dimension of the core tensor when a three-dimensional or higher-dimensional tensor is decomposed into the product of a core tensor and multiple matrices. The optimal decomposition rank is to be able to represent the dimensional value of the original feature tensor with the least parameters while ensuring that the reconstruction error is small enough.
[0062] The first quantum Hamiltonian operator specifically refers to the evolution of the feature in the spatial dimension, including a kinetic energy term and a potential energy term, wherein the kinetic energy term controls the spatial diffusion of the feature, and the potential energy term maintains the spatial structure of the feature.
[0063] The second quantum Hamiltonian operator specifically refers to the evolution of features in the time dimension, including time-dependent terms and interaction terms, wherein the time-dependent terms control the temporal changes of features, and the interaction terms describe the associations between different features.
[0064] The relationship between the first quantum Hamiltonian operator and the second quantum Hamiltonian operator specifically refers to the synergistic effect through step-by-step evolution. First, the first quantum Hamiltonian operator evolves the quantum state in the spatial dimension, and then the second quantum Hamiltonian operator further evolves in the time dimension, and finally forms a quantum entangled state with time-space correlation characteristics. This step-by-step evolution can better capture the changing laws of characteristics in different dimensions.
[0065] In a specific implementation, first, the fused face-changing features are subjected to high-order tensor decomposition to extract the core beauty features. Specifically, the fused face-changing features are represented in the form of a multidimensional array, and then decomposed into the product of a core tensor and three core matrices. The optimal decomposition rank is determined by minimizing the reconstruction error, and the dimensions of the core tensor and core matrix are determined based on this rank. For example, a 100×100×3 RGB image can be decomposed into a 10×10×3 core tensor and three core matrices of 10×100, 10×100, and 3×3. This core tensor represents the core beauty features.
[0066] Next, the extracted core beauty features are compressed. The tensor of the core beauty features is sparsely compressed, the tensor spectrum distribution of the feature tensor is calculated, and an adaptive threshold is determined. This threshold is used to truncate the elements of the feature tensor, and elements less than the threshold are set to zero, and elements greater than the threshold are retained. For example, if the threshold is set to 0.1, then all elements less than 0.1 will be set to 0. This can reduce the storage space and computational complexity of the data while retaining important beauty information.
[0067] Then, the compressed beauty features are input into a quantum entangled state coding network for further enhancement. First, the compressed beauty features are mapped to the quantum state space through a quantum state mapping matrix to obtain the initial quantum state. Then, the initial quantum state is exponentially evolved using the first quantum Hamiltonian operator and the second quantum Hamiltonian operator to obtain a quantum entangled state. For example, two 2×2 matrices can be used as Hamiltonians to evolve a 2×1 initial quantum state.
[0068] A non-local attention mechanism is constructed based on quantum entangled states. The feature dimensions of the compressed beauty feature are mapped to a query matrix and a key value matrix. The similarity scores of the query matrix and the key value matrix are calculated, and then normalized to obtain an attention weight matrix. The attention weight matrix is subjected to a tensor product operation with the quantum entangled state, and the face area is adaptively beautified to obtain an enhanced beauty feature. For example, a 10×1 feature vector can be mapped to two 5×1 query matrices and key value matrices, and their similarity scores are calculated to obtain a 5×5 attention weight matrix.
[0069] Finally, the fractional-order partial differential equation is used to perform non-integer-order derivative operations on the enhanced beauty features. The enhanced beauty features are input into the constructed fractional-order partial differential equation, and the fractional-order partial differential equation is solved by the splitting operator iteration method. The enhanced beauty features are subjected to non-integer-order derivative operations to obtain nonlinear enhanced features. For example, non-integer-order derivative operations can be performed on the pixel values of an image to enhance the details and texture of the image. The nonlinear enhanced features are decoded and mapped to output the final high-definition face-changing beauty image.
[0070] In this embodiment, through high-order tensor decomposition and quantum entangled state coding network, facial features can be extracted and enhanced more finely, achieving a more natural and personalized beautification effect; the application of feature compression and fractional-order partial differential equations can reduce the amount of calculation, increase the processing speed, and achieve real-time beautification; the nonlinear enhancement characteristics of fractional-order partial differential equations can improve the clarity and detail expression of the image, and output high-definition beauty images.
[0071] In an optional implementation, constructing a fractional-order partial differential equation, inputting the enhanced beauty feature into the fractional-order partial differential equation, solving the fractional-order partial differential equation using a splitting operator iteration method, and performing a non-integer-order derivative operation on the enhanced beauty feature to obtain a nonlinear enhanced feature includes: Constructing a fractional-order partial differential equation including a fractional-order diffusion term and a nonlinear convection term, and decomposing the fractional-order partial differential equation into a linear diffusion operator and a nonlinear convection operator; Inputting the enhanced beauty feature into the fractional-order partial differential equation, performing Fourier transform on the enhanced beauty feature by using a spectral decomposition method of a fractional-order Laplace operator on the linear diffusion operator to obtain a frequency domain feature; Obtaining a first eigenvalue of the fractional-order Laplace operator by fractional-order derivative calculation, and constructing an anisotropic diffusion matrix based on the first eigenvalue; Expanding the nonlinear convection operator under an eigenvector basis, and obtaining an evolution mode by solving a second eigenvalue of the nonlinear convection operator; Determine an adaptive time step based on the numerical values of the first eigenvalue and the second eigenvalue; Decomposing the enhanced beauty features at different scales to obtain multi-scale facial feature components, and performing the linear diffusion operator solution and the nonlinear convection operator solution on the multi-scale facial feature components respectively; In the adaptive time step, the facial feature solution at the previous moment is converted into the frequency domain by Fourier transform, and the frequency spectrum response of the fractional-order Laplace operator is calculated to obtain an intermediate facial feature solution; Calculating a nonlinear source term based on the intermediate facial feature solution, obtaining an evolution mode of the nonlinear source term through feature decomposition, and updating the facial feature solution at the current moment; Perform multi-scale reconstruction on the facial feature solutions corresponding to the multi-scale facial feature components to obtain nonlinear enhanced features; The relative error between the facial feature solutions of two adjacent iterations is calculated, and when the relative error is less than a preset threshold, the nonlinear enhanced feature is output.
[0072] The fractional diffusion term specifically refers to the result of the fractional Laplace operator acting on the facial features, where the order of the fractional derivative can be a non-integer; it controls the degree of smooth diffusion of the facial features. When the fractional order varies between 0 and 2, different degrees of smoothing effects can be achieved while maintaining edge features. Smaller fractional derivatives are conducive to maintaining image detail information, while larger fractional derivatives enhance the smoothing effect.
[0073] The nonlinear convection term specifically refers to a nonlinear function related to the feature gradient, which describes the transmission process of the feature in space; the diffusion strength and direction are adaptively adjusted according to the local structure of the facial features. In edge and texture areas, the convection term weakens the diffusion to maintain the structure; in flat areas, the convection term allows stronger diffusion to achieve smoothness.
[0074] In a specific implementation, first, the enhanced beauty features to be processed are prepared, for example, a face image with a resolution of 1024×768, and a pixel value range of 0 to 255. The image can be a color image or a grayscale image.
[0075] Next, a fractional-order partial differential equation is constructed. This equation contains a fractional-order diffusion term and a nonlinear convection term. The fractional-order diffusion term simulates the smoothing process of texture details in the image, while the nonlinear convection term is used to enhance the edges and contours of the image. For example, a fractional-order Laplace operator can be used to represent the diffusion term, and a nonlinear function based on the image gradient can be used to construct the convection term.
[0076] Then, the fractional-order partial differential equation is decomposed into a linear diffusion operator and a nonlinear convection operator. For example, the fractional-order Laplace operator can be regarded as a linear diffusion operator, and the nonlinear convection term can be regarded as a nonlinear convection operator.
[0077] The enhanced beauty features are input into the fractional-order partial differential equation. For the linear diffusion operator, the enhanced beauty features are Fourier transformed to obtain frequency domain features through the spectral decomposition method of the fractional-order Laplace operator. For example, the fast Fourier transform algorithm can be used to convert the image from the spatial domain to the frequency domain.
[0078] The first eigenvalue of the fractional Laplace operator is obtained by fractional derivative calculation. An anisotropic diffusion matrix is constructed based on the eigenvalue. For example, the coefficients of the diffusion matrix can be adaptively adjusted according to the size of the first eigenvalue, thereby controlling the smoothness of different regions of the image. Assume that the calculated first eigenvalue is 0.8.
[0079] The nonlinear convection operator is expanded in the eigenvector basis. The evolution mode is obtained by solving the second eigenvalue of the nonlinear convection operator. For example, the nonlinear convection operator can be represented as a combination of an eigenvector and an eigenvalue, and the evolution direction of the image can be determined by calculating the second eigenvalue. Assume that the calculated second eigenvalue is 0.5.
[0080] The adaptive time step is determined based on the numerical values of the first eigenvalue 0.8 and the second eigenvalue 0.5. For example, the time step can be dynamically adjusted according to the size of the eigenvalue to ensure the stability and efficiency of the algorithm. Assume that the time step is determined to be 0.1 according to the calculation results.
[0081] The enhanced beauty features are decomposed at different scales to obtain multi-scale facial feature components. The linear diffusion operator and the nonlinear convection operator are respectively solved for each multi-scale facial feature component. For example, the image can be decomposed into components of different scales using a Gaussian pyramid or a wavelet transform.
[0082] Within the adaptive time step of 0.1, the facial feature solution at the previous moment is converted to the frequency domain through Fourier transform. The spectrum response of the fractional-order Laplace operator is calculated to obtain the intermediate facial feature solution.
[0083] The nonlinear source term is calculated based on the intermediate facial feature solution. The evolution mode of the nonlinear source term is obtained through feature decomposition, and the facial feature solution at the current moment is updated.
[0084] The facial feature solutions corresponding to the multi-scale facial feature components are reconstructed at multiple scales to obtain nonlinear enhanced features. For example, the components of different scales can be reassembled into a complete image using a Gaussian pyramid or wavelet transform in reverse.
[0085] The relative error between the facial feature solutions of two adjacent iterations is calculated. When the relative error is less than a preset threshold (e.g., 0.01), the nonlinear enhanced features are output.
[0086] In this embodiment, through nonlinear enhancement technology, the details and texture of the image can be effectively enhanced, and the clarity and visual effect of the image can be improved; through technologies such as adaptive time step and multi-scale decomposition, the naturalness of the image can be retained while enhancing the image details, and distortion caused by excessive enhancement can be avoided; the introduction of fractional-order partial differential equations makes the algorithm more robust to noise and fluctuations in image quality, and can obtain stable enhancement effects in various complex situations.
[0087] Figure 2 FIG. 1 is a schematic diagram of the structure of an intelligent beauty feature optimization processing system for high-definition face swapping according to an embodiment of the present invention. Figure 2 As shown, the system comprises: The first unit is used to input the source face image and the target face image into the nonlinear feature decoupler, decouple and generate a source face feature group and a target face feature group, each of which includes identity features, expression features and texture features; calculate the mapping relationship between the source face feature group and the target face feature group to generate a feature mapping group; construct a diffusion probability field to modulate the feature mapping group, fuse the expression features of the source face with the identity features of the target face through a stochastic differential equation, and obtain an initial fused feature; reconstruct the initial fused feature by using Monte Carlo sampling, and maintain the topological structure of the facial features through homotopy mapping to generate a basic face-changing feature; The second unit is used to convert the basic face-changing features into a spectral domain space, extract the spectral domain face-changing features through complex domain convolution; perform sub-band decomposition on the spectral domain face-changing features to separate the contour features of the target face and the detail features of the source face; perform sub-space projection on the contour features of the target face to obtain a structural mapping feature, perform directional filtering transformation on the detail features of the source face to obtain a texture enhancement feature; fuse the structural mapping feature and the texture enhancement feature to generate a fused face-changing feature; The third unit is used to perform high-order tensor decomposition on the fused face-changing features to extract core beautification features; compress the feature tensor of the core beautification features to obtain compressed beautification features, input the compressed beautification features into the quantum entangled state coding network, realize adaptive beautification of the facial area through the non-local attention mechanism, obtain enhanced beautification features, use fractional-order partial differential equations to perform non-integer-order derivative operations on the enhanced beauty features, and output the final high-definition face-changing beautification image.
[0088] According to a third aspect of the embodiments of the present invention, An electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0089] A fourth aspect of the embodiments of the present invention is: A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.
[0090] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intelligent beauty feature optimization processing method for high-definition face swapping, characterized in that: include: Input the source face image and the target face image into the nonlinear feature decoupler, and decouple to generate a source face feature group and a target face feature group, respectively, wherein each feature group includes identity features, expression features and texture features; Calculate the mapping relationship between the source face feature group and the target face feature group to generate a feature mapping group; construct a diffusion probability field to modulate the feature mapping group, fuse the expression features of the source face with the identity features of the target face through a stochastic differential equation to obtain an initial fused feature; reconstruct the initial fused feature using Monte Carlo sampling, and maintain the topological structure of the facial features through homotopy mapping to generate a basic face-changing feature; Convert the basic face-changing features to the spectral domain space, extract the spectral domain face-changing features through complex domain convolution; perform sub-band decomposition on the spectral domain face-changing features to separate the contour features of the target face and the detail features of the source face; Perform subspace projection on the contour features of the target face to obtain structure mapping features, perform directional filtering transformation on the detail features of the source face to obtain texture enhancement features; fuse the structure mapping features and the texture enhancement features to generate a fused face-changing feature; Performing high-order tensor decomposition on the fused face-changing features to extract core beauty features; The feature tensor of the core beautification feature is compressed to obtain a compressed beautification feature, and the compressed beautification feature is input into a quantum entangled state coding network. Adaptive beautification of the facial area is achieved through a non-local attention mechanism to obtain an enhanced beautification feature. A fractional-order partial differential equation is used to perform non-integer-order derivative operations on the enhanced beautification feature to output a final high-definition face-changing beautification image.
2. The method according to claim 1, characterized in that Input the source face image and the target face image into the nonlinear feature decoupler, and decouple to generate a source face feature group and a target face feature group, respectively, wherein each feature group includes identity features, expression features and texture features; Calculate the mapping relationship between the source face feature group and the target face feature group, and generate a feature mapping group including: Inputting the source face image and the target face image into a feature decoupler respectively, wherein the feature decoupler includes an identity branch, an expression branch, and a texture branch; Through the identity branch with a multi-level residual structure, shallow feature extraction, multiple sets of serial residual block feature extraction and high-level feature fusion are performed on the image in sequence to obtain an initial identity feature; the initial identity feature is subjected to global average pooling and full connection mapping to obtain an identity feature vector; Through the expression branch with channel attention mechanism, a multi-level expression feature map is extracted, and the inter-channel response strength of the expression feature map is calculated by using a soft maximization function to generate a channel attention weight map; the channel attention weight map is adaptively weighted fused with the expression feature map, and an expression feature vector is obtained through a feature aggregation network; Through the texture branch of the multi-scale pyramid structure, the feature pyramid is constructed layer by layer for the image to obtain image levels with different resolutions, extract local texture information and global texture information, establish a horizontal feature transfer path between adjacent levels of the pyramid, perform feature fusion of local texture information and global texture information, and generate a texture feature vector; Calculate the absolute value of the inner product between the identity feature vector, expression feature vector and texture feature vector, and construct the sum of the absolute values of the inner products as the orthogonal constraint loss function; iteratively optimize the network parameters through back propagation to minimize the orthogonal constraint loss, ensure the decoupled independence between feature vectors, and finally output the source face feature group and the target face feature group; Based on each feature point in the source face feature group and the target face feature group, a kernel density function is constructed with the feature point as the center, and the kernel density functions of all feature points are accumulated and normalized to obtain a probability distribution model; a transmission matrix from the source feature point to the target feature point is constructed, and the optimal transmission cost is calculated based on the transmission matrix, and the optimal transmission cost is used as the optimization target of the feature mapping function; the network parameters of the feature mapping function are iteratively optimized by the gradient descent method until the mapping error from the source face feature group to the target face feature group converges, and a feature mapping group is generated.
3. The method according to claim 1, characterized in that Constructing a diffusion probability field to modulate the feature mapping group, fusing the expression features of the source face with the identity features of the target face through a stochastic differential equation to obtain an initial fusion feature; reconstructing the initial fusion feature by using Monte Carlo sampling, and maintaining the topological structure of the facial features through homotopy mapping to generate basic face-changing features including: Input the feature mapping group into the probability density estimation network, calculate the probability density function of the feature distribution, and obtain the probability representation of the feature distribution; Constructing a discretized time step sequence, setting a corresponding diffusion coefficient for each time step, wherein the diffusion coefficient decreases as the evolution time increases, and obtaining a time-varying diffusion coefficient sequence; The identity feature item and the expression feature item of the source face are generated by performing probability gradient calculation on the identity feature of the target face and the expression feature of the source face through a dual-branch drift network; Calculating a first time-varying weight coefficient and a second time-varying weight coefficient based on the time-varying diffusion coefficient sequence, multiplying the identity feature item by the first time-varying weight coefficient, and multiplying the expression feature item by the second time-varying weight coefficient to obtain a weighted feature item; The probability representation, the time-varying diffusion coefficient sequence and the weighted feature item are combined to construct the drift function; in each time step, the deterministic evolution increment is calculated according to the drift function, and the Brownian motion random increment corresponding to the diffusion coefficient is generated, and the deterministic evolution increment and the Brownian motion random increment are superimposed to update the feature state; this is repeated for all time steps to generate the initial fusion feature; Constructing a Markov sampling chain with the target distribution as a stationary distribution for the initial fusion feature to obtain a feature state sequence, applying Gaussian random perturbation to the current feature state based on the feature state sequence to generate candidate features, calculating the ratio of the probability density values of the candidate features and the current feature state under the target distribution to obtain the state transition probability; using the state transition probability for acceptance-rejection judgment to update the feature state sequence; Based on the preset facial key points, deformation constraints are constructed to obtain a constraint set; based on the constraint set, based on the constraint set and the corresponding features of the target face, a continuous deformation path is constructed and parameterized as a continuous function of time to obtain a parameterized deformation path; the current feature state is input into the velocity field prediction network, and the instantaneous deformation direction and amplitude of the feature are calculated in combination with the parameterized deformation path to obtain a deformation velocity field; based on the velocity field and the constraint set, the feature is deformed, and the connection relationship of the facial key points is maintained through interpolation operations to obtain the deformed feature state; the deformed feature state is added to the feature state sequence, and the execution is repeated until the feature distribution converges and the deformation path is completed, and the basic face-changing feature is output.
4. The method according to claim 1, characterized in that: Convert the basic face-changing features to the spectral domain space, extract the spectral domain face-changing features through complex domain convolution; perform sub-band decomposition on the spectral domain face-changing features to separate the contour features of the target face and the detail features of the source face; Performing subspace projection on the contour features of the target face to obtain structure mapping features, and performing directional filtering transformation on the detail features of the source face to obtain texture enhancement features; Fusion of the structure mapping feature and the texture enhancement feature to generate a fused face-changing feature includes: Constructing a first convolution kernel for extracting feature amplitude using the real part and a second convolution kernel for extracting feature phase using the imaginary part, and combining the first convolution kernel as the real part and the second convolution kernel as the imaginary part to generate a complex domain convolution kernel, wherein the complex domain convolution kernel simultaneously extracts feature amplitude information and phase information; The basic face-changing features are converted into spectral domain space through two-dimensional Fourier transform to obtain spectral domain features, and the spectral domain features are subjected to complex domain convolution operation using the complex domain convolution kernel to obtain spectral domain face-changing features containing amplitude information and phase information; Constructing a first bandpass filter for extracting low-frequency structure and a second bandpass filter for extracting high-frequency details, combining the first bandpass filter and the second bandpass filter to generate a subband decomposition filter group, using the subband decomposition filter group to perform subband decomposition on the spectral domain face-changing features, separating the contour features of the target face through the first bandpass filter, and separating the detail features of the source face through the second bandpass filter; Constructing a basis vector matrix of a feature space, orthogonalizing the basis vector matrix to generate an orthogonal basis matrix, performing a subspace projection operation on the contour features of the target face using the orthogonal basis matrix, and projecting the contour features of the target face into the feature space to obtain a structure mapping feature; Constructing a plurality of directional selective filters at different angles, combining the plurality of directional selective filters at different angles to generate a directional filter group, and using the directional filter group to perform directional filtering transformation on the detail features of the source face to obtain texture enhancement features; An adaptive learning method is adopted to calculate the fusion weight of the structure mapping feature and the texture enhancement feature, and the structure mapping feature and the texture enhancement feature are weightedly fused according to the fusion weight to generate a fused face-changing feature with the target face contour and the source face details.
5. The method according to claim 4, characterized in that Constructing a plurality of directional selective filters at different angles, combining the plurality of directional selective filters at different angles to generate a directional filter group, and using the directional filter group to perform directional filtering transformation on the detail features of the source face, to obtain texture enhancement features including: Obtaining an edge direction histogram of detail features of a source face, and determining a main direction angle set according to the edge direction histogram; Based on the main direction angle set, an integral transformation kernel is constructed, and a tensor product operation is performed on the integral transformation kernel and a preset direction waveform function to generate a plurality of direction basis functions at different angles; Performing orthogonalization processing on the directional basis function to obtain an orthogonal directional basis, and expanding the orthogonal directional basis in the frequency domain to obtain an anisotropic directional filter; Constructing transformation basis functions with different scales and curvatures, and adaptively combining the transformation basis functions with the anisotropic directional filters based on an energy maximization criterion to generate an adaptive directional filter group with directional selectivity and curvature adaptability; Calculating a structure tensor of detail features of the source face, and performing eigenvalue decomposition on the structure tensor to obtain a eigenvector representing a main direction of the local features and an eigenvalue representing a degree of local anisotropy; Calculating an anisotropy coefficient according to the ratio of the eigenvalues, and adaptively adjusting the filtering parameters of the adaptive directional filter group using the anisotropy coefficient; The adaptive directional filter group is used to filter and enhance the detail features of the source face to obtain texture enhancement features.
6. The method according to claim 1, characterized in that The fused face-changing features are subjected to high-order tensor decomposition to extract core beautification features; the feature tensors of the core beautification features are compressed to obtain compressed beautification features, the compressed beautification features are input into a quantum entangled state coding network, adaptive beautification of facial regions is achieved through a non-local attention mechanism, enhanced beautification features are obtained, non-integer-order derivative operations are performed on the enhanced beautification features using fractional-order partial differential equations, and the final high-definition face-changing beautification images are outputted, including: Expand the fused face-changing features into the product form of a core tensor and three core matrices, determine the optimal decomposition rank by minimizing the reconstruction error, determine the dimensions of the core tensor and the core matrix based on the optimal decomposition rank, and obtain the core beauty features; Sparsely compressing the feature tensor of the core beautification feature, determining an adaptive threshold by calculating the tensor spectrum distribution of the feature tensor, and performing threshold truncation on elements of the feature tensor using the adaptive threshold to obtain a compressed beautification feature; Constructing a quantum entangled state coding network, mapping the compressed beauty features to the quantum state space through a quantum state mapping matrix to obtain an initial quantum state, and using a first quantum Hamiltonian operator and a second quantum Hamiltonian operator to exponentially evolve the initial quantum state to obtain a quantum entangled state; A non-local attention mechanism is constructed based on the quantum entangled state, the feature dimensions of the compressed beauty feature are mapped into a query matrix and a key value matrix, the similarity score of the query matrix and the key value matrix is calculated, and the attention weight matrix is obtained by normalization processing, and a tensor product operation is performed on the attention weight matrix and the quantum entangled state to perform adaptive beauty on the facial area and obtain an enhanced beauty feature; Constructing a fractional-order partial differential equation, inputting the enhanced beauty feature into the fractional-order partial differential equation, solving the fractional-order partial differential equation using a splitting operator iteration method, and performing a non-integer-order derivative operation on the enhanced beauty feature to obtain a nonlinear enhanced feature; The nonlinear enhancement features are decoded and mapped to output a final high-definition face-changing and beautifying image.
7. The method according to claim 6, characterized in that Constructing a fractional-order partial differential equation, inputting the enhanced beauty feature into the fractional-order partial differential equation, solving the fractional-order partial differential equation using a splitting operator iteration method, and performing a non-integer-order derivative operation on the enhanced beauty feature to obtain a nonlinear enhanced feature includes: Constructing a fractional-order partial differential equation including a fractional-order diffusion term and a nonlinear convection term, and decomposing the fractional-order partial differential equation into a linear diffusion operator and a nonlinear convection operator; Inputting the enhanced beauty feature into the fractional-order partial differential equation, performing Fourier transform on the enhanced beauty feature by using a spectral decomposition method of a fractional-order Laplace operator on the linear diffusion operator to obtain a frequency domain feature; Obtaining a first eigenvalue of the fractional-order Laplace operator by fractional-order derivative calculation, and constructing an anisotropic diffusion matrix based on the first eigenvalue; Expanding the nonlinear convection operator under an eigenvector basis, and obtaining an evolution mode by solving a second eigenvalue of the nonlinear convection operator; Determine an adaptive time step based on the numerical values of the first eigenvalue and the second eigenvalue; Decomposing the enhanced beauty features at different scales to obtain multi-scale facial feature components, and performing the linear diffusion operator solution and the nonlinear convection operator solution on the multi-scale facial feature components respectively; In the adaptive time step, the facial feature solution at the previous moment is converted into the frequency domain by Fourier transform, and the frequency spectrum response of the fractional-order Laplace operator is calculated to obtain an intermediate facial feature solution; Calculating a nonlinear source term based on the intermediate facial feature solution, obtaining an evolution mode of the nonlinear source term through feature decomposition, and updating the facial feature solution at the current moment; Perform multi-scale reconstruction on the facial feature solutions corresponding to the multi-scale facial feature components to obtain nonlinear enhanced features; The relative error between the facial feature solutions of two adjacent iterations is calculated, and when the relative error is less than a preset threshold, the nonlinear enhanced feature is output.
8. An intelligent beauty feature optimization processing system for high-definition face swapping, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to input the source face image and the target face image into the nonlinear feature decoupler, and decouple to generate a source face feature group and a target face feature group, respectively, wherein each feature group includes identity features, expression features and texture features; Calculate the mapping relationship between the source face feature group and the target face feature group to generate a feature mapping group; construct a diffusion probability field to modulate the feature mapping group, fuse the expression features of the source face with the identity features of the target face through a stochastic differential equation to obtain an initial fused feature; reconstruct the initial fused feature using Monte Carlo sampling, and maintain the topological structure of the facial features through homotopy mapping to generate a basic face-changing feature; The second unit is used to convert the basic face-changing features into a spectral domain space, extract the spectral domain face-changing features through complex domain convolution; perform sub-band decomposition on the spectral domain face-changing features to separate the contour features of the target face and the detail features of the source face; Perform subspace projection on the contour features of the target face to obtain structure mapping features, perform directional filtering transformation on the detail features of the source face to obtain texture enhancement features; fuse the structure mapping features and the texture enhancement features to generate a fused face-changing feature; The third unit is used to perform high-order tensor decomposition on the fused face-changing features to extract core beauty features; The feature tensor of the core beautification feature is compressed to obtain a compressed beautification feature, and the compressed beautification feature is input into a quantum entangled state coding network. Adaptive beautification of the facial area is achieved through a non-local attention mechanism to obtain an enhanced beautification feature. A fractional-order partial differential equation is used to perform non-integer-order derivative operations on the enhanced beautification feature to output a final high-definition face-changing beautification image.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data acquisition method and device, terminal and storage medium
CN109919754A
Multi-focus image processing method based on dual-tree complex number wavelet and convolutional neural network
CN113393408A
Archive retrieval method and system based on AI image and talent key information
CN119166842A
Deep learning-based face feature point detection method
WO2022151535A1
Cited By
Digital culture creative content generation method based on artificial intelligence
CN120070636A
Method performed by electronic device, electronic device, storage medium, and program product
WO2026197671A1