Machine learning diffusion model with image encoder for synthetic image generation

By using image encoders and text encoders in the machine learning diffusion model to extract visual features from a single user image, the problem of traditional models requiring multiple training images and intensive computing resources is solved, and the effect of quickly generating user synthetic images is achieved.

CN118536616APending Publication Date: 2024-08-23FACE CUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410183811.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-02-21
Filing Date
2024-02-19
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Traditional diffusion models require a large number of training images and are time-consuming and computationally resource-intensive to generate synthetic realistic images of a specific user, and the fine-tuning process is prone to inaccurate visual feature learning due to factors such as illumination and angle.

Method used

Using trained machine learning diffusion models, including image encoder, text encoder and diffusion model, the image encoder directly learns visual features from a single user image and generates an embedding set, the text encoder generates the input feature vector, and the diffusion model generates Synthetic images reduce the number of training images and computational resource consumption.

Benefits of technology

It achieves the generation of synthetic images with visual characteristics similar to those of the user within 2 seconds, reduces computing resource consumption and generation time, and improves user-friendliness and generation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536616A
    Figure CN118536616A
Patent Text Reader

Abstract

The present disclosure provides systems and methods for generating a composite image of a user using a trained machine-learned diffusion model. In one example, a computing system includes one or more processors. The one or more processors are configured to execute the instructions stored in the memory to execute the trained machine learning diffusion model. The machine learning diffusion model comprises an image encoder, a text encoder and a diffusion model. The image encoder is configured to receive an image of a user and to generate an embedded set based at least on the image of the user, the embedded set semantically describing a visual feature of the user. A text encoder is configured to receive the embedded set and generate an input feature vector based at least on the embedded set. The diffusion model is configured to receive an input feature vector and generate a composite image of the user based at least on the input feature vector.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Machine learning generative models can be implemented in a variety of applications, such as image-to-text generation, style transfer, image-to-image translation, and text-to-three-dimensional (3D) object generation. Recent research on text-to-image generation has shown that large generative models, when pre-trained on large datasets, can generate realistic content that closely matches a given text prompt. A subclass of these generative models includes diffusion models that enable more diverse generated content. Summary of the invention

[0002] The present disclosure provides systems and methods for generating a synthetic image of a user using a trained machine learning diffusion model. In one example, a computing system includes one or more processors configured to execute instructions stored in a memory to execute a trained machine learning diffusion model, the machine learning diffusion model including an image encoder, a text encoder, and a diffusion model. The image encoder is configured to receive an image of the user and generate an embedding set based at least on the image of the user, the embedding set semantically describing the visual features of the user. The text encoder is configured to receive the embedding set and generate an input feature vector based at least on the embedding set. The diffusion model is configured to receive an input feature vector and generate a synthetic image of the user based at least on the input feature vector.

[0003] This Summary is provided to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Furthermore, the claimed subject matter is not limited to implementations that solve any or all disadvantages noted in any part of this disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0004] Figure 1 A computing system including a computing device executing a social media application and a server computing system implementing a social networking platform according to an example of the present disclosure is schematically illustrated, either or both of which may be configured to execute a trained machine learning diffusion model to generate a composite image of a user.

[0005] Figure 2 Schematically shows the Figure 1 Data flow for an example inference phase of a trained machine learning diffusion model implemented by a computing system.

[0006] Figure 3 Schematically shows the Figure 1 Figure 2. Data flow during the training phase of an example machine learning diffusion model implemented by a computing system.

[0007] Figures 4A to 4D It shows Figure 1 An example use case in which a computing device of a computing system generates and displays a composite image of a user.

[0008] Figure 5 An example image of a first user and a Figure 1 The computing system's trained machine learning diffusion model generates multiple composite images of the first user based at least on the image of the first user.

[0009] Figure 6 An example image of a second user is shown and Figure 1 The computing system's trained machine learning diffusion model generates multiple composite images of the second user based at least on the image of the second user.

[0010] Figure 7 is a flow chart of an example computer-implemented method for generating a composite image of a user using a trained machine learning diffusion model according to one example of the present disclosure.

[0011] Figure 8 It schematically shows Figure 1 An example computing system environment in which a computing system may be implemented. DETAILED DESCRIPTION

[0012] One type of conventional generative diffusion model is pre-trained on a large number of images and corresponding text data to generate image content based on text input. In order for such conventional diffusion model to generate synthetic realistic images of a specific user, it needs to be fine-tuned using multiple (10 or more) training images of the user. Once such conventional diffusion model is fine-tuned for a specific user, it can generate various synthetic images of synthetic people with similar visual features to the user. The synthetic images can have different artistic styles, and the people depicted in the synthetic images can have different clothes and body postures, depending on, for example, scene words and style words attached with user identifiers as input for controlling the conventional diffusion model. However, the process of fine-tuning such conventional diffusion model has several disadvantages.

[0013] One disadvantage is that ten or more training images of the user are required to fine-tune a conventional diffusion model. Collecting these images is a significant burden on the user. In addition, these training images require specific visual characteristics in order to fine-tune the conventional diffusion model to accurately learn the user's visual features. For example, in order for the conventional model to operate properly, the lighting conditions and the user's facial features in each of the training images need to be the same or similar. If the user's appearance differs significantly between images due to differences in, for example, hairstyle, headwear, glasses, shooting angle, makeup, eyelashes, facial expressions, head pose, etc., the resulting differences in the user's appearance often prevent the conventional diffusion model from accurately learning the user's visual features during the fine-tuning process. In addition, the training images must include a variety of backgrounds and photo angles, and the user must wear different clothes in different training images. If the user wears the same clothes in all training images, the user's identical appearance may cause the previous diffusion model to inaccurately learn that the clothes are included in the user's visual features, which will be used for the generation of the user's synthetic images.

[0014] Another disadvantage of conventional diffusion models is that fine-tuning is a time-consuming and computer resource-intensive process because the fine-tuning process involves retraining the entire diffusion model. In one example, using state-of-the-art computer processing hardware, fine-tuning a prior diffusion model for a specific user requires approximately 10 minutes on state-of-the-art computer hardware to appropriately learn the visual features of the user from multiple training images of the user.

[0015] In order to address these and other shortcomings of traditional diffusion models, the present disclosure provides a system and method for generating a synthetic image of a user using a trained machine learning diffusion model in a less computer resource intensive and faster manner than existing methods including traditional diffusion models. In one example of the present disclosure, the trained machine learning diffusion model includes an image encoder, a text encoder, and a diffusion model. The image encoder is configured to receive an image of the user and generate an embedding set based on at least the image of the user, which semantically describes the visual features of the user. More specifically, the image encoder is pre-trained to project general image information into a latent space rich in semantic information used to control the trained diffusion model. The image encoder is fine-tuned to learn the visual features of the user directly from a single image of the user and project the visual features into the latent space as an embedding set. The text encoder is configured to generate an input feature vector based at least on the embedding set. The input feature vector represents the embedding set in a format that can be consumed by the diffusion model. The diffusion model is configured to generate a synthetic image of the user based at least on the input feature vector. The synthetic image of the user includes the visual features of the user defined by the embedding set generated by the image encoder.

[0016] The trained machine learning diffusion model employs a pre-trained image encoder that is fine-tuned to learn visual features of a specific user directly from a single image of the user. The technical feature of fine-tuning the image encoder in this manner rather than fine-tuning the diffusion model itself provides a technical benefit of reducing the overall time and computer resource consumption used to enable the trained machine learning diffusion model to generate a synthetic image of the user from an input image of the user, relative to previous diffusion models. In one example, using state-of-the-art computer hardware, the trained machine learning diffusion model generates a synthetic image of the user based on an input image of the user in at least 2 seconds, as opposed to 10 minutes required for a previous diffusion model to generate a synthetic image.

[0017] In addition, the image encoder is fine-tuned to extract visual features of the user from a single image of the user, and correspondingly, the trained machine learning diffusion model is configured to generate a composite image from the single image of the user. Relative to existing methods including the above-mentioned traditional diffusion model, this technical feature provides a technical benefit of reducing the amount of training images required to generate a composite image of the user.

[0018] Figure 1 A schematic diagram of an example computing system 10 including a computing device 100 for generating a composite image using a trained machine learning diffusion model is shown. The computing device 100 includes a processor 102 (e.g., a central processing unit or "CPU"), a volatile memory 104, a non-volatile memory 106, an input / output (I / O) module 108, a camera 110, and a display 112. The different components are operably coupled to each other. The non-volatile memory 106 stores instructions for executing a social media application 114.

[0019] The social media application 114 is configured to communicate with a social networking platform 118 executing on a server computing system 120 of the computing system 10 via a computer network 116. The social media application 114 includes a graphical user interface (GUI) 122 that is displayed via the display 112. The GUI 122 facilitates initialization of a composite image generation process, which includes capturing an image 124 of a user (in the form of a video) via the camera 110 using the social media application 114. Figure 1 , referred to as input image 124).

[0020] The social media application 114 can capture the image 124 of the user in any suitable manner. In some implementations, the social media application 114 displays an image capture prompt 126 in the GUI 122. The image capture prompt 126 instructs the user to position at least some portion of the user's body (e.g., face) at a specified location in the field of view of the camera 110. The social media application 114 controls the camera 110 to capture the image 124 of the user based at least on detecting that the user is located at the specified location in the field of view of the camera 110. In some other implementations, the social media application 114 automatically captures the image 124 of the user during normal use of the social media application 114 without explicitly displaying a prompt.

[0021] The trained machine learning diffusion model 128 is configured to receive the image 124 of the user and generate a composite image 130 of the user based on at least the image 124 of the user captured via the camera 110. The composite image 130 includes a character having the same or similar visual features as the user (e.g., the same eye shape, eye color, nose shape, mouth shape, cheekbone shape, skin color, etc.). Optionally, the composite image 130 includes additional stylized visual features. For example, the character may have different clothing, assume different body postures, and / or may be placed in different scenes. Additionally or alternatively, the composite image 130 may have one of a variety of different stylized themes / appearances, such as an oil painting, a pencil drawing, a sepia-toned image, etc. Such visual features are applied to the composite image 130 based on at least one word embedding in the trained machine learning diffusion model 128. The trained machine learning diffusion model 128 is configured to generate the composite image 130 of the user in a more timely manner (e.g., 2 seconds instead of 10 minutes) than previous diffusion models, as will be discussed in further detail herein.

[0022] In some implementations, the trained machine learning diffusion model 128 may be trained to extract visual features of the user's face captured in the user's image 124. In some other implementations, the trained machine learning diffusion model 128 may be trained to extract visual features of at least some or all of the user's body captured in the user's image 124.

[0023] In some implementations, trained machine learning diffusion model 128 may be executed locally on computing device 100. In some other implementations, trained machine learning diffusion model 128′ may be executed on a remote computing system, such as server computing system 120. In one example, computing device 100 sends image 124 of the user to server computing system 120 via computer network 116. Trained machine learning diffusion model 128′ generates composite image 130, and server computing system 120 sends composite image 130 to computing device 100 via computer network 116.

[0024] The social media application 114 is configured to display the user's composite image 130 in the GUI 122 for the user to view. In addition, the social media application 114 is configured to publish or share the user's composite image 130 to the social networking platform 118 for other users of the social networking platform 118 to view.

[0025] In implementations where the composite image 130 is generated on the computing device 100, the computing device 100 sends the composite image 130 to the server computing system 120 via the computer network 116 to be published or shared on the social networking platform 118. In implementations where the composite image 130 is generated on the server computing system 120, the server computing system 120 publishes the composite image 130 directly to the social networking platform 118.

[0026] In some implementations, the social media application 114 may optionally be configured to capture a video stream 132 of the user via the camera 110. The video stream 132 includes a sequence of images of the user. The social media application 114 is configured to display the video stream 132 of the user in the GUI 122 incorporating a composite image 130 of the user. In some examples, the video stream 132 is captured before the composite image 130 is generated, and then the composite image 130 is incorporated into the video stream 132. For example, the composite image 130 may be incorporated into the background of the video stream 132. In some other examples, the video stream 132 is captured after the composite image 130 is generated. For example, the video stream 132 may capture the user's reaction to viewing the composite image 130. The composite image 130 may be incorporated into the video stream 132 in any suitable manner. Additionally, the social media application 114 may optionally accomplish posting the composite image 130 to the social networking platform 118 by posting the user's video stream 132 incorporating the composite image 130 to the social networking platform 118 for viewing by other users of the social network.

[0027] Figure 2 Schematically shows Figure 1The data flow of an example inference phase of a trained machine learning diffusion model 128 (or 128 ′) is shown. The trained machine learning diffusion model 128 includes an image encoder 200 , a text encoder 202 , and a diffusion model 204 .

[0028] The image encoder 200 is configured to receive an image 124 of a user and generate a set of embeddings 206 that semantically describe visual features of the user based at least on the image 124 of the user. The set of embeddings is selected from a dictionary of embeddings within a latent space. Embeddings that are similar to each other are located closer to each other in the latent space. The dimensionality of the latent space is selected to be lower than the dimensionality of the pixel space from which the embeddings are drawn, making the construction of the latent space an example of dimensionality reduction, which can also be viewed as a form of data compression that allows for faster processing of generating a synthetic image 130.

[0029] In one example, the image encoder 200 includes a visual transformer (ViT). The ViT processes the image 124 of the user by segmenting the image 124 into a plurality of smaller two-dimensional image patches. The ViT flattens each image patch into a vector. The ViT generates a sequence of lower-dimensional embedded image patches by mapping the flattened patches to multiple dimensions using a trainable linear projection. The ViT adds positional embeddings to the sequence of lower-dimensional embedded image patches and feeds the sequence as input to a pre-trained transformer encoder to generate an embedding set 206 that semantically describes the visual features of the user based on at least the image 124 of the user.

[0030] ViT is provided as a non-limiting example.In some other implementations, the image encoder may include another type of transformer encoder.

[0031] In some implementations, the image encoder 200 includes a plurality of pre-trained layers 208 (e.g., 14 pre-trained layers) trained for general object recognition. In one example, the plurality of pre-trained layers are from pre-trained contrastive language-image pre-training (CLIP) ViT. In some implementations, the image encoder 200 also includes a plurality of fine-tuned layers 210 (e.g., 8 fine-tuned layers), the plurality of fine-tuned layers 210 being specifically retrained to extract visual features of the user from the user's image 124. In some implementations, the plurality of fine-tuned layers are retrained to extract visual features of the user's face. In some other implementations, the plurality of fine-tuned layers are retrained to extract visual features of the user's body. In some implementations, the image encoder 200 includes a fully connected layer 212 configured to generate an embedding set 206 based at least on the visual features of the user's face extracted by the plurality of fine-tuned layers 210. For example, the fine-tuned layer 210 may extract visual features of the user's face as a set of latent space embeddings, and the fully connected layer 212 may be configured to map the set of latent space embeddings to a set of word embeddings suitable for processing by the text encoder 202. In a specific example, the image encoder 200 is configured to receive a cropped image of a user's face having a resolution of 336×336 pixels and output a set of word embeddings including 4 words, each word embedding having 768 dimensions, which are used to describe the user's facial features.

[0032] In some implementations, the embedding set 206 generated for the user's image 124 is associated with a user identifier 214 that acts as a placeholder in the text description used by the diffusion model 204 to generate the synthetic image 130. At inference time, the user identifier is embedded in different word embeddings or combined with different sentences by the text encoder 202, and the diffusion model 204 synthesizes a character (i.e., a synthetically generated image of a person) having visual features of the user in different contexts based on at least the user identifier and the word embeddings and / or sentences. In other words, when the diffusion model 204 encounters the user identifier 214 at inference time, the diffusion model 204 replaces (i.e., encodes or transforms) the user identifier 214 with the embedding set 206 that semantically describes the user's visual features.

[0033] The text encoder 202 is configured to receive the embedding set 206 (and / or the user identifier 214) and generate an input feature vector 216 based at least on the embedding set 206. The input feature vector 216 represents the embedding set 206 as a column vector in a high-dimensional vector space (e.g., 768 dimensions) in a format suitable for processing by the diffusion model 204.

[0034] In some implementations, the text encoder 202 may receive additional inputs that affect the visual appearance and / or content included in the composite image 130. In some implementations, the trained machine learning diffusion model 128 may include a library 218 of predetermined templates. Each template may include a different combination of embeddings corresponding to different combinations of style and / or scene words used to generate the composite image 130. Non-limiting examples of such descriptive templates include: a digital image of a magical witch with a mysterious light in the background; a portrait of a samurai with a dramatic light and mountain background; an oil painting of a person wearing a hip-hop rap Santa hat; a bust of a doctor wearing a blue scrubs and a white coat; and a sketch portrait of a person's head. The template may include any suitable description of the scene and / or person. The library 218 may include any suitable number of different templates. In some examples, a different template may be selected (e.g., randomly) each time a different composite image is generated by the trained machine learning diffusion model 128. The selected template and embedding set 206 may be provided as an input to the text encoder 202 and the text encoder 202 may generate an input feature vector 216 based at least on the selected template and embedding set 206 .

[0035] In some implementations, the trained machine learning diffusion model 128 can be configured to receive user input text 220 (e.g., via Figure 1 The I / O module 108 shown in FIG. 1 ). The user input text 220 may include style and / or scene words describing visual features that the user desires to be represented in the composite image 130. The user input text and the embedding set 206 may be provided as input to the text encoder 202 and the text encoder 202 may generate an input feature vector 216 based at least on the user input text 220 and the embedding set 206.

[0036] The diffusion model 204 is configured to receive an input feature vector 216 and generate a synthetic image 130 of a user based at least on the input feature vector 216. In one example, the diffusion model 204 is a pre-trained stable diffusion model. The stable diffusion model processes the input feature vector 216 in an iterative manner, starting from a randomly starting array of image information (e.g., a latent array). The stable diffusion model iteratively denoises the random noise from the latent array until a specified number of iterations has been reached. Each iteration operates on the input latent array and generates another latent array based at least on the concept and image information used to train the stable diffusion model together with the attention mechanism, which better resembles the visual information encoded in the input feature vector 216.

[0037] Note that the stable diffusion model is provided as one non-limiting example of a diffusion model. In other examples, the diffusion model may include another type of graphics-to-text generation model based at least on diffusion.

[0038] Since the image encoder 200 is fine-tuned to learn the visual features of the user based on at least the input image 124, the diffusion model 204 does not need to be fine-tuned on the input image 124. Instead, the diffusion model 204 is pre-trained and controlled based on at least the fine-tuned image encoder 200. This technical feature provides a technical benefit of reducing the time and computing resource consumption used to generate the composite image 130 relative to methods that lack a fine-tuned image encoder and instead require the diffusion model to be fine-tuned on multiple input images of the user to generate a composite image of the user.

[0039] Figure 3 The data flow of an example training phase of the machine learning diffusion model 128 is schematically illustrated. A training image set 300 is generated to train the image encoder 200. In some examples, the training image set 300 includes images of faces of different people. In some examples, the training image set 300 includes an open source image set.

[0040] In some implementations, the training image set 300 includes a plurality of synthetic training images 302 generated based at least on an initial training image of the training image set 300. Each of the plurality of synthetic training images 302 is modified relative to the initial training image to generate the synthetic training image by one or more of: rotating, horizontally flipping, and / or cropping the initial training image. Any suitable number of training images in the training image set 300 may be modified in this manner or another to generate the synthetic training images 302. Doing so increases the number and diversity of training images, which improves the generalization and robustness of the image encoder 200. For example, the image encoder 200 may learn facial features by providing such variations from the synthetic training images 302 without being distracted or confused by different facial angles or different facial orientations.

[0041] A certain amount of noise 304 is added to each training image in the training image set 300. In one example, a time T (e.g., 0 to 1000) is randomly selected to add a corresponding degree of noise to the training image set 300. The training image set 300 with the corresponding amount of noise 304 is fed to the image encoder 200 to generate a training embedding set 306 based on at least the training image set 300 and the amount of noise 304. In some examples, the values ​​of the embeddings in the training embedding set 306 output by the image encoder 200 are constrained by the L1-norm to ensure that the training embeddings remain within the word embedding space, which improves the text binding ability of the training output of the image encoder 200.

[0042] In some implementations, the trained image caption model 308 is configured to generate a composite word embedding 310 for each image in the training image set 300. Non-limiting examples of descriptions generated by the image caption model 308 include: a woman in a nice dress; a clean-shaven man; a ninja in the mountains. The image caption model 308 can generate any suitable composite word embeddings to add descriptions to the training images based at least on the embeddings in the dictionary used for the machine learning diffusion model 128. By training the diffusion model 204 with composite word embeddings, the text binding capabilities of the output of the image encoder 200 are enhanced, which in turn enhances the training of the diffusion model 204 to generate composite images with visual features including composite word embeddings.

[0043] The set of training embeddings 306 (and the set of synthetic word embeddings 310 when applicable) is fed to the text encoder 202. The text encoder 202 generates a set of training feature vectors based at least on the set of training embeddings 306 (and the set of synthetic word embeddings 310 when applicable). The set of training feature vectors 312 is fed to the diffusion model 204, and the diffusion model 204 generates a set of predicted synthetic images 314 based at least on the set of training feature vectors 312. The diffusion model 204 compares the set of predicted synthetic images 314 with the original set of training images 300 and a certain amount of noise 304. The diffusion model 204 is trained by iteratively adjusting based at least on minimizing a loss function between each training image and each predicted synthetic image, and the diffusion model 204 learns the difference between each training image 300 and the predicted synthetic image 314.

[0044] In some implementations, different elements of the machine learning diffusion model 128 may be trained together in some stages and separately in other stages. In one example, the text encoder 202 and the diffusion model 204 are trained together for 20,000 iterations. Then, the image encoder 200, the text encoder 202, and the diffusion model 204 are trained together for an additional 50,000 iterations. Different elements of the machine learning diffusion model 128 may be trained together or separately for any suitable number of different iterations. The machine learning diffusion model 128 may be trained in any suitable manner.

[0045] Note that the image encoder 200 is pre-trained during the training phase based on at least the training image set 300. Then, during the inference phase, the image encoder 200 is fine-tuned on the user's input image 124. Other elements of the machine learning diffusion model 128 are pre-trained during the training phase.

[0046] Figures 4A to 4DAn example use case is shown in which a computing device generates and displays a composite image of a user according to the methods described herein. Figure 4A 4, a user 400 holds a computing device in the form of a smart phone 402. Smart phone 402 includes a display 404 and a camera 406 located on the same side of smart phone 402 as display 404. Smart phone 402 executes a social media application configured to communicate with a social networking platform executed on a server computing system via a computer network. The social media application includes a GUI 408 displayed via display 404. The social media application is configured to display a prompt 410 in GUI 408 via display 404. Prompt 410 guides user 400 to position the face of user 400 at a specified location in the field of view of camera 406. In the example shown, prompt 410 includes an ellipse displayed in GUI 408 along with a real-time video stream captured via camera 406. User 400 can use the real-time video stream as visual feedback to adjust the position of the user's head and / or smart phone 402 to align with ellipse 410.

[0047] exist Figure 4B 4, the social media application detects that the user's face 412 is aligned with the oval 410 and captures an input image of the user's face via the camera 406. In the example shown, the social media application captures the input image of the user in an explicit manner. In some other examples, the social media application may be configured to capture the input image of the user via the camera in a more automatic / discrete manner without displaying a prompt.

[0048] exist Figure 4C In the example, a composite image 414 of the user is generated based at least on the captured image of the user's face via a trained machine learning diffusion model and displayed in the GUI 408. In one example, the trained machine learning diffusion model corresponds to Figure 1 and 2 4. In the illustrated example, the composite image 414 depicts a warrior character having similar facial features to the user but with additional face paint and decorated elf ears. Additionally, the background of the composite image 414 includes mountains and dramatic lighting. In some examples, the social networking application posts or shares the user's composite image 414 to the social networking platform for viewing by other users of the social networking platform.

[0049] exist Figure 4D4, the social media application captures a video stream 416 of the user via camera 406 and displays the video stream 416 of the user in GUI 408 via display 404. Video stream 416 incorporates a composite image 414 of the user. For example, video stream 416 can capture the user's reaction to viewing composite image 414. In the example shown, video stream 416 includes the user's face cropped or masked and overlaid on composite image 414. Composite image 414 can be incorporated into video stream 416 in any suitable manner. In addition, the social media application can complete the posting of the composite image to the social media platform by posting or sharing the video stream of the user incorporating the composite image to the social networking platform for viewing by other users of the social networking platform. In some other examples, the social media application displays the composite image 414 in GUI 408 without incorporating the composite image 414 into the video stream.

[0050] Because the trained machine learning diffusion model includes an image encoder that is pre-trained and then fine-tuned on the input image of a specific user, the entire machine learning diffusion model does not have to be fine-tuned as a whole for a specific user in order to generate a synthetic image of the user. Compared to other diffusion models that require overall fine-tuning over a much longer period of time (e.g., 10 minutes or longer) and based on at least more input images (e.g., 10 input images), this technical feature enables the user's synthetic image to be generated much faster (e.g., about 2 seconds or less after the input image is captured). This technical feature provides the following technical benefits: making social media applications more user-friendly and promoting user participation in social media applications to generate different synthetic images of the user and share the user's different synthetic images with other users of the social networking platform.

[0051] Figure 5 and Figure 6 It shows how different input images from different users produce different synthetic images, even though the same word embeddings are used to generate different synthetic images. Figure 5 An example input image 500 of a first user and a plurality of synthetic images 502, 504, 506 of the first user generated by a trained machine learning diffusion model of the present disclosure based at least on the input image 500 of the first user are shown. A first set of synthetic images 502 is generated based at least on the input image 500 and a set of word embeddings that designates a portrait of the first user as a soldier with a mountain background. A second set of synthetic images 504 is generated based at least on the input image 500 and a set of word embeddings that designates an oil painting of the first user wearing a hip-hop rap Santa hat. A third set of synthetic images 506 is generated based at least on the input image 500 and a set of word embeddings that designates a half-length portrait of the first user as a doctor wearing a blue scrubs and a white coat.

[0052] Figure 6An example input image 600 of a second user and a plurality of composite images 602, 604, 606 of the second user generated by a trained machine learning diffusion model of the present disclosure based at least on the input image 600 of the second user are shown. A first set of composite images 602 is generated based at least on the input image 600 and a set of word embeddings that specifies a portrait of the first user as a soldier with a mountain background. The first set of composite images 602 of the second user corresponds to the first set of composite images 502 of the first user, except that the facial features between different users are different. A second set of composite images 604 is generated based at least on the input image 600 and a set of word embeddings that specifies an oil painting of the first user wearing a hip-hop rap Santa hat. The second set of composite images 604 of the second user corresponds to the second set of composite images 504 of the first user, except that the facial features between different users are different. A third set of composite images 606 is generated based at least on the input image 600 and a set of word embeddings that specifies a half-length portrait of the first user as a doctor wearing a blue surgical gown and a white coat. The third set of composite images 606 of the second user corresponds to the third set of composite images 506 of the first user, except that the facial features between different users are different.

[0053] In some implementations, different user identifiers may be generated as placeholders for sets of embeddings that semantically describe facial features of the first and second users determined from different input images. These user identifiers may be combined with other scene words and style words to form descriptive sentences used to generate different composite images.

[0054] Figure 7 is a flow chart of an example computer-implemented method 700 for generating a composite image of a user using a trained machine learning diffusion model. For example, the computer-implemented method 700 may be Figure 1 The computing device 100 shown, Figures 4A to 4D The illustrated smartphone 402 or another computing device may be used for execution.

[0055] At 702 , the computer-implemented method 700 includes receiving an input image of a user at a trained machine learning diffusion model, the machine learning diffusion model comprising an image encoder, a text encoder, and a diffusion model.

[0056] At 704 , the computer-implemented method 700 includes generating, via an image encoder, a set of embeddings based at least on an input image, the set of embeddings semantically describing visual features of a user.

[0057] At 706 , the computer-implemented method 700 includes generating, via a text encoder, an input feature vector based at least on the set of embeddings.

[0058] At 708 , the computer-implemented method 700 includes generating, via a diffusion model, a composite image of the user based at least on the input feature vector.

[0059] In some implementations, at 710 , the computer-implemented method 700 can optionally include posting or sharing the composite image of the user to a social networking platform for viewing by other users of the social networking platform.

[0060] In some implementations, the methods and processes described herein may be bound to a computing system of one or more computing devices. Specifically, such methods and processes may be implemented as computer applications or services, application programming interfaces (APIs), libraries, and / or other computer program products.

[0061] Figure 8 A non-limiting implementation of a computing system 800 that can perform one or more of the above methods and processes is schematically illustrated. The computing system 800 is shown in simplified form. The computing system 800 can embody Figure 1 The computer device 100 shown in Figure 1 The server computing system 120 and / or Figures 4A to 4D 402 is shown in FIG. The computing system 800 may take the form of one or more personal computers, server computers, tablet computers, home entertainment computers, network computing devices, gaming devices, mobile computing devices, mobile communication devices (e.g., smart phones), and / or other computing devices, as well as wearable computing devices (such as smart watches and head-mounted augmented reality devices).

[0062] The computing system 800 includes a logic machine 802 and a storage machine 804. The computing system 800 may optionally include a display subsystem 806, an input subsystem 808, a communication subsystem 810, and / or Figure 8 Other components not shown.

[0063] The logic machine 802 includes one or more physical devices configured to execute instructions. For example, the logic machine 802 can be configured to execute instructions that are part of one or more applications, services, programs, routines, libraries, objects, components, data structures, or other logical constructs. Such instructions can be implemented to perform tasks, implement data types, transform the state of one or more components, implement technical effects, or otherwise achieve desired results.

[0064] The logic machine 802 may include one or more processors configured to execute software instructions. Additionally or alternatively, the logic machine 802 may include one or more hardware or firmware logic machines configured to execute hardware or firmware instructions. The processor of the logic machine 802 may be single-core or multi-core, and the instructions executed thereon may be configured for sequential, parallel and / or distributed processing. The individual components of the logic machine 802 may optionally be distributed in two or more separate devices, which may be remotely located and / or configured for coordinated processing. Various aspects of the logic machine 802 may be virtualized and executed by a remotely accessible networked computing device configured in a cloud computing configuration.

[0065] The storage machine 804 includes one or more physical devices configured to store instructions executable by the logic machine 802 to implement the methods and processes described herein. When such methods and processes are implemented, the state of the storage machine 804 may be transformed—for example, to store different data.

[0066] The storage machine 804 may include removable and / or built-in devices. The storage machine 804 may include optical storage (e.g., CD, DVD, HD-DVD, Blu-ray disc, etc.), semiconductor storage (e.g., RAM, EPROM, EEPROM, etc.), and / or magnetic storage (e.g., hard disk drive, floppy disk drive, tape drive, MRAM, etc.), etc. The storage machine 804 may include volatile, non-volatile, dynamic, static, read / write, read-only, random access, sequential access, location addressable, file addressable, and / or content addressable devices.

[0067] It will be understood that storage 804 comprises one or more physical devices. However, aspects of the instructions described herein may alternatively be propagated over a communication medium (eg, electromagnetic signal, optical signal, etc.) of limited duration that is not held by a physical device.

[0068] Aspects of the logic machine 802 and the storage machine 804 may be integrated together into one or more hardware logic components. Such hardware logic components may include, for example, field programmable gate arrays (FPGAs), program and application specific integrated circuits (PASIC / ASIC), program and application specific standard products (SSP / ASSP), systems on chips (SOCs), and complex programmable logic devices (CPLDs).

[0069] The terms "module," "program," and "engine" may be used to describe an aspect of a computing system 800 that is implemented to perform a particular function. In some cases, a module, program, or engine may be instantiated via the logic machine 802 executing instructions held by the storage machine 804. It will be understood that different modules, programs, and / or engines may be instantiated from the same application, service, code block, object, library, routine, API, function, etc. Likewise, the same module, program, and / or engine may be instantiated by different applications, services, code blocks, objects, routines, APIs, functions, etc. The terms "module," "program," and "engine" may encompass individual executable files, data files, libraries, drivers, scripts, database records, etc., or groups of executable files, data files, libraries, drivers, scripts, database records, etc.

[0070] It will be understood that a "service" as used herein is an application program executable across multiple user sessions. A service is available to one or more system components, programs, and / or other services. In some implementations, a service may run on one or more server computing devices.

[0071] When included, display subsystem 806 can be used to present a visual representation of the data held by storage machine 804. This visual representation can take the form of a graphical user interface (GUI). When the methods and processes described herein change the data held by the storage machine and thus transform the state of storage machine 804, the state of display subsystem 806 can be similarly transformed to visually represent the change of the underlying data. Display subsystem 806 may include one or more display devices utilizing virtually any type of technology. Such a display device can be combined with logic machine 802 and / or storage machine 804 in a shared housing, or such a display device can be a peripheral display device.

[0072] When included, the input subsystem 808 may include or interface with one or more user input devices, such as a keyboard, mouse, touch screen, or game controller. In some implementations, the input subsystem 808 may include or interface with selected natural user input (NUI) components. Such components may be integrated or peripheral, and the transduction and / or processing of input actions may be handled on-board or off-board. Example NUI components may include microphones for speech and / or voice recognition; infrared, color, stereo, and / or depth cameras for machine vision and / or gesture recognition; head trackers, eye trackers, accelerometers, and / or gyroscopes for motion detection and / or intent recognition; and electric field sensing components for assessing brain activity.

[0073] When included, the communication subsystem 810 can be configured to communicatively couple the computing system 800 with one or more other computing devices. The communication subsystem 810 can include wired and / or wireless communication devices compatible with one or more different communication protocols. As non-limiting examples, the communication subsystem 810 can be configured for communication via a wireless telephone network, or a wired or wireless local area network or wide area network. In some implementations, the communication subsystem 810 can allow the computing system 800 to send messages to other devices and / or receive messages from other devices via a network (such as the Internet).

[0074] The following paragraphs provide additional descriptions of the subject matter of the present disclosure. In an example, a computing device includes a camera, a display, one or more processors, the one or more processors configured to execute instructions stored in a memory to: execute a social media application including a graphical user interface (GUI) displayed via the display, the social media application configured to communicate with a social networking platform executed on a server computing system via a computer network, capture an image of a user's face via the camera using the social media application, generate a composite image of the user via a trained machine learning diffusion model based at least on the captured image of the user's face, display the composite image of the user in the GUI, and post the composite image of the user to the social networking platform for viewing by other users of the social networking platform. In this example and / or some other examples, the one or more processors may be configured to execute instructions stored in the memory to: display a prompt in the GUI via the display, the prompt guiding the user to position the user's face at a specified location in the camera's field of view, and an image of the user's face may be captured via the camera based at least on detecting that the user's face is located at the specified location in the camera's field of view. In this example and / or some other examples, one or more processors may be configured to execute instructions stored in a memory to: capture a video stream of a user via a camera, and display the user video stream incorporating a composite image of the user in a GUI via a display, and publishing the composite image may be accomplished by publishing the user's video stream incorporating the composite image to a social networking platform for viewing by other users of the social networking platform. In this example and / or some other examples, the trained machine learning diffusion model may include an image encoder, a text encoder, and a diffusion model, the image encoder may be configured to receive an image of the user's face and generate an embedding set of visual features that semantically describes the user's face based at least on the image of the user's face, the text encoder may be configured to receive the embedding set and generate an input feature vector based at least on the embedding set, and the diffusion model may be configured to receive the input feature vector and generate a composite image of the user based at least on the input feature vector. In this example and / or some other examples, the image encoder may include a plurality of pre-trained layers trained for general object recognition and a plurality of fine-tuned layers retrained to extract visual features of the user's face. In this example and / or some other examples, visual features of a user's face may be extracted as a set of latent space embeddings, and the image encoder may include a fully connected layer configured to map the set of latent space embeddings to a set of word embeddings.In this example and / or some other examples, an image encoder may be trained on a training image set of faces to generate a training embedding set based at least on the training image set of faces, the training embedding set semantically describing visual features of faces in the training image set, a text encoder may be trained on the training embedding set to generate a training feature vector set, and a diffusion model may be trained on the training feature vector set. In this example and / or some other examples, the trained image description model may be configured to generate a synthetic word embedding describing visual features of training images in the training image set, and the diffusion model may be trained based at least on an input feature vector corresponding to the synthetic word embedding for the training image set. In this example and / or some other examples, the training image set may include a plurality of synthetic training images based at least on an initial training image, each of the plurality of synthetic training images may be modified relative to the initial training image by one or more of the following to generate a synthetic training image: rotating, horizontally flipping, and / or cropping the initial training image. In this example and / or some other examples, the embedding set output by the image encoder may be associated with a user identifier, which may be combined with other word embeddings describing the style and / or scene information of the synthetic image of the user. In this example and / or some other examples, the trained machine learning diffusion model may include a library of predetermined templates describing different sets of embeddings of different styles and / or scene information, and the text encoder may be configured to include a template selected from the library and generate an input feature vector based at least on the selected template.

[0075] In another example, a computing system includes one or more processors, the computing system is configured to execute instructions stored in a memory to execute a trained machine learning diffusion model, the machine learning diffusion model includes an image encoder, a text encoder, and a diffusion model, the image encoder is configured to receive an image of a user and generate an embedding set based on at least the image of the user, the embedding set semantically describing the visual features of the user, the text encoder is configured to receive the embedding set and generate an input feature vector based on at least the embedding set, and the diffusion model is configured to receive the input feature vector and generate a synthetic image of the user based on at least the input feature vector. In this example and / or some other examples, the image encoder may include a plurality of pre-trained layers trained for general object recognition and a plurality of fine-tuned layers retrained to extract visual features of the user's face. In this example and / or some other examples, the image encoder may include a fully connected layer, the fully connected layer is configured to generate an embedding set based on at least the visual features of the user's face extracted by the plurality of fine-tuned layers. In this example and / or some other examples, the visual features of the user's face may be extracted as a latent space embedding set, and the fully connected layer may be configured to map the latent space embedding set to a word embedding set. In this example and / or some other examples, an image encoder may be trained on a training image set of faces to generate a training embedding set based at least on the training image set of faces, the training embedding set may semantically describe visual features of faces in the training image set, a text encoder may be trained on the training embedding set to generate a training feature vector set, and a diffusion model may be trained on the training feature vector set. In this example and / or some other examples, the trained image description model may be configured to generate a synthetic word embedding that describes visual features of training images in the training image set, and the diffusion model may be trained based at least on an input feature vector corresponding to the synthetic word embedding for the training image set. In this example and / or some other examples, the training image set may include a plurality of synthetic training images based at least on an initial training image, each of the plurality of synthetic training images may be modified relative to the initial training image to generate a synthetic training image by one or more of: rotating, horizontally flipping, and / or cropping the initial training image. In this example and / or some other examples, the set of embeddings output by the image encoder can be associated with a user identifier, which can be combined with other word embeddings that describe the style and / or scene information of the synthesized image of the user.

[0076] In yet another example, a computer-implemented method includes receiving an input image of a user at a trained machine learning diffusion model, the machine learning diffusion model including an image encoder, a text encoder, and a diffusion model, generating an embedding set via the image encoder based at least on the input image, the embedding set semantically describing visual features of the user, generating an input feature vector via the text encoder based at least on the embedding set, and generating a synthetic image of the user via the diffusion model based at least on the input feature vector.

[0077] It will be appreciated that the configuration and / or method described herein are exemplary in nature, and these specific implementations or examples should not be considered as restrictive, because many variations are possible. The specific routine or method described herein can represent one or more processing strategies in any number of processing strategies. Like this, the various actions shown and / or described can be performed in the order shown and / or described, in other orders, in parallel, or omitted. Equally, the order of the above-mentioned processing can be changed.

[0078] The subject matter of the present disclosure includes all novel and non-obvious combinations and sub-combinations of the various processes, systems and configurations, and other features, functions, acts, and / or properties disclosed herein, as well as any and all equivalents thereof.

Claims

1. A computing device, comprising: camera; monitor; One or more processors configured to execute instructions stored in the memory to: executing a social media application, the social media application comprising a graphical user interface GUI displayed via the display, the social media application being configured to communicate with a social networking platform executed on a server computing system via a computer network; capturing an image of a user's face via the camera using the social media application; generating, via a trained machine learning diffusion model, a composite image of the user based at least on the captured image of the face of the user; displaying the composite image of the user in the GUI; as well as The composite image of the user is published to the social networking platform for viewing by other users of the social networking platform.

2. The computing device of claim 1 , wherein the one or more processors are configured to execute instructions stored in the memory to: A prompt is displayed in the GUI via the display, the prompt guiding the user to position the user's face at a specified location in the field of view of the camera, and wherein the image of the user's face is captured via the camera based at least on detecting that the user's face is located at the specified location in the field of view of the camera.

3. The computing device of claim 1 , wherein the one or more processors are configured to execute instructions stored in the memory to: capturing a video stream of the user via the camera; as well as displaying, via the display, in the GUI, the video stream of the user incorporated into the composite image of the user; The publishing of the composite image is accomplished by publishing the video stream of the user incorporated into the composite image to the social networking platform for other users of the social networking platform to watch.

4. The computing device of claim 1 , wherein the trained machine learning diffusion model comprises an image encoder, a text encoder, and a diffusion model, wherein the image encoder is configured to receive the image of the face of the user and generate a set of embeddings based at least on the image of the face of the user, the set of embeddings semantically describing visual features of the face of the user, wherein the text encoder is configured to receive the embedding set and generate an input feature vector based at least on the embedding set, and The diffusion model is configured to receive the input feature vector and generate the synthetic image of the user based at least on the input feature vector.

5. The computing device of claim 4, wherein the image encoder comprises a plurality of pre-trained layers trained for general object recognition and a plurality of fine-tuned layers retrained to extract visual features of a user's face.

6. The computing device of claim 5 , wherein the visual features of the face of the user are extracted as a set of latent space embeddings, and wherein the image encoder comprises a fully connected layer configured to map the set of latent space embeddings to a set of word embeddings.

7. A computing device according to claim 4, wherein the image encoder is trained on a set of facial training images to generate a set of training embeddings based at least on the set of training images of faces, the set of training embeddings semantically describing visual features of the faces in the set of training images, wherein the text encoder is trained on the set of training embeddings to generate a set of training feature vectors, and wherein the diffusion model is trained on the set of training feature vectors.

8. A computing device according to claim 7, wherein the trained image description model is configured to generate synthetic word embeddings that describe visual features of training images in the training image set, and wherein the diffusion model is trained based on at least an input feature vector corresponding to the synthetic word embedding for the training image set.

9. A computing device according to claim 7, wherein the training image set includes multiple synthetic training images based at least on an initial training image, each of the multiple synthetic training images is modified relative to the initial training image to generate the synthetic training image by one or more of the following: rotating, horizontally flipping, and / or cropping the initial training image.

10. The computing device of claim 4, wherein the set of embeddings output by the image encoder is associated with a user identifier, the user identifier being combinable with other word embeddings describing style and / or scene information of the composite image of the user.

11. A computing device according to claim 4, wherein the trained machine learning diffusion model includes a library of predetermined templates describing different embedding sets of different styles and / or scene information, wherein the text encoder is configured to include a template selected from the library and generate the input feature vector based at least on the selected template.

12. A computing system comprising: one or more processors configured to execute instructions stored in the memory to execute a trained machine learning diffusion model, the trained machine learning diffusion model comprising an image encoder, a text encoder, and a diffusion model, wherein the image encoder is configured to receive an image of a user and generate a set of embeddings based at least on the image of the user, the set of embeddings semantically describing visual features of the user, wherein the text encoder is configured to receive the embedding set and generate an input feature vector based at least on the embedding set, and The diffusion model is configured to receive the input feature vector and generate a synthetic image of the user based at least on the input feature vector.

13. The computing system of claim 12, wherein the image encoder comprises a plurality of pre-trained layers trained for general object recognition and a plurality of fine-tuned layers retrained to extract visual features of a user's face.

14. The computing system of claim 13, wherein the image encoder comprises a fully connected layer configured to generate the set of embeddings based at least on the visual features of the face of the user extracted by the plurality of fine-tuned layers.

15. The computing system of claim 14, wherein the visual features of the face of the user are extracted as a set of latent space embeddings, and wherein the fully connected layer is configured to map the set of latent space embeddings to a set of word embeddings.

16. The computing system of claim 12, wherein the image encoder is trained on a training image set of faces to generate a training embedding set based at least on the training image set of faces, the training embedding set semantically describing visual features of the faces in the training image set, wherein the text encoder is trained on the training embedding set to generate a training feature vector set, and wherein the diffusion model is trained on the training feature vector set.

17. The computing system of claim 16, wherein the trained image description model is configured to generate synthetic word embeddings that describe visual features of training images in the training image set, and wherein the diffusion model is trained based at least on input feature vectors corresponding to the synthetic word embeddings for the training image set.

18. The computing system of claim 16, wherein the training image set comprises a plurality of synthetic training images based at least on an initial training image, each of the plurality of synthetic training images being modified relative to the initial training image to generate the synthetic training image by one or more of: rotating, horizontally flipping, and / or cropping the initial training image.

19. The computing system of claim 12, wherein the set of embeddings output by the image encoder is associated with a user identifier, the user identifier being combinable with other word embeddings describing style and / or scene information of the composite image of the user.

20. A computer-implemented method comprising: Receiving an input image of a user at a trained machine learning diffusion model, wherein the trained machine learning diffusion model includes an image encoder, a text encoder, and a diffusion model; generating, via the image encoder, a set of embeddings based at least on the input image, the set of embeddings semantically describing visual features of the user; generating, via the text encoder, an input feature vector based at least on the set of embeddings; as well as A composite image of the user is generated based at least on the input feature vector via the diffusion model.