An adaptive image editing method based on latent space manipulation and text guidance

By combining an adaptive directional latent space mapping network and a multimodal fusion network, efficient and accurate attribute decoupling and preservation of irrelevant parts in image editing are achieved, solving the challenges of image editing in the prior art and meeting the requirements of editing relevance and maintaining irrelevance.

CN115797503BActive Publication Date: 2026-02-10XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211267694.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-17
Publication Date
2026-02-10
Estimated Expiration
2042-10-17

AI Technical Summary

Technical Problem

Existing image editing methods struggle to simultaneously satisfy both editing relevance and preserving irrelevance, especially when editing global attributes, where it is difficult to precisely manipulate specific attributes and retain irrelevant parts.

Method used

An adaptive image editing method based on latent space operations and text guidance is adopted. The method utilizes the Adaptive Oriented Latent Space Mapping Network (ADLM) for channel-by-channel group operations and combines the semantic consistency loss and frequency reconstruction loss of the multimodal fusion network to achieve attribute decoupling and preservation of irrelevant parts.

Benefits of technology

It improves the efficiency and accuracy of image editing, ensures consistency between edited images and text prompts, preserves image integrity, and meets customer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115797503B_ABST
    Figure CN115797503B_ABST
Patent Text Reader

Abstract

The application provides an adaptive image editing method based on hidden space operation and text guidance, which inputs an image to be edited into a trained adaptive direction hidden space mapping ADLM network, and through channel group operation of the image, the efficiency of image editing can be improved, in addition, through the semantic consistency loss of the multi-modal fusion network, the difference between the estimated edited image and the corresponding historical image is forced to be aligned, and the semantic change direction of the given description text is used to realize the consistency relationship between the image attribute and the text prompt, ensure the accurate attribute decoupling of the ADLM network for the channel group operation of the image to be edited, and the reconstruction loss based on the discrete space frequency is proposed to retain the irrelevant part of the image, so that the irrelevant part of the editing process and the text prompt is not modified during editing, and the integrity of the output estimated edited image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image editing technology, specifically relating to an adaptive image editing method based on latent space operations and text guidance. Background Technology

[0002] Image editing is an editing technique that modifies images to meet user needs. To ensure that the edited image meets requirements and interests, image editing tasks simultaneously face two challenges: (1) editing relevance: accurately editing relevant attributes according to given conditions; (2) maintaining irrelevance: irrelevant parts (such as identification information, background, or other attributes) cannot be modified during editing. Due to the strong coupling of attributes, satisfying both requirements at the same time is a challenging task.

[0003] To address the aforementioned issues, recent methods have largely explored attribute decoupling in two main ways. Jeong-gi Kwak and David K ​​Han et al., in their 2020 European Conference on Computer Vision paper titled "Cafe-gan: Arbitrary face attribute editing with complementary attention feature," employ spatial attention detection to decouple attributes by searching for specific support regions in space, operating only within this limited area. However, these methods may overlook necessary details outside the support region, such as "makeup" or "age," when editing global attributes. Yujun Shen and Jinjin Gu et al., in their 2020 Computer Vision and Pattern Recognition paper titled "Interpreting the latent space of gans for semantic face editing," use pre-trained GANs for latent space decomposition. These methods, guided by high-level semantics, process images in the latent space, making them more suitable for both global and local attribute editing. However, due to excessive semantic coupling, these methods struggle to operate on specific attributes without strong supervision, thus failing to meet client needs. Summary of the Invention

[0004] To address the aforementioned problems in the existing technology, this invention provides an adaptive image editing method based on latent space operations and text guidance. The technical problem to be solved by this invention is achieved through the following technical solution:

[0005] This invention provides an adaptive image editing method based on latent space operations and text guidance, comprising:

[0006] Step 1: Obtain a training sample set consisting of historical images and add descriptive text to each historical image to describe its attributes;

[0007] Step 2: Extract the image features of each historical image and perform multi-style inversion encoding on the image features to obtain the latent vector of each historical image;

[0008] Step 3: Input the latent vector of each historical image into the constructed Adaptive Oriented Latent Space Mapping (ADLM) network, so that the ADLM network will perform the following process:

[0009] The latent vector of each historical image is divided into g channel groups; the latent vector of each channel group is mapped to the W+ space to obtain decoupled different attribute features; the norm of each attribute feature is calculated and sorted from largest to smallest; the target attribute features corresponding to the top k channel groups in norm sorting are selected; the target attribute features are subjected to hidden layer operation; after the hidden layer operation, the latent vectors of each channel group before mapping are processed as residuals; and the predicted edited image of each historical image is output through supervised learning.

[0010] Step 4: Using a multimodal fusion network, based on the difference value between each predicted edited image and the corresponding historical image, calculate the semantic consistency loss between the given descriptive text and the difference value, as well as the reconstruction loss between each historical image and the predicted edited image. Adjust the parameters of the ADLM network in the direction that reduces the semantic consistency loss and the reconstruction loss to train the ADLM network until the training cutoff condition is reached, and obtain the trained ADLM network.

[0011] Step 5: Based on the trained ADLM network, perform editing prediction on the image to be edited to obtain an edited image that meets the customer's needs.

[0012] This invention provides an adaptive image editing method based on latent space operations and text guidance. The image to be edited is input into a trained Adaptive Oriented Latent Space Mapping (ADLM) network. Through adaptive channel-by-channel group operations on the image, the efficiency of image editing can be improved. Furthermore, by utilizing the semantic consistency loss of a multimodal fusion network, the difference values ​​between the estimated edited image and the corresponding historical image are forcibly aligned with the semantic change direction of the given descriptive text. This achieves precise alignment of the consistency relationship between image attributes and text prompts, ensuring accurate attribute decoupling of the ADLM network during channel-by-channel group operations on the image to be edited. Simultaneously, a reconstruction loss based on discrete spatial frequency is proposed to preserve irrelevant parts of the image, thereby ensuring that parts unrelated to the text prompts are not modified during editing, thus improving the integrity of the output estimated edited image. The invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0013] Figure 1 This is a flowchart illustrating an adaptive image editing method based on latent space operations and text guidance provided in an embodiment of the present invention.

[0014] Figure 2 This is a schematic diagram of the Adaptive Directional Latent Space Mapping (ADLM) network provided in an embodiment of the present invention;

[0015] Figure 3 This is a schematic diagram of adaptive directional latent space mapping provided in an embodiment of the present invention;

[0016] Figure 4 This is a qualitative result diagram of the opposite semantic direction operation provided in the embodiment of the present invention. Detailed Implementation

[0017] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0018] like Figure 1 As shown, the adaptive image editing method based on latent space operations and text guidance provided by this invention includes:

[0019] Step 1: Obtain a training sample set consisting of historical images and add descriptive text to each historical image to describe its attributes;

[0020] It is worth noting that this invention can acquire images based on user needs. For example, if the user needs to edit a face image, this application can use 30,000 training samples from the CelebA-HQ dataset. If the user needs a background image, this invention can use 126,527 training samples from the LSUN Church dataset. If the user needs other images, the required image can be acquired from the device as a historical image to predict the image to be edited.

[0021] Step 2: Extract the image features of each historical image and perform multi-style inversion encoding on the image features to obtain the latent vector of each historical image;

[0022] It is worth noting that: the encoder is denoted as E, the input is a historical image, i.e., a specified image x, and the output is N style codes E(x) = (w 0 ,w 1 ,…w N-1 N is the number of style modulation layers in StyleGAN, and this space is denoted as W+ space.

[0023] Step 3: Input the latent vector of each historical image into the constructed Adaptive Oriented Latent Space Mapping (ADLM) network, so that the ADLM network will perform the following process:

[0024] The latent vector of each historical image is divided into g channel groups; the latent vector of each channel group is mapped to the W+ space to obtain decoupled different attribute features; the norm of each attribute feature is calculated and sorted from largest to smallest; the target attribute features corresponding to the top k channel groups in norm sorting are selected; the target attribute features are subjected to hidden layer operation; after the hidden layer operation, the latent vectors of each channel group before mapping are processed as residuals; and the predicted edited image of each historical image is output through supervised learning.

[0025] The ADLM network includes an image feature mapping module, an adaptive selection module, and an image generation module connected in sequence.

[0026] In this invention, each historical image is mapped into the W+ space to obtain a latent vector. This latent vector is then input into the image feature mapping module, which divides the latent vector of each historical image into g channel groups, obtaining decoupled different attribute features. These different attribute features are then input into the adaptive selection module, which calculates the norm of the corresponding attribute feature for each channel group and sorts the channel groups from largest to smallest according to the calculated norm. The module selects the target attribute features corresponding to the top k channel groups in the norm sorting, performs a hidden layer operation on these target attribute features, and performs residual processing between the latent vectors after the hidden layer operation and the unmapped latent vectors of each channel group to obtain the final manipulated latent vector. This final manipulated latent vector is then input into the image generation module, which outputs a predicted edited image for each historical image through supervised learning.

[0027] The image feature mapping module consists of an allocation layer and a latent vector mapping layer.

[0028] The allocation layer is used to divide the latent vector w of each historical image into g channel groups, and input the latent vector of each channel group into the latent vector mapping layer.

[0029] Where w = [w1, w2, ..., w g ];

[0030] The latent vector mapping layer is used to map the latent vectors of each channel group to the W+ space to obtain target attribute features, and to perform a concat operation on all attribute features to obtain the decoupled latent vectors of each historical image.

[0031] The latent vector mapping layer uses g fully connected networks as hidden layer mapping modules to map the previously obtained image feature latent vectors into the W+ space. Each latent vector is unique for its corresponding group, thus obtaining the attribute features after attribute decoupling. Concatenating the attribute features from different channel groups yields the decoupled latent vector representation of the entire image. The decoupled latent vector of the entire image is:

[0032] w * =[M1(w1),M2(w2),…,M g (w g )]

[0033] In the formula, M i Let [·,·] be the i-th hidden vector mapping layer, where [·,·] represents the concat operation.

[0034] The adaptive selection module consists of a weight calculation layer, a channel selection layer, and a residual connection layer.

[0035] The weight calculation layer is used to calculate the norm of the attribute features corresponding to each channel group, and input the calculation result into the channel selection layer; calculate w * The L1 norm is used to represent the importance of the channel corresponding to each weight;

[0036] To filter w * To eliminate unnecessary operations, the channel selection layer is used to select the target attribute features corresponding to the top k channel groups with the largest norm sorted from largest to smallest, perform hidden layer operations on the target attribute features, and set the hidden vectors of the remaining channel groups to zero to obtain the operation hidden vectors of each channel group. The operation hidden vectors are then input to the residual connection layer.

[0037] The operation's implicit vector is:

[0038] The residual connection layer is used to perform residual processing on the latent vector of each channel group and the latent vector before mapping each channel group to obtain the final manipulated latent vector, and input the final manipulated latent vector into the image generation module.

[0039] The final manipulated hidden vector is:

[0040] The image generation module of the present invention consists of a generator and a discriminator;

[0041] The generator is used to take the latent vector of the final manipulation as input, output the estimated edited image corresponding to each historical image, and input the estimated edited image into the discriminator;

[0042] The discriminator is used to input the descriptive text of each historical image and the estimated edited image, calculate the similarity between the descriptive text and the estimated edited image, determine whether the content of the estimated edited image and the descriptive text are consistent, and then feed the result back to the generator to supervise the generator to regenerate the estimated edited image that is consistent with the descriptive text.

[0043] It's worth noting that by using a StyleGANv2 generator G pre-trained on the ImageNet dataset and fixing its weight parameters during pre-training, the final manipulated latent vectors are fed into the generator to obtain the edited image. The discriminator will combine the text features extracted by CLIP with... Mapping to the latent space, the similarity between the estimated edited image and the descriptive text is calculated to determine whether the generated estimated edited image matches the text prompt, i.e., the generation loss:

[0044]

[0045] Here, D is the distance metric, G is the pre-trained StyleGANv2 generator, and the generator and discriminator constitute a generative adversarial network that competes against each other through optimization. This ensures that the synthesized image matches the desired requirements.

[0046] Step 4: Using a multimodal fusion network, based on the difference between each predicted edited image and the corresponding historical image and the descriptive text, calculate the semantic consistency loss under the guidance of the descriptive text, and adjust the parameters of the ADLM network in the direction that reduces the semantic consistency loss and the reconstruction loss to train the ADLM network until the training cutoff condition is reached, and obtain the trained ADLM network.

[0047] refer to Figure 2 The multimodal fusion network consists of a multimodal feature extractor, a semantic loss layer, and a frequency reconstruction layer;

[0048] The multimodal feature extractor is used to extract the visual semantic features of each historical image, the textual semantic features of each descriptive text, and the visual semantic features of the corresponding predicted edited image, and inputs all the extracted features into the semantic loss layer;

[0049] The semantic loss layer is used to calculate the difference value of the visual semantic features between each estimated edited image and the corresponding historical image, and to calculate the semantic direction consistency loss between the difference value and the textual semantic features of each descriptive text.

[0050] refer to Figure 3 The desired attributes for editing are determined by the text prompt t, and the semantic loss layer uses a pre-trained CLIP model as a hidden layer manipulation guide. For a given image x and text t, visual semantic features y are extracted by leveraging a pre-trained multimodal feature extractor E integrated into CLIP. i =E I (x) and textual semantic features y t =E T (t). Edited image The semantic features can be derived from This indicates that the multimodal fusion network aims to optimize... and y t As close as possible. However, in the hidden space, simply optimizing the matching degree between them may cause irrelevant properties to change. Therefore, forcing... and y i The direction of change between them is aligned with yt, and a semantic direction consistency loss is proposed. The semantic direction consistency loss is given by the following equation:

[0051]

[0052] Where S(·,·) is the similarity measure, and here, efficient cosine similarity is used as the metric. The description text serves as a guide for the process of aligning the visual semantic features of the predicted edited image with each historical image.

[0053] The frequency reconstruction layer is used to map each historical image and its corresponding estimated edit image to the Fourier spectrum space using Fast Fourier Transform (FFT). After mapping to the Fourier spectrum space, each historical image and its corresponding estimated edit image are converted from the complex domain to the real domain. The logarithm of each historical image in the real domain and the logarithm of its corresponding estimated edit image are calculated. The reconstruction loss of each historical image and the estimated edit image in the Fourier spectrum space is then obtained.

[0054] To preserve portions irrelevant to the text prompts, the frequency reconstruction layer uses a reconstruction loss in Fourier space, called the Fourier Frequency Reconstruction (FFR) loss. For a two-dimensional image x of size H×W, this invention uses a Fast Fourier Transform (FFT) to map x to the Fourier spectral space:

[0055]

[0056] Where a = 0, ..., H-1, b = 0, ..., W-1. For ease of post-processing, we convert F from the complex field to the real field. This invention uses logarithms to stabilize the training:

[0057]

[0058] Where ∈=1×10 -8 These are hyperparameters added for numerical stability; Re and Im represent... The real and imaginary parts.

[0059] Each point in the Fourier spectrum will utilize information from all pixels based on a discrete spatial frequency, which will represent the frequency characteristics at the global level. The loss will then be reconstructed in the Fourier spectral space.

[0060]

[0061] Where, ‖·,·‖1 represents the L1 norm.

[0062] Step 5: Based on the trained ADLM network, perform editing prediction on the image to be edited to obtain an edited image that meets the customer's needs.

[0063] Step 5 of the present invention includes:

[0064] Step 51: Obtain the user's requirement description text for the image to be edited;

[0065] Step 52: Extract image features from the image to be edited and obtain text features from the requirement description text;

[0066] Step 53: Map the image features and text features into a common space of dimension 512 to obtain the latent vector of the image to be edited and the text feature vector of dimension 512;

[0067] Step 54: Input the image feature vector into the trained ADLM network so that the ADLM network divides the latent vector of the image to be edited into multiple channel groups; map the latent vector of each channel group to space to obtain decoupled different attribute features; calculate the norm of each attribute feature, select the target attribute features corresponding to the first k channel groups with the highest norms, perform hidden layer operations on the target attribute features, perform residual processing on the latent vectors before mapping each channel group after the hidden layer operations, and output the estimated edited image of the image to be edited based on the prompts of the text feature vector through supervised learning.

[0068] This invention provides an adaptive image editing method based on latent space operations and text guidance. The image to be edited is input into a trained Adaptive Oriented Latent Space Mapping (ADLM) network. By adaptively performing channel-by-channel group operations on the image, the efficiency of image editing can be improved. In addition, by utilizing the semantic consistency loss of a multimodal fusion network, the difference value between the estimated edited image and the corresponding historical image is forced to align with the semantic change direction of the given descriptive text, so as to achieve accurate alignment of the consistency relationship between image attributes and text prompts. This ensures that the ADLM network performs accurate attribute decoupling on the image to be edited through channel-by-channel group operations. At the same time, a reconstruction loss based on discrete spatial frequency is proposed to preserve irrelevant parts of the image, thereby ensuring that parts irrelevant to the text prompts are not modified during editing, thus improving the integrity of the output estimated edited image.

[0069] The effectiveness of the present invention will be verified through simulation experiments below.

[0070] 1. Simulation conditions:

[0071] This invention uses a TITAN RTX GPU and performs simulation experiments based on the PyTorch deep learning toolbox.

[0072] 2. Simulation content:

[0073] This invention conducts testing and simulation experiments on two publicly available datasets specifically designed for testing the quality of image generation: CelebA-HQ and LSUN.

[0074] The training process is as follows: the overall network is initialized to obtain the initialized feature maps and adaptive selection modules;

[0075] Let the loss function of the overall network of this invention be...

[0076] The CelebA-HQ dataset contains 30,000 high-quality facial images selected from the original CelebA dataset. Each high-quality image is 1024×1024 pixels in size. In the original dataset, each image has 40 attribute annotations from the original CelebA dataset. However, in this invention, we remove these annotations and utilize the CLIP model as a strong supervision.

[0077] The LSUN Church dataset consists of 126,527 images at a resolution of 256×256. We selected 300 images from the LSUN Church dataset for testing.

[0078] The image features extracted in step 1 are input into a feature mapping network to decompose them into attribute features of different parts. The decoupled attribute features are then input into an adaptive selection module to select attribute features with high weights. The selected attribute features and the text features extracted in step 1 are input into a multimodal fusion network to generate image attribute features that fuse text semantics. The global features of the image and text, along with the weight vector, are input into an image generation network, and the loss function is minimized. The feature mapping network, adaptive selection network, and image generation module were trained using the Adam optimizer from the PyTorch deep learning toolbox. The initial learning rate was 0.005, and g=9 and k=10 were set during training. The coefficient of the loss function was λ. SDC =1,λ FFR =0.05, and the batch size N is set to 5 and 10 for the CelebA-HQ and LSUN Church datasets, respectively.

[0079] 3. Evaluation Indicators:

[0080] FID: refers to the distance between the feature vectors of the real image and the generated image.

[0081] Simulation comparison experiments were conducted on the two public datasets CelebA-HQ and LSUNChurch using the present invention and existing image attribute editing methods. The results are shown in Table 1.

[0082] Table 1. Performance comparison of the present invention with other technologies on the CelebA-HQ dataset.

[0083]

[0084]

[0085] Table 1 shows that the accuracy of the generation and editing effects of the present invention on the CelebA-HQ dataset is higher than that of the existing technology.

[0086] Demonstrating the use of different model attributes for visualization on the CelebA-HQ and LSUN Church datasets, such as... Figure 4 As shown, the feature mapping module and adaptive selection module of the L2M-GAN model in this invention achieve more vivid and accurate attribute modification than the base model, proving the effectiveness of our method in image and text alignment.

[0087] Although this application has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the appended claims in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality.

[0088] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. An adaptive image editing method based on latent space operations and text guidance, characterized in that, include: Step 1: Obtain a training sample set consisting of historical images and add descriptive text to each historical image to describe its attributes; Step 2: Extract the image features of each historical image and perform multi-style inversion encoding on the image features to obtain the latent vector of each historical image; Step 3: Input the latent vector of each historical image into the constructed Adaptive Oriented Latent Space Mapping (ADLM) network, so that the ADLM network will perform the following process: The latent vector of each historical image is divided into g channel groups; the latent vector of each channel group is mapped to the W+ space to obtain decoupled different attribute features. Calculate the norm of each attribute feature and sort them from largest to smallest. Select the target attribute features corresponding to the top k channel groups in the norm sorting. Perform hidden layer operations on the target attribute features. After the hidden layer operations, perform residual processing with the hidden vectors of each channel group before mapping. Output the predicted edited image for each historical image through supervised learning. Step 4: Using a multimodal fusion network, based on the difference value between each predicted edited image and the corresponding historical image, calculate the semantic consistency loss between the given descriptive text and the difference value, as well as the reconstruction loss between each historical image and the predicted edited image. Adjust the parameters of the ADLM network in the direction that reduces the semantic consistency loss and the reconstruction loss to train the ADLM network until the training cutoff condition is reached, and obtain the trained ADLM network. Step 5: Based on the trained ADLM network, perform editing prediction on the image to be edited to obtain an edited image that meets the customer's needs.

2. The adaptive image editing method based on latent space operations and text guidance according to claim 1, characterized in that, The ADLM network includes an image feature mapping module, an adaptive selection module, and an image generation module connected in sequence. Step 3 includes: inputting the latent vector of each historical image into the image feature mapping module, so that the image feature mapping module divides the latent vector of each historical image into multiple channel groups, maps the latent vector of each channel group to the W+ space, and obtains decoupled different attribute features; and inputting the different attribute features into the adaptive selection module, so that the adaptive selection module calculates the norm of the corresponding attribute feature of each channel group, selects the target attribute features corresponding to the first k channel groups with the largest norm in descending order, performs hidden layer operation on the target attribute features, performs residual processing with the latent vector of each channel group before mapping after the hidden layer operation, obtains the final manipulated latent vector, and inputs the final manipulated latent vector into the image generation module, so that the image generation module outputs the predicted edited image of each historical image through supervised learning.

3. The adaptive image editing method based on latent space operations and text guidance according to claim 2, characterized in that, The image feature mapping module consists of an allocation layer and a latent vector mapping layer. The allocation layer is used to divide the latent vector of each historical image into multiple channel groups, and input the latent vector of each channel group into the latent vector mapping layer; The latent vector mapping layer is used to map the latent vectors of each channel group to the W+ space to obtain target attribute features, and to perform a concat operation on all attribute features to obtain the decoupled latent vectors of each historical image.

4. The adaptive image editing method based on latent space operations and text guidance according to claim 2, characterized in that, The adaptive selection module consists of a weight calculation layer, a channel selection layer, and a residual connection layer. The weight calculation layer is used to calculate the norm of the attribute features corresponding to each channel group and input the calculation result into the channel selection layer. The channel selection layer is used to select the target attribute features corresponding to the first k channel groups sorted by norm, perform hidden layer operations on the target attribute features, and set the hidden vectors of the remaining channel groups to zero to obtain the operation hidden vectors of each channel group. The operation hidden vectors are then input to the residual connection layer. The residual connection layer is used to perform residual processing on the latent vector of each channel group and the latent vector before mapping each channel group to obtain the final manipulated latent vector, and input the final manipulated latent vector into the image generation module.

5. The adaptive image editing method based on latent space operations and text guidance according to claim 2, characterized in that, The image generation module consists of a generator and a discriminator; The generator is used to take the latent vector of the final manipulation as input, output the estimated edited image corresponding to each historical image, and input the estimated edited image into the discriminator; The discriminator is used to input the descriptive text of each historical image and the estimated edited image, calculate the similarity between the descriptive text and the estimated edited image, determine whether the content of the estimated edited image and the descriptive text are consistent, and then feed the result back to the generator to supervise the generator to regenerate the estimated edited image that is consistent with the descriptive text.

6. The adaptive image editing method based on latent space operations and text guidance according to claim 5, characterized in that, The multimodal fusion network consists of a multimodal feature extractor, a semantic loss layer, and a frequency reconstruction layer; The multimodal feature extractor is used to extract the visual semantic features of each historical image, the textual semantic features of each descriptive text, and the visual semantic features of the corresponding predicted edited image, and inputs all the extracted features into the semantic loss layer; The semantic loss layer is used to calculate the difference value of the visual semantic features between each estimated edited image and the corresponding historical image, and to calculate the semantic direction consistency loss between the difference value and the textual semantic features of each descriptive text. The frequency reconstruction layer is used to map each historical image and its corresponding estimated edit image to the Fourier spectrum space using Fast Fourier Transform (FFT). After mapping to the Fourier spectrum space, each historical image and its corresponding estimated edit image are converted from the complex domain to the real domain. The logarithm of each historical image in the real domain and the logarithm of its corresponding estimated edit image are calculated. The reconstruction loss of each historical image and the estimated edit image in the Fourier spectrum space is then obtained.

7. The adaptive image editing method based on latent space operations and text guidance according to claim 6, characterized in that, Step 5 includes: Step 51: Obtain the user's requirement description text for the image to be edited; Step 52: Extract image features from the image to be edited and obtain text features from the requirement description text; Step 53: Map the image features and text features into a common space of dimension 512 to obtain the latent vector of the image to be edited and the text feature vector of dimension 512; Step 54: Input the image feature vector into the trained ADLM network so that the ADLM network divides the latent vector of the image to be edited into multiple channel groups; map the latent vector of each channel group to the W+ space to obtain decoupled different attribute features; calculate the norm of each attribute feature, select the target attribute features corresponding to the first k channel groups with the highest norms, perform hidden layer operations on the target attribute features, perform residual processing on the latent vectors before mapping each channel group after the hidden layer operations, and output the estimated edited image of the image to be edited based on the prompts of the text feature vector through supervised learning.

Citation Information

Patent Citations

  • Image processing method, image processing model training method and device, and storage medium

    CN113963087A

  • Face multi-attribute editing method based on global attribute editing direction

    CN115082292A