Generating structured documents from textual cues
Generating structured documents by generating neural networks and decoders solves the problem that the output of image generation models is inconvenient for editing, and achieves a fast and convenient document editing process.
Patent Information
- Application Number
- CN202410134859.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-14
- Filing Date
- 2024-01-31
- Publication Date
- 2024-10-18
AI Technical Summary
When existing image generation models generate images, different aspects or content of the image are not represented in a way that is convenient for editing, resulting in users needing to perform time-consuming and inconvenient pre-processing to prepare the image for editing.
Using a document processing device based on user prompts, by generating a neural network and a decoder, a structured document is generated, including multiple document resources and metadata describing the relationship between document resources, and a coherent structured document is directly created instead of simply images, thereby simplifying the editing process.
Users can edit the generated structured documents faster and easier without additional pre-processing, and can be directly imported into the image editor for editing, which improves document editing efficiency.
Smart Images

Figure CN118798135A_ABST
Abstract
Description
Background Art
[0001] The following relates generally to machine learning, and more specifically to machine learning for document processing.
[0002] Digital document editing (or document processing) refers to the process of making changes to digital documents using computers or other electronic devices. This may include adding, deleting, or modifying text, images, and other content in a document. Various applications or tools can support different functions for creating and editing documents, and these tools can be used to create and edit a wide variety of documents. In addition, digital documents can be used for a wide variety of communication tasks, including the reproduction of formal documents, communication through online advertisements, social media posts, flyers, posters, billboards, web and mobile application prototypes, etc. Summary of the invention
[0003] The present disclosure describes systems and methods for document processing. Embodiments of the present disclosure include a document processing device configured to generate a structured document (e.g., a Photoshop document (PSD), a portable document format (PDF) document, etc.) based on a prompt from a user. The document processing device can generate a text embedding based on the prompt, generate a latent vector based on the text embedding, and decode the latent vector to obtain a plurality of document assets (e.g., image assets) for the structured document. The document processing device can then create a structured document by combining the document assets (e.g., into different layers, such as a background layer and a foreground layer). Therefore, the document processing device can be used to create a coherent structured document (e.g., instead of a simple image).
[0004] Methods, apparatus, non-transitory computer-readable media, and systems for machine learning for document processing are described. One or more aspects of the method, apparatus, non-transitory computer-readable media, and system include: obtaining a prompt including a document description describing a plurality of elements; using a generative neural network, generating a plurality of image resources based on the prompt, wherein the plurality of image resources correspond to the plurality of elements of the document description; and generating a structured document matching the document description, wherein the structured document includes the plurality of image resources and metadata describing the relationship between the plurality of image resources.
[0005] Methods, apparatus, non-transitory computer-readable media, and systems for machine learning for document processing are described. One or more aspects of the method, apparatus, non-transitory computer-readable media, and system include: obtaining training data including a structured document and a document description of the structured document, wherein the structured document includes a plurality of image resources and metadata describing relationships between the plurality of image resources; and using the training data, training a generative neural network, wherein the generative neural network is trained to generate a plurality of image resources based on the document description.
[0006] An apparatus, system, and method for machine learning for document processing are described. One or more aspects of the apparatus, system, and method include: at least one memory component; at least one processing device coupled to the at least one memory component, wherein the processing device is configured to execute instructions stored in the at least one memory component; a generating neural network including parameters stored in the at least one memory component, wherein the generating neural network is configured to generate a plurality of image resources based on a prompt; and a document generator configured to generate a structured document including the plurality of image resources and metadata describing relationships between the plurality of image resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 An example of a document processing system according to aspects of the present disclosure is shown.
[0008] Figure 2 An example of a document processing apparatus according to aspects of the present disclosure is shown.
[0009] Figure 3 An example of a guided latent diffusion model according to aspects of the present disclosure is shown.
[0010] Figure 4 An example of a method for document processing according to aspects of the present disclosure is shown.
[0011] Figure 5 An example of a process for document processing according to aspects of the present disclosure is shown.
[0012] Figure 6 A diffusion process according to aspects of the present disclosure is shown.
[0013] Figure 7 and Figure 8 Examples of methods for machine learning according to aspects of the present disclosure are shown.
[0014] Fig. 9 An example of a method for training a diffusion model according to aspects of the present disclosure is shown.
[0015] Fig.10 An example of a computing device for document processing according to aspects of the present disclosure is shown. DETAILED DESCRIPTION
[0016] The present disclosure describes systems and methods for document processing. Embodiments of the present disclosure include a document processing device configured to generate a structured document (e.g., a Photoshop document (PSD), a portable document format (PDF) document, etc.) based on prompts from a user. The document processing device can generate text embeddings based on the prompts, generate potential vectors based on the text embeddings, and decode the potential vectors to obtain multiple document resources for the structured document. The document processing device can then create a structured document by combining the document resources (e.g., into different layers, such as a background layer and a foreground layer). Therefore, the document processing device can be used to create a coherent structured document (e.g., instead of a simple image).
[0017] Several text-to-image generation models have been introduced that allow for the generation of images based on textual prompts. Some image generation models build on existing models through post-processing, or use existing models as base models for optimization tasks. However, in some examples, images generated using image generation models may be simple. For example, different aspects of an image or different content in an image may not be represented in an image file format (e.g., at least not in a way that is convenient for editing). As a result, users may pre-process these images to prepare them for editing, and such pre-processing may be time consuming and inconvenient.
[0018] Embodiments of the present disclosure include a document processing device configured to generate a structured document based on a prompt from a user. The structured document may include multiple document resources and metadata describing the relationship between the document resources. The document processing device may include a multimodal encoder, a generative neural network, a decoder, and a document generator. The multimodal encoder may obtain a prompt from the user and, based on the prompt, generate a text embedding. The generative neural network may generate a latent vector corresponding to multiple document resources of the structured document based on the text embedding. The decoder may decode the latent vector to obtain the document resource. And the document generator may create a structured document by combining the document resources.
[0019] In some embodiments, a document processing device may be trained using training data including structured documents and user prompts. Each of the structured documents may include multiple document resources and metadata describing the relationships between the document resources. A multimodal encoder of the document processing device may be pre-trained to encode text prompts into text embeddings. A generative neural network of the document processing device may be trained to generate a latent vector representing the document resource based on the text embedding and noise vector corresponding to the document resource. Additionally, a decoder of the document processing device may be trained to decode the latent vector to obtain the document resource (e.g., based on training on an inverse task of encoding the document resource into a latent vector).
[0020] Some embodiments of the present disclosure improve upon conventional document editing platforms by enabling the generation and editing of structured documents (e.g., documents with multiple layers) rather than being limited to simple images. The examples of document processing devices described herein can be used to generate coherent structured documents based on user prompts. Users can edit these documents faster and more easily without having to perform any additional preprocessing (e.g., or with less additional preprocessing). For example, if a document processing device is trained to generate documents in the PSD file format rather than images in another file format, a user may be able to import the generated document into an image editor and begin editing. Reference Figures 1 to 3 Provides details about the architecture of an example document processing device. Figures 4 to 7 Provides sample procedures for document processing. Figure 8 and Fig. 9 An example training process is described.
[0021] Network Architecture
[0022] exist Figures 1 to 3 In the invention, a system for machine learning for document processing is described. The system includes: at least one memory component; at least one processing device coupled to the at least one memory component, wherein the processing device is configured to execute instructions stored in the at least one memory component; a generating neural network including parameters stored in the at least one memory component, wherein the generating neural network is configured to generate an image resource set based on a prompt; and a document generator configured to generate a structured document including the image resource set and metadata describing a relationship between the image resource set.
[0023] In some aspects, the system includes a decoder configured to decode a latent vector generated by a generative neural network to obtain the image resource set. In some aspects, the decoder includes a decoder of a VAE model. In some aspects, the system includes a text encoder configured to encode a prompt to obtain a text embedding, wherein the image resource set is generated based on the text embedding. In some aspects, the text encoder includes a multimodal text encoder configured to encode text and images in a joint embedding space. In some aspects, the generative neural network includes a diffusion model based on a UNet architecture.
[0024] Figure 1 An example of a document processing system 100 according to aspects of the present disclosure is shown. In one aspect, the document processing system 100 includes a user 105, a user device 110, a document processing device 115, a database 120, and a cloud 125. The document processing device 115 is a reference Figure 2 Examples of corresponding elements described, or including references Figure 2Describes aspects of the corresponding elements.
[0025] The user 105 may interact with the document processing software on the user device 110. The user device 110 may communicate with the document processing device 115 via the cloud 125. In some examples, the user 105 may provide a prompt 130 to the document processing device 115 via the user device 110, and the document processing device 115 may generate a structured document 135 based on the prompt 130. The structured document 135 may include multiple document resources and metadata describing the relationships between the document resources. The document processing device 115 may then provide the structured document 135 to the user 105 via the user device 110.
[0026] In some examples, the document processing device 115 may include a server. The server provides one or more functions to users (e.g., user 105) through one or more links in various networks. In some cases, the server includes a single microprocessor board that includes a microprocessor responsible for controlling all aspects of the server. In some cases, the server uses a microprocessor and a protocol to exchange data with other devices / users on one or more networks via the Hypertext Transfer Protocol (HTTP) and the Simple Mail Transfer Protocol (SMTP), but other protocols such as the File Transfer Protocol (FTP) and the Simple Network Management Protocol (SNMP) may also be used. In some cases, the server is configured to send and receive files in the Hypertext Markup Language (HTML) format (e.g., for displaying web pages). In various embodiments, the server includes a general-purpose computing device (e.g., user device 110), a personal computer, a laptop computer, a mainframe computer, a supercomputer, or any other suitable processing device.
[0027] Database 120 is an organized collection of data. For example, database 120 stores data in a specific format called a schema. Database 120 can be constructed as a single database, a distributed database, multiple distributed databases, or an emergency backup database. In some cases, a database controller can manage data storage and processing in the database. In some cases, user 105 interacts with the database controller. In other cases, the database controller can run automatically without user interaction.
[0028] Cloud 125 is a computer network configured to provide on-demand availability of computer system resources (such as data storage and computing power). In some examples, cloud 125 provides resources without active management by user 105. The term "cloud" is sometimes used to describe a data center that is available to many users via the Internet. The functions of some large cloud networks are distributed in multiple locations of central servers. If a server has a direct or close connection to a user, the server is designated as an edge server. In some cases, cloud 125 is limited to a single organization. In other examples, cloud 125 can be used for many organizations. In one example, cloud 125 includes a multi-layer communication network including multiple edge routers and core routers. In another example, cloud 125 is based on a local collection of switches in a single physical location.
[0029] The user device 110 (e.g., computing device) is a personal computer, laptop, mainframe, palmtop, personal assistant, mobile device, or any other suitable processing device. In one aspect, the document processing system 100 includes a user 105, a user device 110, a document processing device 115, a database 120, and a cloud 125. The document processing device 115 is a reference Figure 2 Examples of corresponding elements described, or including references Figure 2 Describes aspects of the corresponding elements.
[0030] Figure 2 An example of a document processing device 200 according to aspects of the present disclosure is shown. In one aspect, the document processing device 200 includes a processor unit 205, a memory unit 210, an I / O module 215, a training component 220, a machine learning model 225, and a document generator 245. The machine learning model 225 includes a text encoder 230, a generative neural network 235, and a decoder 240. The document processing device 200 is a reference Figure 1 Examples of corresponding elements described, or including references Figure 1 Describes aspects of the corresponding elements.
[0031] The processor unit 205 includes a processor. The processor unit 205 is an intelligent hardware device (e.g., a general processing component, a digital signal processor (DSP), a central processing unit (CPU), a graphics processing unit (GPU), a microcontroller, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a programmable logic device, a discrete gate or transistor logic component, a discrete hardware component, or any combination thereof). In some cases, the processor unit 205 is configured to operate a memory array using a memory controller. In other cases, the memory controller is integrated into the processor unit 205. In some cases, the processor unit 205 is configured to execute computer-readable instructions stored in the memory to perform various functions. In some embodiments, the processor unit 205 includes dedicated components for modem processing, baseband processing, digital signal processing, or transmission processing. The processor unit 205 is a reference Fig.10 An example of a processor described herein, or including reference Fig.10 Describes aspects of the processor.
[0032] The memory unit 210 includes a memory including instructions executable by the processor. Examples of the memory unit 210 include random access memory (RAM), read-only memory (ROM), or a hard disk. Examples of the memory unit 210 include solid-state memory and a hard disk drive. In some examples, the memory is used to store computer-readable, computer-executable software including instructions that, when executed, cause the processor to perform the various functions described herein. In some cases, the memory unit 210 includes, among other things, a basic input / output system (BIOS) that controls basic hardware operations or basic software operations, such as interaction with peripheral components or devices. In some cases, a memory controller operates the memory elements. For example, the memory controller may include a row decoder, a column decoder, or both. In some cases, the memory elements within the memory unit 210 store information in the form of logical states. The memory unit 210 is a reference to Fig.10 An example of a memory subsystem described herein, or including reference to Fig.10 Aspects of the memory subsystem are described.
[0033] I / O module 215 (e.g., input / output interface) can include an I / O controller. An I / O controller can manage input and output signals for a device. An I / O controller can also manage peripheral devices that are not integrated into the device. In some cases, an I / O controller can represent a physical connection to an external peripheral device or a port to an external peripheral device. In some cases, an I / O controller can utilize an operating system, such as or another known operating system. In other cases, the I / O controller may represent or interact with a modem, keyboard, mouse, touch screen, or similar device. In some cases, the I / O controller may be implemented as part of the processor. In some cases, a user may interact with the device via the I / O controller or via hardware components controlled by the I / O controller. I / O module 215 is a reference Fig.10 Describes an example of an I / O interface, or includes a reference Fig.10 Describes various aspects of the I / O interface.
[0034] In some examples, the I / O module 215 includes a user interface. The user interface can enable a user to interact with the device. In some embodiments, the user interface can include an audio device such as an external speaker system, an external display device such as a display screen, or an input device (e.g., a remote control device connected to the user interface directly or through an I / O controller module). In some cases, the user interface can be a graphical user interface (GUI). In some examples, the communication interface operates at the boundary between the communication entity and the channel, and can also record and process communications. A communication interface is provided herein to enable a processing system to be coupled to a transceiver (e.g., a transmitter and / or receiver). In some examples, the transceiver is configured to transmit (or send) and receive signals for a communication device via an antenna. The user interface of the I / O module 215 can be a reference Fig.10 Examples of user interface components described, or including references Fig.10 Describes aspects of user interface components.
[0035] In some examples, the document processing device 200 includes a computer-implemented artificial neural network (ANN) to generate classification data for a sample set. ANN is a hardware component or software component that includes many connected nodes (i.e., artificial neurons) that roughly correspond to neurons in the human brain. Each connection, or edge, transmits a signal from one node to another (like a physical synapse in the brain). When a node receives a signal, the node processes the signal and then transmits the processed signal to other connected nodes. In some cases, the signals between nodes include real numbers, and the output of each node is calculated by a function of the sum of its inputs. Each node and edge is associated with one or more node weights that determine how to process and transmit signals.
[0036] In some examples, the document processing device 200 includes a computer-implemented convolutional neural network (CNN). CNN is a class of neural networks commonly used in computer vision or image classification systems. In some cases, CNN can enable digital images to be processed with minimal preprocessing. CNN can be characterized by using convolution (or cross-correlation) hidden layers. These layers apply convolution operations to the input and then signal the results to the next layer. Each convolution node can process data for a limited input field (i.e., receptive field). During the forward pass of the CNN, the filter at each layer can be convolved on the input volume, calculating the dot product between the filter and the input. During the training process, the filters can be modified so that they are activated when detecting specific features in the input.
[0037] In some examples, the document processing device 200 may include a transformer. A transformer or transformer network is a type of neural network model for natural language processing tasks. The transformer network uses an encoder and a decoder to transform one sequence into another sequence. The encoder and decoder include modules that can be stacked on top of each other multiple times. These modules include multi-head attention and feedforward layers. The input and output (target sentence) are first embedded in an n-dimensional space. The position encoding of different words (i.e., giving each word / part in the sequence a relative position because the sequence depends on the order of its elements) is added to the embedding representation (n-dimensional vector) of each word. In some examples, the transformer network includes an attention mechanism, where the attention looks at the input sequence and decides which other parts of the sequence are important at each step. The attention mechanism involves queries, keys, and values represented by Q, K, and V, respectively. Q corresponds to a matrix containing the query (a vector representation of a word in the sequence), K corresponds to all keys (a vector representation of all words in the sequence), and V corresponds to a value, which is also a vector representation of all words in the sequence. For the encoder and decoder, multi-head attention module, V consists of the same word sequence as Q. However, for attention modules that consider encoder and decoder sequences, V is different from the sequence represented by Q. In some cases, the values in V are multiplied by some attention weights a and summed.
[0038] In some examples, decoder 240 is a decoder of a variational autoencoder (VAE) model. VAE is a generative model that uses deep learning to compress and decompress data, usually for the purpose of generating new samples. VAE combines the traditional autoencoder architecture with the mathematical concepts of variational inference. The encoder portion of the VAE absorbs the input data sample and compresses it into a lower-dimensional potential representation (e.g., a potential vector). The decoder portion of the VAE then takes the potential representation and generates a reconstruction of the original data sample. During training, the VAE minimizes the difference between the generated reconstruction and the input sample, while also maximizing the likelihood of the potential representation according to a specified prior distribution. Therefore, VAE can be used to generate new samples similar to the original data, and VAE can improve the performance of the generative model and reduce the dimensionality of the data to make it easier to visualize and understand.
[0039] In some examples, the text encoder 230 is a multilingual, multimodal encoder, such as a contrastive language-image pre-training (CLIP) encoder. CLIP is a neural network-based model trained on a large-scale dataset of images and text (e.g., image descriptions). CLIP uses a technique called contrastive learning to learn the underlying patterns and features of the data. This allows CLIP to understand the relationship between different objects and scenes in an image, and to classify objects and scenes based on the content in the objects and scenes. CLIP is multimodal because it can process and understand multiple types of data inputs, such as text and images. In some examples, CLIP can be fine-tuned for specific tasks, such as identifying specific objects in an image. CLIP's ability to generalize from one task class to another and to fine-tune for new tasks makes it a highly versatile model.
[0040] In some examples, training component 220 is implemented as software stored in a memory and executable by a processor of an independent computing device, as firmware in an independent computing device, as one or more hardware circuits of an independent computing device, or as a combination thereof. In some examples, training component 220 is part of another device other than document processing device 200 and communicates with document processing device 200.
[0041] According to some aspects, the text encoder 230 obtains a prompt for a document description including a set of descriptive elements. According to some aspects, the generative neural network 235 generates a set of image resources based on the prompt, wherein the set of image resources corresponds to the set of elements of the document description. According to some aspects, the document generator 245 generates a structured document matching the document description, wherein the structured document includes the set of image resources and metadata describing the relationship between the set of image resources.
[0042] In some examples, the text encoder 230 encodes the hint to obtain a text embedding, where the set of image resources is generated based on the text embedding.
[0043] In some examples, the generative neural network 235 initializes a noise vector in a latent space representing the document part set. In some examples, the generative neural network 235 generates a latent vector representing the image resource set based on the noise vector. According to some aspects, the decoder 240 decodes the latent vector to obtain a document resource set, wherein the image resource set corresponds to the document part set respectively.
[0044] In some examples, decoder 240 decodes the latent vector to obtain parameters for displaying resources in the image resource set.
[0045] In some aspects, a denoising diffusion implicit model (DDIM) process is used to generate the latent vector.
[0046] In some examples, generative neural network 235 generates additional resources based on the set of image resources provided as input, wherein the structured document includes the additional resources.
[0047] In some examples, text encoder 230 obtains additional prompts, wherein the additional resources are generated based on the additional prompts.
[0048] In some aspects, the set of image assets includes a background image and a foreground image, and wherein the relationship includes a layer ordering of the background image and the foreground image.
[0049] According to some aspects, the training component 220 obtains training data including a structured document and a document description of the structured document, wherein the structured document includes an image resource set and metadata describing the relationship between the image resource sets. In some examples, the training component 220 uses the training data to train the generative neural network 235, wherein the generative neural network 235 is trained to generate the image resource set based on the document description.
[0050] In some examples, the training component 220 generates a set of noise vectors corresponding to the structured document. According to some aspects, the neural network 235 generates a set of prediction vectors corresponding to the noise vector set. In some examples, the training component 220 compares the prediction vector set with the noise vector set, wherein the training is based on the comparison.
[0051] According to some aspects, the machine learning model 225 encodes the set of image resources to obtain latent vectors in a latent space representing the set of document parts, wherein the generative neural network 235 is trained to generate the latent vectors.
[0052] In some examples, training component 220 trains an encoder to encode the set of image resources.
[0053] In some aspects, the generative neural network 235 is trained using a denoised diffusion probabilistic model (DDPM) process.
[0054] According to some aspects, the text encoder 230 encodes the document description to obtain an encoded description, wherein the generative neural network 235 is trained to generate the set of image resources based on the encoded description.
[0055] Figure 3 An example of a guided latent diffusion model 300 according to aspects of the present disclosure is shown. The guided latent diffusion model 300 is a reference Figure 2 An example of generating a neural network 235 as described herein, or including reference Figure 2 Aspects of the described generative neural network 235. The guided latent diffusion model 300 can generate latent vectors representing document resources of a structured document based on prompts from a user.
[0056] Diffusion models are a class of generative neural networks that can be trained to generate new data with features similar to those found in the training data. In particular, diffusion models can be used to generate novel images. Diffusion models can be used for a variety of image generation tasks, including image super-resolution, image generation with perceptual metrics, conditional generation (e.g., generation based on text or other guidance), image inpainting, and image processing.
[0057] Types of diffusion models include DDPM and DDIM. In DDPM, the generation process involves reversing a random Markov diffusion process. On the other hand, DDIM uses a deterministic process so that the same input produces the same output. Diffusion models can also be characterized by whether the noise is added to the image itself or to the image features generated by the encoder (i.e., latent diffusion).
[0058] The diffusion model works by iteratively adding noise to the data during the forward process and then learning to recover the data by denoising the data during the backward process. For example, during training, the guided latent diffusion model 300 can take as input the original image 305 in the pixel space 310 and apply the image encoder 315 to convert the original image 305 into the original image features 320 in the latent space 325. Then, the forward diffusion process 330 gradually adds noise to the original image features 320 to obtain noisy features 335 (also in the latent space 325) at various noise levels.
[0059] Next, the back diffusion process 340 (e.g., U-Net ANN) gradually removes noise from the noisy features 335 at various noise levels to obtain denoised image features 345 in the latent space 325. In some examples, the denoised image features 345 are compared with the original image features 320 at each of the various noise levels, and the parameters of the back diffusion process 340 of the diffusion model are updated based on the comparison. Finally, the image decoder 350 decodes the denoised image features 345 to obtain an output image 355 in the pixel space 310. In some cases, the output image 355 is created at each of the various noise levels. The output image 355 can be compared with the original image 305 to train the back diffusion process 340.
[0060] In some cases, the image encoder 315 and the image decoder 350 are pre-trained before training the back diffusion process 340. In some examples, the image encoder 315 and the image decoder 350 are jointly trained or fine-tuned with the back diffusion process 340.
[0061] The back diffusion process 340 may also be guided based on the textual cue 360, or another guiding cue such as an image, a layout, a segmentation map, etc. The textual cue 360 may be encoded using a text encoder 365 (e.g., a multimodal encoder) to obtain guiding features 370 in a guiding space 375. The guiding features 370 may be combined with the noisy features 335 at one or more layers of the back diffusion process 340 to ensure that the output image 355 includes the content described by the textual cue 360. For example, the guiding features 370 may be combined with the noisy features 335 using a cross-attention block within the back diffusion process 340.
[0062] Document Processing
[0063] exist Figures 4 to 7 In the invention, a method, apparatus, non-transitory computer-readable medium, and system for machine learning for document processing are described. One or more aspects of the method, apparatus, non-transitory computer-readable medium, and system include: obtaining a prompt including a document description describing a plurality of elements; using a generative neural network, based on the prompt, generating a plurality of image resources, wherein the plurality of image resources correspond to the plurality of elements of the document description; and generating a structured document matching the document description, wherein the structured document includes the plurality of image resources and metadata describing the relationship between the plurality of image resources.
[0064] Some examples of the method, apparatus, non-transitory computer-readable medium, and system further include encoding the hint to obtain a text embedding, wherein the plurality of image resources are generated based on the text embedding.
[0065] Some examples of the method, apparatus, non-transitory computer-readable medium, and system further include initializing a noise vector in a latent space representing multiple document parts. Some examples further include using a generative neural network to generate a latent vector representing multiple image resources based on the noise vector. Some examples further include decoding the latent vector to obtain multiple image resources, wherein the multiple image resources correspond to the multiple document parts respectively.
[0066] Some examples of the method, apparatus, non-transitory computer-readable medium, and system also include decoding the latent vector to obtain a parameter for displaying a resource in the plurality of image resources.
[0067] In some aspects, a DDIM process is used to generate the latent vector.
[0068] Some examples of the method, apparatus, non-transitory computer-readable medium, and system also include generating additional resources by providing one or more of the plurality of image resources as input to a generative neural network, wherein the structured document includes the additional resources.
[0069] Some examples of the method, apparatus, non-transitory computer-readable medium, and system further include obtaining an additional prompt, wherein the additional resource is generated based on the additional prompt.
[0070] In some aspects, the plurality of image assets include a background image and a foreground image, and wherein the relationship includes a layer ordering of the background image and the foreground image.
[0071] Figure 4 An example of a method 400 for document processing according to aspects of the present disclosure is shown. In some examples, the operations are performed by a system including a processor that executes a set of codes to control functional elements of a device. Additionally or alternatively, dedicated hardware is used to perform certain processes. Typically, the operations are performed according to the methods and processes described in accordance with aspects of the present disclosure. In some cases, the operations described herein are composed of various sub-steps or are performed in conjunction with other operations.
[0072] At operation 405, a user may generate a prompt for generating a document. The prompt may specify the properties of the document to be generated, and the document processing device may use the prompt to generate the document. In some cases, the operation of this step refers to the following example. Figure 1 Describes the user, or can be referenced by Figure 1 Describes the user execution.
[0073] At operation 410, the user may provide a prompt to the document processing device. In some examples, the user may provide a prompt to the document processing device via the user device. In some cases, the operation of this step refers to the Figure 1 Describes the user, or can be referenced by Figure 1 Describes the user execution.
[0074] At operation 415, the document processing device may generate multiple document resources based on the prompt. For example, the document processing device may initialize a noise vector; generate a latent vector representing the document resource based on the noise vector; and decode the latent vector to obtain the document resource. In some cases, the operation of this step refers to the operation described in reference to Figure 2 The generative neural network and decoder described in , or can be made by reference Figure 2 Described generative neural network and decoder implementation.
[0075] At operation 420, the document processing device may generate a structured document. The structured document may include the document resources generated at operation 415, and may also include metadata describing the relationship between the document resources. In some cases, the operation of this step refers to the example of reference. Figure 2 The document generator described in Figure 2 Describes the documentation generator implementation.
[0076] At operation 425, the document processing device may provide the structured document to the user. In some examples, the document processing device may provide the structured document to the user via a user interface. In some cases, the operation of this step refers to the Figure 1 and Figure 2 The document processing device described herein may be a document processing device as described in reference Figure 1 and Figure 2 The document processing device described is executed.
[0077] Figure 5 An example of a process 500 for document processing according to aspects of the present disclosure is shown. A document processing device may implement process 500 to generate a structured document based on a user prompt. Examples of file formats of structured documents that may be generated by a document processing device include PSD, PDF, and the like. These file formats and other formats may include multiple layers and objects and may be used by designers and artists (e.g., for document creation, document editing, and the like). In some examples, it may be challenging for a user to create a file in these file formats (e.g., by manually masking out objects in a document or performing other pre-processing tasks). Process 500 may support the generation of structured documents in these file formats to reduce the burden on users to create or convert files into these file formats.
[0078] The document processing device implementing process 500 may support a system, method, or technique (e.g., a diffusion method) for automatically generating a structured document (e.g., a PSD document) in an end-to-end manner. Such a system, method, or technique can greatly improve the efficiency of art design and other practices. In some examples, the document processing device can also generate a structured document based on an existing structured document (e.g., using an existing structured document), which may be useful for users of editing software. Structured documents (e.g., PSD) that may be multi-layered in nature may be different from simple images because the resources or content of the document may be more easily accessible (e.g., for users through editing software).
[0079] By directly generating structured documents, users who are unfamiliar with document creation and editing can start using file formats (e.g., PSD, PDF, etc.) that are suitable for document creation and editing (e.g., non-disruptive editing). Therefore, these users can get started more easily. A document processing device that implements process 500 can generate multiple image layers as well as alpha channels, layer masks, fusion methods, etc. Process 500 can also be extended to generate various structured documents, including design templates or design files. In some examples, process 500 can be used in one or more workflows, including synthesis, retouching, etc. Some operations of process 500 can be optimized, and the model that implements process 500 can be converted into other formats for faster execution (e.g., Core ML format, which can run on Metal Performance Shaders (MPS) in 10 seconds on an Apple M1 Max chip).
[0080] exist Figure 5 In the example of FIG. 5 , a document processing device may be trained to generate a document including a foreground image (I ) given a text prompt T (eg, prompt 505) as input. f )、Background Image(I b ), synthetic image (I c ), and an alpha mask (α) of the foreground. In other examples, the document processing device can be trained to generate a structured document 525 including more layers, fewer layers, different layers, or even different parameters (e.g., parameters for displaying resources, such as alpha mask, brightness, etc.). The document processing device can also be trained based on one or more types of user prompts (e.g., prompts specifying layout, image, text, style, color, or body position).
[0081] The document processing device may include a text encoder (e.g., a multimodal text encoder), a generative neural network (e.g., a diffusion model), an autoencoder (e.g., including a decoder), and a document generator. The components of the document processing device can be trained independently or in any combination, so that the document processing device can be used to generate a structured document (e.g., structured document 525) based on a user prompt (e.g., prompt 505) after training. The training data for training the document processing device may include pairs of structured documents and user prompts. The document resources in the structured document 525 can each be represented as an element of a tuple. In some examples, during training, each element of the elements of the tuple can be provided as noise, provided without noise, or provided with some noise. In this way, the training data can be used to guide the document processing device to focus on generating specific document resources.
[0082] The autoencoder can be trained to transform the tuple (I f , I b , I c ,α) is projected into the latent space to produce a latent representation (e.g., feature) z∈R 4×H×W The text encoder can be used to project the text prompt T into an intermediate representation τ θ (T) (e.g., text embedding), this intermediate representation can be fed into a generative neural network (e.g., fed into an intermediate layer of a UNet diffusion module via a criss-cross attention mechanism). The generative neural network can be trained to take the input z at the current time step t , t, and τ θ (T), and predict the noise ∈ added to the current time step θ (z t , t, τ θ (T)). In some examples, the generative neural network can be a diffusion model, and the diffusion model can be trained to follow the workflow of DDPM. The prediction noise ∈ can be penalized by applying the L2 norm according to θ (z t , t, τ θ The difference between (T)) and the ground truth noise ∈:
[0083]
[0084] During inference, a user may provide a prompt 505 to the document processing device, and a text encoder of the document processing device may generate a text embedding 510 based on the prompt 505. The generative neural network may generate a latent vector 515 representing a plurality of document resources based on the text embedding 510, and the decoder may decode the latent vector 515 to obtain a document resource 520. The document generator may then generate a structured document 525 including the document resources 520 and metadata describing the relationship between the document resources 520. In some examples, the document processing device may take the document resources as input in addition to the text prompt for further guiding the generation of the structured document. Each of the document resources may be provided with any amount of noise (e.g., depending on the information available to the user).
[0085] The diffusion model of the present disclosure can follow the workflow of DDIM in the inference phase, which can produce samples with comparable quality to DDPM while using fewer time steps. For example, DDIM can use 20 or 50 time steps and can be 20 or 50 times faster than DDPM. In some examples, the starting noise of the back diffusion process can be sampled as z T ~N(0,1), and from time step T to time step 1, the noise can be sampled as ∈ t ~N(0,1). Then, the denoised latent vector z can be iteratively calculated as follows t-1 :
[0086]
[0087] In Equation 2, σ t It can be a coefficient that controls the diversity of the generated documents (e.g., structured documents 525). Then, z0 can be fed into the bottleneck layer of the pre-trained VAE, which can recover the tuple (I f , I b , I c , α).
[0088] In some examples, a generative neural network for generating a latent representation (e.g., latent vector 515) of a document resource (e.g., document resource 520) may include one or more generative models. In one example, the generative neural network may include a single generative model that may generate a single latent representation of multiple document resources in a latent space. In another example, the generative neural network may include multiple generative models such that at least one document resource may be generated by a different generative model than another document resource. In some examples, one generative model in the generative neural network may be able to identify an internal state of another generative model in the generative neural network. In some examples, the latent space of one document resource may be different from the latent space of another document resource. In some examples, although different document resources may be associated with different latent spaces, the generative neural network may still generate latent representations of multiple document resources in a single latent space.
[0089] Figure 6 600 is shown in accordance with various aspects of the present disclosure. Figure 3 As described, the diffusion model may include a forward diffusion process 605 for adding noise to an image (or a feature in a latent space) and a backward diffusion process 610 for denoising the image (or feature) to obtain a denoised image. The forward diffusion process 605 may be expressed as q(x t |x t-1 ), and the reverse diffusion process 610 can be expressed as p(x t-1 |x t ). In some cases, a forward diffusion process 605 is used during training to generate images with continuously larger noise, and the neural network is trained to perform a backward diffusion process 610 (ie, to continuously remove noise).
[0090] In the example forward process for the latent diffusion model, the model uses a Markov chain to map the observed variable x0 (in pixel space or latent space) and the intermediate variables x1, ..., x T When the latent variable is passed through a neural network such as U-Net, the Markov chain gradually adds Gaussian noise to the data to obtain an approximate posterior q(x 1:T |x0), where x1, ..., x T has the same dimensions as x0.
[0091] The neural network can be trained to perform the reverse process. During the back diffusion process 610, the model is trained from noisy data x such as a noisy image 615. T Start with denoising the data to obtain p(x t-1 |x t). At each step t-1, the back diffusion process 610 transforms the first intermediate image 620 into t Here, t represents the step in the transition sequence associated with different noise levels, and the back diffusion process 610 iteratively outputs x t-1 , such as the second intermediate image 625, until x T is restored back to x0, the original image 630. The reverse process can be expressed as:
[0092] p θ (x t-1 |x t ):=N(x t-1 ;μ θ (x t , t), ∑ θ (x t , t)). (3)
[0093] The joint probability of a sample sequence in a Markov chain can be written as the product of the conditional judgment and the marginal probability:
[0094]
[0095] Where p(x T )=N(x T 0, I) is a pure noise distribution, because the reverse process takes the result of the forward process (a sample of pure noise) as input, and represents a sequence corresponding to the Gaussian transformation of a sequence with Gaussian noise added to the samples.
[0096] At inference time, the observed data x0 in the pixel space can be mapped into the latent space as input, and the generated data As the output, x0 represents the original input image with low image quality, and the latent variables x1, ..., x T represents a noisy image, and Represents a generated image with high image quality.
[0097] Figure 7 An example of a method 700 for machine learning according to aspects of the present disclosure is shown. In some examples, the operations are performed by a system including a processor that executes a set of codes to control functional elements of the device. Additionally or alternatively, dedicated hardware is used to perform certain processes. Typically, the operations are performed according to the methods and processes described in accordance with aspects of the present disclosure. In some cases, the operations described herein are composed of various sub-steps or are performed in conjunction with other operations.
[0098] At operation 705, the system obtains a prompt for a document description including a set of description elements. In some cases, the operation of this step refers to the following example. Figure 2 The text encoder described in Figure 2 Describes the text encoder implementation.
[0099] At operation 710, the system generates a set of image resources based on the prompt using a generative neural network, wherein the set of image resources corresponds to the set of elements described by the document. In some cases, the operation of this step refers to the process described in reference to Figure 2 The generative neural network described in Figure 2 Generative neural network implementation described.
[0100] At operation 715, the system generates a structured document matching the document description, wherein the structured document includes the image resource set and metadata describing the relationship between the image resource set. In some cases, the operation of this step refers to the example of reference Figure 2 The document generator described in Figure 2 Describes the documentation generator implementation.
[0101] train
[0102] In the figure and Fig. 9 In the invention, a method, apparatus, non-transitory computer-readable medium, and system for machine learning for document processing are described. One or more aspects of the method, apparatus, non-transitory computer-readable medium, and system include: obtaining training data including a structured document and a document description of the structured document, wherein the structured document includes a plurality of image resources and metadata describing the relationship between the plurality of image resources; and using the training data, training a generative neural network, wherein the generative neural network is trained to generate a plurality of image resources based on the document description.
[0103] Some examples of the method, apparatus, non-transitory computer-readable medium, and system also include generating a plurality of noise vectors corresponding to the structured document. Some examples also include using a generative neural network to generate a plurality of prediction vectors corresponding to the plurality of noise vectors, respectively. Some examples also include comparing the plurality of prediction vectors to the plurality of noise vectors, wherein the training is based on the comparison.
[0104] Some examples of the method, apparatus, non-transitory computer-readable medium, and system also include encoding the plurality of image resources to obtain a latent vector in a latent space representing the plurality of document portions, wherein a generative neural network is trained to generate the latent vector.
[0105] Some examples of the method, apparatus, non-transitory computer-readable medium, and system also include training an encoder to encode a plurality of image resources.
[0106] In some aspects, the generative neural network is trained using a DDPM process.
[0107] Some examples of the method, apparatus, non-transitory computer-readable medium, and system also include encoding the document description to obtain an encoded description, wherein the generative neural network is trained to generate a plurality of image resources based at least in part on the encoded description.
[0108] Figure 8 An example of a method 800 for machine learning according to aspects of the present disclosure is shown. In some examples, the operations are performed by a system including a processor that executes a set of codes to control functional elements of the device. Additionally or alternatively, dedicated hardware is used to perform certain processes. Typically, the operations are performed according to the methods and processes described in accordance with aspects of the present disclosure. In some cases, the operations described herein are composed of various sub-steps or are performed in conjunction with other operations.
[0109] At operation 805, the system obtains training data including a structured document and a document description of the structured document, wherein the structured document includes a set of image resources and metadata describing the relationship between the set of image resources. In some cases, the operation of this step refers to the example of reference Figure 2 The training components described in Figure 2 Describes the training component execution.
[0110] At operation 810, the system trains a generative neural network using the training data, wherein the generative neural network is trained to generate a set of image resources based on the document description. In some cases, the operation of this step refers to the Figure 2 The training components described in Figure 2 Describes the training component execution.
[0111] Fig. 9 An example of a method 900 for training a diffusion model according to aspects of the present disclosure is shown. The method 900 represents a method for training the diffusion model as described above. Figure 6 In some examples, these operations are performed by a system including a processor that executes a code set to control a device (such as Figure 2 Functional elements of the document processing device described in .
[0112] Additionally or alternatively, dedicated hardware may be used to perform certain processes of method 900. Typically, these operations are performed according to the methods and processes described in accordance with various aspects of the present disclosure. In some cases, the operations described herein are composed of various sub-steps or are performed in conjunction with other operations.
[0113] At operation 905, the user initializes the untrained model. Initialization may include defining the architecture of the model and establishing initial values for model parameters. In some cases, initialization may include defining hyperparameters such as the number of layers, the resolution and channels of each layer block, the location of skip connections, etc.
[0114] At operation 910, the system adds noise to the training image using a forward diffusion process in N stages. In some cases, the forward diffusion process is a fixed process in which Gaussian noise is continuously added to the image. In a latent diffusion model, Gaussian noise can be continuously added to features in the latent space.
[0115] At operation 915, the system predicts an image or image features at each stage n, starting from stage N, using a back diffusion process at stage n-1. For example, the back diffusion process can predict the noise added by the forward diffusion process, and the predicted noise can be removed from the image to obtain a predicted image. In some cases, the original image is predicted at each stage of the training process.
[0116] At operation 920, the system compares the predicted image (or image features) at stage n-1 with the actual image (or image features), such as the image at stage n-1 or the original input image. For example, given observed data x, the diffusion model can be trained so that the negative log-likelihood of the training data -logp θ Minimize the variational upper bound of (x).
[0117] At operation 925, the system updates the parameters of the model based on the comparison. For example, gradient descent can be used to update the parameters of the U-Net. Time-dependent parameters of the Gaussian transformation can also be learned.
[0118] Fig.10 An example of a computing device 1000 for document processing according to aspects of the present disclosure is shown. In one aspect, computing device 1000 includes processor(s) 1005, memory subsystem 1010, communication interface 1015, I / O interface 1020, user interface component(s) 1025, and channel 1030.
[0119] In some embodiments, computing device 1000 is Figure 2 An example of a document processing apparatus 200 including Figure 2Aspects of the document processing apparatus 200 of the present invention. In some embodiments, the computing device 1000 includes one or more processors 1005, which can execute instructions stored in the memory subsystem 1010 to obtain a hint of a document description including a description element set; generate an image resource set based on the hint using a generative neural network, wherein the image resource set corresponds to the element set of the document description; and generate a structured document matching the document description, wherein the structured document includes the image resource set and metadata describing the relationship between the image resource set.
[0120] According to some aspects, computing device 1000 includes one or more processors 1005. In some cases, the processor is an intelligent hardware device (e.g., a general processing component, a digital signal processor (DSP), a central processing unit (CPU), a graphics processing unit (GPU), a microcontroller, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a programmable logic device, a discrete gate or transistor logic component, a discrete hardware component, or a combination thereof. In some cases, the processor is configured to operate a memory array using a memory controller. In other cases, the memory controller is integrated into the processor. In some cases, the processor is configured to execute computer-readable instructions stored in the memory to perform various functions. In some embodiments, the processor includes dedicated components for modem processing, baseband processing, digital signal processing, or transmission processing. Processor 1005 may be Figure 2 An example of a processor unit comprising Figure 2 aspects of the processor unit.
[0121] According to some aspects, the memory subsystem 1010 includes one or more memory devices. Examples of memory devices include random access memory (RAM), read-only memory (ROM), or a hard disk. Examples of memory devices include solid-state memory and hard disk drives. In some examples, the memory is used to store computer-readable, computer-executable software including instructions that, when executed, cause the processor to perform the various functions described herein. In some cases, the memory includes, among other things, a basic input / output system (BIOS), which controls basic hardware operations or basic software operations, such as interaction with peripheral components or devices. In some cases, a memory controller operates memory elements. For example, a memory controller may include a row decoder, a column decoder, or both. In some cases, memory elements within a memory store information in the form of logical states. The memory subsystem 1010 may be Figure 2 An example of a memory cell comprising Figure 2 aspects of a memory cell.
[0122] According to some aspects, the communication interface 1015 operates at the boundary between the communication entities (such as the computing device 1000, one or more user devices, the cloud, and one or more databases) and the channel 1030, and can record and process the communication. In some cases, the communication interface 1015 is provided to enable the processing system to be coupled to a transceiver (e.g., a transmitter and / or a receiver). In some examples, the transceiver is configured to transmit (or send) and receive signals for the communication device via an antenna.
[0123] According to some aspects, I / O interface 1020 is controlled by an I / O controller to manage input signals and output signals for computing device 1000. In some cases, I / O interface 1020 manages peripheral devices that are not integrated into computing device 1000. In some cases, I / O interface 1020 represents a physical connection to or a port to an external peripheral device. In some cases, an I / O controller uses an operating system, such as or other known operating systems. In some cases, an I / O controller represents or interacts with a modem, keyboard, mouse, touch screen, or similar device. In some cases, an I / O controller is implemented as a component of a processor. In some cases, a user interacts with a device via I / O interface 1020 or via a hardware component controlled by an I / O controller. I / O interface 1020 may be a processor. Figure 2 Examples of I / O modules include Figure 2 All aspects of the I / O modules.
[0124] According to some aspects, user interface component 1025 enables a user to interact with computing device 1000. In some cases, user interface component 1025 includes an audio device such as an external speaker system, an external display device such as a display screen, an input device (e.g., a remote control device connected to the user interface directly or through an I / O controller), or a combination thereof. In some cases, user interface component 1025 includes a GUI.
[0125] The descriptions and drawings described herein represent example configurations and do not represent all implementations within the scope of the claims. For example, operations and steps may be rearranged, combined, or otherwise modified. In addition, structures and devices may be represented in the form of block diagrams to indicate the relationships between components and to avoid obscuring the concepts described. Similar components or features may have the same name but may have different reference numerals corresponding to different drawings.
[0126] For those skilled in the art, some modifications to the present disclosure may be clear, and the principles defined herein may be applied to other variations without departing from the scope of the present disclosure. Therefore, the present disclosure is not limited to the examples and designs described herein, but conforms to the broadest scope consistent with the principles and novel features disclosed herein.
[0127] The described method can be implemented or executed by a device including a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. A general-purpose processor can be a microprocessor, a conventional processor, a controller, a microcontroller, or a state machine. The processor can also be implemented as a combination of computing devices (e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, a combination of one or more microprocessors and a DSP core, or any other such configuration). Therefore, the functions described herein can be implemented in hardware or software and can be performed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, these functions can be stored in the form of instructions or codes on a computer-readable medium.
[0128] Computer-readable media include non-transient computer storage media and communication media, including any media that facilitates code or data transmission. Non-transient storage media can be any available media that can be accessed by a computer. For example, non-transient computer-readable media can include random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), compact disk (CD) or other optical disk storage device, magnetic disk storage device, or any other non-transient medium for carrying or storing data or code.
[0129] In addition, the connecting component can be properly referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio or microwave signals are used to transmit code or data from a website, server, or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technology is included in the definition of medium. Combinations of media are also included in the scope of computer-readable media.
[0130] In the present disclosure and the appended claims, the word "or" indicates an inclusive list, so that, for example, a list of X, Y, or Z means X or Y or Z or XY or XZ or YZ or XYZ. The phrase "based on" is also not intended to indicate a closed set of conditions. For example, a step described as "based on condition A" can be based on both condition A and condition B. In other words, the phrase "based on" should be interpreted to mean "based at least in part on." Similarly, the words "a" or "an" indicate "at least one".
Claims
1. A method comprising: Obtaining a hint including a document description describing a plurality of elements; generating, using a generative neural network, a plurality of image resources based on the prompt, wherein the plurality of image resources correspond to the plurality of elements described by the document; as well as A structured document matching the document description is generated, wherein the structured document includes the plurality of image resources and metadata describing the relationship between the plurality of image resources.
2. The method according to claim 1, further comprising: The hint is encoded to obtain a text embedding, wherein the plurality of image resources are generated based on the text embedding.
3. The method according to claim 1, further comprising: Initialize noise vectors in the latent space representing multiple document parts; generating, using the generative neural network, latent vectors representing the plurality of image resources based on the noise vectors; and The latent vector is decoded to obtain the plurality of image resources, wherein the plurality of image resources respectively correspond to the plurality of document parts.
4. The method according to claim 3, further comprising: The latent vector is decoded to obtain parameters for displaying a resource among the plurality of image resources.
5. The method according to claim 3, wherein: The latent vector is generated using a denoising diffusion implicit model (DDIM) process.
6. The method according to claim 1, further comprising: Additional resources are generated by providing one or more of the plurality of image resources as input to the generative neural network, wherein the structured document includes the additional resources.
7. The method according to claim 6, further comprising: An additional hint is obtained, wherein the additional resource is generated based on the additional hint.
8. The method according to claim 1, wherein: The plurality of image resources include a background image and a foreground image, and wherein the relationship includes a layer ordering of the background image and the foreground image.
9. A method comprising: Obtaining training data including a structured document and a document description of the structured document, wherein the structured document includes a plurality of image resources and metadata describing a relationship between the plurality of image resources; as well as A generative neural network is trained using the training data, wherein the generative neural network is trained to generate the plurality of image resources based on the document description.
10. The method according to claim 9, further comprising: generating a plurality of noise vectors corresponding to the structured document; Using the generative neural network to generate a plurality of prediction vectors corresponding to the plurality of noise vectors respectively; as well as The plurality of prediction vectors are compared to the plurality of noise vectors, wherein the training is based on the comparison.
11. The method according to claim 9, further comprising: The plurality of image resources are encoded to obtain latent vectors in a latent space representing a plurality of document portions, wherein the generative neural network is trained to generate the latent vectors.
12. The method according to claim 11, further comprising: An encoder is trained to encode the plurality of image resources.
13. The method of claim 9, wherein: The generative neural network is trained using a denoising diffusion probability model (DDPM) procedure.
14. The method of claim 9, wherein: The document description is encoded to obtain an encoded description, wherein the generative neural network is trained to generate the plurality of image resources based at least in part on the encoded description.
15. A system comprising: at least one memory component; at least one processing device coupled to the at least one memory component, wherein the processing device is configured to execute instructions stored in the at least one memory component; a generative neural network, including parameters stored in the at least one memory component, wherein the generative neural network is configured to generate a plurality of image resources based on a prompt; as well as The document generator is configured to generate a structured document, wherein the structured document includes the plurality of image resources and metadata describing the relationship between the plurality of image resources.
16. The system of claim 15, further comprising: A decoder is configured to decode the latent vector generated by the generative neural network to obtain the plurality of image resources.
17. The system of claim 16, wherein the decoder comprises a decoder of a variational autoencoder (VAE) model.
18. The system of claim 15, further comprising: A text encoder is configured to encode the hint to obtain a text embedding, wherein the plurality of image resources are generated based on the text embedding.
19. The system of claim 18, wherein the text encoder comprises a multimodal text encoder configured to encode text and images in a joint embedding space.
20. The system of claim 18, wherein the generative neural network comprises a diffusion model based on a UNet architecture.
