Movatterモバイル変換


[0]ホーム

URL:


CN109949213A - Method and apparatus for generating images - Google Patents

Method and apparatus for generating images
Download PDF

Info

Publication number
CN109949213A
CN109949213ACN201910199011.XACN201910199011ACN109949213ACN 109949213 ACN109949213 ACN 109949213ACN 201910199011 ACN201910199011 ACN 201910199011ACN 109949213 ACN109949213 ACN 109949213A
Authority
CN
China
Prior art keywords
image
type information
model
user
face organ
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910199011.XA
Other languages
Chinese (zh)
Other versions
CN109949213B (en
Inventor
田飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Mailai Xiaomeng Network Technology Co.,Ltd.
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co LtdfiledCriticalBeijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910199011.XApriorityCriticalpatent/CN109949213B/en
Publication of CN109949213ApublicationCriticalpatent/CN109949213A/en
Application grantedgrantedCritical
Publication of CN109949213BpublicationCriticalpatent/CN109949213B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Embodiment of the disclosure discloses the method and apparatus for generating image.One specific embodiment of this method includes: the initial pictures for obtaining user's input, and the picture type information that user selectes from predetermined picture type information set, wherein, picture type information in picture type information set generates the image in model set with image trained in advance and generates model one-to-one correspondence, and image generates the target image that model is used to generate the image type of corresponding picture type information characterization;It is generated in model set from image, determines that image corresponding with acquired picture type information generates model;Initial pictures are input to determined image and generate model, generate target image.The embodiment enriches the generating mode of image, can generate different types of image according to the different needs of the user.

Description

Translated fromChinese
用于生成图像的方法和装置Method and apparatus for generating images

技术领域technical field

本公开的实施例涉及计算机技术领域,具体涉及用于生成图像的方法和装置。Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method and apparatus for generating an image.

背景技术Background technique

现有技术中,由于每个用户的需求往往不同,其所喜欢的图像通常也是不同的。然而,一些用户无法自行设计其所满意的图像。可见,现有技术中存在对用户选定的初始图像进行类型变换的需求。In the prior art, since the needs of each user are often different, the images they like are usually different. However, some users cannot design their own images to their satisfaction. It can be seen that in the prior art, there is a need to perform type transformation on the initial image selected by the user.

现有的技术方案通常仅仅是对初始图像进行美颜、滤镜等图像处理。The existing technical solutions usually only perform image processing such as beautifying and filtering on the initial image.

发明内容SUMMARY OF THE INVENTION

本公开提出了用于生成图像的方法和装置。The present disclosure proposes methods and apparatus for generating images.

第一方面,本公开的实施例提供了一种用于生成图像的方法,该方法包括:获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息,其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应,图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像;从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型;将初始图像输入至所确定出的图像生成模型,生成目标图像。In a first aspect, an embodiment of the present disclosure provides a method for generating an image, the method comprising: acquiring an initial image input by a user, and image type information selected by a user from a predetermined set of image type information, wherein , the image type information in the image type information set corresponds to the image generation model in the pre-trained image generation model set, and the image generation model is used to generate the target image of the image type represented by the corresponding image type information; In the collection, an image generation model corresponding to the acquired image type information is determined; an initial image is input into the determined image generation model to generate a target image.

在一些实施例中,对于图像类型信息集合中的图像类型信息,该图像类型信息对应的图像生成模型是通过如下步骤训练得到的:获取训练样本集合,其中,训练样本包括样本初始图像,以及与样本初始图像对应的样本目标图像,样本目标图像为该图像类型信息表征的图像类型的图像;利用机器学习算法,将训练样本集合中的训练样本包括的样本初始图像作为输入,将与输入的样本初始图像对应的样本目标图像作为期望输出,训练得到图像生成模型。In some embodiments, for the image type information in the image type information set, the image generation model corresponding to the image type information is obtained by training through the following steps: acquiring a training sample set, wherein the training samples include sample initial images, and The sample target image corresponding to the sample initial image, the sample target image is the image of the image type represented by the image type information; using the machine learning algorithm, the sample initial image included in the training samples in the training sample set is used as input, and the input sample The sample target image corresponding to the initial image is used as the expected output, and the image generation model is obtained by training.

在一些实施例中,初始图像为面部图像;以及该方法还包括:确定用户输入的初始图像包括的至少一个面部器官图像区域的区域大小;针对至少一个面部器官图像区域的区域大小,响应于确定该面部器官图像区域的区域大小大于等于预先针对该面部器官图像区域确定的大小阈值,对位于该面部器官图像区域的面部器官图像进行形变处理。In some embodiments, the initial image is a facial image; and the method further includes: determining an area size of at least one facial part image area included in the initial image input by the user; for the area size of the at least one facial part image area, in response to determining The area size of the facial part image area is greater than or equal to a size threshold determined in advance for the facial part image area, and deformation processing is performed on the facial part image located in the facial part image area.

在一些实施例中,该方法还包括:获取用户从预先确定的面部器官信息集合中选定的面部器官信息,以及用户从针对面部器官信息集合确定的形变信息集合中选定的形变信息;根据用户选定的面部器官信息和形变信息,从预先训练的面部器官形变模型集合中确定面部器官形变模型;将所生成的目标图像输入至所确定出的面部器官形变模型,得到初始图像的形变后图像。In some embodiments, the method further includes: acquiring facial organ information selected by a user from a predetermined set of facial organ information, and deformation information selected by a user from a set of deformation information determined for the set of facial organ information; The facial organ information and deformation information selected by the user, determine the facial organ deformation model from the pre-trained facial organ deformation model set; input the generated target image into the determined facial organ deformation model, and obtain the deformation of the initial image. image.

在一些实施例中,图像生成模型为生成对抗网络。In some embodiments, the image generation model is a generative adversarial network.

第二方面,本公开的实施例提供了一种用于生成图像的装置,该装置包括:第一获取单元,被配置成获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息,其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应,图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像;第一确定单元,被配置成从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型;生成单元,被配置成将初始图像输入至所确定出的图像生成模型,生成目标图像。In a second aspect, an embodiment of the present disclosure provides an apparatus for generating an image, the apparatus comprising: a first acquiring unit configured to acquire an initial image input by a user, and a user selects an image type information from a predetermined set of image type information. The selected image type information, wherein the image type information in the image type information set corresponds to the image generation model in the pre-trained image generation model set, and the image generation model is used to generate the image type represented by the corresponding image type information the target image; the first determination unit is configured to determine the image generation model corresponding to the acquired image type information from the image generation model set; the generation unit is configured to input the initial image to the determined image generation model model, which generates the target image.

在一些实施例中,其中,对于图像类型信息集合中的图像类型信息,该图像类型信息对应的图像生成模型是通过如下步骤训练得到的:获取训练样本集合,其中,训练样本包括样本初始图像,以及与样本初始图像对应的样本目标图像,样本目标图像为该图像类型信息表征的图像类型的图像;利用机器学习算法,将训练样本集合中的训练样本包括的样本初始图像作为输入,将与输入的样本初始图像对应的样本目标图像作为期望输出,训练得到图像生成模型。In some embodiments, for the image type information in the image type information set, the image generation model corresponding to the image type information is obtained by training through the following steps: acquiring a training sample set, wherein the training samples include sample initial images, and the sample target image corresponding to the sample initial image, the sample target image is the image of the image type represented by the image type information; using the machine learning algorithm, the sample initial image included in the training sample set in the training sample set is used as input, and the input The sample target image corresponding to the sample initial image is taken as the expected output, and the image generation model is obtained by training.

在一些实施例中,初始图像为面部图像;以及该装置还包括:第二确定单元,被配置成确定用户输入的初始图像包括的至少一个面部器官图像区域的区域大小;处理单元,被配置成针对至少一个面部器官图像区域的区域大小,响应于确定该面部器官图像区域的区域大小大于等于预先针对该面部器官图像区域确定的大小阈值,对位于该面部器官图像区域的面部器官图像进行形变处理。In some embodiments, the initial image is a facial image; and the apparatus further includes: a second determining unit configured to determine an area size of at least one facial organ image area included in the initial image input by the user; a processing unit configured to For the area size of at least one facial part image area, in response to determining that the area size of the facial part image area is greater than or equal to a size threshold determined in advance for the facial part image area, perform deformation processing on the facial part image located in the facial part image area .

在一些实施例中,该装置还包括:第二获取单元,被配置成获取用户从预先确定的面部器官信息集合中选定的面部器官信息,以及用户从针对面部器官信息集合确定的形变信息集合中选定的形变信息;第三确定单元,被配置成根据用户选定的面部器官信息和形变信息,从预先训练的面部器官形变模型集合中确定面部器官形变模型;输入单元,被配置成将所生成的目标图像输入至所确定出的面部器官形变模型,得到初始图像的形变后图像。In some embodiments, the apparatus further includes: a second acquisition unit configured to acquire facial part information selected by the user from a predetermined set of facial part information, and a set of deformation information determined by the user from the set of facial part information Deformation information selected in; the third determining unit, configured to determine the facial organ deformation model from the set of pre-trained facial organ deformation models according to the facial organ information and deformation information selected by the user; the input unit is configured to The generated target image is input to the determined facial organ deformation model to obtain the deformed image of the initial image.

在一些实施例中,图像生成模型为生成对抗网络。In some embodiments, the image generation model is a generative adversarial network.

第三方面,本公开的实施例提供了一种用于生成图像的电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当上述一个或多个程序被上述一个或多个处理器执行,使得该一个或多个处理器实现如上述用于生成图像的方法中任一实施例的方法。In a third aspect, an embodiment of the present disclosure provides an electronic device for generating an image, comprising: one or more processors; a storage device on which one or more programs are stored, when the one or more programs are stored thereon Executed by the one or more processors described above, such that the one or more processors implement the method of any of the embodiments of the method for generating an image described above.

第四方面,本公开的实施例提供了一种用于生成图像的计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如上述用于生成图像的方法中任一实施例的方法。In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium for generating an image, on which a computer program is stored, and when the program is executed by a processor, implements any one of the above-mentioned methods for generating an image example method.

本公开的实施例提供的用于生成图像的方法和装置,通过获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息,其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应,图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像,然后,从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型,最后,将初始图像输入至所确定出的图像生成模型,生成目标图像,丰富了图像的生成方式,可以根据用户不同的需求来生成不同类型的图像。The method and apparatus for generating an image provided by the embodiments of the present disclosure obtain the initial image input by the user and the image type information selected by the user from the predetermined image type information set, wherein the image type information in the image type information set is The image type information is in one-to-one correspondence with the image generation models in the pre-trained image generation model set. The image generation model is used to generate the target image of the image type represented by the corresponding image type information. Then, from the image generation model set, determine the The image generation model corresponding to the obtained image type information, and finally, the initial image is input into the determined image generation model to generate the target image, which enriches the image generation method, and can generate different types of images according to different needs of users .

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present disclosure will become more apparent upon reading the detailed description of non-limiting embodiments taken with reference to the following drawings:

图1是本公开的一个实施例可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure may be applied;

图2是根据本公开的用于生成图像的方法的一个实施例的流程图;2 is a flowchart of one embodiment of a method for generating an image according to the present disclosure;

图3是根据本公开的用于生成图像的方法的一个应用场景的示意图;3 is a schematic diagram of an application scenario of the method for generating an image according to the present disclosure;

图4是根据本公开的用于生成图像的方法的又一个实施例的流程图;4 is a flowchart of yet another embodiment of a method for generating an image according to the present disclosure;

图5是根据本公开的用于生成图像的装置的一个实施例的结构示意图;5 is a schematic structural diagram of an embodiment of an apparatus for generating an image according to the present disclosure;

图6是适于用来实现本公开的实施例的电子设备的计算机系统的结构示意图。6 is a schematic structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure.

具体实施方式Detailed ways

下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。It should be noted that the embodiments of the present disclosure and the features of the embodiments may be combined with each other under the condition of no conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

图1示出了可以应用本公开的实施例的用于生成图像的方法或用于生成图像的装置的实施例的示例性系统架构100。1 illustrates an exemplary system architecture 100 of an embodiment of a method for generating an image or an apparatus for generating an image to which embodiments of the present disclosure may be applied.

如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the system architecture 100 may include terminal devices 101 , 102 , and 103 , a network 104 and a server 105 . The network 104 is a medium used to provide a communication link between the terminal devices 101 , 102 , 103 and the server 105 . The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如图像处理类应用、网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages and the like. Various communication client applications may be installed on the terminal devices 101 , 102 and 103 , such as image processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, and the like.

终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏并且图像处理的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。The terminal devices 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with display screens and image processing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) Players, Laptops and Desktops, etc. When the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as a plurality of software or software modules (eg, software or software modules for providing distributed services), or can be implemented as a single software or software module. There is no specific limitation here.

服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103发送的初始图像进行处理(例如风格迁移(Style transfer))的后台服务器。后台服务器可以对接收到的初始图像等数据进行风格迁移等处理,从而生成处理结果(例如对初始图像进行风格迁移后得到的图像)。The server 105 may be a server that provides various services, such as a background server that processes (eg, style transfer) the initial images sent by the terminal devices 101 , 102 , and 103 . The backend server may perform style transfer and other processing on the received initial image and other data, thereby generating a processing result (for example, an image obtained by performing style transfer on the initial image).

需要说明的是,本公开的实施例所提供的用于生成图像的方法可以由服务器105执行,也可以由终端设备101、102、103执行。相应地,用于生成图像的装置可以设置于服务器105中,也可以设置于终端设备101、102、103中。可选的,本公开的实施例所提供的用于生成图像的方法还可以由服务器与终端设备彼此配合执行,用于生成图像的装置所包括的各个单元还可以分别设置于服务器与终端设备中。It should be noted that, the method for generating an image provided by the embodiments of the present disclosure may be executed by the server 105 , and may also be executed by the terminal devices 101 , 102 , and 103 . Correspondingly, the apparatus for generating images may be provided in the server 105 or in the terminal devices 101 , 102 and 103 . Optionally, the method for generating an image provided by the embodiments of the present disclosure may also be executed by a server and a terminal device in cooperation with each other, and each unit included in the apparatus for generating an image may also be respectively provided in the server and the terminal device. .

需要说明的是,服务器可以是硬件,也可以是软件。当服务器为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务的软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。It should be noted that the server may be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or can be implemented as a single server. When the server is software, it can be implemented as a plurality of software or software modules (for example, software or software modules for providing distributed services), or can be implemented as a single software or software module. There is no specific limitation here.

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。当用于生成图像方法运行于其上的电子设备不需要与其他电子设备进行数据传输时,该系统架构可以仅包括用于生成图像方法运行于其上的电子设备。It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs. When the electronic device on which the method for generating an image runs does not require data transmission with other electronic devices, the system architecture may only include the electronic device on which the method for generating an image runs.

继续参考图2,示出了根据本公开的用于生成图像的方法的一个实施例的流程200。该用于生成图像的方法,包括以下步骤:With continued reference to FIG. 2, a flow 200 of one embodiment of a method for generating an image in accordance with the present disclosure is shown. The method for generating an image includes the following steps:

步骤201,获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息。Step 201: Acquire the initial image input by the user and the image type information selected by the user from a predetermined set of image type information.

在本实施例中,用于生成图像的方法的执行主体(例如图1所示的服务器)可以通过有线连接方式或者无线连接方式从其他电子设备或者本地获取用户输入的初始图像。类似的,上述执行主体也可以通过有线连接方式或者无线连接方式从其他电子设备或者本地获取用户从预先确定的图像类型信息集合中选定的图像类型信息。In this embodiment, the execution body of the method for generating an image (for example, the server shown in FIG. 1 ) may acquire the initial image input by the user from other electronic devices or locally through wired connection or wireless connection. Similarly, the above-mentioned execution body may also acquire image type information selected by the user from a predetermined set of image type information from other electronic devices or locally through wired connection or wireless connection.

其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应。图像生成模型用于生成其所对应的图像类型信息表征的图像类型的目标图像。The image type information in the image type information set is in one-to-one correspondence with the image generation models in the pre-trained image generation model set. The image generation model is used to generate the target image of the image type represented by the corresponding image type information.

在这里,上述初始图像可以是待对其进行风格迁移的图像。例如,初始图像可以是但不限于:面部图像、人体图像、风景图像、动物图像、植物图像等等。图像类型信息可以用于表征图像类型。示例性的,上述图像类型信息集合中的图像类型信息可以用于表征但不限于如下任一图像类型:动漫风格、卡通风格、油画风格、抽象派风格、英伦风格等等。可以理解,风格迁移,是一种对图像的类型进行变换的技术。例如,初始图像可以是用户的自拍图像,对该处是图像进行风格迁移,可以得到动漫风格的自拍图像、卡通风格的自拍图像、油画风格的自拍图像、抽象派风格的自拍图像、英伦风格的自拍图像等等。Here, the above-mentioned initial image may be an image to be style-transferred. For example, the initial image may be, but is not limited to, a face image, a human body image, a landscape image, an animal image, a plant image, and the like. Image type information can be used to characterize the image type. Exemplarily, the image type information in the above image type information set can be used to represent, but not limited to, any of the following image types: animation style, cartoon style, oil painting style, abstract style, British style, and so on. Understandably, style transfer is a technique for transforming the type of an image. For example, the initial image can be the user's selfie image, and the style transfer is performed on the image, and an anime-style selfie image, a cartoon-style selfie image, an oil painting-style selfie image, an abstract style selfie image, an English-style selfie image can be obtained. Selfie images and more.

实践中,用户可以通过拍摄、下载等方式,向其所使用的终端设备输入初始图像。由此,当上述执行主体为终端设备时,上述执行主体可以从本地获取用户所输入的初始图像;当上述执行主体为服务器时,上述执行主体可以与用户所使用的终端设备通信连接,从而,上述执行主体可以从通信连接的终端设备获取用户所输入的初始图像。In practice, the user may input the initial image to the terminal device used by the user by means of photographing, downloading, or the like. Therefore, when the execution body is a terminal device, the execution body can locally acquire the initial image input by the user; when the execution body is a server, the execution body can be connected to the terminal device used by the user in communication, thereby, The above-mentioned execution body may acquire the initial image input by the user from the terminal device connected in communication.

作为示例,上述执行主体可以采用如下方式,来获取用户从预先确定的图像类型信息集合中选定的图像类型信息:用户所使用的终端设备可以呈现有图像类型信息集合中的各个图像类型信息,由此,上述执行主体可以通过检测用户的选定操作(例如对图像类型信息的勾选、点击、长按,输入图像类型信息等操作),来获取用户从该图像类型信息集合中所选定的图像类型信息。As an example, the above-mentioned execution body may acquire the image type information selected by the user from the predetermined image type information set in the following manner: the terminal device used by the user may present each image type information in the image type information set, Therefore, the above-mentioned execution body can acquire the image type information selected by the user from the set of image type information by detecting the user's selection operation (such as checking, clicking, long-pressing on the image type information, inputting image type information, etc.). image type information.

可以理解,上述执行主体,或者,与上述执行主体通信连接的电子设备,可以将上述图像类型信息集合中的图像类型信息与上述图像生成模型集合中的图像生成模型进行关联存储,从而建立二者之间的对应关系。It can be understood that the above-mentioned executive body, or an electronic device communicatively connected to the above-mentioned executive body, can associate and store the image type information in the above-mentioned image type information set and the image generation model in the above-mentioned image generation model set, thereby establishing the two Correspondence between.

在本实施例的一些可选的实现方式中,对于图像类型信息集合中的图像类型信息,该图像类型信息对应的图像生成模型可以是上述执行主体或者与上述执行主体通信连接的电子设备,通过如下步骤训练得到的:In some optional implementations of this embodiment, for the image type information in the image type information set, the image generation model corresponding to the image type information may be the above-mentioned executive body or an electronic device communicatively connected to the above-mentioned executive body, through Trained in the following steps:

第一步,获取训练样本集合。其中,训练样本包括样本初始图像,以及与样本初始图像对应的样本目标图像。样本目标图像为该图像类型信息表征的图像类型的图像。The first step is to obtain a set of training samples. The training samples include sample initial images and sample target images corresponding to the sample initial images. The sample target image is an image of the image type represented by the image type information.

在这里,上述样本初始图像可以是用于训练得到该图像类型信息对应的图像生成模型并且进行风格迁移前的图像。上述与样本初始图像对应的样本目标图像可以是该样本初始图像进行该图像类型信息表征的图像类型的风格迁移后所得到的图像。例如,如果该图像类型信息表征的图像类型为“动漫风格”,那么,与样本初始图像对应的样本目标图像可以是动漫风格的样本初始图像。Here, the above-mentioned sample initial image may be an image used for training to obtain an image generation model corresponding to the image type information and before performing style transfer. The above-mentioned sample target image corresponding to the sample initial image may be an image obtained after the sample initial image is subjected to style transfer of the image type represented by the image type information. For example, if the image type represented by the image type information is "anime style", then the sample target image corresponding to the sample initial image may be an anime-style sample initial image.

第二步,利用机器学习算法,将训练样本集合中的训练样本包括的样本初始图像作为输入,将与输入的样本初始图像对应的样本目标图像作为期望输出,训练得到图像生成模型。样本目标图像可以为该图像类型信息表征的图像类型的图像。实践中,上述样本目标图像可以是绘制人员对初始图像的图像类型进行改变从而绘制成的。In the second step, using the machine learning algorithm, the initial image of the sample included in the training sample in the training sample set is used as the input, and the target image of the sample corresponding to the input initial image of the sample is used as the expected output, and the image generation model is obtained by training. The sample target image may be an image of the image type represented by the image type information. In practice, the above-mentioned sample target image may be drawn by a drawing person changing the image type of the initial image.

具体地,上述执行主体可以将训练样本集合中的训练样本包括的样本初始图像作为初始模型(例如卷积神经网络)的输入,得到与输入的样本初始图像对应的实际输出。确定初始模型是否满足预先确定的训练结束条件。如果满足,则将满足预先确定的训练结束条件的初始模型,确定为训练完成的图像生成模型。如果不满足,则采用反向传播法、梯度下降法,来基于与输入的样本初始图像对应的实际输出和期望输出调整初始模型的参数,并将参数调整后的初始模型用于下次训练。其中,上述训练结束条件可以包括但不限于以下至少一项:训练时间超过预设时长,训练次数超过预设次数,将实际输出与期望输出输入至预先确定的损失函数的到的函数值小于预设阈值。Specifically, the above-mentioned execution body may use the sample initial images included in the training samples in the training sample set as the input of the initial model (eg, convolutional neural network), and obtain the actual output corresponding to the input sample initial images. Determines whether the initial model satisfies a predetermined end-of-training condition. If so, the initial model that satisfies the predetermined training end condition is determined to be the image generation model after the training is completed. If it is not satisfied, the back-propagation method and the gradient descent method are used to adjust the parameters of the initial model based on the actual output and the expected output corresponding to the input sample initial image, and the parameter-adjusted initial model is used for the next training. The above training termination conditions may include, but are not limited to, at least one of the following: the training time exceeds a preset time length, the number of training times exceeds the preset number of times, and the actual output and the expected output are input to the predetermined loss function. Set the threshold.

可以理解,本可选的实现方式可以采用有监督的训练方法,针对上述图像类型信息集合中的每个图像类型信息,训练得到一个图像生成模型。It can be understood that a supervised training method may be adopted in this optional implementation manner, and an image generation model is obtained by training for each image type information in the above-mentioned image type information set.

在本实施例的一些可选的实现方式中,图像生成模型也可以为生成对抗网络。其中,生成对抗网络包括生成网络和判别网络,生成网络用于表征初始图像与目标图像之间的对应关系,判别网络用于确定所输入的目标图像是生成的目标图像还是真实的目标图像。作为示例,上述生成对抗网络可以是循环式生成对抗网络(CycleGan)。其中,目标图像为该图像生成模型对应的图像类型信息表征的图像类型的初始图像。In some optional implementations of this embodiment, the image generation model may also be a generative adversarial network. The generative adversarial network includes a generative network and a discriminant network. The generative network is used to represent the correspondence between the initial image and the target image, and the discriminant network is used to determine whether the input target image is a generated target image or a real target image. As an example, the above-mentioned generative adversarial network may be a recurrent generative adversarial network (CycleGan). The target image is the initial image of the image type represented by the image type information corresponding to the image generation model.

可以理解,当图像生成模型也可以为生成对抗网络时,本可选的实现方式可以采用无监督的训练方法,针对上述图像类型信息集合中的每个图像类型信息,训练得到一个图像生成模型。It can be understood that when the image generation model can also be a generative adversarial network, an unsupervised training method can be adopted in this optional implementation manner, and an image generation model is obtained by training for each image type information in the above-mentioned image type information set.

步骤202,从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型。Step 202 , from the image generation model set, determine an image generation model corresponding to the acquired image type information.

在本实施例中,上述执行主体可以从上述图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型。In this embodiment, the execution subject may determine an image generation model corresponding to the acquired image type information from the image generation model set.

可以理解,上述执行主体可以从上述图像生成模型集合中,确定与所获取的图像类型信息预先建立关联关系的图像生成模型,作为其所对应的图像生成模型。It can be understood that the above-mentioned execution body may determine, from the above-mentioned set of image generation models, an image generation model that has a pre-established relationship with the acquired image type information as its corresponding image generation model.

步骤203,将初始图像输入至所确定出的图像生成模型,生成目标图像。Step 203: Input the initial image into the determined image generation model to generate the target image.

在本实施例中,上述执行主体可以将步骤201获取到的初始图像输入至步骤202所确定出的图像生成模型,从而生成目标图像。其中,目标图像可以是该图像生成模型对应的图像类型信息表征的图像类型的图像。In this embodiment, the above-mentioned execution subject may input the initial image obtained in step 201 into the image generation model determined in step 202, so as to generate the target image. The target image may be an image of an image type represented by the image type information corresponding to the image generation model.

由此,本实施例可以按照用户的需求,对用户输入的初始图像进行风格迁移,从而得到符合用户需求的目标图像(即对初始图像进行风格迁移后得到的图像)。Therefore, this embodiment can perform style transfer on the initial image input by the user according to the user's needs, so as to obtain a target image (ie, an image obtained after performing style transfer on the initial image) that meets the user's needs.

在本实施例的一些可选的实现方式中,初始图像为面部图像。由此,上述执行主体还可以执行如下步骤:In some optional implementations of this embodiment, the initial image is a facial image. Therefore, the above-mentioned executive body can also perform the following steps:

步骤一,确定用户输入的初始图像包括的至少一个面部器官图像区域的区域大小。其中,面部器官包括但不限于以下至少一项:眼睛、鼻子、额头、耳朵、嘴巴、眉毛、睫毛、颧骨等等。Step 1: Determine the area size of at least one facial organ image area included in the initial image input by the user. The facial organs include, but are not limited to, at least one of the following: eyes, nose, forehead, ears, mouth, eyebrows, eyelashes, cheekbones, and the like.

作为示例,上述执行主体可以针对上述用户输入的初始图像包括的至少一个面部器官图像区域中的每个面部器官图像区域,确定该面部器官图像区域的区域大小。As an example, the execution subject may, for each facial part image area in the at least one facial part image area included in the initial image input by the user, determine the area size of the facial part image area.

作为又一示例,上述执行主体也可以确定上述用户输入的初始图像包括的至少一个面部器官图像区域中,用户所选中的面部器官图像区域的区域大小。As another example, the execution subject may also determine the area size of the facial part image area selected by the user in at least one facial part image area included in the initial image input by the user.

作为示例,上述区域大小可以通过该面部器官图像区域包括的像素点的数量来表征,也可以通过该面部器官图像区域的面积与上述用户输入的初始图像的面积之比来表征。As an example, the above-mentioned area size can be characterized by the number of pixels included in the facial organ image area, or by the ratio of the area of the facial organ image area to the area of the initial image input by the user.

步骤二,针对至少一个面部器官图像区域的区域大小,响应于确定该面部器官图像区域的区域大小大于等于预先针对该面部器官图像区域确定的大小阈值,对位于该面部器官图像区域的面部器官图像进行形变处理。Step 2, with respect to the area size of at least one facial organ image area, in response to determining that the area size of the facial organ image area is greater than or equal to a size threshold determined in advance for the facial organ image area, the facial organ image located in the facial organ image area is processed. Transform processing.

在这里,上述执行主体可以采用三角形仿射变化算法,来对面部器官图像进行形变处理,也可以将面部器官图像输入至预先训练的形变模型,从而对其进行形变处理。其中,上述形变模型可以用于对输入的图像进行形变处理。例如,该形变模型可以是采用机器学习算法训练得到的卷积神经网络模型。Here, the above-mentioned execution body may use a triangle affine transformation algorithm to deform the facial organ image, or input the facial organ image to a pre-trained deformation model to perform deformation processing. The above deformation model can be used to deform the input image. For example, the deformation model may be a convolutional neural network model trained by using a machine learning algorithm.

其中,技术人员可以预先针对面部包括的各个面部器官设置大小阈值。作为示例,技术人员可以将面部器官“眼睛”的大小阈值设置为任意一个眼睛的大小或任意多个眼睛大小的均值。上述形变处理可以包括但不限于:放大、缩小、平移、旋转、扭曲等等。Wherein, the technician can set a size threshold for each facial organ included in the face in advance. As an example, the skilled person may set the size threshold of the facial organ "eyes" to be the size of any one eye or the average of the sizes of any number of eyes. The above deformation processing may include, but is not limited to: enlargement, reduction, translation, rotation, distortion, and the like.

在本实施例的一些可选的实现方式中,上述执行主体还可以执行如下步骤:In some optional implementation manners of this embodiment, the foregoing execution body may further perform the following steps:

步骤一,获取用户从预先确定的面部器官信息集合中选定的面部器官信息。以及获取用户从针对面部器官信息集合确定的形变信息集合中选定的形变信息。Step 1: Acquire facial organ information selected by the user from a predetermined set of facial organ information. and acquiring deformation information selected by the user from the deformation information set determined for the facial organ information set.

其中,面部器官信息用于指示面部器官。这里,面部器官信息可以通过文字来表征,例如面部器官信息可以是“鼻子”。可选的,面部器官信息也可以通过其他形式来表征,例如,面部器官信息也可以通过图像来表征。形变信息可以用于指示具体的形变处理。这里,形变信息可以通过文字来表征,例如形变信息可以是“放大”。可选的,形变信息也可以通过其他形式来表征,例如,形变信息也可以通过图像(例如放大的眼睛的图像)来表征。Among them, the facial part information is used to indicate the facial parts. Here, the facial organ information can be represented by words, for example, the facial organ information can be "nose". Optionally, the facial organ information can also be represented by other forms, for example, the facial organ information can also be represented by an image. The deformation information can be used to indicate a specific deformation process. Here, the deformation information can be represented by words, for example, the deformation information can be "enlarged". Optionally, the deformation information may also be represented by other forms, for example, the deformation information may also be represented by an image (eg, an image of an enlarged eye).

需要说明的是,技术人员可以针对面部器官信息集合中的每个面部器官信息设置一个或多个与其对应的形变信息,也可以分别设置面部器官信息集合和形变信息集合,从而使得面部器官信息集合中的任一面部器官信息,与形变信息集合中的任一形变信息相对应。It should be noted that, the technician can set one or more deformation information corresponding to each facial organ information in the facial organ information set, and can also set the facial organ information set and the deformation information set respectively, so that the facial organ information set is Any facial organ information in , corresponds to any deformation information in the deformation information set.

在这里,当上述执行主体为终端设备时,其可以呈现面部器官信息集合中的各个面部器官信息,由此,用户可以从上述执行主体所呈现的面部器官信息集合中,选取面部器官信息,以便上述执行主体获取用户选取的面部器官信息。当上述执行主体为服务器时,其可以向与其通信连接的终端设备发送面部器官信息集合,以便该终端设备呈现所接收到的面部器官信息集合中的各个面部器官信息,由此,用户可以从上述执行主体所呈现的面部器官信息集合中,选取面部器官信息,之后,终端设备可以再将用户选取的面部器官信息发送至上述执行主体,以便上述执行主体获取用户选取的面部器官信息。Here, when the above-mentioned executive body is a terminal device, it can present each facial part information in the facial part information set, so that the user can select the facial part information from the facial part information set presented by the above-mentioned executive body, so as to The above-mentioned execution body acquires the facial organ information selected by the user. When the above-mentioned executive body is a server, it can send a set of facial organ information to a terminal device that is communicatively connected to it, so that the terminal device presents each facial organ information in the received set of facial organ information, so that the user can download the set of facial organ information from the above-mentioned In the facial organ information set presented by the execution body, the facial body information is selected, and then the terminal device can send the facial body information selected by the user to the execution body, so that the execution body obtains the facial body information selected by the user.

可以理解,对于形变信息,上述执行主体可以采用与面部器官信息类似的方式来获取,在此不再赘述。It can be understood that, for the deformation information, the above-mentioned execution body can be obtained in a manner similar to the facial organ information, which will not be repeated here.

步骤二,根据用户选定的面部器官信息和形变信息,从预先训练的面部器官形变模型集合中确定面部器官形变模型。Step 2, according to the facial organ information and deformation information selected by the user, determine the facial organ deformation model from the set of pre-trained facial organ deformation models.

其中,面部器官形变模型可以用于对初始图像中的面部器官进行形变处理。作为示例,上述面部器官形变模型可以是采用机器学习算法训练得到的神经网络模型,也可以是三角形放射变换算法。Among them, the facial organ deformation model can be used to deform the facial organs in the initial image. As an example, the above-mentioned facial organ deformation model may be a neural network model trained by using a machine learning algorithm, or may be a triangle radiation transformation algorithm.

步骤三,将所生成的目标图像输入至所确定出的面部器官形变模型,得到初始图像的形变后图像。Step 3: Input the generated target image into the determined facial organ deformation model to obtain a deformed image of the initial image.

继续参见图3A-图3C,图3A-图3C是根据本实施例的用于生成图像的方法的一个应用场景的示意图。在图3A中,手机获取用户输入的初始图像301,以及用户从预先确定的图像类型信息集合302中选定的图像类型信息3020。其中,图像类型信息集合301中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应。图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像。然后,请参考图3B,手机从图像生成模型集合(例如包括图像类型信息“油画”对应的图像生成模型、图像类型信息“卡通”对应的图像生成模型、图像类型信息“英伦”对应的图像生成模型、图像类型信息“哥特”对应的图像生成模型、图像类型信息“沙画”对应的图像生成模型和图像类型信息“黑白”对应的图像生成模型)中,确定与所获取的图像类型信息3020对应的图像生成模型304。最后,手机将初始图像301输入至所确定出的图像生成模型304,生成目标图像303。可选的,请参考图3C,手机在屏幕上向用户呈现了对初始图像301进行油画风格迁移而生成的目标图像303。Continue to refer to FIG. 3A-FIG. 3C, FIG. 3A-FIG. 3C are schematic diagrams of an application scenario of the method for generating an image according to this embodiment. In FIG. 3A , the mobile phone obtains an initial image 301 input by the user, and image type information 3020 selected by the user from a predetermined set of image type information 302 . The image type information in the image type information set 301 is in one-to-one correspondence with the image generation models in the pre-trained image generation model set. The image generation model is used to generate the target image of the image type represented by the corresponding image type information. Then, please refer to FIG. 3B, the mobile phone generates a model set from images (for example, the image generation model corresponding to the image type information "oil painting", the image generation model corresponding to the image type information "cartoon", the image generation model corresponding to the image type information "English" model, the image generation model corresponding to the image type information "Gothic", the image generation model corresponding to the image type information "sand painting", and the image generation model corresponding to the image type information "black and white"), determine the type information corresponding to the acquired image 3020 corresponds to the image generation model 304. Finally, the mobile phone inputs the initial image 301 to the determined image generation model 304 to generate the target image 303 . Optionally, referring to FIG. 3C , the mobile phone presents to the user a target image 303 generated by performing oil painting style transfer on the initial image 301 on the screen.

现有技术中,由于每个用户的需求往往不同,其所需的头像通常也是不同的。然而,多数用户无法自行设计其所满意的头像。可见,现有技术中存在对用户选定的初始图像进行类型变换的需求。In the prior art, since the requirements of each user are often different, the avatars required by each user are usually also different. However, most users cannot design their own avatars to their satisfaction. It can be seen that in the prior art, there is a need to perform type transformation on the initial image selected by the user.

本公开的上述实施例提供的方法,通过获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息,然后,从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型,最后,将初始图像输入至所确定出的图像生成模型,生成目标图像,可以按照用户的需求,对用户输入的初始图像进行风格迁移,从而得到符合用户需求的图像,由此丰富了图像的生成方式。In the method provided by the above-mentioned embodiments of the present disclosure, the initial image input by the user and the image type information selected by the user from the predetermined image type information collection are obtained, and then, from the image generation model collection, the obtained image is determined and obtained. The image generation model corresponding to the image type information, and finally, the initial image is input into the determined image generation model to generate the target image, and the style transfer of the initial image input by the user can be performed according to the user's needs, so as to obtain a user-friendly image. images, thereby enriching the way images are generated.

进一步参考图4,其示出了用于生成图像的方法的又一个实施例的流程400。该用于生成图像的方法的流程400,包括以下步骤:With further reference to Figure 4, a flow 400 of yet another embodiment of a method for generating an image is shown. The process 400 of the method for generating an image includes the following steps:

步骤401,获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息。Step 401: Acquire the initial image input by the user and the image type information selected by the user from a predetermined set of image type information.

在本实施例中,用于生成图像的方法的执行主体(例如图1所示的服务器或终端设备)可以通过有线连接方式或者无线连接方式从其他电子设备或者本地获取用户输入的初始图像。类似的,上述执行主体也可以通过有线连接方式或者无线连接方式从其他电子设备或者本地获取用户从预先确定的图像类型信息集合中选定的图像类型信息。初始图像为面部图像。In this embodiment, the execution body of the method for generating an image (for example, the server or terminal device shown in FIG. 1 ) may obtain the initial image input by the user from other electronic devices or locally through wired connection or wireless connection. Similarly, the above-mentioned execution body may also acquire image type information selected by the user from a predetermined set of image type information from other electronic devices or locally through wired connection or wireless connection. The initial image is a face image.

其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应,图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像The image type information in the image type information set corresponds to the image generation models in the pre-trained image generation model set, and the image generation model is used to generate a target image of the image type represented by the corresponding image type information

步骤402,从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型。Step 402 , from the image generation model set, determine an image generation model corresponding to the acquired image type information.

在本实施例中,上述执行主体可以从上述图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型。In this embodiment, the execution subject may determine an image generation model corresponding to the acquired image type information from the image generation model set.

步骤403,将初始图像输入至所确定出的图像生成模型,生成目标图像。Step 403: Input the initial image into the determined image generation model to generate the target image.

在本实施例中,上述执行主体可以将步骤401获取到的初始图像输入至步骤402所确定出的图像生成模型,从而生成目标图像。其中,目标图像可以是该图像生成模型对应的图像类型信息表征的图像类型的图像。In this embodiment, the above-mentioned execution subject may input the initial image obtained in step 401 into the image generation model determined in step 402, so as to generate the target image. The target image may be an image of an image type represented by the image type information corresponding to the image generation model.

在这里,除上面所记载的内容外,步骤401-步骤403还可以分别包括与图2对应实施例中的步骤201-步骤203基本一致的内容,这里不再赘述。Here, in addition to the contents described above, steps 401 to 403 may also respectively include contents that are basically the same as those of steps 201 to 203 in the embodiment corresponding to FIG. 2 , which will not be repeated here.

步骤404,确定用户输入的初始图像包括的至少一个面部器官图像区域的区域大小。Step 404: Determine the area size of the at least one facial organ image area included in the initial image input by the user.

在本实施例中,上述执行主体可以确定用户输入的初始图像包括的至少一个面部器官图像区域的区域大小。其中,面部器官包括但不限于以下至少一项:眼睛、鼻子、额头、耳朵、嘴巴、眉毛、睫毛、颧骨等等。In this embodiment, the above-mentioned execution subject may determine the area size of at least one facial organ image area included in the initial image input by the user. The facial organs include, but are not limited to, at least one of the following: eyes, nose, forehead, ears, mouth, eyebrows, eyelashes, cheekbones, and the like.

作为示例,上述执行主体可以针对上述用户输入的初始图像包括的至少一个面部器官图像区域中的每个面部器官图像区域,确定该面部器官图像区域的区域大小。As an example, the execution subject may, for each facial part image area in the at least one facial part image area included in the initial image input by the user, determine the area size of the facial part image area.

作为又一示例,上述执行主体也可以确定上述用户输入的初始图像包括的至少一个面部器官图像区域中,用户所选中的面部器官图像区域的区域大小。As another example, the execution subject may also determine the area size of the facial part image area selected by the user in at least one facial part image area included in the initial image input by the user.

作为示例,上述区域大小可以通过该面部器官图像区域包括的像素点的数量来表征,也可以通过该面部器官图像区域的面积与上述用户输入的初始图像的面积之比来表征。As an example, the above-mentioned area size can be characterized by the number of pixels included in the facial organ image area, or by the ratio of the area of the facial organ image area to the area of the initial image input by the user.

步骤405,针对至少一个面部器官图像区域的区域大小,响应于确定该面部器官图像区域的区域大小大于等于预先针对该面部器官图像区域确定的大小阈值,对位于该面部器官图像区域的面部器官图像进行形变处理。Step 405, with respect to the area size of at least one facial organ image area, in response to determining that the area size of the facial organ image area is greater than or equal to a size threshold determined in advance for the facial organ image area, the facial organ image located in the facial organ image area is processed. Transform processing.

在本实施例中,上述执行主体还可以针对至少一个面部器官图像区域的区域大小,响应于确定该面部器官图像区域的区域大小大于等于预先针对该面部器官图像区域确定的大小阈值,对位于该面部器官图像区域的面部器官图像进行形变处理。In this embodiment, the above-mentioned execution body may further, for the area size of at least one facial part image area, in response to determining that the area size of the facial part image area is greater than or equal to a size threshold determined in advance for the facial part image area, perform the operation on the area located in the facial part image area. The facial part image in the facial part image area is deformed.

在这里,上述执行主体可以采用三角形仿射变化算法,来对面部器官图像进行形变处理,也可以将面部器官图像输入至预先训练的形变模型,从而对其进行形变处理。其中,上述形变模型可以用于对输入的图像进行形变处理。例如,该形变模型可以是采用机器学习算法训练得到的卷积神经网络模型。Here, the above-mentioned execution body may use a triangle affine transformation algorithm to deform the facial organ image, or input the facial organ image to a pre-trained deformation model to perform deformation processing. The above deformation model can be used to deform the input image. For example, the deformation model may be a convolutional neural network model trained by using a machine learning algorithm.

其中,技术人员可以预先针对面部包括的各个面部器官设置大小阈值。作为示例,技术人员可以将面部器官“眼睛”的大小阈值设置为任意一个眼睛的大小或任意多个眼睛大小的均值。上述形变处理可以包括但不限于:放大、缩小、平移、旋转、扭曲等等。Wherein, the technician can set a size threshold for each facial organ included in the face in advance. As an example, the skilled person may set the size threshold of the facial organ "eyes" to be the size of any one eye or the average of the sizes of any number of eyes. The above deformation processing may include, but is not limited to: enlargement, reduction, translation, rotation, distortion, and the like.

从图4中可以看出,与图2对应的实施例相比,本实施例中的用于生成图像的方法的流程400突出了对面部器官图像进行形变处理的步骤。由此,本实施例描述的方案可以在实现对面部图像进行风格迁移的基础上,进一步对面部图像中的面部器官图像进行形变。例如,如果面部图像表征鼻子所在的图像区域的大小,大于等于预先确定的鼻子大小阈值(例如多个人的鼻子的大小均值),那么,通过本实施例描述的方案可以对该面部图像的鼻子进行形变处理(例如放大处理),从而得到风格化(例如动漫风格)的、鼻子经形变处理(例如放大处理)后的面部图像。由此,可以进一步满足用户的个性化需求,进一步丰富了图像的生成方式。As can be seen from FIG. 4 , compared with the embodiment corresponding to FIG. 2 , the process 400 of the method for generating an image in this embodiment highlights the step of performing deformation processing on the facial organ image. Therefore, the solution described in this embodiment can further deform the facial organ image in the facial image on the basis of implementing the style transfer of the facial image. For example, if the face image represents the size of the image area where the nose is located, and is greater than or equal to a predetermined nose size threshold (for example, the average size of the noses of multiple persons), then the nose of the face image can be processed by the solution described in this embodiment. A deformation process (eg, enlarging process) is performed to obtain a stylized (eg, anime-style) facial image after the nose is deformed (eg, an enlargement process). Thereby, the personalized needs of users can be further satisfied, and the way of generating images can be further enriched.

进一步参考图5,作为对上述各图所示方法的实现,本公开提供了一种用于生成图像的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,除下面所记载的特征外,该装置实施例还可以包括与图2所示的方法实施例相同或相应的特征。该装置具体可以应用于各种电子设备中。With further reference to FIG. 5 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for generating an image, and the apparatus embodiment corresponds to the method embodiment shown in FIG. 2 , except In addition to the features described below, the apparatus embodiment may also include the same or corresponding features as the method embodiment shown in FIG. 2 . Specifically, the device can be applied to various electronic devices.

如图5所示,本实施例的用于生成图像的装置500包括:第一获取单元501、第一确定单元502和生成单元503。其中,第一获取单元501被配置成获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息,其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应,图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像;第一确定单元502被配置成从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型;生成单元503被配置成将初始图像输入至所确定出的图像生成模型,生成目标图像。As shown in FIG. 5 , the apparatus 500 for generating an image in this embodiment includes: a first acquiring unit 501 , a first determining unit 502 and a generating unit 503 . The first acquiring unit 501 is configured to acquire the initial image input by the user, and the image type information selected by the user from the predetermined image type information set, wherein the image type information in the image type information set is the same as the pre-trained image type information. The image generation models in the image generation model set are in one-to-one correspondence, and the image generation model is used to generate a target image of the image type represented by the corresponding image type information; the first determining unit 502 is configured to determine from the image generation model set. The image generation model corresponding to the acquired image type information; the generating unit 503 is configured to input the initial image into the determined image generation model to generate the target image.

在本实施例中,用于生成图像的装置500的第一获取单元501可以通过有线连接方式或者无线连接方式从其他电子设备或者本地获取用户输入的初始图像。类似的,上述装置500也可以通过有线连接方式或者无线连接方式从其他电子设备或者本地获取用户从预先确定的图像类型信息集合中选定的图像类型信息。In this embodiment, the first acquiring unit 501 of the apparatus 500 for generating an image may acquire the initial image input by the user from other electronic devices or locally through a wired connection or a wireless connection. Similarly, the above-mentioned apparatus 500 may also acquire the image type information selected by the user from the predetermined image type information set from other electronic devices or locally through wired connection or wireless connection.

其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应。图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像。The image type information in the image type information set is in one-to-one correspondence with the image generation models in the pre-trained image generation model set. The image generation model is used to generate the target image of the image type represented by the corresponding image type information.

在本实施例中,上述第一确定单元502可以从上述图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型。In this embodiment, the above-mentioned first determining unit 502 may determine an image generation model corresponding to the acquired image type information from the above-mentioned image generation model set.

在本实施例中,上述生成单元503可以将第一获取单元501获取到的初始图像输入至第一确定单元502所确定出的图像生成模型,从而生成目标图像。其中,目标图像可以是该图像生成模型对应的图像类型信息表征的图像类型的图像。In this embodiment, the above-mentioned generating unit 503 may input the initial image acquired by the first acquiring unit 501 into the image generating model determined by the first determining unit 502, thereby generating the target image. The target image may be an image of an image type represented by the image type information corresponding to the image generation model.

在本实施例的一些可选的实现方式中,对于图像类型信息集合中的图像类型信息,该图像类型信息对应的图像生成模型是通过如下步骤训练得到的:In some optional implementations of this embodiment, for the image type information in the image type information set, the image generation model corresponding to the image type information is obtained by training through the following steps:

首先,获取训练样本集合,其中,训练样本包括样本初始图像,以及与样本初始图像对应的样本目标图像,样本目标图像为该图像类型信息表征的图像类型的图像;First, a training sample set is obtained, wherein the training samples include an initial sample image and a sample target image corresponding to the sample initial image, and the sample target image is an image of the image type represented by the image type information;

然后,利用机器学习算法,将训练样本集合中的训练样本包括的样本初始图像作为输入,将与输入的样本初始图像对应的样本目标图像作为期望输出,训练得到图像生成模型。Then, using the machine learning algorithm, the sample initial image included in the training samples in the training sample set is used as input, and the sample target image corresponding to the input sample initial image is used as the expected output, and the image generation model is obtained by training.

在本实施例的一些可选的实现方式中,初始图像为面部图像。该装置500还包括:第二确定单元(图中未示出)被配置成确定用户输入的初始图像包括的至少一个面部器官图像区域的区域大小。处理单元(图中未示出)被配置成针对至少一个面部器官图像区域的区域大小,响应于确定该面部器官图像区域的区域大小大于等于预先针对该面部器官图像区域确定的大小阈值,对位于该面部器官图像区域的面部器官图像进行形变处理。In some optional implementations of this embodiment, the initial image is a facial image. The apparatus 500 further includes: a second determining unit (not shown in the figure) configured to determine the area size of the at least one facial organ image area included in the initial image input by the user. The processing unit (not shown in the figure) is configured to, in response to determining that the area size of the facial part image area is greater than or equal to a size threshold determined in advance for the facial part image area, for the area size of the at least one facial part image area, to determine the area size of the facial part image area. The facial part image in the facial part image area is subjected to deformation processing.

在本实施例的一些可选的实现方式中,该装置500还包括:第二获取单元(图中未示出)被配置成获取用户从预先确定的面部器官信息集合中选定的面部器官信息,以及用户从针对面部器官信息集合确定的形变信息集合中选定的形变信息。第三确定单元(图中未示出)被配置成根据用户选定的面部器官信息和形变信息,从预先训练的面部器官形变模型集合中确定面部器官形变模型。输入单元(图中未示出)被配置成将所生成的目标图像输入至所确定出的面部器官形变模型,得到初始图像的形变后图像。In some optional implementations of this embodiment, the apparatus 500 further includes: a second acquiring unit (not shown in the figure) configured to acquire facial organ information selected by the user from a predetermined set of facial organ information , and the deformation information selected by the user from the deformation information set determined for the facial organ information set. The third determining unit (not shown in the figure) is configured to determine a facial organ deformation model from a set of pre-trained facial organ deformation models according to the facial organ information and deformation information selected by the user. The input unit (not shown in the figure) is configured to input the generated target image to the determined facial organ deformation model to obtain a deformed image of the initial image.

在本实施例的一些可选的实现方式中,图像生成模型为生成对抗网络。In some optional implementations of this embodiment, the image generation model is a generative adversarial network.

本公开的上述实施例提供的装置,通过第一获取单元501获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息,其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应,图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像,然后,第一确定单元502从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型,最后,生成单元503将初始图像输入至所确定出的图像生成模型,生成目标图像,可以按照用户的需求,对用户输入的初始图像进行风格迁移,从而得到符合用户需求的图像,由此丰富了图像的生成方式。In the apparatus provided by the above embodiments of the present disclosure, the first obtaining unit 501 obtains the initial image input by the user and the image type information selected by the user from the predetermined image type information set, wherein the image in the image type information set The type information is in one-to-one correspondence with the image generation models in the pre-trained image generation model set, and the image generation model is used to generate a target image of the image type represented by the corresponding image type information. Then, the first determining unit 502 generates a model set from the image. , determine the image generation model corresponding to the acquired image type information, and finally, the generation unit 503 inputs the initial image into the determined image generation model to generate the target image, and can, according to the user's needs, generate the initial image input by the user. Perform style transfer to obtain images that meet the needs of users, thereby enriching the way of image generation.

下面参考图6,其示出了适于用来实现本公开的实施例的电子设备的计算机系统600的结构示意图。图6示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。Referring now to FIG. 6 , a schematic diagram of the structure of a computer system 600 suitable for implementing an electronic device of an embodiment of the present disclosure is shown. The electronic device shown in FIG. 6 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.

如图6所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有系统600操作所需的各种程序和数据。CPU 601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6, a computer system 600 includes a central processing unit (CPU) 601, which can be loaded into a random access memory (RAM) 603 according to a program stored in a read only memory (ROM) 602 or a program from a storage section 608 Instead, various appropriate actions and processes are performed. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601 , the ROM 602 , and the RAM 603 are connected to each other through a bus 604 . An input/output (I/O) interface 605 is also connected to bus 604 .

以下部件连接至I/O接口605:包括键盘、鼠标等的输入部分606;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。The following components are connected to the I/O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc. ; and a communication section 609 including a network interface card such as a LAN card, a modem, and the like. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I/O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。在该计算机程序被中央处理单元(CPU)601执行时,执行本公开的方法中限定的上述功能。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 609 and/or installed from the removable medium 611 . When the computer program is executed by the central processing unit (CPU) 601, the above-described functions defined in the method of the present disclosure are performed.

需要说明的是,本公开所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium described in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,所述程序设计语言包括面向目标的程序设计语言—诸如Python、Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including object-oriented programming languages—such as Python, Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.

描述于本公开的实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括第一获取单元、第一确定单元和生成单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一确定单元还可以被描述为“确定与所获取的图像类型信息对应的图像生成模型的单元”。The units involved in the embodiments of the present disclosure may be implemented in software or hardware. The described unit may also be provided in a processor, for example, it may be described as: a processor includes a first acquiring unit, a first determining unit and a generating unit. The names of these units in some cases do not constitute a limitation on the unit itself. For example, the first determination unit may also be described as "a unit for determining an image generation model corresponding to the acquired image type information".

作为另一方面,本公开还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取用户输入的初始图像,以及用户从预先确定的图像类型信息集合中选定的图像类型信息,其中,图像类型信息集合中的图像类型信息与预先训练的图像生成模型集合中的图像生成模型一一对应,图像生成模型用于生成对应的图像类型信息表征的图像类型的目标图像;从图像生成模型集合中,确定与所获取的图像类型信息对应的图像生成模型;将初始图像输入至所确定出的图像生成模型,生成目标图像。As another aspect, the present disclosure also provides a computer-readable medium. The computer-readable medium may be included in the electronic device described in the above embodiments; it may also exist alone without being assembled into the electronic device. middle. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the initial image input by the user, and the user selects the image type information from the predetermined image type information set. The selected image type information, wherein the image type information in the image type information set corresponds to the image generation model in the pre-trained image generation model set, and the image generation model is used to generate the image type represented by the corresponding image type information the target image; from the image generation model set, determine the image generation model corresponding to the acquired image type information; input the initial image into the determined image generation model to generate the target image.

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, and should also cover, without departing from the above-mentioned inventive concept, the above-mentioned technical features or Other technical solutions formed by any combination of its equivalent features. For example, a technical solution is formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) with similar functions.

Claims (12)

CN201910199011.XA2019-03-152019-03-15Method and apparatus for generating imageActiveCN109949213B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910199011.XACN109949213B (en)2019-03-152019-03-15Method and apparatus for generating image

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910199011.XACN109949213B (en)2019-03-152019-03-15Method and apparatus for generating image

Publications (2)

Publication NumberPublication Date
CN109949213Atrue CN109949213A (en)2019-06-28
CN109949213B CN109949213B (en)2023-06-16

Family

ID=67010103

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910199011.XAActiveCN109949213B (en)2019-03-152019-03-15Method and apparatus for generating image

Country Status (1)

CountryLink
CN (1)CN109949213B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110503703A (en)*2019-08-272019-11-26北京百度网讯科技有限公司 Method and device for generating images
CN114331820A (en)*2021-12-292022-04-12北京字跳网络技术有限公司Image processing method, image processing device, electronic equipment and storage medium
CN117291856A (en)*2023-09-252023-12-26卓米私人有限公司Image generation model training method, image generation device and electronic equipment
WO2024226415A1 (en)*2023-04-242024-10-31Mastercard International IncorporatedPersonalizing articles using generative artificial intelligence

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090257099A1 (en)*2008-04-142009-10-15Canon Kabushiki KaishaImage processing apparatus and image processing method
US20150262370A1 (en)*2014-03-142015-09-17Omron CorporationImage processing device, image processing method, and image processing program
JP2016051302A (en)*2014-08-292016-04-11カシオ計算機株式会社Image processor, imaging device, image processing method, and program
CN107909540A (en)*2017-10-262018-04-13深圳天珑无线科技有限公司Image processing method, device, mobile terminal and computer-readable recording medium
CN108259769A (en)*2018-03-302018-07-06广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN108401112A (en)*2018-04-232018-08-14Oppo广东移动通信有限公司Image processing method, device, terminal and storage medium
CN108960093A (en)*2018-06-212018-12-07阿里体育有限公司The recognition methods and equipment of face's rotational angle
CN109215007A (en)*2018-09-212019-01-15维沃移动通信有限公司A kind of image generating method and terminal device
CN109376596A (en)*2018-09-142019-02-22广州杰赛科技股份有限公司Face matching process, device, equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090257099A1 (en)*2008-04-142009-10-15Canon Kabushiki KaishaImage processing apparatus and image processing method
US20150262370A1 (en)*2014-03-142015-09-17Omron CorporationImage processing device, image processing method, and image processing program
JP2016051302A (en)*2014-08-292016-04-11カシオ計算機株式会社Image processor, imaging device, image processing method, and program
CN107909540A (en)*2017-10-262018-04-13深圳天珑无线科技有限公司Image processing method, device, mobile terminal and computer-readable recording medium
CN108259769A (en)*2018-03-302018-07-06广东欧珀移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN108401112A (en)*2018-04-232018-08-14Oppo广东移动通信有限公司Image processing method, device, terminal and storage medium
CN108960093A (en)*2018-06-212018-12-07阿里体育有限公司The recognition methods and equipment of face's rotational angle
CN109376596A (en)*2018-09-142019-02-22广州杰赛科技股份有限公司Face matching process, device, equipment and storage medium
CN109215007A (en)*2018-09-212019-01-15维沃移动通信有限公司A kind of image generating method and terminal device

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
曾碧等: "基于CycleGAN的非配对人脸图片光照归一化方法", 《广东工业大学学报》*
曾碧等: "基于CycleGAN的非配对人脸图片光照归一化方法", 《广东工业大学学报》, vol. 35, no. 05, 18 July 2018 (2018-07-18), pages 11 - 19*
林维训,潘纲,吴朝晖,潘云鹤: "脸部特征定位方法", 中国图象图形学报, no. 08, pages 11*
赵增顺等: "生成对抗网络理论框架、衍生模型与应用最新进展", 《小型微型计算机系统》*
赵增顺等: "生成对抗网络理论框架、衍生模型与应用最新进展", 《小型微型计算机系统》, vol. 39, no. 12, 11 December 2018 (2018-12-11), pages 2602 - 2606*

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110503703A (en)*2019-08-272019-11-26北京百度网讯科技有限公司 Method and device for generating images
CN110503703B (en)*2019-08-272023-10-13北京百度网讯科技有限公司 Methods and apparatus for generating images
CN114331820A (en)*2021-12-292022-04-12北京字跳网络技术有限公司Image processing method, image processing device, electronic equipment and storage medium
WO2024226415A1 (en)*2023-04-242024-10-31Mastercard International IncorporatedPersonalizing articles using generative artificial intelligence
CN117291856A (en)*2023-09-252023-12-26卓米私人有限公司Image generation model training method, image generation device and electronic equipment

Also Published As

Publication numberPublication date
CN109949213B (en)2023-06-16

Similar Documents

PublicationPublication DateTitle
CN110827378B (en)Virtual image generation method, device, terminal and storage medium
US10650492B2 (en)Method and apparatus for generating image
US11978245B2 (en)Method and apparatus for generating image
CN111476871B (en)Method and device for generating video
CN110298319B (en)Image synthesis method and device
CN109189544B (en)Method and device for generating dial plate
US11436863B2 (en)Method and apparatus for outputting data
WO2019242222A1 (en)Method and device for use in generating information
CN110766777A (en)Virtual image generation method and device, electronic equipment and storage medium
CN109949213B (en)Method and apparatus for generating image
CN109981787B (en)Method and device for displaying information
CN110503703A (en) Method and device for generating images
CN109977905B (en) Method and apparatus for processing fundus images
CN110136054B (en)Image processing method and device
CN110288705B (en)Method and device for generating three-dimensional model
CN109829432A (en)Method and apparatus for generating information
CN112581635B (en)Universal quick face changing method and device, electronic equipment and storage medium
CN112527115A (en)User image generation method, related device and computer program product
JP2020013553A (en) Information generation method and device applied to terminal device
CN114049417B (en)Virtual character image generation method and device, readable medium and electronic equipment
CN110197230B (en)Method and apparatus for training a model
CN113223128B (en)Method and apparatus for generating image
CN111258414B (en)Method and device for adjusting screen
CN112308950A (en)Video generation method and device
CN110415318A (en) Image processing method and device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right

Effective date of registration:20231214

Address after:Building 3, No. 1 Yinzhu Road, Suzhou High tech Zone, Suzhou City, Jiangsu Province, 215011

Patentee after:Suzhou Moxing Times Technology Co.,Ltd.

Address before:100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing

Patentee before:BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20250605

Address after:215000 Jiangsu Province, Suzhou City, Wuzhong District, Changqiao Street, Xinjia Industrial Park, Xinmen Road No. 10, 3rd Floor, Room 3037

Patentee after:Suzhou Mailai Xiaomeng Network Technology Co.,Ltd.

Country or region after:China

Address before:Building 3, No. 1 Yinzhu Road, Suzhou High tech Zone, Suzhou City, Jiangsu Province, 215011

Patentee before:Suzhou Moxing Times Technology Co.,Ltd.

Country or region before:China

TR01Transfer of patent right

[8]ページ先頭

©2009-2025 Movatter.jp