WO2020134556A1 - 图像风格迁移方法、装置、电子设备及存储介质 - Google Patents

图像风格迁移方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2020134556A1
WO2020134556A1 PCT/CN2019/114793 CN2019114793W WO2020134556A1 WO 2020134556 A1 WO2020134556 A1 WO 2020134556A1 CN 2019114793 W CN2019114793 W CN 2019114793W WO 2020134556 A1 WO2020134556 A1 WO 2020134556A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
content
stylized
loss function
style
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.)
Ceased
Application number
PCT/CN2019/114793
Other languages
English (en)
French (fr)
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Publication of WO2020134556A1 publication Critical patent/WO2020134556A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method, device, electronic device, and storage medium for transferring image styles.
  • IST image style transfer
  • image style transfer is a very important and challenging subject.
  • IST is divided into sub-topics such as artistic style transfer, fidelity style transfer, and semantic style transfer.
  • IST has a wide range of application scenarios, including image editing, image synthesis, and image special effects.
  • the current method of researching IST generally uses Convolutional Neural Networks (CNN, Convolutional Neural Networks) to extract the features of content and style graphs and construct a Gram matrix to define content loss and style loss, and then optimize the solution to get stylized Figure.
  • CNN Convolutional Neural Networks
  • the present application provides a method, device, electronic device, and storage medium for transferring image styles.
  • a method for transferring image styles includes:
  • a style transfer model is used to process the to-be-processed image to obtain a first styled image; the style transfer model is obtained by performing model training based on the content image, the second styled image, and the third styled image in advance, where , The second stylized image is obtained by stylizing the content image, and the third stylized image is obtained by processing the content image using a neural network model.
  • an image style transfer device including:
  • the acquisition module is configured to acquire the image to be processed
  • the stylization module is configured to use the style transfer model to process the to-be-processed image to obtain a first styled image; the style transfer model is based on the content image, the second styled image, and the third styled image in advance Obtained through model training, wherein the second stylized image is obtained by stylizing the content image, and the third stylized image is obtained by processing the content image using a neural network model.
  • an electronic device comprising:
  • a memory for storing executable instructions of the processor
  • the processor is configured to execute the image style transfer method as described in the first aspect.
  • a non-transitory computer-readable storage medium when instructions in the storage medium are executed by a processor of an electronic device, enabling the electronic device to execute as described in the first aspect Image style transfer method.
  • a computer program product which, when instructions in the computer program product are executed by a processor of an electronic device, enables the electronic device to perform image style transfer as described in the first aspect method.
  • an image style transfer method, device, electronic equipment and storage medium are provided.
  • the technical solution of this application adopts a style transfer model obtained by pre-training to perform style transfer processing on the image to be processed to avoid the process of performing style transfer Solve and optimize the loss function to achieve fast style transfer; and, the style transfer model is obtained by supervising the neural network model by using pairs of input and output samples such as content images and second stylized images.
  • the introduction of label samples can enhance the stylized effect of the model.
  • FIG. 1 is a flowchart of steps of a method for transferring image styles shown in this application;
  • FIG. 3 is a schematic block diagram of a style transfer model shown in this application.
  • FIG. 4 is a flow chart of steps of an implementation manner of obtaining a style transfer model shown in this application;
  • FIG. 5 is a flowchart of steps of another implementation manner for obtaining a style transfer model shown in this application;
  • FIG. 6 is a block diagram of an image style migration device shown in this application.
  • FIG. 7 is a block diagram of an electronic device shown in this application.
  • FIG. 8 is a block diagram of an electronic device shown in this application.
  • FIG. 1 is a flowchart of an image style transfer method shown in this application. As shown in FIG. 1, the method is applied to an electronic device. The method includes the following steps.
  • step S101 an image to be processed is acquired.
  • the image to be stylized is acquired.
  • a style transfer model is used to process the image to be processed to obtain a first stylized image; the style transfer model is obtained by performing model training based on the content image, the second stylized image, and the third stylized image in advance, where , The second stylized image is obtained by stylizing the content image, and the third stylized image is obtained by processing the content image using a neural network model.
  • a pre-trained style transfer model is used to perform style transfer processing on the image to be processed to obtain a first styled image. Since the embodiment of the present application adopts a pre-trained style transfer model, there is no need to perform gradient iterative calculation on the loss function in the process of style transfer, and directly input the image to be processed into the style transfer model, and the output can be obtained.
  • a stylized image so that the existing "training" process of generating stylized images becomes a process of "executing" a pre-trained style transfer model, which can greatly speed up the generation of stylized images.
  • the style transfer model can be pre-trained according to the label sample, the label sample includes the content image and the second stylized image pre-styled according to the content image, and the neural network model is used to process the content image to obtain the third stylized image, Then, the neural network model is trained according to the associated features of the content image, the second stylized image, and the third stylized image, to obtain a style transfer model.
  • the content image is an original image sample that has not been stylized.
  • the image style transfer method provided in the embodiment of the present application adopts a pre-trained style transfer model to perform style transfer processing on the image to be processed, without solving and optimizing the loss function in the process of performing style transfer, thereby achieving rapid style transfer; and,
  • the style transfer model is obtained by using pairs of input and output samples such as content images and second stylized images to supervise the training of the neural network model.
  • the introduction of labeled samples can improve the stylization effect of the model.
  • step S102 may further include: a step of obtaining a style transfer model.
  • the step of obtaining a style transfer model may specifically include:
  • step S201 the content image and the second stylized image are acquired.
  • the second stylized image can be obtained by stylizing the content image (content image) in advance, for example, the process of stylized processing can be completed by a painter.
  • one-shot learning or one-shot learning can be used ) Method supervises machine learning.
  • Small-sample learning is to use one or several pairs of input and output samples for model training. Its task is to complete model training based on a small number of label samples by using a large number of unlabeled samples or prior knowledge.
  • the content may be used 1000 to train the model image I c, wherein the content is an image of the label There is a second stylized image
  • the remaining 999 content images are unlabeled content images used to assist in machine learning. It should be noted that there can be multiple pairs of labeled content images and corresponding second stylized images. In the subsequent model training process, it is only necessary to traverse each content image and each second stylized image.
  • step S202 the neural network model is used to process the content image to obtain a third stylized image.
  • the content image I c (including the tagged content image ) Input to a neural network model such as a convolutional neural network CNN, or an inference network (Inference Network) as shown in FIG. 3, and perform a stylization process to obtain a third stylized image O.
  • the third stylized image O is the output image of the inference network corresponding to the content image I c , including Corresponding inference network output graph O OS .
  • step S203 the neural network model is trained according to the associated features of the content image, the second stylized image, and the third stylized image to obtain a style transfer model; wherein, the associated features include content features, style features, and pixel features And at least one of the semantic features.
  • the Perceptual Loss network (such as VGG19) shown in FIG. 3 may be used to evaluate the content image I c (including tagged content images ), the second stylized image And the third stylized image O (including tagged content images Corresponding feature differences between the corresponding inference network output graphs O OS ), the loss function is determined, and the loss function is optimized and solved to determine the parameters in the inference network to obtain the style transfer model.
  • the related features include at least one of content features, style features, pixel features, semantic features, and so on.
  • step S203 may further include:
  • step S401 the content loss function is determined according to the difference between the content characteristics of the third stylized image and the content image.
  • the image characteristics of the third stylized image O and the content image I c may be used to characterize the content characteristics. Therefore, the content loss function may be calculated using the following formula:
  • L is the total number of CNN network convolutional layers
  • i index represents the i-th convolutional layer
  • N i groups of filters in each layer the total number of pixels in the feature map corresponding to each group of filters is D i
  • F i ( ⁇ ) corresponds to the CNN layer i feature matrix
  • (j, k) is used for indexing
  • ⁇ i is used to balance the weight of each layer.
  • a style loss function is determined according to the difference in style characteristics between the third stylized image and the second stylized image.
  • the third stylized image O and the second stylized image may be used
  • the Gram matrix represents the style characteristics, therefore, the style loss function can be calculated using the following formula:
  • L is the total number of CNN network convolutional layers
  • i index represents the i-th convolutional layer
  • N i sets of filters in each layer there are N i sets of filters in each layer
  • (j, k) is used for index
  • ⁇ i is used to balance each layer
  • the weight of G i ( ⁇ ) corresponds to the Gram matrix obtained by calculating the inner product of the i-th layer features of CNN
  • ⁇ s is used to adjust the proportion of style loss in the total loss function.
  • step S403 the pixel loss function is determined according to the difference in pixel characteristics of the third stylized image and the second stylized image.
  • the inference network output image O OS corresponding to the tagged content image Icos in the third stylized image O and the second stylized image may be used
  • the pixel data (such as gray scale, etc.) characterize the pixel characteristics, so the pixel loss function can be calculated using the following formula:
  • (j, k) is used for index
  • ⁇ e is used to adjust the proportion of pixel loss in the total loss function
  • D OS is the content image with label The total number of pixels.
  • step S404 the parameters of the neural network model are determined according to the content loss function, the style loss function, and the pixel loss function, and the style transfer model is obtained.
  • the loss function can be obtained according to the sum of the content loss function, the style loss function, and the pixel loss function:
  • step S203 may further include:
  • step S501 the content image, the second stylized image, and the third stylized image are semantically segmented to obtain multiple semantic categories.
  • semantic segmentation refers to segmenting an image and determining the category (semantic category) of objects, such as cats and dogs, based on the segmentation results.
  • semantic segmentation can be achieved by manual or automatic machine segmentation.
  • step S502 a loss function corresponding to each semantic category is calculated based on the content image, the second stylized image, and the third stylized image.
  • the method provided in the embodiment shown in FIG. 4 may be used to separately calculate the content loss function, style loss function, and pixel loss function corresponding to each semantic category, which may specifically include the following steps:
  • the pixel loss function corresponding to each semantic category is determined according to the difference in pixel characteristics corresponding to each semantic category in the third stylized image and the second stylized image.
  • step S503 the parameters of the neural network model are determined according to the loss function corresponding to each semantic category, and the style transfer model is obtained.
  • the content loss function corresponding to each semantic category can be summed to obtain a content loss function; the style loss function corresponding to each semantic category can be summed to obtain a style loss function; the pixel loss function corresponding to each semantic category can be summed, Get the pixel loss function; then according to the content loss function, style loss function and pixel loss function, get the loss function. For example, the content loss function, the style loss function and the pixel loss function are summed to obtain the loss function.
  • the parameters of the neural network model can be determined, and the style transfer model can be obtained.
  • the image style transfer method provided in the embodiment of the present application can better distinguish different semantic categories by adding semantic segmentation, so that the calculation and optimization of the loss function are performed for different semantic categories, to avoid stylized results that violate semantic information, thereby
  • the trained style transfer model can realize accurate transfer, and further improve the overall stylization effect.
  • FIG. 6 is a block diagram of an image style migration device shown in this application. 6, the device may include:
  • the obtaining module 61 is configured to obtain an image to be processed
  • the stylization module 62 is configured to use the style transfer model to process the image to be processed to obtain the first stylized image; the style transfer model is obtained by performing model training based on the content image, the second stylized image, and the third stylized image in advance Among them, the second stylized image is obtained by stylizing the content image, and the third stylized image is obtained by processing the content image using a neural network model.
  • the device may further include: a model training module 63 configured to obtain a style transfer model.
  • the model training module 63 is used to:
  • model training module 63 is specifically used to:
  • the parameters of the neural network model are determined to obtain the style transfer model.
  • the model training module 63 can obtain the following loss function according to the sum of the content loss function, the style loss function, and the pixel loss function:
  • model training module 63 is also used to:
  • the second stylized image and the third stylized image calculate the loss function corresponding to each semantic category
  • the parameters of the neural network model are determined to obtain the style transfer model.
  • the model training module 63 calculates the loss function corresponding to each semantic category based on the content image, the second stylized image, and the third stylized image, including:
  • the pixel loss function is determined according to the difference in pixel characteristics corresponding to the semantic categories in the third stylized image and the second stylized image.
  • the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, or the like.
  • the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , ⁇ 816.
  • the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps in the above method.
  • the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components.
  • the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
  • the memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, and so on.
  • the memory 804 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable and removable Programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable and removable Programmable read only memory
  • PROM programmable read only memory
  • ROM read only memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • the power supply component 806 provides power to various components of the electronic device 800.
  • the power component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundary of the touch or sliding action, but also detect the duration and pressure related to the touch or sliding operation.
  • the multimedia component 808 includes a front camera and/or a rear camera. When the device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 810 is configured to output and/or input audio signals.
  • the audio component 810 includes a microphone (MIC).
  • the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
  • the audio component 810 further includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
  • the peripheral interface module may be a keyboard, a click wheel, or a button. These buttons may include, but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 814 includes one or more sensors for providing the electronic device 800 with status assessment in various aspects.
  • the sensor component 814 can detect the on/off state of the device 800, and the relative positioning of the components, for example, the component is the display and keypad of the electronic device 800, and the sensor component 814 can also detect the electronic device 800 or one of the electronic devices 800.
  • the position of the component changes, the presence or absence of user contact with the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
  • the sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 814 may further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
  • the electronic device 800 may access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof.
  • the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 800 may be controlled by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), or A microcontroller, a microcontroller, a microprocessor or other electronic components are implemented to perform the above method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • PLDs programmable logic devices
  • FPGAs field programmable gate arrays
  • a microcontroller, a microcontroller, a microprocessor or other electronic components are implemented to perform the above method.
  • a non-transitory computer-readable storage medium including instructions is also provided, for example, a memory 804 including instructions, which can be executed by the processor 820 of the electronic device 800 to complete the above method.
  • the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, or the like.
  • FIG. 8 is a block diagram of an electronic device 1900 shown in this application.
  • the electronic device 1900 may be provided as a server.
  • the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by the memory 1932 for storing instructions executable by the processing component 1922, such as application programs.
  • the application programs stored in the memory 1932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above method.
  • the electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to the network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate an operating system based on the memory 1932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

本申请示出了一种图像风格迁移方法、装置、电子设备及存储介质,其中图像风格迁移方法包括:获取待处理图像;采用风格迁移模型,对待处理图像进行处理,得到第一风格化图像;风格迁移模型是预先根据内容图像、第二风格化图像以及第三风格化图像进行模型训练得到的,第二风格化图像是对内容图像进行风格化处理得到的,第三风格化图像是采用神经网络模型对内容图像进行处理得到的。本申请采用预先训练得到的风格迁移模型对待处理图像进行风格迁移处理,避免在执行风格迁移的过程中对损失函数进行求解优化等过程,从而实现快速风格迁移;并且,风格迁移模型是采用成对的输入输出样本对神经网络模型进行监督训练得到的,可以提升模型的风格化效果。

Description

图像风格迁移方法、装置、电子设备及存储介质
相关申请的交叉引用
本申请要求在2018年12月28日提交中国专利局、申请号为201811627179.8、申请名称为“图像风格迁移方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及一种图像风格迁移方法、装置、电子设备及存储介质。
背景技术
在图像处理和计算机图形学领域,图像风格迁移(IST,Image Style Transfer)是一项非常重要且富有挑战性的课题。根据实际处理的不同问题场景,IST又分为艺术风格迁移、保真风格迁移、语义风格迁移等子课题。IST具有广阔的应用场景,包括图像编辑、图像合成、图像特效等。
目前研究IST的方法一般运用卷积神经网络(CNN,Convolutional Neural Networks)提取内容(content)和风格(style)图的特征并构建Gram矩阵,从而定义内容损失和风格损失,然后优化求解得到风格化图。发明人发现这种方法虽然可以得到不错的风格化结果,但往往求解优化问题需要很长时间,不能快速实现风格迁移。
发明内容
为克服相关技术中存在的问题,本申请提供一种图像风格迁移方法、装置、电子设备及存储介质。
根据本申请的第一方面,提供一种图像风格迁移方法,所述方法包括:
获取待处理图像;
采用风格迁移模型,对所述待处理图像进行处理,得到第一风格化图像;所述风格迁移模型是预先根据内容图像、第二风格化图像以及第三风格化图像进行模型训练得到的,其中,所述第二风格化图像是对所述内容图像进行风格化处理得到的,所述第三风格化图像是采用神经网络模型对所述内容图像进行处理得到的。
根据本申请的第二方面,提供一种图像风格迁移装置,所述装置包括:
获取模块,被配置为获取待处理图像;
风格化模块,被配置为采用风格迁移模型,对所述待处理图像进行处理,得到第一风格化图像;所述风格迁移模型是预先根据内容图像、第二风格化图像以及第三风格化图像进行模型训练得到的,其中,所述第二风格化图像是对所述内容图像进行风格化处理得到的,所述第三风格化图像是采用神经网络模型对所述内容图像进行处理得到的。
根据本申请的第三方面,提供一种电子设备,所述电子设备包括:
处理器;
用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为执行如第一方面所述的图像风格迁移方法。
根据本申请的第四方面,提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如第一方面所述的图像风格迁移方法。
根据本申请的第五方面,提供一种计算机程序产品,当所述计算机程序产品中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如第一方面所述的图像风格迁移方法。
本申请提供的技术方案可以包括以下有益效果:
在本申请中,提供了一种图像风格迁移方法、装置、电子设备及存储介质,本申请技术方案采用预先训练得到的风格迁移模型对待处理图像进行风格迁移处理,避免在执行风格迁移的过程中对损失函数进行求解优化等过程,从而实现快速风格迁移;并且,风格迁移模型是采用成对的输入输出样本如 内容图像和第二风格化图像,对神经网络模型进行监督训练得到的,通过有标签样本的引入,可以提升模型的风格化效果。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。
图1是本申请示出的一种图像风格迁移方法的步骤流程图;
图2是本申请示出的一种获得风格迁移模型的步骤流程图;
图3是本申请示出的一种风格迁移模型的原理框图;
图4是本申请示出的一种获得风格迁移模型实现方式的步骤流程图;
图5是本申请示出的另一种获得风格迁移模型实现方式的步骤流程图;
图6是本申请示出的一种图像风格迁移装置的框图;
图7是本申请示出的一种电子设备的框图;
图8是本申请示出的一种电子设备的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。图像风格迁移(IST,Image Style Transfer)研究的是自然图片之间的风格转换,其任务是以原始图的内容为基础,将参考图的风格迁移上去,得到风格化图。图1是本申请示出的一种图像风格迁移方法的流程图,如图1所示,该方法应用于电子设备中,该方法包括以下步骤。
在步骤S101中,获取待处理图像。
具体地,获取待进行风格化迁移的图像。
在步骤S102中,采用风格迁移模型,对待处理图像进行处理,得到第一风格化图像;风格迁移模型是预先根据内容图像、第二风格化图像以及第三风格化图像进行模型训练得到的,其中,第二风格化图像是对内容图像进行 风格化处理得到的,第三风格化图像是采用神经网络模型对内容图像进行处理得到的。
具体地,采用预先训练好的风格迁移模型,对待处理图像进行风格迁移处理,得到第一风格化图像。由于本申请实施例采用的是预先训练好的风格迁移模型,因此,在进行风格迁移的过程中无需对损失函数进行梯度迭代计算,直接将待处理图像输入到风格迁移模型,即可输出得到第一风格化图像,这样就把现有生成风格化图像的“训练”的过程变成了一个“执行”预先训练好的风格迁移模型的过程,因此可以大大加快生成风格化图像的速度。
其中,风格迁移模型可以根据标签样本预先训练得到,标签样本包括内容图像以及根据内容图像预先进行风格化处理的第二风格化图像,采用神经网络模型对内容图像进行处理得到第三风格化图像,再根据内容图像、第二风格化图像以及第三风格化图像的关联特征对神经网络模型进行训练,得到风格迁移模型。其中,内容图像为未进行风格化处理的原始图像样本。
本申请实施例提供的图像风格迁移方法,采用预先训练得到的风格迁移模型对待处理图像进行风格迁移处理,无需在执行风格迁移的过程中对损失函数进行求解优化,从而实现快速风格迁移;并且,风格迁移模型是采用成对的输入输出样本如内容图像和第二风格化图像,对神经网络模型进行监督训练得到的,通过有标签样本的引入,可以提升模型的风格化效果。
在本申请实施例的一种实现方式中,在步骤S102之前,还可以包括:获得风格迁移模型的步骤,参照图2,获得风格迁移模型的步骤具体可以包括:
在步骤S201中,获取内容图像以及第二风格化图像。
具体地,第二风格化图像(stylized图)可以预先对内容图像(content图)进行风格化处理得到,例如可以通过画家完成风格化处理的过程。
在实际应用中,由于我们只能获得少量的标签样本(成对的内容图像和第二风格化图像),因此,可以采用单样本学习(One-Shot Learning)或少样本学习(Few-Shot Learning)的方法监督机器学习,少样本学习是利用一对或几对输入输出样本进行模型训练,其任务是通过借助大量无标签样本或先验 知识,根据少量标签样本完成模型训练。
根据实际可用的有标签样本的数量,借助无标签样本数据如大量的无标签内容图像帮助学习,即使用半监督学习算法的方式进行模型训练。
在实际应用中,例如可以采用1000张内容图像I c进行模型训练,其中1张为有标签的内容图像
Figure PCTCN2019114793-appb-000001
对应有1张第二风格化图像
Figure PCTCN2019114793-appb-000002
剩余999张内容图像为无标签的内容图像,用来辅助进行机器学习。需要说明的是,有标签的内容图像和对应的第二风格化图像可以有多对,在后续模型训练过程中,只需要遍历每一张内容图像和每一张第二风格化图像即可。
在步骤S202中,采用神经网络模型,对内容图像进行处理,得到第三风格化图像。
具体地,将内容图像I c(包括有标签的内容图像
Figure PCTCN2019114793-appb-000003
)输入到神经网络模型如卷积神经网络CNN,或者如图3所示的推理网络(Inference Network),进行风格化处理后得到第三风格化图像O。第三风格化图像O为内容图像I c对应的推理网络输出图,包括
Figure PCTCN2019114793-appb-000004
对应的推理网络输出图O OS
在步骤S203中,根据内容图像、第二风格化图像以及第三风格化图像的关联特征,对神经网络模型进行训练,得到风格迁移模型;其中,关联特征包括内容特征、风格特征、像素点特征以及语义特征中的至少一种。
具体地,可以采用图3中示出的Perceptual Loss网络(如VGG19)评价内容图像I c(包括有标签的内容图像
Figure PCTCN2019114793-appb-000005
)、第二风格化图像
Figure PCTCN2019114793-appb-000006
以及第三风格化图像O(包括有标签的内容图像
Figure PCTCN2019114793-appb-000007
对应的推理网络输出图O OS)之间的关联特征差异,确定损失函数,通过对损失函数进行优化求解,确定推理网络中的参数,得到风格迁移模型。
其中,关联特征包括内容特征、风格特征、像素点特征以及语义特征等的至少一种。
一种实现方式中,参照图4,在步骤S203中可以进一步包括:
在步骤S401中,根据第三风格化图像以及内容图像的内容特征差异,确定内容损失函数。
具体地,可以采用第三风格化图像O以及内容图像I c的图像特征表征内容特征,因此,内容损失函数可以采用如下公式计算得到:
Figure PCTCN2019114793-appb-000008
Figure PCTCN2019114793-appb-000009
其中,L是CNN网络卷积层的总数,i索引表示第i层卷积层,在每一层中共有N i组滤波器,每组滤波器对应的特征图总像素数为D i,F i(·)对应CNN第i层特征矩阵,(j,k)用于索引,α i用于平衡各层的权重。
在步骤S402中,根据第三风格化图像以及第二风格化图像的风格特征差异,确定风格损失函数。
具体地,可以采用第三风格化图像O以及第二风格化图像
Figure PCTCN2019114793-appb-000010
的Gram矩阵表征风格特征,因此,风格损失函数可以采用如下公式计算得到:
Figure PCTCN2019114793-appb-000011
Figure PCTCN2019114793-appb-000012
其中,L是CNN网络卷积层的总数,i索引表示第i层卷积层,在每一层中共有N i组滤波器,(j,k)用于索引,β i用于平衡各层的权重,G i(·)对应CNN第i层特征计算内积得到的Gram矩阵,λ s用于调节风格损失在总损失函数中所占的比例。
在步骤S403中,根据第三风格化图像以及第二风格化图像的像素点特征差异,确定像素损失函数。
具体地,可以采用第三风格化图像O中有标签的内容图像Icos对应的推理网络输出图O OS以及第二风格化图像
Figure PCTCN2019114793-appb-000013
的像素点数据(如灰度等)表征像素点特征,因此,像素损失函数可以采用如下公式计算得到:
L3=λ eL e
Figure PCTCN2019114793-appb-000014
其中,(j,k)用于索引,λ e用于调节像素损失在总损失函数中所占的比例,D OS为有标签的内容图像
Figure PCTCN2019114793-appb-000015
的总像素数。
在步骤S404中,根据内容损失函数、风格损失函数以及像素损失函数,确定神经网络模型的参数,得到风格迁移模型。
具体地,可以根据内容损失函数、风格损失函数以及像素损失函数之和,得到损失函数:
Figure PCTCN2019114793-appb-000016
然后对损失函数进行优化求解,确定神经网络模型的参数,得到风格迁移模型。
一种实现方式中,参照图5,在步骤S203中可以进一步包括:
在步骤S501中,对内容图像、第二风格化图像以及第三风格化图像进行语义分割,得到多个语义类别。
具体地,语义分割是指将图像进行分割,根据分割结果确定物体的类别(语义类别),比如猫、狗等等。在实际应用中,语义分割可以通过手动或者机器自动分割等方式实现。
在步骤S502中,根据内容图像、第二风格化图像以及第三风格化图像,计算各语义类别对应的损失函数。
例如,可以采用图4所示实施例提供的方法,分别计算各语义类别对应的内容损失函数、风格损失函数以及像素损失函数等,具体可以包括如下步骤:
根据第三风格化图像以及内容图像中各语义类别对应的内容特征差异,确定各语义类别对应的内容损失函数;
根据第三风格化图像以及第二风格化图像中各语义类别对应的风格特征差异,确定各语义类别对应的风格损失函数;
根据第三风格化图像以及第二风格化图像中各语义类别对应的像素点特征差异,确定各语义类别对应的像素损失函数。
在步骤S503中,根据各语义类别对应的损失函数,确定神经网络模型的参数,得到风格迁移模型。
具体地,可以将各语义类别对应的内容损失函数求和,得到内容损失函数;将各语义类别对应的风格损失函数求和,得到风格损失函数;将各语义类别对应的像素损失函数求和,得到像素损失函数;然后根据内容损失函数、风格损失函数以及像素损失函数,得到损失函数。例如对内容损失函数、风格损失函数以及像素损失函数求和,得到损失函数。对损失函数进行优化求解,可以确定神经网络模型的参数,得到风格迁移模型。
本申请实施例提供的图像风格迁移方法,通过加入语义分割,可以更好地区分不同语义类别,从而针对不同的语义类别分别进行损失函数的计算和优化,避免违反语义信息的风格化结果,从而使训练得到的风格迁移模型能够实现精准迁移,进一步提升整体风格化效果。
图6是本申请示出的一种图像风格迁移装置的框图。参照图6,该装置可以包括:
获取模块61,被配置为获取待处理图像;
风格化模块62,被配置为采用风格迁移模型,对待处理图像进行处理,得到第一风格化图像;风格迁移模型是预先根据内容图像、第二风格化图像以及第三风格化图像进行模型训练得到的,其中,第二风格化图像是对内容图像进行风格化处理得到的,第三风格化图像是采用神经网络模型对内容图像进行处理得到的。
在一个可选的实现方式中,装置还可以包括:模型训练模块63,被配置为获得风格迁移模型。模型训练模块63用于:
获取内容图像以及第二风格化图像;
采用神经网络模型,对内容图像进行处理,得到第三风格化图像;
根据内容图像、第二风格化图像以及第三风格化图像的关联特征,对神 经网络模型进行训练,得到风格迁移模型;其中,关联特征包括内容特征、风格特征、像素点特征以及语义特征中的至少一种。
在一个可选的实现方式中,模型训练模块63具体用于:
根据第三风格化图像以及内容图像的内容特征差异,确定内容损失函数;
根据第三风格化图像以及第二风格化图像的风格特征差异,确定风格损失函数;
根据第三风格化图像以及第二风格化图像的像素点特征差异,确定像素损失函数;
根据内容损失函数、风格损失函数以及像素损失函数,确定神经网络模型的参数,得到风格迁移模型。
具体地,模型训练模块63可以根据内容损失函数、风格损失函数以及像素损失函数之和,得到如下损失函数:
Figure PCTCN2019114793-appb-000017
其中,
Figure PCTCN2019114793-appb-000018
Figure PCTCN2019114793-appb-000019
Figure PCTCN2019114793-appb-000020
然后对损失函数进行优化求解,确定神经网络模型的参数,得到风格迁移模型。
在一个可选的实现方式中,模型训练模块63还用于:
对内容图像、第二风格化图像以及第三风格化图像进行语义分割,得到多个语义类别;
根据内容图像、第二风格化图像以及第三风格化图像,计算各语义类别 对应的损失函数;
根据各语义类别对应的损失函数,确定神经网络模型的参数,得到风格迁移模型。
具体的,模型训练模块63根据内容图像、第二风格化图像以及第三风格化图像,计算各语义类别对应的损失函数,包括:
根据第三风格化图像以及内容图像中各语义类别对应的内容特征差异,确定内容损失函数;
根据第三风格化图像以及第二风格化图像中各语义类别对应的风格特征差异,确定风格损失函数;
根据第三风格化图像以及第二风格化图像中各语义类别对应的像素点特征差异,确定像素损失函数。
关于上述实施例中的装置,其中各个模块执行操作的具体方式以及有益效果已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图7是本申请示出的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图7,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在设备800的操作。这 些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图像,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800的一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,运营商网络(如2G、3G、4G或5G),或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由电子设备800的处理器820执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
图8是本申请示出的一种电子设备1900的框图。例如,电子设备1900 可以被提供为一服务器。
参照图8,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。

Claims (10)

  1. 一种图像风格迁移方法,包括:
    获取待处理图像;
    采用风格迁移模型,对所述待处理图像进行处理,得到第一风格化图像;所述风格迁移模型是预先根据内容图像、第二风格化图像以及第三风格化图像进行模型训练得到的,其中,所述第二风格化图像是对所述内容图像进行风格化处理得到的,所述第三风格化图像是采用神经网络模型对所述内容图像进行处理得到的。
  2. 根据权利要求1所述的方法,在所述采用风格迁移模型,对所述待处理图像进行处理,得到第一风格化图像的步骤之前,还包括:获得所述风格迁移模型;
    所述获得所述风格迁移模型的步骤,包括:
    获取所述内容图像以及所述第二风格化图像;
    采用神经网络模型,对所述内容图像进行处理,得到第三风格化图像;
    根据所述内容图像、所述第二风格化图像以及所述第三风格化图像的关联特征,对所述神经网络模型进行训练,得到所述风格迁移模型;其中,所述关联特征包括内容特征、风格特征、像素点特征以及语义特征中的至少一种。
  3. 根据权利要求2所述的方法,所述根据所述内容图像、所述第二风格化图像以及所述第三风格化图像的关联特征,对所述神经网络模型进行训练,得到所述风格迁移模型的步骤,包括:
    根据所述第三风格化图像以及所述内容图像的内容特征差异,确定内容损失函数;
    根据所述第三风格化图像以及所述第二风格化图像的风格特征差异,确定风格损失函数;
    根据所述第三风格化图像以及所述第二风格化图像的像素点特征差异, 确定像素损失函数;
    根据所述内容损失函数、所述风格损失函数以及所述像素损失函数,确定所述神经网络模型的参数,得到所述风格迁移模型;或
    所述根据所述内容图像、所述第二风格化图像以及所述第三风格化图像的关联特征,对所述神经网络模型进行训练,得到所述风格迁移模型的步骤,包括:
    对所述内容图像、所述第二风格化图像以及所述第三风格化图像进行语义分割,得到多个语义类别;
    根据所述内容图像、所述第二风格化图像以及所述第三风格化图像,计算各所述语义类别对应的损失函数;
    根据各所述语义类别对应的损失函数,确定所述神经网络模型的参数,得到所述风格迁移模型。
  4. 根据权利要求3所述的方法,根据所述内容图像、所述第二风格化图像以及所述第三风格化图像,计算各所述语义类别对应的损失函数,包括:
    根据所述第三风格化图像以及所述内容图像中各语义类别对应的内容特征差异,确定内容损失函数;
    根据所述第三风格化图像以及所述第二风格化图像中各语义类别对应的风格特征差异,确定风格损失函数;
    根据所述第三风格化图像以及所述第二风格化图像中各语义类别对应的像素点特征差异,确定像素损失函数。
  5. 一种图像风格迁移装置,包括:
    获取模块,被配置为获取待处理图像;
    风格化模块,被配置为采用风格迁移模型,对所述待处理图像进行处理,得到第一风格化图像;所述风格迁移模型是预先根据内容图像、第二风格化图像以及第三风格化图像进行模型训练得到的,其中,所述第二风格化图像是对所述内容图像进行风格化处理得到的,所述第三风格化图像是采用神经网络模型对所述内容图像进行处理得到的。
  6. 根据权利要求5所述的装置,还包括:模型训练模块,被配置为获得所述风格迁移模型;
    所述模型训练模块,用于:
    获取所述内容图像以及所述第二风格化图像;
    采用神经网络模型,对所述内容图像进行处理,得到第三风格化图像;
    根据所述内容图像、所述第二风格化图像以及所述第三风格化图像的关联特征,对所述神经网络模型进行训练,得到所述风格迁移模型;其中,所述关联特征包括内容特征、风格特征、像素点特征以及语义特征中的至少一种。
  7. 根据权利要求6所述的装置,所述模型训练模块具体用于:
    根据所述第三风格化图像以及所述内容图像的内容特征差异,确定内容损失函数;
    根据所述第三风格化图像以及所述第二风格化图像的风格特征差异,确定风格损失函数;
    根据所述第三风格化图像以及所述第二风格化图像的像素点特征差异,确定像素损失函数;
    根据所述内容损失函数、所述风格损失函数以及所述像素损失函数,确定所述神经网络模型的参数,得到所述风格迁移模型;
    或者所述模型训练模块还用于:
    对所述内容图像、所述第二风格化图像以及所述第三风格化图像进行语义分割,得到多个语义类别;
    根据所述内容图像、所述第二风格化图像以及所述第三风格化图像,计算各所述语义类别对应的损失函数;
    根据各所述语义类别对应的损失函数,确定所述神经网络模型的参数,得到所述风格迁移模型。
  8. 根据权利要求7所述的装置,所述模型训练模块还用于:
    根据所述第三风格化图像以及所述内容图像中各语义类别对应的内容特 征差异,确定内容损失函数;
    根据所述第三风格化图像以及所述第二风格化图像中各语义类别对应的风格特征差异,确定风格损失函数;
    根据所述第三风格化图像以及所述第二风格化图像中各语义类别对应的像素点特征差异,确定像素损失函数。
  9. 一种电子设备,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行如权利要求1-4任一项所述的方法。
  10. 一种非临时性计算机可读存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如权利要求1-4任一项所述的方法。
PCT/CN2019/114793 2018-12-28 2019-10-31 图像风格迁移方法、装置、电子设备及存储介质 Ceased WO2020134556A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811627179.8 2018-12-28
CN201811627179.8A CN109859096A (zh) 2018-12-28 2018-12-28 图像风格迁移方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2020134556A1 true WO2020134556A1 (zh) 2020-07-02

Family

ID=66893099

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114793 Ceased WO2020134556A1 (zh) 2018-12-28 2019-10-31 图像风格迁移方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN109859096A (zh)
WO (1) WO2020134556A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115994853A (zh) * 2023-01-20 2023-04-21 Oppo广东移动通信有限公司 图像处理方法、装置、计算机设备及存储介质
GB2615396A (en) * 2021-12-02 2023-08-09 Bosch Gmbh Robert System and method for augmenting vision transformers
CN116935057A (zh) * 2023-06-06 2023-10-24 浙江大华技术股份有限公司 目标评价方法、电子设备和计算机可读存储介质
CN117314731A (zh) * 2022-06-20 2023-12-29 北京小米移动软件有限公司 图像风格迁移方法、装置、电子设备和存储介质

Families Citing this family (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109859096A (zh) * 2018-12-28 2019-06-07 北京达佳互联信息技术有限公司 图像风格迁移方法、装置、电子设备及存储介质
EP3973497A4 (en) * 2019-06-11 2022-08-03 Guangdong Oppo Mobile Telecommunications Corp., Ltd. METHOD, SYSTEM AND COMPUTER READABLE MEDIA FOR STYLIZING VIDEO STILL FRAMES
CN110310222A (zh) * 2019-06-20 2019-10-08 北京奇艺世纪科技有限公司 一种图像风格迁移方法、装置、电子设备及存储介质
CN110598781A (zh) * 2019-09-05 2019-12-20 Oppo广东移动通信有限公司 图像处理方法、装置、电子设备及存储介质
CN110930295B (zh) * 2019-10-25 2023-12-26 广东开放大学(广东理工职业学院) 一种图像风格迁移方法、系统、装置和存储介质
CN111127309B (zh) * 2019-12-12 2023-08-11 杭州格像科技有限公司 肖像风格迁移模型训练方法、肖像风格迁移方法以及装置
CN113139893B (zh) * 2020-01-20 2023-10-03 北京达佳互联信息技术有限公司 图像翻译模型的构建方法和装置、图像翻译方法和装置
CN113259583B (zh) * 2020-02-13 2023-05-12 北京小米移动软件有限公司 一种图像处理方法、装置、终端及存储介质
CN111275057B (zh) 2020-02-13 2023-06-20 腾讯科技(深圳)有限公司 图像处理方法、装置及设备
CN113269213B (zh) * 2020-02-17 2023-06-30 百度在线网络技术(北京)有限公司 训练集的获取方法、装置及电子设备
CN111325664B (zh) * 2020-02-27 2023-08-29 Oppo广东移动通信有限公司 风格迁移方法、装置、存储介质及电子设备
CN111667399B (zh) * 2020-05-14 2023-08-25 华为技术有限公司 风格迁移模型的训练方法、视频风格迁移的方法以及装置
CN113763230B (zh) * 2020-06-04 2024-05-17 北京达佳互联信息技术有限公司 图像风格迁移模型训练方法、风格迁移方法及装置
CN111710011B (zh) * 2020-06-10 2021-06-25 广州梦映动漫网络科技有限公司 一种漫画生成方法、系统、电子设备及介质
CN112258381B (zh) * 2020-09-29 2024-02-09 北京达佳互联信息技术有限公司 模型训练方法、图像处理方法、装置、设备及存储介质
CN113393544B (zh) * 2020-09-30 2024-07-19 腾讯科技(深圳)有限公司 一种图像处理方法、装置、设备及介质
CN112383765B (zh) * 2020-11-10 2023-04-07 中移雄安信息通信科技有限公司 一种vr图像传输方法及装置
CN112581358B (zh) * 2020-12-17 2023-09-26 北京达佳互联信息技术有限公司 图像处理模型的训练方法、图像处理方法及装置
CN112734627B (zh) * 2020-12-24 2023-07-11 北京达佳互联信息技术有限公司 图像风格迁移模型的训练方法、图像风格迁移方法及装置
CN112581361B (zh) * 2020-12-30 2023-07-11 北京达佳互联信息技术有限公司 图像风格迁移模型的训练方法、图像风格迁移方法及装置
CN112883806B (zh) * 2021-01-21 2024-03-22 杭州广电云网络科技有限公司 基于神经网络的视频风格迁移方法、装置、计算机设备和存储介质
CN112785493B (zh) * 2021-01-22 2024-02-09 北京百度网讯科技有限公司 模型的训练方法、风格迁移方法、装置、设备及存储介质
CN112862669B (zh) * 2021-02-02 2024-02-09 百果园技术(新加坡)有限公司 图像生成模型的训练方法、生成方法、装置及设备
CN113822957B (zh) * 2021-02-26 2024-10-18 北京沃东天骏信息技术有限公司 用于合成图像的方法和装置
CN113052757B (zh) * 2021-03-08 2024-08-02 Oppo广东移动通信有限公司 图像处理方法、装置、终端及存储介质
CN113240576B (zh) * 2021-05-12 2024-04-30 北京达佳互联信息技术有限公司 风格迁移模型的训练方法、装置、电子设备及存储介质
CN113205448B (zh) * 2021-05-21 2025-02-11 珠海金山数字网络科技有限公司 图像处理方法及装置
CN113656126B (zh) * 2021-07-30 2023-10-27 北京数码大方科技股份有限公司 信息系统的菜单显示方法及菜单显示装置、电子设备
CN113688888B (zh) * 2021-08-13 2025-03-07 北京小米移动软件有限公司 一种图像处理方法、装置、计算机设备及存储介质
CN113793253A (zh) * 2021-08-30 2021-12-14 易佳慧 自动生成风格化视频的风格迁移系统
CN113793258B (zh) * 2021-09-18 2024-11-08 超级视线科技有限公司 监控视频图像的隐私保护方法及其装置
CN114387152A (zh) * 2021-12-08 2022-04-22 广州方硅信息技术有限公司 图片风格迁移模型的训练方法、装置、设备及存储介质
CN114298895B (zh) * 2021-12-24 2023-09-26 成都索贝数码科技股份有限公司 图像真实感风格迁移方法、装置、设备及存储介质
CN115063513B (zh) * 2022-05-09 2025-07-15 网易(杭州)网络有限公司 一种图像处理方法以及装置
CN115908109A (zh) * 2022-11-02 2023-04-04 阿里巴巴(中国)有限公司 人脸图像风格化模型训练方法、设备和存储介质
CN118014820B (zh) * 2023-12-27 2024-08-13 拓元(广州)智慧科技有限公司 一种风格化图像生成方法、装置、设备及存储介质
CN119741188B (zh) * 2024-11-26 2025-08-19 中南大学 一种基于区域语义的数字湘绣图像的风格迁移方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651766A (zh) * 2016-12-30 2017-05-10 深圳市唯特视科技有限公司 一种基于深度卷积神经网络的图像风格迁移方法
CN108537776A (zh) * 2018-03-12 2018-09-14 维沃移动通信有限公司 一种图像风格迁移模型生成方法及移动终端
US20180300850A1 (en) * 2017-04-14 2018-10-18 Facebook, Inc. Artifact reduction for image style transfer
CN109859096A (zh) * 2018-12-28 2019-06-07 北京达佳互联信息技术有限公司 图像风格迁移方法、装置、电子设备及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3507773A1 (en) * 2016-09-02 2019-07-10 Artomatix Ltd. Systems and methods for providing convolutional neural network based image synthesis using stable and controllable parametric models, a multiscale synthesis framework and novel network architectures
US10916001B2 (en) * 2016-11-28 2021-02-09 Adobe Inc. Facilitating sketch to painting transformations
CN107392842B (zh) * 2017-06-30 2021-05-21 北京奇虎科技有限公司 图像风格化处理方法、装置、计算设备及计算机存储介质
CN107977414B (zh) * 2017-11-22 2021-10-12 西安财经学院 基于深度学习的图像风格迁移方法及其系统
CN108629747B (zh) * 2018-04-25 2019-12-10 腾讯科技(深圳)有限公司 图像增强方法、装置、电子设备及存储介质
CN108596830B (zh) * 2018-04-28 2022-04-22 国信优易数据股份有限公司 一种图像风格迁移模型训练方法以及图像风格迁移方法
CN108765278B (zh) * 2018-06-05 2023-04-07 Oppo广东移动通信有限公司 一种图像处理方法、移动终端及计算机可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651766A (zh) * 2016-12-30 2017-05-10 深圳市唯特视科技有限公司 一种基于深度卷积神经网络的图像风格迁移方法
US20180300850A1 (en) * 2017-04-14 2018-10-18 Facebook, Inc. Artifact reduction for image style transfer
CN108537776A (zh) * 2018-03-12 2018-09-14 维沃移动通信有限公司 一种图像风格迁移模型生成方法及移动终端
CN109859096A (zh) * 2018-12-28 2019-06-07 北京达佳互联信息技术有限公司 图像风格迁移方法、装置、电子设备及存储介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2615396A (en) * 2021-12-02 2023-08-09 Bosch Gmbh Robert System and method for augmenting vision transformers
US12327331B2 (en) 2021-12-02 2025-06-10 Robert Bosch Gmbh System and method for augmenting vision transformers
CN117314731A (zh) * 2022-06-20 2023-12-29 北京小米移动软件有限公司 图像风格迁移方法、装置、电子设备和存储介质
CN115994853A (zh) * 2023-01-20 2023-04-21 Oppo广东移动通信有限公司 图像处理方法、装置、计算机设备及存储介质
CN116935057A (zh) * 2023-06-06 2023-10-24 浙江大华技术股份有限公司 目标评价方法、电子设备和计算机可读存储介质

Also Published As

Publication number Publication date
CN109859096A (zh) 2019-06-07

Similar Documents

Publication Publication Date Title
WO2020134556A1 (zh) 图像风格迁移方法、装置、电子设备及存储介质
CN114266840B (zh) 图像处理方法、装置、电子设备及存储介质
US11556761B2 (en) Method and device for compressing a neural network model for machine translation and storage medium
WO2020172979A1 (zh) 数据处理方法和装置、电子设备和存储介质
EP3057304B1 (en) Method and apparatus for generating image filter
CN111160448B (zh) 一种图像分类模型的训练方法及装置
CN111462268A (zh) 图像重建方法及装置、电子设备和存储介质
TW202030648A (zh) 一種目標對象處理方法、裝置、電子設備及儲存介質
CN112148980B (zh) 基于用户点击的物品推荐方法、装置、设备和存储介质
WO2020088126A1 (zh) 视频推荐方法、装置和计算机可读存储介质
CN104156915A (zh) 肤色调整方法和装置
US10248855B2 (en) Method and apparatus for identifying gesture
CN107133354B (zh) 图像描述信息的获取方法及装置
CN109961094B (zh) 样本获取方法、装置、电子设备及可读存储介质
CN111259967A (zh) 图像分类及神经网络训练方法、装置、设备及存储介质
CN106485567B (zh) 物品推荐方法及装置
CN107967459B (zh) 卷积处理方法、装置及存储介质
CN109919829A (zh) 图像风格迁移方法、装置和计算机可读存储介质
CN116543211B (zh) 图像属性编辑方法、装置、电子设备和存储介质
CN110619325A (zh) 一种文本识别方法及装置
CN108898591A (zh) 图像质量的评分方法及装置、电子设备、可读存储介质
CN107194464A (zh) 卷积神经网络模型的训练方法及装置
WO2020019683A1 (zh) 一种输入方法、装置和电子设备
CN107341509A (zh) 卷积神经网络的训练方法及装置
CN111104807B (zh) 一种数据处理方法、装置和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19902044

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19902044

Country of ref document: EP

Kind code of ref document: A1