System and method for synthetic image generation using localized editing - Patents.com
The system addresses the lack of local customization in GANs by using feature vectors and clustering to transfer semantic elements from a source to a target image, achieving precise and efficient image synthesis without complex spatial operations.
Patent Information
- Application Number
- JP2020208781
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-01-08
- Filing Date
- 2020-12-16
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-12-16
AI Technical Summary
Existing generative adversarial networks (GANs) lack the capability for efficient local customization and semantic editing of synthetic images, often relying on complex spatial operations and external supervision.
A system that utilizes feature vectors and clustering techniques to perform localized semantic editing by transferring the style of semantic elements from a source image to a target image using augmented GANs like StyleGAN, without requiring explicit spatial processing or external supervision.
Enables seamless and localized editing of synthetic images by transferring specific image segments, such as eyes or windows, from one image to another, enhancing the precision and efficiency of image synthesis.
Smart Images

Figure 0007554657000012 
Figure 0007554657000017 
Figure 0007554657000015
Abstract
Description
[Technical field]
[0001] The present disclosure relates generally to the field of artificial intelligence (AI), and more specifically, to a system and method for generating synthetic images with localized customization using an augmented generative adversarial network (GAN) incorporating semantic information. [Background technology]
[0002] The exponential development of AI-based techniques such as neural networks has led to their widespread use as a medium for generating synthetic data for use in a variety of applications. In recent years, generative adversarial networks (GANs) have become increasingly popular as a means of generating synthetic data, such as synthetic, but realistic, images. To do this, GANs typically include a generator neural network (referred to as the generator) and a discriminator neural network (referred to as the discriminator).
[0003] The generator can generate synthetic image samples as output. The generator can attempt to improve the quality of the synthetic image samples by "convincing" the classifier that these images are real images. The classifier is tasked with distinguishing between real image samples and the generated synthetic image samples. The classifier determines whether the image is real in its entirety. As a result, over multiple iterations, the generator learns to generate synthetic images that incorporate the statistical properties of real images.
[0004] GANs can also be used for semantic image editing. For example, a GAN can learn a manifold for natural images in a GAN-facilitated latent space and perform semantic edits that cross or lie close to this manifold. A GAN can use an autoencoder to separate an image into semantic subspaces and reconstruct the image to facilitate semantic editing along the individual subspaces. Separation indicates that attributes of a subject that can be considered as semantically meaningful elements of an image can be manipulated independently of other attributes. Such a GAN can perform several edits that represent changes in color, lighting, pose, facial expression, age, hair appearance, glasses, and headwear.
[0005] While GANs bring many desirable features to synthetic image generation, several issues remain unresolved to facilitate localized customization of the synthetic image generation process. Summary of the Invention
[0006] The embodiments described herein provide a system for generating a synthetic image using localized editing. During operation, the system obtains a source image and a target image for image synthesis, and extracts respective feature representations from the source image and the target image. The system also selects semantic elements from the source image, which indicate semantically meaningful parts of an object depicted in the source image. The system then determines style information associated with the source image and the target image. Subsequently, based on the feature representations, the style of the semantic elements is transferred from the source image to the target image to generate the synthetic image. In this manner, the system can facilitate localized editing of the target image.
[0007] In a variation of this embodiment, the system obtains the strength of style transfer of the semantic element and transfers the style of the semantic element based on the strength.
[0008] In a variation of this embodiment, the synthetic images are generated by a generative adversarial network (GAN), such as StyleGAN.
[0009] In a variation of this embodiment, the system obtains a feature vector as a feature representation associated with the source image and the target image, and then generates a set of clusters based on the feature vector, each of which corresponds to a semantic element of the source image.
[0010] In a further variation, the set of clusters is generated based on one or more of K-means clustering, spherical K-means clustering, and non-negative matrix factorization.
[0011] In a further variation, the source and target images are synthetic images generated by StyleGAN. The feature vectors can then correspond to embeddings of one or more hidden layers of StyleGAN.
[0012] In a variation of this embodiment, the source image and the target image are natural images. The system then converts the source image and the target image into their respective StyleGAN representations.
[0013] In a variation of this embodiment, transferring the semantic elements also includes suppressing the transfer of styles outside of the semantic elements from the original image.
[0014] In a variation of this embodiment, transferring the style of the semantic element also includes performing style interpolation between the source image and the target image based on a localized condition matrix associated with the semantic element.
[0015] In a variation of this embodiment, the system presents a user interface that can obtain user input for selecting a semantic element from the original image, the user interface can obtain the user input based on one or more of a selection of a spatial location of the semantic element on the original image and a selection from a catalog of semantic elements.
[0016] In a variation of this embodiment, the system can perform localized editing in the absence of (i) explicit or external spatially localized manipulation and (ii) external forms of oversight. [Brief description of the drawings]
[0017] [Figure 1A] 1 illustrates an exemplary synthetic image generation system that enables localized customization, according to an embodiment of the present application.
[0018] [Figure 1B] 1 illustrates an exemplary local edit for a synthetic image generation process according to an embodiment of the present application.
[0019] [Diagram 2] 1 illustrates exemplary clusters representing semantically meaningful elements of an image according to one embodiment of the present application.
[0020] [Diagram 3] 1 illustrates an exemplary augmented GAN for generating synthetic images with localized editing, according to an embodiment of the present application.
[0021] [Figure 4A] 1 illustrates an exemplary composite image generated based on localized editing according to an embodiment of the present application.
[0022] [Figure 4B] 1 illustrates an exemplary image difference illustrating edit localization according to an embodiment of the present application.
[0023] [Figure 5A]1 shows a flowchart of a method for clustering image features of a synthetic image generation system representing semantic elements in an image according to an embodiment of the present application.
[0024] [Figure 5B] 1 illustrates a flowchart of a method for a synthetic image generation system for generating a synthetic image using localized editing according to an embodiment of the present application.
[0025] [Figure 6] 1 illustrates a flowchart of a method for a user interface of a synthetic image generation system that facilitates synthetic image generation with localized editing, according to an embodiment of the present application.
[0026] [Figure 7] 1 illustrates an exemplary computer system that facilitates composite image generation using localized editing, according to an embodiment of the present application.
[0027] [Figure 8] 1 illustrates an exemplary apparatus that facilitates composite image generation using localized editing, in accordance with an embodiment of the present application.
[0028] In the drawings, like reference numbers refer to like graphical elements. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0029] The following description is presented to enable any person skilled in the art to make and use the embodiments, and is provided in the context of a particular application and its requirements. Various modifications to the disclosed embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the present disclosure. Thus, the embodiments described herein are not intended to be limited to the embodiments shown, but are to be accorded the widest scope consistent with the principles and features disclosed herein. overview
[0030] The embodiments described herein solve the problem of generating synthetic images with localized editing by (i) determining semantically meaningful segments of an image using feature clustering, and (ii) incorporating feature information associated with the semantically meaningful segments into the image synthesis process. The system may use a generative adversarial network (GAN) to generate the synthetic images.
[0031] Existing techniques may not reveal an accurate model of GAN learning while generating synthetic images. To address this issue, augmented image GANs, such as Progressive Growing GAN (PG-GAN) and StyleGAN, use progressive training to encourage each layer to model the variations exhibited at a given image resolution. Based on progressive training, models of these GAN variations often exhibit decoupled representations of image features. Decoupling may indicate that attributes of interest, such as semantic elements of an image (e.g., eyes on a face, windows in a bedroom), can be manipulated independently of other attributes. However, augmented image GANs do not typically utilize decoupling to facilitate localized editing during image synthesis.
[0032] To solve this problem, the embodiments described herein provide an efficient synthetic image generation system that incorporates localized editing during image synthesis based on separated semantic information. The system can perform spatially localized semantic editing on the output of the GAN. The system can perform editing by transferring information, particularly the style, associated with semantic elements of the source image to the target image. One or both of the source image and the target image may be real or synthetic images (e.g., the output of the GAN). Instead of relying on traditional image morphing methods that require additional datasets and trained networks or complex spatial operations, the system uses feature vectors of the images (e.g., embeddings of neural network layers). As a result, the system can utilize the semantic representations learned by the GAN.
[0033] Unlike existing solutions, the system facilitates a certain form of semantic editing that transfers the style of semantic elements from a source image to a target image. The semantic elements of an image may be image segments that have semantic meaning within the context of that image. For example, eyes, mouth, and nose may be semantic elements in a face image, and a bed, pillow, and window may be semantic elements in an image depicting an indoor living scene. Instead of morphing the entire image, the system receives a pair of images as input parameters, but the system only transfers semantic elements from the source image to the target image while leaving the rest of the target image unchanged. This transfer of semantic elements does not require explicit spatial processing, such as warping and compositing (e.g., as required in face-swapping applications). Furthermore, the system can perform localized editing using inherently isolated structures without external supervision by a pre-trained image segmentation model.
[0034] During operation, the system can obtain feature information of the original image. The feature information can be represented by a feature vector. The system can obtain the feature vector by applying an adversarial AI model (e.g., neural network) on a natural image. On the other hand, if the original image is a synthetic image, the system can obtain embeddings associated with hidden layer activations of the image synthesis process. The system can analyze the feature vector (e.g., activation tensors of adversarial models such as PG-GAN and StyleGAN) and cluster the feature vector by applying a clustering technique (e.g., spherical k-means clustering). The generated clusters can be spatially spread on coherent semantic elements and subelements in the image, such as eyes, nose, and mouth for face images, and bed, pillow, and window for bedroom images.
[0035] In some embodiments, the system may select an original image (e.g., by browsing a local computer system or from a predefined repository) allowing a user to select an original image and a target image. The user may use the interface to select a semantic element on the original image (e.g., using a pointing device or touch screen). The interface may also present a list of semantic elements (e.g., in a drop-down menu) from which the user can select a semantic element. Since a cluster represents a corresponding semantic element in the original image, the system may select a cluster corresponding to the selected semantic element in the original image. The system may use a GAN (e.g., StyleGAN) to synthesize images by transferring the style of the selected semantic element from the original image to the target image based on feature information in the cluster corresponding to the selected semantic element, thereby facilitating local editing in image synthesis. Exemplary System
[0036] FIG. 1A illustrates an exemplary synthetic image generation system that enables localized customization, according to one embodiment of the present application. In this example, an image management environment 100 includes an application server 134 that can host one or more applications that use synthetic images. Such applications include, but are not limited to, visualization of new interior / industrial designs, new designs for apparel and accessories, and scenes in computer games and animations. An image generation server 132 in the environment 100 can generate synthetic images and provide the synthetic images to the application server 134. In some embodiments, the image generation server 132 communicates with the application server 134 over a network 130, which may be a local or wide area network.
[0037] The image generation server 132 can use GANs to generate synthetic images. With existing techniques, it may not be clear what exact model the GAN of the server 132 learns while generating the synthetic image. To address this issue, the server 132 can utilize image augmented GANs such as PG-GAN and StyleGAN, which use progressive training to prompt each layer to model the variations exhibited at a given image resolution. Based on progressive training, the model variations of these GANs often exhibit a separated representation of image features. However, image augmented GANs do not typically utilize separation to facilitate localized editing during image synthesis. As a result, the server 132 may not be able to incorporate local and semantic features of the source image 104 with the target image 102.
[0038] To solve this problem, an efficient synthetic image generation system 110 can incorporate localized editing during image synthesis based on separated semantic information. The system 110 can perform spatially localized semantic editing on the output of the GAN. The system 110 can perform editing by transferring information, particularly styles associated with semantic elements of the source image 104, to the target image 102. One or both of the images 102 and 104 can be real or synthetic images (e.g., the output of a GAN). Instead of relying on traditional image morphing methods that require additional datasets and trained networks or complex spatial operations, the system 110 uses a feature vector of the source image 102. The feature vector allows the system 110 to utilize semantic representations in the source image 104.
[0039] Unlike existing solutions, the system 110 facilitates a certain form of semantic editing that transfers the style of semantic elements from the source image 104 to the target image 102. The semantic elements of the source image 104 may be image segments that have semantic meaning within the context of the source image 104. For example, if the source image 104 is an image of a face, eyes, mouth, and nose, they may be semantic elements of the source image. Similarly, if the source image 104 shows an indoor living scene, a bed, a pillow, and a window may be semantic elements in the source image 104. Even though the system 110 receives a pair of images 102 and 104 instead of the morphing image 102 as input parameters, the system 110 transfers only the semantic elements from the source image 104 to the target image 102 while leaving the rest of the target image 102 unchanged. This transfer of semantic elements does not require explicit spatial processing such as warping and compositing. Furthermore, the system 110 can perform localized editing using inherently isolated structures without external supervision through pre-trained image segmentation models.
[0040] The system 110 may include a feature analysis module 112, a semantic analysis module 114, and an augmented GAN 116. During operation, the feature analysis module 112 may obtain feature information of the original image 104. The feature information may be represented by a set of feature vectors 142. The feature analysis module 112 may obtain the feature vectors 142 by applying an adversarial AI model (e.g., a neural network) on the natural image. On the other hand, if the original image 104 is a synthetic image, the feature analysis module 112 may obtain embeddings associated with hidden layer activations of the image synthesis process as the feature vectors 142. The semantic analysis module 114 may analyze the feature vectors 142 (e.g., activation tensors of an adversarial model, such as PG-GAN and StyleGAN), and cluster the feature information in the feature vectors 142 to generate a set of feature clusters 144. In some embodiments, the semantic analysis module 114 may apply a clustering technique, such as spherical k-means clustering, on the feature vectors 142. The generated feature clusters 144 may be spatially spread across coherent semantic elements and sub-elements in the original image 104 .
[0041] In some embodiments, the system 110 can present a user interface 150 with an image selector 152 through which a user can provide user input 160. The user input 160 can be obtained based on a click operation of a pointing device or a touch operation on a touch screen. The user input 160 includes selecting the source image 104 and the target image 102. Using the image selector 152, the user can select the source image 104 and the target image 102 from a local storage device, from a distributed storage device (e.g., from the cloud), or from a predefined repository of the system 110. The user can then use the interface 150 to select a semantic element on the source image 104 as part of the user input 160. The user may click on a particular element of the source image 104 in the user interface 150 to select the spatial location of the semantic element on the source image. Based on the click, the system 110 can determine which semantic element of the source image 104 the user wants to transfer to the target image 102.
[0042] The interface 150 may also present a semantic element selector 154 (e.g., a drop-down menu) that may present a catalog of semantic elements that may be selected from the original image 104. The system 110 may determine the set of semantic elements based on the type of objects shown in the original image 104. In some embodiments, the system 110 may generate the catalog by labeling each cluster of the clusters 144 with a label that has a corresponding semantic meaning and combining the labels into the catalog. The user may select a semantic element from the semantic element selector 154. For example, if the original image 104 is an image of a face, the corresponding catalog may include eyes, nose, mouth, and hair as semantic elements of the original image 104. The semantic element selector 154 may then list eyes, nose, mouth, and hair as elements that may be selected from the original image 104.
[0043] The interface 150 may also include an intensity selector 156, which may be a slide bar, indicating the degree or strength of the transfer of the semantic element. The intensity selector 156 may use a scale of 0 to 1, with 0 indicating no change and 1 indicating strong transfer. Upon obtaining user input 160 (e.g., based on user submission via the interface 150), the system 110 may select a cluster from the clusters 144 associated with the selected semantic element of the source image 104. The system 110 may synthesize the output image 106 by transferring the style of the selected semantic element from the source image 104 to the target image 102 using an augmented GAN 116 (e.g., StyleGAN) based on the feature information of the cluster corresponding to the selected semantic element. By localizing the style transfer, the system 110 facilitates localized editing in image synthesis. The system 110 may then display the output image 106 in the interface 150.
[0044] 1B illustrates an exemplary localized edit for a synthetic image generation process according to an embodiment of the present application. Assume that a user input 160 selects a semantic element 172 from an original image 104. If the original image 104 depicts a face, the semantic element 170 may correspond to the eyes of the face. Because the clusters 144 represent corresponding semantic elements such as the eyes, nose, and mouth of the original image 104, the system 110 can select a cluster 174 that corresponds to the semantic element 172 of the original image 104. The system 110 can obtain a selection from the interface 150 (e.g., either by clicking or from a feature catalog) and determine the corresponding cluster 174 within the clusters 144.
[0045] The GAN 116 can synthesize the output image 106 by transferring the style of the selected semantic element 172 from the source image 104 to the target image 102 based on the feature information in the cluster 174 associated with the selected semantic element. The GAN 116 can be trained to synthesize an image by transferring the style from the source image 104 to the target image 102. For example, if the GAN 116 is based on StyleGAN, the generator neural network of the GAN 116 can learn spatially separated representations for the semantic elements of the source image 104. In other words, the latent representations of the GAN 116 spatially separate the semantic elements in the source image 104. As a result, the embeddings corresponding to different elements in the source image 104 represent a clear and consistent feature space. The system 110 can utilize the embeddings of the selected semantic elements to direct style interpolation to the target image 102.
[0046] The system 110 can localize the style transfer to the selected semantic elements 172 of the source image 104 by providing information represented by the clusters 174 (i.e., in the corresponding embeddings). Thus, the synthesis process of the GAN 116 transfers the style primarily represented in the selected regions indicated by the semantic elements 172 of the source image 104 to generate the corresponding synthetic output image 106. The location of the style transfer may depend on the degree to which the semantic elements 172 are separated from other elements in the source image 104. Because the latent representations of the GAN 116 may be significantly separated, the system 110 can facilitate a seamless transition from the unedited elements in the target image 102 to the edited elements in the output image 106. In this example, the eyes of the face depicted in the source image 104 can be seamlessly integrated with the face depicted in the target image 102. In this way, by incorporating localized information during the synthesis process, the system 110 facilitates localized editing in image synthesis without any external supervision or complex spatial manipulation to define the edited regions. Semantic Structure
[0047] 2 illustrates an example cluster representing semantically meaningful elements of an image according to one embodiment of the present application. Deep feature factorization (DFF) shows that the learning of an AI model (e.g., a convolutional neural network (CNN)) can be represented by factorizing a matrix of hidden layer excitations. This factorization can be represented by a set of feature maps. Such factorization shows that an AI model trained for image classification can learn features that act as semantic element detectors for images.
[0048] Similarly, if the original image 104 is a synthetic image generated by the GAN 116, feature analysis module 112, the embeddings learned by the GAN 116 during the image synthesis process can be obtained to demonstrate similar features. The semantic analysis module 114 can cluster the activation vectors of the synthesis process of the image 104 by applying a clustering technique (e.g., spherical k-means clustering) to the activation vectors. The semantic analysis module 114 then generates a semantic representation 210 representing the clusters. In some embodiments, the activation vectors are C-dimensional activation vectors corresponding to the activation tensors at various layers of the generator network of the GAN 116. As shown in the semantic representation 210, the resulting clusters are spatially spread into coherent semantic objects such as eyes, nose, mouth, and chin corresponding to the face depicted in the original image 104. For example, clusters 212 and 214 can correspond to eyes and mouth.
[0049] The semantic representation 210 shows that the generator network of the GAN 116 can learn spatially separated representations for semantic elements of the face depicted in the source image 104. In other words, different semantic elements are embedded in separate coherent feature spaces and can be transferred independently. As a result, if a user wants to transfer the eyes of a face depicted in the source image 104, the system 110 can incorporate the information in the cluster 212 in the synthesis process of the GAN 116. Thus, the eyes of the face depicted in the source image 104 can be seamlessly integrated with the face depicted in the target image. Augmented GAN Architecture
[0050] 3 illustrates an exemplary augmented GAN for generating synthetic images with localized editing, according to an embodiment of the present application. In operation, the GAN 116 (e.g., StyleGAN) randomly samples a latent vector 302, which may be referred to as z, from a sampling space Z. The GAN 116 then transforms z into an intermediate latent vector 308, which may be referred to as w∈W. The GAN 116 may perform a transformation operation based on a normalization operation 304 and a mapping network 306. The generator network of the GAN 116 may be a convolutional neural network that incorporates a fixed input 312 (e.g., a trained fixed image).
[0051] The vector w can be accessed by the generator network via the per-layer formula, y = (y s ,y b )=S(w) (where S can be the learned centripetal transformation, and the two subvectors [y s ,y b ] are used to perform scale and shift operations, respectively. X''∈R (C×H×W) Let x be the feature map generated by the convolution operation at some given layer. Let us assume that x is the styled feature map x for each channel c. c can be generated from X″ and y using an Adaptive Instance Normalization (AdaIN) operation 314, where:
number
number
number
[0052] Using the GAN 116, the system 110 can transfer selected semantic elements from the source image to the target image. (s) and y (t) are two different seeds z that generate the source and target images, respectively. (s) and z (t) For image synthesis, they correspond to two different identities that can vary locally and / or globally. The system 110 computes the style vector y (λ) =y (t) +λ(y (s) -y (t) ) by updating the style vector y (s) andy (t) We can gradually transfer the style from a source image (denoted by “S”) to a target image (denoted by “T”) based on linear interpolation between
[0053] However, such an update operation (s) All style characteristics of y (λ) As a result, y (t) In order to enable selective localized editing, the system 110 performs a matrix transformation: y (λ) =y (t) +Q(y (s) -y (t)) can be used to control style interpolation, where the matrix Q is positive semi-definite and y (λ) The change in y (t) In other words, the matrix Q is chosen to be localized in y (λ) y (s) From (t) The matrix Q is chosen so that it yields a localized style transfer to C , which may be a diagonal matrix that may be referred to as a query matrix. In the example of FIG. 1B, localized semantic editing is performed by interpolation on the query matrix for element-specific elements between the original and target styles (e.g., semantic element 172 representing eyes in original image 104). In contrast, global interpolation transfers the eyes, nose, and mouth from original image 104.
[0054] All variations in the output of the generator network are determined by the changes to the style of each layer. To edit the GAN 116' output, the system 110 manipulates y (or its upstream "ancestors" w or z). Thus, the system 110 determines q such that the dimensions of y are relevant to the selected semantic element and have relatively low relevance to the rest of the elements in the original image. Because the style y is applied globally (e.g., at all spatial locations), all spatial differentiation between elements in the original image is encoded in the normalized feature map X'. x'∈R C Assume that,x,is an embedding that represents a semantic element in the original image.,x,′,can represent a sample drawn from an appropriate spatial,location of,X,′,, the query object (i.e., the selected,semantic element).
[0055] Scale vector y s For x', the entry is y sNote that the entries of q may affect the selected semantic element. Entries of x' with small absolute values may remain small even when scaled, while entries with large absolute values are significantly affected by scaling. Thus, the system 110 scales the vector y to ensure that the entries of q are proportional to |x'|. s Therefore, the system 110 does not need to change the absolute value of x′ and the offset term y s If we determine Q as a diagonal matrix with all zeros in and entries proportional to x, the resulting adjusted interpolation will have a significant effect on the part represented by y. (λ) It can only affect entries in
[0056] In addition, y s To determine which entries in have a unique membership to the semantic element, the system 110 assigns a weight h c In some embodiments, the system 110 may assign a matrix V∈R of K centroids that emerge from spherical k-means clustering. K×C Based on the Hoyer dilution measured over a c The system 110 can determine
number
[0057] Based on the element eigenvector x′ and the size selectivity weightings h, the system 110 calculates the corresponding q c can be determined as minutes
number
number
[0058] 4A shows an exemplary composite image generated based on localized editing according to an embodiment of the present application. In this example, different semantic elements are transferred from source images 402, 404, 406, and 408 to target image 400. Columns 412, 414, and 416 correspond to the transfer of eyes, nose, and mouth from 402, 404, 406, and 408, respectively, to target image 400. Each semantic element is seamlessly transferred to the rest of target image 400 without significant modification. In this way, the localized transfer of semantic elements can facilitate localized editing during image synthesis.
[0059] FIG. 4B illustrates an exemplary image difference between a target image and a corresponding output image showing localization of edits according to one embodiment of the present application. Image differences 452 and 454 show the average pixel-by-pixel image difference calculated over 50,000 pairs of edited and original target images. The edited images are generated based on the local edits. Image differences 452 and 454 show the image difference of images locally edited for eyes and mouth, respectively. Image differences 452 and 454 show that local edits during image synthesis can be effective.
[0060] Localized editing does not require explicit spatial localization operations (e.g., spatial attention or weight maps) in the actual editing process. Moreover, such localized editing does not rely on external forms of supervision (e.g., semantic partial segmentation). Instead, localization is achieved by exploiting the inherent structure of the embeddings of the hidden layers of the augmented GAN, which are naturally aligned with semantic elements of the image. operation
[0061] FIG. 5A presents a flowchart 500 illustrating a method for clustering image features of a synthetic image generation system that represents semantic elements in an image, according to one embodiment of the present application. During operation, the system determines (i.e., receives) a source image and a target image (operation 502). The system then obtains a respective set of feature vectors for the source image and the target image (operation 504). In some embodiments, the feature vectors are embeddings (e.g., activations) of a hidden layer of a GAN. The system then clusters the feature vectors using a clustering technique (operation 506). If the system uses k-means clustering, the system can generate k clusters (or centroids). The system then determines a semantic definition associated with each cluster (operation 508). A user can label each cluster to facilitate the semantic definition of the cluster.
[0062] FIG. 5B shows a flowchart 550 of a method of a synthetic image generation system for generating a synthetic image with localized editing according to one embodiment of the present application. During operation, the system obtains a source image and a target image (operation 552) and obtains a selection of semantic elements in the source image (operation 554). The system then determines a localized semantic space for style transfer corresponding to the selected semantic element (operation 556). The system then determines style transfer information associated with the determined semantic space represented by the corresponding cluster (operation 558). The system then generates a synthetic output image with localized editing from the source image and the target image based on the style transfer information (operation 560). In the example of FIG. 3, the style transfer information is:
number
[0063] FIG. 6 illustrates a flow chart 600 of a method of a user interface of a synthetic image generation system facilitating synthetic image generation with localized editing according to an embodiment of the present application. During operation, the interface presents upload options for each of a target image and a source image (ACT 602). The interface then determines semantic elements in the source image (ACT 604). The interface may use a pre-populated catalog of semantic elements for the image type of the source image. The interface then presents respective options for selecting semantic elements for style transfer, and strength of style transfer (ACT 606). The interface then obtains user input selecting semantic elements and strength of style transfer (ACT 608) and obtains an instruction (e.g., submit) to initiate image synthesis (ACT 610). Exemplary Computer Systems and Devices
[0064] 7 illustrates an exemplary computer system that facilitates synthetic image generation based on semantic information, according to an embodiment of the present application. The computer system 700 includes a processor 702, a memory device 704, and a storage device 708. The memory device 704 may include a volatile memory device (e.g., a dual in-line memory module (DIMM)). Additionally, the computer system 700 may be coupled to a display device 710, a keyboard 712, and a pointing device 714. The storage device 708 may store an operating system 716, a synthetic image generation system 718, and data 736. The synthetic image generation system 718 may incorporate the operations of the system 110.
[0065] The synthetic image generation system 718 may include instructions that, when executed by the computer system 700, cause the computer system 700 to perform the methods and / or processes described herein. In particular, the synthetic image generation system 718 may include instructions for providing a user interface that allows a user to select source and target images, as well as semantic elements within the source image (user interface module 720). The synthetic image generation system 718 may also include instructions for determining feature vectors associated with the source and / or target images (feature analysis module 722). Additionally, the synthetic image generation system 718 includes instructions for clustering the feature vectors using a clustering technique and assigning a semantic label to each cluster (semantic analysis module 724).
[0066] The synthetic image generation system 718 may also include instructions for generating a synthetic output image based on the source image and the target image with localized edits associated with selected semantic elements (image generation module 726). The synthetic image generation system 718 may further include instructions for sending and receiving messages (communication module 728). The data 736 may include any data that may facilitate the operation of one or more of the feature analysis module 112, the semantic analysis module 114, and the augmented GAN 116. The data 736 may include one or more of image samples, feature vectors, clusters of feature vectors, associations between clusters and corresponding semantic elements, a query matrix, and a synthetic output image.
[0067] FIG. 8 illustrates an exemplary apparatus for facilitating semantic information-based synthetic image generation according to an embodiment of the present application. The synthetic image generation apparatus 800 may comprise multiple units or devices that may communicate with each other via wired, wireless, quantum optical, or electrical communication channels. The apparatus 800 may be implemented using one or more integrated circuits and may include fewer or more units or devices than those illustrated in FIG. 8. Furthermore, the apparatus 800 may be integrated into a computer system or implemented as a separate device capable of communicating with other computer systems and / or devices. In particular, the apparatus 800 may comprise units 802-810 that perform functions or operations similar to the modules 720-728 of the computer system 700 of FIG. 7, including a user interface unit 802; a feature analysis unit 804; a semantic analysis unit 806; an image generation unit 808; and a communication unit 810.
[0068] The data structures and code described in the Detailed Description of the Invention are typically stored on a computer-readable storage medium, which may be any device or medium capable of storing code and / or data for use by a computer system. Computer-readable storage media include, but are not limited to, volatile memory, non-volatile memory, disks, magnetic tapes, magnetic and optical storage devices such as compact discs (CDs), digital versatile discs (DVDs), or digital video discs (DVDs), or other media capable of storing computer-readable media now known or later developed.
[0069] The methods and processes described in the Detailed Description section may be embodied as code and / or data that may be stored in a computer-readable storage medium as discussed above. When a computer system reads and executes the code and / or data stored on a computer-readable storage medium, the computer system performs the methods and processes embodied as data structures and code stored in the computer-readable storage medium.
[0070] Additionally, the methods and processes described above may be included in a hardware module, which may include, but is not limited to, an application-specific integrated circuit (ASIC) chip, a field-programmable gate array (FPGA), and other programmable logic devices now known or later developed. When a hardware module is activated, the hardware module executes the methods and processes included within the hardware module.
[0071] The foregoing embodiments described herein have been presented for purposes of illustration and description only. They are not intended to be exhaustive or to limit the embodiments described herein to the precise forms disclosed. Thus, many modifications and variations will be apparent to one of ordinary skill in the art. In addition, the above disclosure is not intended to limit the embodiments described herein. The scope of the embodiments described herein is defined by the appended claims.
Claims
1. 1. A method for generating a composite image using localized editing, comprising: Obtaining a source image and a target image as inputs for image synthesis; extracting respective feature vectors from the source image and the target image by applying a first artificial intelligence (AI) model; selecting semantic elements from the original image, the semantic elements indicating semantically meaningful parts of objects depicted in the original image; determining respective style information associated with the source image and the target image; determining a style for the semantic element from the style information local to the semantic element; and generating a synthetic image using a second AI model by transferring the style of selected semantic elements from the source image to the target image based on the feature vector, thereby facilitating localized editing of the target image.
2. obtaining a strength of the transfer of the style of the semantic element; The method of claim 1 , further comprising: transferring the style of the semantic element based on the strength.
3. 2. The method of claim 1 , wherein the second AI model comprises a generative adversarial network (GAN), the GAN comprising a StyleGAN.
4. Obtaining corresponding embeddings from one or more layers of the first AI model for the feature vectors associated with the source image and the target image; The method of claim 1 , further comprising: generating a set of clusters based on the feature vector, each cluster corresponding to a semantic element of the original image.
5. The method of claim 4 , wherein the set of clusters is generated based on one or more of K-means clustering, spherical K-means clustering, and non-negative matrix factorization.
6. 2. The method of claim 1, wherein the first AI model includes a StyleGAN, the source image and the target image are synthetic images generated by the StyleGAN, and the feature vector corresponds to embeddings of one or more hidden layers of the StyleGAN.
7. the source image and the target image are natural images, The method of claim 1 , further comprising converting the source image and the target image into respective StyleGAN representations.
8. The method of claim 1 , wherein transferring the semantic elements further comprises suppressing transfer of styles outside of the semantic elements from the source image.
9. The method of claim 1 , wherein transferring the style of the semantic element further comprises performing style interpolation between the source image and the target image based on a localized condition matrix associated with the semantic element.
10. 2. The method of claim 1, further comprising presenting a user interface capable of obtaining user input for selecting the semantic element from the original image, the user interface being configured to obtain the user input based on one or more of a selection of a spatial location of the semantic element on the original image and a selection from a catalog of the semantic element.
11. A non-transitory computer-readable storage medium storing instructions that, when executed by a computer, cause the computer to perform a method for generating a semantic image with localized editing, the method comprising: Obtaining a source image and a target image as inputs for image synthesis; extracting respective feature vectors from the source image and the target image by applying a first artificial intelligence (AI) model; selecting semantic elements from the original image, the semantic elements indicating semantically meaningful parts of objects depicted in the original image; determining respective style information associated with the source image and the target image; determining a style for the semantic element from the style information local to the semantic element; and generating a synthetic image by transferring the style of the selected semantic elements from the source image to the target image based on a feature vector using a second AI model, thereby facilitating localized editing of the target image.
12. The method further comprising: obtaining a strength of the transfer of the style of the semantic element; The computer-readable storage medium of claim 11 , further comprising: transferring the style of the semantic element based on the strength.
13. 12. The computer-readable storage medium of claim 11, wherein the second AI model comprises a generative adversarial network (GAN), the GAN comprising a StyleGAN.
14. The method further comprising: Obtaining corresponding embeddings from one or more layers of the first AI model for the feature vectors associated with the source image and the target image; The computer-readable storage medium of claim 11 , further comprising: generating a set of clusters based on the feature vector, each cluster corresponding to a semantic element of the original image.
15. 15. The computer-readable storage medium of claim 14, wherein the set of clusters is generated based on one or more of K-means clustering, spherical K-means clustering, and non-negative matrix factorization.
16. 12. The computer-readable storage medium of claim 11, wherein the first AI model includes a StyleGAN, the source image and the target image are synthetic images generated by the StyleGAN, and the feature vector corresponds to embeddings of one or more hidden layers of the StyleGAN.
17. the source image and the target image are natural images, The computer-readable storage medium of claim 14 , wherein the method further comprises converting the source image and the target image into respective StyleGAN representations.
18. The computer-readable storage medium of claim 11 , wherein transferring the semantic elements further comprises suppressing transfer of a style outside of the semantic elements from the source image.
19. 12. The computer-readable storage medium of claim 11, wherein transferring the style of the semantic element further comprises performing style interpolation between the source image and the target image based on a localized condition matrix associated with the semantic element.
20. 12. The computer-readable storage medium of claim 11, wherein the method further includes presenting a user interface capable of obtaining user input for selecting the semantic element from the original image, the user interface being configured to obtain the user input based on one or more of a selection of a spatial location of the semantic element on the original image and a selection from a catalog of semantic elements.
Citation Information
Patent Citations
Image generation method, image generation apparatus, image generation system and program
WO2019118990A1
