Text-based real image editing with diffusion models

The text-based image editing method using a diffusion model effectively applies semantic edits to real photographs by fine-tuning and interpolating text embeddings, ensuring the original image's details are preserved.

JP2024154427AActive Publication Date: 2024-10-30GOOGLE LLC

Patent Information

Application Number
JP2024067535
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-18
Filing Date
2024-04-18
Publication Date
2024-10-30
Estimated Expiration
2044-04-18

AI Technical Summary

Technical Problem

Existing image processing methods struggle with applying non-trivial semantic edits to real photographs, often requiring additional inputs or being limited to specific edits and failing to maintain the original image's background and composition.

Method used

A text-based image editing method using a diffusion model that fine-tunes and interpolates text embeddings to apply edits to real images, preserving the original image's details while aligning with the target text.

Benefits of technology

Enables sophisticated, high-quality edits in real images by maintaining the original image's background and structure, allowing for a wide range of edits and seamless integration of text-based changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024154427000001_ABST
    Figure 2024154427000001_ABST
Patent Text Reader

Abstract

To provide a method and system for editing an image.SOLUTION: The method includes the steps of: receiving an input image and a target text indicating a desired edit for the input image; and acquiring, by a computing system, a target text embedding on the basis of the target text. The method also includes the steps of: acquiring, by the computing system, optimized text embedding on the basis of the target text embedding and the input image; and fine-tuning a diffusion model on the basis of the optimized text embedding. The method may further include the steps of: interpolating, by the computing system, the target text embedding and the optimized text embedding to acquire an interpolated embedding; and generating an edited image containing the desired edit using the diffusion model on the basis of the input image and the interpolated embedding.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This disclosure relates generally to digital image editing and, more particularly, to applying text-based semantic edits to images using only an input image and a target text by leveraging a text imaging diffusion model. [Background technology]

[0002] Applying non-trivial semantic edits to real photographs has been a challenge in image processing. Many methods for text-based image editing suffer from shortcomings such as being limited to a specific set of edits (such as drawing on top of an image, adding objects, or transferring a style), working only on images from a specific domain or images generated by synthesis, or requiring auxiliary input in addition to the input image, such as an image mask indicating the desired edit locations, multiple images of the same subject, or text describing the original image. Summary of the Invention [Means for solving the problem]

[0003] Aspects and advantages of embodiments of the present disclosure will be set forth in part in the description that follows, or may be learned from the description, or may be learned by practice of the embodiments.

[0004] An exemplary aspect of the present disclosure is directed to a computer-implemented method for editing an image. The method includes receiving, by a computing system, an input image and a target text, the target text indicating a desired edit for the input image, and obtaining, by the computing system, a target text embedding based on the target text. The method also includes obtaining, by the computing system, an optimized text embedding based on the target text embedding and the input image, and fine-tuning, by the computing system, a diffusion model based on the optimized text embedding. The method further includes interpolating, by the computing system, the target text embedding and the optimized text embedding to obtain an interpolated embedding, and generating, by the computing system, an edited image including the desired edit using the diffusion model based on the input image and the interpolated embedding.

[0005] Another exemplary aspect of the present disclosure is directed to a computing system for editing an image. The computing system includes one or more processors and a non-transitory computer-readable medium comprising instructions that, when executed by the one or more processors, cause the one or more processors to perform operations. The operations include receiving an input image and a target text, the target text indicating a desired edit for the input image, and obtaining a target text embedding based on the target text. The operations also include obtaining an optimized text embedding based on the target text embedding and the input image, and fine-tuning a diffusion model based on the optimized text embedding. The operations further include interpolating the target text embedding and the optimized text embedding to obtain an interpolated embedding, and generating an edited image including the desired edit using the diffusion model based on the input image and the interpolated embedding.

[0006] Another example aspect of the present disclosure is directed to a non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause the one or more processors to perform operations. The operations include receiving an input image and a target text, the target text indicating a desired edit for the input image, and obtaining a target text embedding based on the target text. The operations also include obtaining an optimized text embedding based on the target text embedding and the input image, and fine-tuning a diffusion model based on the optimized text embedding. The operations further include interpolating the target text embedding and the optimized text embedding to obtain an interpolated embedding, and generating an edited image including the desired edit using the diffusion model based on the input image and the interpolated embedding.

[0007] Other aspects of the present disclosure are directed to various systems, apparatus, non-transitory computer-readable media, user interfaces, and electronic devices.

[0008] These and other features, aspects, and advantages of various embodiments of the present disclosure will become better understood with reference to the following description and appended claims. The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the present disclosure and, together with the description, serve to explain associated principles.

[0009] A detailed discussion of embodiments, directed to persons skilled in the art, is described herein, which refers to the accompanying drawings. [Brief description of the drawings]

[0010] [Figure 1] FIG. 2 is a block diagram of an exemplary image editing model, according to an exemplary embodiment of the present disclosure. [Diagram 2] 1A-1C are diagrams illustrating an example of an exemplary image editing process, according to an exemplary embodiment of the present disclosure. [Diagram 3] FIG. 13 illustrates the results of different random noise samples being input into a fine-tuned diffusion model, according to an exemplary embodiment of the present disclosure. [Figure 4] FIG. 13 illustrates how varying values ​​of hyper-parameters can result in different edited images, according to an exemplary embodiment of the present disclosure. [Diagram 5] FIG. 2 is a flow chart diagram of an exemplary method for performing image editing according to an exemplary embodiment of the present disclosure. [Figure 6A] FIG. 1 is a block diagram of an exemplary computing system for implementing image editing, according to an exemplary embodiment of the present disclosure. [Figure 6B] FIG. 2 is a block diagram of an exemplary computing device for implementing image editing, in accordance with an exemplary embodiment of the present disclosure. [Figure 6C] FIG. 2 is a block diagram of an exemplary computing device for implementing image editing, in accordance with an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Reference numbers that are repeated among the figures identify like features in various implementations.

[0012] overview In general, this disclosure is directed to semantic image editing, given only an input image to be edited and a single text prompt that describes the target edit.

[0013] The text imaging diffusion model uses a diffusion model capable of high quality image synthesis. When conditioned on a natural language text prompt, the diffusion model can generate images that match well with the requested text. The present invention adapts the diffusion model to edit real-life images rather than synthesizing new images.

[0014] This is done in a three-step process: First, the text embedding is optimized, resulting in a text embedding that best matches the given input image in the vicinity of the target text embedding. Second, the diffusion model is fine-tuned to better match or reconstruct the given input image. Finally, the optimized embedding and the target text embedding are linearly interpolated to find a point that achieves both fidelity to the image and the target text match.

[0015] The method of editing images described above allows for sophisticated, non-rigid edits on realistic, high-resolution images. The resulting image output matches the target text well while maintaining the overall background, structure, and composition of the original image. For example, an input image of a standing dog with the text "dog lying down" will result in an output of the dog (same coat color, same background, same expression, same features, etc.) in a new pose (lying down instead of standing). Multiple objects in an image can be edited and a wide variety of edits may be performed, all maintaining the overall structure and composition of the original image.

[0016] Furthermore, the present invention allows a semantically significant linear interpolation between two text embedding sequences to be generated, which demonstrates the powerful compositional ability of the text-imaging diffusion model and allows users to incrementally edit objects in an image.

[0017] Referring now to the drawings, exemplary embodiments of the present disclosure will be discussed in further detail.

[0018] Example model layout FIG. 1 illustrates a block diagram of an example image model 100 according to an example embodiment of the present disclosure.

[0019] The image editing model 100 includes a pre-trained diffusion model 105. The core premise of the pre-trained diffusion model is to initialize with a randomly sampled noisy image (such as the randomly sampled noisy image 110) and then iteratively refine the image in a controlled manner until the image is synthesized into a "clean" photorealistic image, i.e., free of artifacts from the generative process. Each refinement step may involve the application of a neural network to the current sample, followed by a random Gaussian noise perturbation to obtain a more defined sample. The network is trained for denoising, which leads to a learned image delivery with high fidelity to the target delivery. These models may be generalized to learn conditional delivery by conditioning the denoising network with auxiliary inputs, and the resulting diffusion process can sample from the data delivery, conditional on the auxiliary inputs. In some embodiments, the auxiliary inputs may be text sequences describing the desired image. By incorporating knowledge from large-scale language models or hybrid visual-language models, these text-to-image diffusion models can generate realistic high-resolution images using only text prompts describing the scene. A low-resolution image is first synthesized using generative diffusion and then transformed into a high-resolution image using an additive auxiliary model.

[0020] The present invention receives as input an input image (such as input image 115) that represents a real object, animal, person, etc., and a target text that describes the desired edit. The ultimate goal of the pre-trained model 105 is to edit the input image to satisfy the given text while preserving the maximum amount of details from the input image (e.g., background details and the identity of the object in the image). To accomplish this, the text embedding layer of the pre-trained diffusion model 105 may be used to perform semantic manipulation. This is performed by finding significant representations that, when fed through a generative process, yield images similar to the input image 115. The pre-trained model 105 is then fine-tuned to better reconstruct the input image 115, and then the latent representations are manipulated to finally obtain the edited result.

[0021] First, text embedding optimization may be performed, which involves passing the target text through a text encoder, which outputs corresponding target text embeddings 120. The output target text embeddings indicate the number of tokens in the target text and may have a token embedding dimension.

[0022] The parameters of the pre-trained diffusion model 105 are then frozen and the target text embeddings 120 are optimized using a denoising diffusion objective, such as the objective shown in Equation 1.

[0023]

number

[0024] In formula 1, x tis a noisy version of the input image, and theta is a set of pre-trained diffusion model weights. The resulting optimized text embedding 125 is a text embedding that matches the input image as closely as possible (e.g., as indicated by the embedding distance 130). In some embodiments, this process is performed in relatively few steps to remain close to the initial target text embedding 120 when obtaining the optimized test embedding 125. This optimized text embedding, when put through the generative diffusion process, does not necessarily lead exactly to the input image x, since the optimization only runs a few steps. This proximity allows for significant interpolation in the embedding space and does not exhibit linear behavior for distant embeddings.

[0025] Next, the pre-trained diffusion model 105 is fine-tuned. Since the optimization to obtain the optimized text embeddings 125 runs for only a few steps, the model parameters theta of the pre-trained diffusion model 105 are optimized using the same loss function as shown in Equation 1, and the optimized text embeddings 125 are frozen. This process shifts the pre-trained diffusion model 105 to match the input image 115 in terms of the optimized text embeddings 125. In parallel, an auxiliary diffusion model present in the base generative model may be fine-tuned with the same reconstruction loss as the pre-trained diffusion model 105, but conditional on the target text embeddings 120 instead of the optimized text embeddings 125. The optimization of the auxiliary model ensures the preservation of high-frequency details from the input image 115 that are not present in the base resolution.

[0026] After the pre-trained diffusion model 105 is trained to sufficiently reproduce the input image 115 in the optimized embedding 125, a newly created fine-tuned diffusion model 150 (e.g., the trained and fine-tuned pre-trained diffusion model 105) is used to apply the desired edits to the input image 115 by going towards the target text embedding 120. In other words, this stage of the process is a simple linear interpolation 155 between the target text embedding 120 and the optimized text embedding 125. For a given hyper-parameter η ∈ [0,1], Equation 2 can be used to obtain an embedding that represents the desired edited image.

[0027]

number

[0028] In formula 2, e tgt is the target text embedding 120, and e opt is the optimized text embedding 125. The output of Equation 2 is an embedding that represents the desired edited image. The fine-tuned diffusion model 150 is

number

[0029] In some embodiments, the framework of the pre-trained diffusion model 105 and the fine-tuned diffusion model 150 may include three different text-conditioned diffusion models: a generative diffusion model for 64×64 pixel images, a super-resolution diffusion model that turns the 64×64 pixel images into 256×256 pixel images, and a second super-resolution diffusion model that turns the 256×256 pixel images into 1024×1024 pixel images. By cascading these three models and using classifier-less guidance, the pre-trained diffusion model 105 and the fine-tuned diffusion model 150 can generate image edits based on text guidance from the target text.

[0030] An example of the image editing process can be seen in FIG. 2. For example, based on an input image (such as any of the input images 205), the fine-tuned diffusion model 150 may be fine-tuned for the particular input image, resulting in outputting various edited images (such as any of the edited images 210) based on the target text input associated with the desired image edit. In one example, an input dog image 215 of a dog standing in a field may be provided with one of the desired image edit target texts 220, such as "dog sitting", "dog jumping", "dog lying down", etc. Note that for some target texts, such as "dog playing with a toy" or "dog jumping with a frisbee", new objects as well as edits may be added to the currently existing objects being performed. Other examples of input images 205 and resulting edited images 210 are also shown to illustrate other types of edits that can be performed on various input images.

[0031] Returning now to FIG. 1, in some embodiments, the final output image 160 may differ based on the random noise 165 input to the fine-tuned diffusion model 150. For example, FIG. 3 shows the results 305 where different random noise samples are input to the fine-tuned diffusion model 150. Given a first input image 310 of a bird resting with its wings down, with target text "picture of a bird spreading its wings", different noise samples may result in different output results 305. A second example of a second input image 315 of a forest, with target text "child's drawing of a forest", is also provided to show how the random noise samples 165 may result in different final output images 160.

[0032] In some embodiments, values ​​of the hyperparameter η may result in different edited images. For example, Figure 4 shows how varying the value 410 of the hyperparameter η may result in different edited images 415 based on a given input image 405. In a second example, a particular different value of η 420 may lead to different generated results based on an input image of a cake and the target text "picture of pistachio cake."

[0033] Exemplary Methods 5 illustrates a flow chart diagram of an exemplary method 500 for performing image editing, according to an exemplary embodiment of the present disclosure. Although FIG. 5 illustrates steps performed in a particular order for purposes of illustration and explanation, the methods of the present disclosure are not limited to the order or sequence specifically shown. Various steps of method 500 may be variously omitted, rearranged, combined, and / or adapted without departing from the scope of the present disclosure.

[0034] At 502, a computing system receives an input image and target text, the target text indicating a desired edit for the input image. The target text is a textual representation of the desired edit, such as "dog sitting" provided along with an input image showing a dog standing in a field. The input image is based on which an edited image is generated (e.g., preserving details from the input image) while implementing the desired edit indicated by the target text.

[0035] At 504, the computing system obtains a target text embedding based on the target text. The target text embedding is a text embedding that represents the target text in an embedding usable by one or more models. In some embodiments, the computing system obtains the target text embedding by providing the target text to a text encoder and receiving the target text embedding as output from the text encoder. In some embodiments, the target text embedding has a token embedding dimension that includes the number of tokens in the target text.

[0036] At 506, the computing system obtains an optimized text embedding based on the target text embedding and the input image. To obtain the optimized text embedding, the parameters of the diffusion model are frozen and the target text embedding is optimized using a denoising decoding objective, which may be a loss function such as the function described in Equation 2 above. The obtained text embedding represents the input image as closely as possible. This optimization process is run for a certain number of steps (relatively few) to remain close to the initial target text embedding. The embedding obtained after several steps are run is the optimized text embedding. The optimized text embedding allows for significant linear interpolation in the embedding space, which does not show linear behavior for distant embeddings. The optimized text embedding does not necessarily lead to the input image exactly when passed through the diffusion model, because the optimization runs for only a few steps.

[0037] At 508, the computing system fine-tunes the diffusion model based on the optimized text embeddings. To fine-tune the diffusion model, the optimal text embeddings are frozen and the frozen optimal text embeddings are used to optimize model parameters of the diffusion model. A loss function is used to optimize the model parameters. This process shifts the model to fit the input image x at the points of the optimized text embeddings. In some embodiments, optimizing the model parameters may include conditioning the diffusion model on the optimized text embeddings.

[0038] In some embodiments, fine-tuning the diffusion model may also include fine-tuning at least one auxiliary diffusion model, such as a super-resolution generating diffusion model. Fine-tuning the auxiliary diffusion model may be similar to fine-tuning the diffusion model. For example, fine-tuning the auxiliary diffusion model may include using the same loss function as the diffusion model to optimize one or more parameters of the auxiliary diffusion model, but rather than freezing the optimized text embeddings and conditioning the auxiliary diffusion model on the optimized text embeddings, the target text embeddings are instead frozen and the auxiliary diffusion model is conditioned on the target text embeddings. Optimizing the auxiliary diffusion model on the target text embeddings ensures that high frequency details from the input image that are not present at the base resolution generated by the diffusion model are preserved.

[0039] At 510, the computing system interpolates the target text embedding and the optimized text embedding to obtain an interpolated embedding. The diffusion model is trained sufficiently and closely (e.g., overfits) to adequately reproduce the input image in the optimized embedding. Thus, to apply the desired edits, the computing system starts at the optimized embedding and moves through the embedding space toward the target text embedding to generate the edits. To "move toward" the target text embedding, a simple linear interpolation (described by Equation 2 disclosed above) is performed between the optimized text embedding and the target text embedding. In some embodiments, this interpolation is represented by the hyper-parameter |. Based on the linear interpolation of the optimized text embedding, the target text embedding, and the hyper-parameters, an interpolated embedding is obtained.

[0040] At 512, the computing system generates an edited image including the desired edits using a diffusion model based on the input image and the interpolated embedding. The fine-tuned diffusion model then performs a base generative diffusion process conditioned on the interpolated embedding to obtain a low-resolution image (e.g., a 64×64 pixel image) including the desired edits. In some embodiments, one or more auxiliary diffusion models, such as a super-resolution model, may then be used to super-resolve the low-resolution image into a high-resolution final image (e.g., a 256×256 and / or 1024×1024 pixel image), which is then output as the final edited image.

[0041] Exemplary Devices and Systems 6A illustrates a block diagram of an exemplary computing system 600 for implementing image editing, according to an exemplary embodiment of the present disclosure. The system 600 includes a user computing device 602, a server computing system 630, and a training computing system 650, communicatively coupled via a network 680.

[0042] The user computing device 602 may be any type of computing device, such as, for example, a personal computing device (e.g., a laptop or desktop), a mobile computing device (e.g., a smartphone or tablet), a game console or controller, a wearable computing device, an embedded computing device, or any other type of computing device.

[0043] The user computing device 602 includes one or more processors 612 and memory 614. The one or more processors 612 may be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and may be a single processor or multiple processors operatively connected. The memory 614 may include one or more non-transitory computer-readable recording media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 614 may store data 616 and instructions 618 that are executed by the processor 612 to cause the user computing device 602 to perform operations.

[0044] In some implementations, the user computing device 602 can store or include one or more image editing models 620. For example, the image editing models 620 can be or otherwise include various machine learning models, such as neural networks (e.g., deep neural networks) or other types of machine learning models including nonlinear and / or linear models. The neural networks can include feed-forward neural networks, recurrent neural networks (e.g., long short-term memory recurrent neural networks), convolutional neural networks, or other forms of neural networks. Some exemplary machine learning models can leverage attention mechanisms such as self-attention. For example, some exemplary machine learning models can include multi-headed self-attention models (e.g., transformer models). Exemplary image editing models 620 are discussed with reference to FIG. 1.

[0045] In some implementations, one or more image editing models 620 may be received from a server computing system 630 over a network 680, stored in a user computing device memory 614, and then used or otherwise implemented by one or more processors 612. In some implementations, a user computing device 602 may implement multiple parallel instances of a single image editing model 620 (e.g., to perform parallel image edits across multiple instances of image edits).

[0046] More specifically, given an input image and target text indicating desired edits to the image, the one or more image editing models 620 can edit the image to satisfy the given text while preserving the maximum amount of detail from the original input image, such as detail in the background, detail about the unedited portions of one or more objects, etc. The one or more models 620 then perform semantic operations on the input image using a text embedding layer of the one or more models to obtain a latent representation of the input image, which may then be manipulated to obtain an output image in which the desired edits are specified by the given text.

[0047] Additionally or alternatively, one or more image editing models 640 may be included in or otherwise stored and implemented by a server computing system 630 that communicates with the user computing device 602 according to a client-server relationship. For example, the image editing model 640 may be implemented by the server computing system 630 as part of a web service (e.g., an image editing service). Thus, one or more models 620 may be stored and implemented in the user computing device 602 and / or one or more models 640 may be stored and implemented in the server computing system 630.

[0048] The user computing device 602 may also include one or more user input components 622 that receive user input. For example, the user input component 622 may be a touch-sensitive component (e.g., a touch-sensitive display screen or touchpad) that is sensitive to the touch of a user input object (e.g., a finger or stylus). The touch-sensitive component can be useful for implementing a virtual keyboard. Other exemplary user input components include a microphone, a traditional keyboard, or other means by which a user can provide user input.

[0049] The server computing system 630 includes one or more processors 632 and a memory 634. The one or more processors 632 may be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and may be a single processor or multiple processors operatively connected. The memory 634 may include one or more non-transitory computer-readable recording media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 634 may store data 636 and instructions 638 that are executed by the processor 632 to cause the server computing system 630 to perform operations.

[0050] In some implementations, the server computing system 630 includes or is otherwise implemented by one or more server computing devices. In instances in which the server computing system 630 includes multiple server computing devices, such server computing devices may operate according to a sequential computing architecture, a parallel computing architecture, or some combination thereof.

[0051] As described above, the server computing system 630 may store or otherwise include one or more image editing models 640. For example, the models 640 may be or otherwise include various machine learning based models. Exemplary machine learning based models include neural networks or other multi-layer nonlinear models. Exemplary neural networks include feed-forward neural networks, deep neural networks, recurrent neural networks, and convolutional neural networks. Some exemplary machine learning based models may leverage attention mechanisms such as self-attention. For example, some exemplary machine learning based models may include multi-headed self-attention models (e.g., transformer models). Exemplary models 640 are discussed with reference to FIG. 1.

[0052] The user computing device 602 and / or the server computing system 630 can train the models 620 and / or 640 through interaction with a training computing system 650 that is communicatively coupled via a network 680. The training computing system 650 may be separate from the server computing system 630 or may be part of the server computing system 630.

[0053] The training computing system 650 includes one or more processors 652 and a memory 654. The one or more processors 652 may be any suitable processing device (e.g., a processor core, a microprocessor, an ASIC, an FPGA, a controller, a microcontroller, etc.) and may be a single processor or multiple processors operably connected. The memory 654 may include one or more non-transitory computer-readable recording media, such as RAM, ROM, EEPROM, EPROM, flash memory devices, magnetic disks, etc., and combinations thereof. The memory 654 may store data 656 and instructions 658 executed by the processor 652 to cause the training computing system 650 to perform operations. In some implementations, the training computing system 650 includes or is otherwise implemented by one or more server computing devices.

[0054] The training computing system 650 may include a model trainer 660 that trains the machine learning based models 620 and / or 640 stored in the user computing device 602 and / or the server computing system 630 using various training or learning techniques, such as, for example, backpropagation. For example, a loss function may be backpropagated through the model to update one or more parameters of the model (e.g., based on the gradient of the loss function). Various loss functions may be used, such as mean squared error, likelihood loss, cross entropy loss, hinge loss, and / or various other loss functions. Gradient descent techniques may be used to iteratively update the parameters through several training iterations.

[0055] In some implementations, performing the error backpropagation may include performing truncated backpropagation over time. The model trainer 660 can implement some generalization techniques (e.g., weight decay, dropout, etc.) to improve the generalization ability of the trained model.

[0056] In particular, the model trainer 660 can train the image editing models 620 and / or 640 based on a set of training data 662. The training data 662 can include, for example, input images for one or more of the editing models 620 and 640. In some embodiments, the editing models 620 and 640 can include a generative diffusion model for 64×64 pixel images, a first super-resolution diffusion model for converting the 64×64 pixel images to 256×256 pixel images, and a second super-resolution diffusion model for converting the 256×256 pixel images to 1024×1024 pixel images. Text embeddings for the image editing models 620 and 640 can be optimized during training using the 64×64 diffusion model. In some embodiments, an Adam optimizer with 100 sets and a fixed learning rate of 1e-3 can be used. The 64×64 diffusion model can then be fine-tuned by continuing training on the input images, conditioned on the optimized embeddings, for 1500 steps. In parallel, the first super-resolution diffusion model can be fine-tuned using the target text embeddings and the original image for 1500 steps to capture high-frequency details from the input image.

[0057] In another embodiment, the image editing models 620 and 640 may be trained by applying a diffusion process in a latent space of size 4×64×64 of a pre-trained autoencoder operating on 512×512 images with text embedding optimization taking 1000 steps, with a learning rate of 2e-3 using Adam.

[0058] Based on this training, the text embeddings may be interpolated according to Equation 3 described above with respect to FIG. 1. Through the fine-tuning process, as η is increased, the output image becomes more aligned with the target text. For example, when η is 0, the original image is generated, and when η is 1, an entirely new image (e.g., one that shares no characteristics with the input image) is generated. In some embodiments, η may be between 0.6 and 0.8. An output image may then be generated using image editing model 620 or 640.

[0059] In some implementations, if the user has given consent, the training examples may be provided by the user computing device 602. Thus, in such implementations, the model 620 provided to the user computing device 602 may be trained by the training computing system 650 against user-specific data received from the user computing device 602. In some instances, this process may be referred to as individualizing the model.

[0060] The model trainer 660 includes computer logic used to provide the desired functionality. The model trainer 660 may be implemented in hardware, firmware, and / or software controlling a general-purpose processor. For example, in some implementations, the model trainer 660 includes a program file that is stored on a storage device, loaded into memory, and executed by one or more processors. In other implementations, the model trainer 660 includes one or more sets of computer-executable instructions stored on a tangible computer-readable recording medium, such as a RAM, a hard disk, or an optical or magnetic medium.

[0061] Network 680 may be any type of communications network, such as a local area network (e.g., an intranet), a wide area network (e.g., the Internet), or some combination thereof, and may include any number of wired or wireless links. In general, communications over network 680 may be carried over any type of wired and / or wireless connections using a wide variety of communications protocols (e.g., TCP / IP, HTTP, SMTP, FTP), encodings or formats (e.g., HTML, XML), and / or protection schemes (e.g., VPN, Secure HTTP, SSL).

[0062] The machine learning models described herein may be used in a variety of tasks, applications, and / or use cases.

[0063] In some implementations, the input to the machine learning based model of the present disclosure may be image data. The machine learning based model may process the image data to generate an output. As an example, the machine learning based model may process the image data to generate an image recognition output (e.g., recognition of the image data, latent embedding of the image data, an encoded representation of the image data, a hash of the image data, etc.). As another example, the machine learning based model may process the image data to generate an image segmentation output. As another example, the machine learning based model may process the image data to generate an image classification output. As another example, the machine learning based model may process the image data to generate an image data modification output (e.g., alteration of the image data, etc.). As another example, the machine learning based model may process the image data to generate an encoded image data output (e.g., an encoded and / or compressed representation of the image data, etc.). As another example, the machine learning based model may process the image data to generate an upscaled image data output. As another example, the machine learning based model may process the image data to generate a prediction output.

[0064] In some implementations, the input to the machine learning based model of the present disclosure may be text or natural language data. The machine learning based model may process the text or natural language data to generate an output. As an example, the machine learning based model may process the natural language data to generate a language encoding output. As another example, the machine learning based model may process the text or natural language data to generate a latent text embedding output. As another example, the machine learning based model may process the text or natural language data to generate a transformation output. As another example, the machine learning based model may process the text or natural language data to generate a classification output. As another example, the machine learning based model may process the text or natural language data to generate a text segmentation output. As another example, the machine learning based model may process the text or natural language data to generate a semantic intent output. As another example, the machine learning based model may process the text or natural language data to generate an upscaled text or natural language output (e.g., text or natural language data that is of higher quality than the input text or natural language, etc.). As another example, the machine learning based model may process the text or natural language data to generate a prediction output.

[0065] In some implementations, the input to the machine learning based model of the present disclosure may be audio data. The machine learning based model may process the audio data to generate an output. As an example, the machine learning based model may process the audio data to generate a speech recognition output. As another example, the machine learning based model may process the audio data to generate a speech translation output. As another example, the machine learning based model may process the audio data to generate a latent embedding output. As another example, the machine learning based model may process the audio data to generate an encoded audio output (e.g., an encoded and / or compressed representation of the audio data, etc.). As another example, the machine learning based model may process the audio data to generate an upscaled audio output (e.g., audio data of higher quality than the input audio data, etc.). As another example, the machine learning based model may process the audio data to generate a text representation output (e.g., a text representation of the input audio data, etc.). As another example, the machine learning based model may process the audio data to generate a predicted output.

[0066] In some implementations, the input to the machine learning based model of the present disclosure may be latent coding data (e.g., a latent space representation of the input, etc.). The machine learning based model may process the latent coding data to generate an output. As an example, the machine learning based model may process the latent coding data to generate a recognition output. As another example, the machine learning based model may process the latent coding data to generate a reconstruction output. As another example, the machine learning based model may process the latent coding data to generate an exploration output. As another example, the machine learning based model may process the latent coding data to generate a reclustered output. As another example, the machine learning based model may process the latent coding data to generate a prediction output.

[0067] In some cases, the machine learning based model may be configured to perform a task that includes encoding input data for reliable and / or efficient transmission or storage (and / or corresponding decoding). For example, the task may be an audio compression task. The input may include audio data and the output may include compressed audio data. In another example, the input may include visual data (e.g., one or more images or videos) and the output may include compressed visual data, and the task is a visual data compression task. In another example, the task may include generating an embedding for the input data (e.g., input audio or visual data).

[0068] 6A illustrates one exemplary computing system that can be used to implement the present disclosure. Other computing systems may be used. For example, in some implementations, the user computing device 602 may include a model trainer 660 and a training data set 662. In such implementations, the model 620 may be both trained and used locally at the user computing device 602. In some of such implementations, the user computing device 602 may implement the model trainer 660 to personalize the model 620 based on user-specific data.

[0069] 6B illustrates a block diagram of an exemplary computing device 700 for implementing according to an exemplary embodiment of the present disclosure. The computing device 700 may be a user computing device or a server computing device.

[0070] Computing device 700 includes several applications (e.g., applications 1-N). Each application includes its own machine learning library and machine learning model. For example, each application may include a machine learning model. Exemplary applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc.

[0071] 6B, each application may communicate with several other components of the computing device, such as one or more sensors, a context manager, a device state component, and / or additional components. In some implementations, each application may communicate with each device component using an API (e.g., a public API). In some implementations, the API used by each application is specific to that application.

[0072] 6C illustrates a block diagram of an exemplary computing device 800 for implementing according to an exemplary embodiment of the present disclosure. The computing device 800 may be a user computing device or a server computing device.

[0073] Computing device 800 includes several applications (e.g., applications 1-N). Each application is in communication with a central intelligence layer. Exemplary applications include a text messaging application, an email application, a dictation application, a virtual keyboard application, a browser application, etc. In some implementations, each application can communicate with the central intelligence layer (and the models stored therein) using an API (e.g., a common API across all applications).

[0074] The central intelligence layer includes several machine learning models. For example, as shown in FIG. 6C, a respective machine learning model may be provided to each application and managed by the central intelligence layer. In other implementations, two or more applications may share a single machine learning model. For example, in some implementations, the central intelligence layer may provide a single model to all of the applications. In some implementations, the central intelligence layer is included in or otherwise implemented by the operating system of the computing device 800.

[0075] The central intelligence layer can communicate with a central device data layer, which can be a centralized repository of data for the computing device 800. As shown in FIG. 6C, the central device data layer can communicate with several other components of the computing device, such as one or more sensors, a context manager, a device state component, and / or additional components. In some implementations, the central device data layer can communicate with each device component using an API (e.g., a private API).

[0076] Additional Disclosures The technology described herein refers to servers, databases, software applications, and other computer-based systems, as well as actions taken and information sent to and from such systems. The inherent flexibility of computer-based systems allows for a wide variety of possible configurations, combinations, and divisions of tasks and functionality among components. For example, the processes described herein may be implemented using a single device or component or multiple devices or components working in combination. Databases and applications can be implemented on a single system or distributed across multiple systems. Distributed components can operate serially or in parallel.

[0077] Although the present subject matter has been described in detail with respect to various specific exemplary embodiments thereof, each example is provided as an explanation, not a limitation of the present disclosure. Those skilled in the art, upon understanding the above, may easily make modifications, variations, and equivalents to such embodiments. Thus, the present disclosure does not exclude the inclusion of such modifications, variations, and / or additions to the present subject matter as would be readily apparent to those skilled in the art. For example, features illustrated or described as part of one embodiment may also be used with another embodiment to produce yet a further embodiment. Thus, it is intended that the present disclosure encompass such alternatives, modifications, and equivalents. [Explanation of symbols]

[0078] 100 Image Models, Image Editing Models 105 Pre-trained Diffusion Model, Pre-trained Model 600 Computing system, system 602 User Computing Device 612 processor 614 Memory, User Computing Device Memory 622 User Input Components 630 Server Computing System 632 processor 634 Memory 650 Training Computing System 652 processor 654 Memory 660 Model Trainer 680 Network 700 computing devices 800 computing devices

Claims

1. 1. A computer-implemented method for editing an image, comprising: receiving, by a computing system, an input image and target text, the target text indicating a desired edit for the input image; obtaining, by the computing system, a target text embedding based on the target text; obtaining, by the computing system, optimized text embeddings based on the target text embeddings and the input image; fine-tuning, by the computing system, a diffusion model based on the optimized text embeddings; interpolating, by the computing system, the target text embedding and the optimized text embedding to obtain an interpolated embedding; generating, by the computing system, an edited image including the desired edits based on the input image and the interpolated embedding using the diffusion model.

2. The step of obtaining the target text embedding comprises: providing, by the computing system, the target text to a text encoder; and receiving, by the computing system, the target text embeddings from the text encoder.

3. The step of obtaining the optimized text embeddings comprises: freezing, by the computing system, parameters of the diffusion model; optimizing, by the computing system, the target text embedding using a denoising diffusion objective to obtain the optimized text embedding; and outputting the optimized text embedding, the optimized text embedding being a text embedding that matches the input image.

4. The step of fine-tuning the diffusion model comprises: freezing, by the computing system, the optimized text embeddings; and optimizing, by the computing system, at least one model parameter of the diffusion model using a loss function.

5. 5. The computer-implemented method of claim 4, wherein optimizing at least one model parameter comprises conditioning the diffusion model on the optimized text embeddings.

6. The step of fine-tuning the diffusion model comprises: The method further includes fine-tuning, by the computing system, at least one auxiliary diffusion model, the fine-tuning comprising: freezing, by the computing system, the target text embeddings; and optimizing, by the computing system, the at least one auxiliary diffusion model using the loss function.

7. 7. The computer-implemented method of claim 6, wherein optimizing the at least one auxiliary diffusion model comprises conditioning the at least one auxiliary diffusion model on the target text embeddings.

8. The step of generating an edited image includes: generating, by the computing system, a low-resolution version of the edited image using the diffusion model; and super-resolving, by the computing system, the low-resolution version of the edited image into a final high-resolution version of the edited image using the at least one auxiliary diffusion model.

9. The step of generating an edited image includes:

2. The computer-implemented method of claim 1, comprising generating, by the computing system, the edited image using the diffusion model conditioned on the interpolated embedding.

10. 1. A computing system for editing images, the computing system comprising: one or more processors; and a computer-readable medium comprising instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, the operations including: receiving an input image and target text, the target text indicating a desired edit for the input image; obtaining a target text embedding based on the target text; and obtaining optimized text embeddings based on the target text embeddings and the input image; and fine-tuning a diffusion model based on the optimized text embeddings; and interpolating the target text embedding and the optimized text embedding to obtain an interpolated embedding; generating an edited image including the desired edits using the diffusion model based on the input image and the interpolated embedding.

11. Obtaining the target text embeddings includes: providing the target text to a text encoder; and receiving the target text embeddings from the text encoder.

12. Obtaining the optimized text embeddings includes: freezing, by the computing system, parameters of the diffusion model; optimizing, by the computing system, the target text embeddings using a denoising diffusion objective to obtain the optimized text embeddings; and outputting the optimized text embedding, the optimized text embedding being a text embedding that matches the input image.

13. Fine-tuning the diffusion model includes: Freezing the optimized text embeddings; and and optimizing at least one model parameter of the diffusion model using a loss function.

14. 14. The computing system of claim 13, wherein optimizing the at least one model parameter comprises conditioning the diffusion model with the optimized text embeddings.

15. Fine-tuning the diffusion model includes: and further comprising fine-tuning at least one auxiliary diffusion model, wherein the fine-tuning of the at least one auxiliary diffusion model comprises: Freezing the target text embeddings; and and optimizing the at least one auxiliary diffusion model using the loss function.

16. 16. The computing system of claim 15, wherein optimizing the at least one auxiliary diffusion model comprises conditioning the at least one auxiliary diffusion model on the target text embedding.

17. generating the edited image includes: generating a low resolution version of the edited image using the diffusion model; and and super-resolving the low-resolution version of the edited image into a final high-resolution version of the edited image using the at least one auxiliary diffusion model.

18. generating the edited image includes: The computing system of claim 10 further comprising generating the edited image using the diffusion model conditioned on the interpolated embedding.

19. 1. A computer-readable medium comprising instructions that, when executed by one or more processors, cause the one or more processors to perform operations, the operations including: receiving an input image and target text, the target text indicating a desired edit for the input image; obtaining a target text embedding based on the target text; and obtaining optimized text embeddings based on the target text embeddings and the input image; and fine-tuning a diffusion model based on the optimized text embeddings; and interpolating the target text embedding and the optimized text embedding to obtain an interpolated embedding; generating an edited image including the desired edits using the diffusion model based on the input image and the interpolated embedding.

20. generating the edited image includes:

20. The computer-readable medium of claim 19, further comprising generating the edited image using the diffusion model conditioned on the interpolated embedding.

Citation Information

Patent Citations

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

    JP2022180519A

  • Semantic image manipulation using visual-semantic joint embeddings

    US20220036127A1

Cited By

  • Information processing device, method for controlling information processing device, and program

    JP2025089908A

  • Information processing device, control method for information processing device, and program

    JP7757379B2

  • Apparatus for calculating local area governor free contribution

    KR1020240123786A

  • Apparatus for calculating local area governor free contribution using phase measurement

    KR1020240123788A