WO2020114047A1 - Image style transfer and data storage method and apparatus, and electronic device - Google Patents

Image style transfer and data storage method and apparatus, and electronic device Download PDF

Info

Publication number
WO2020114047A1
WO2020114047A1 PCT/CN2019/108272 CN2019108272W WO2020114047A1 WO 2020114047 A1 WO2020114047 A1 WO 2020114047A1 CN 2019108272 W CN2019108272 W CN 2019108272W WO 2020114047 A1 WO2020114047 A1 WO 2020114047A1
Authority
WO
WIPO (PCT)
Prior art keywords
style
target
feature map
intermediate feature
image
Prior art date
Application number
PCT/CN2019/108272
Other languages
French (fr)
Chinese (zh)
Inventor
许鸿民
张文波
郑文
Original Assignee
北京达佳互联信息技术有限公司
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 北京达佳互联信息技术有限公司 filed Critical 北京达佳互联信息技术有限公司
Publication of WO2020114047A1 publication Critical patent/WO2020114047A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Definitions

  • the present application relates to the field of image processing technology, and in particular, to image style transfer and data storage methods, devices, and electronic equipment.
  • Style Transfer is a technology that has received much attention in the field of image processing and computer vision in recent years, and has practical application value.
  • the style transfer can transform an Original Image into an artistically processed Stylized Image.
  • the style elements come from the image of Style Image.
  • any image can be transformed into an image with the style of Van Gogh's famous oil painting "Starry Sky” through style transfer.
  • Style Bank framework different styles are represented by the 128-dimensional Filter Bank in the middle, and each style has its own filter bank, which needs to be separately
  • the feature map of the output activation of the oscilloscope group of each style type is stored, so when more and more styles, the stored data will grow linearly, taking up a lot of storage space.
  • the purpose of the embodiments of the present application is to provide an image style transfer and data storage method, device and electronic equipment, so as to reduce the storage space occupation.
  • the specific technical solutions are as follows:
  • an embodiment of the present application provides a data storage method.
  • the method includes:
  • the output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
  • the data storage method according to an embodiment of the present application is based on a style separation framework.
  • the method further includes:
  • the target style type obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map
  • the target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  • an embodiment of the present application provides a method for transferring image styles.
  • the method includes:
  • the target style type obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map
  • the target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  • the image style transfer method according to an embodiment of the present application is based on a style separation framework.
  • an embodiment of the present application provides a data storage device.
  • the device includes:
  • the weight value determination module is configured to input images of various styles into a preset convolutional neural network model for training to obtain an intermediate feature map and group output of each of the style type filters. Activation is relative to the intermediate features The weight value of the graph;
  • the data storage module is configured to store the weight value of the output activation of each style type filter bank relative to the intermediate feature map and the intermediate feature map.
  • the data storage device of the embodiment of the present application is based on a style separation framework.
  • the data storage device of the embodiment of the present application further includes:
  • the first parameter acquisition module is configured to acquire an image to be styled to be transferred, a target style type to be converted, and the intermediate feature map;
  • a target weight value determination module configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type
  • the target filter bank determination module is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
  • the style transfer module is configured to process the to-be-style-transferred image through the output of the target filter bank to obtain the style-transferred image.
  • an image style transfer device including:
  • the second parameter acquisition module is configured to acquire the image to be styled, the target style type to be converted, and the preset intermediate feature map;
  • a weight value obtaining module configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type
  • the filter adjustment module is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
  • the image processing module is configured to process the to-be-style-transferred image through the target filter bank output activation to obtain the style-transferred image.
  • the image style migration device is based on a style separation framework.
  • an electronic device including:
  • Memory for storing processor executable instructions
  • the processor is configured to:
  • the output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
  • the electronic device of the embodiment of the present application is based on a style separation framework.
  • the above processor may also execute:
  • the target style type obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map
  • the target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  • an electronic device including:
  • Memory for storing processor executable instructions
  • the processor is configured to:
  • the target style type obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map
  • the target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  • the electronic device of the embodiment of the present application is based on a style separation framework.
  • an embodiment of the present application provides a non-transitory computer-readable storage medium.
  • the mobile terminal can execute a data storage method. Characteristically, the method includes:
  • the output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
  • the data storage method according to an embodiment of the present application is based on a style separation framework.
  • the method further includes:
  • the target style type obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map
  • the target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  • an embodiment of the present application provides a non-transitory computer-readable storage medium.
  • the mobile terminal can perform an image style transfer method, It is characterized in that the method includes:
  • the target style type obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map
  • the target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  • the image style transfer method according to an embodiment of the present application is based on a style separation framework.
  • an embodiment of the present application provides a computer program product.
  • the computer program product When executed on a processor, it implements:
  • the output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
  • the data storage method according to an embodiment of the present application is based on a style separation framework.
  • the method further includes:
  • the target style type obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map
  • the target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  • an embodiment of the present application provides a computer program product, which, when executed on a processor, implements:
  • the target style type obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map
  • the target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  • the image style transfer method according to an embodiment of the present application is based on a style separation framework.
  • the technical solution provided by the embodiments of the present application may include the following beneficial effects:
  • the weight values and intermediate features of the output activation of the filter bank of each style type relative to the intermediate feature map are stored
  • the data volume of the weight value is much smaller than the data volume of the feature map, so compared to storing a feature map for each style type filter bank separately, it can reduce the storage space occupation and save storage space.
  • FIG. 1 is a schematic flowchart of a data storage method according to an embodiment of the present application
  • FIG. 2 is another schematic flowchart of a data storage method according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for transferring image styles according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of a data storage device according to an embodiment of the present application.
  • FIG. 5 is another schematic diagram of a data storage device according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an image style migration device according to an embodiment of the present application.
  • FIG. 7 is a first schematic diagram of an electronic device according to an embodiment of this application.
  • FIG. 8 is a second schematic diagram of an electronic device according to an embodiment of the present application.
  • FIG. 9 is a third schematic diagram of the electronic device of the embodiment of the present application.
  • FIG. 10 is a fourth schematic diagram of the electronic device of the embodiment of the present application.
  • FIG. 11 is a schematic diagram of a preset convolutional neural network model according to an embodiment of the present application.
  • Style transfer is a technology that has attracted the attention of many scholars in the field of image processing/computer vision in recent years and has practical application value. Style transfer can transform an original image into a stylized image after artistic processing. The style element comes from another image called style image. A typical example is to transform any image into an image with the style of Van Gogh's famous oil painting "Starry Sky”.
  • Texture (Synthesis) is the predecessor of style transfer.
  • the method of texture generation is to model the texture at the pixel level.
  • the main purpose of this stage is to model the texture at the pixel level and migrate the given texture into the original image to generate the final texture image.
  • the field has made amazing progress.
  • the quality of the final texture image is greatly improved, which is called stylized image in style transfer, so there is the field of style transfer.
  • Style transfer is a method of texture modeling based on depth features. Therefore, the style transfer not only completes the more general texture generation, but also its technical characteristics are almost different from the texture generation.
  • the specific method of style transfer is to put the original image and the style image into a pre-trained convolutional neural network, such as VGG19 (Visual Geometry Group Network 19, Visual Geometry Group Network 19).
  • VGG19 Visual Geometry Group Network 19, Visual Geometry Group Network 19
  • Activations are functions that run on the neurons of the artificial neural network and are responsible for mapping the inputs of the neurons to the output.
  • NS Fest Neural Style
  • CIN Consumer Instance Normalization
  • Style Bank method e.g., NS (Neural Style) based on optimization methods
  • WCT whitening and coloring transforms
  • CIN-based method CIN-based method
  • Style Bank method Both of these methods are based on FNS) improvements. Therefore, they have a self-encoder structure in their network structure, namely the encoding network and the decoding network.
  • CIN method different styles are represented by different IN layer parameters. This means that each different style has its own different IN parameters.
  • Style Bank method different styles are represented by the middle 128-dimensional Filter Banks (filter bank). Similarly, each style has its own filter bank.
  • the style is expressed by the parameters of the IN layer or the parameters of the filter bank, and the content is expressed by other parameters in the network.
  • the style is more and more, the stored data will grow linearly, which will take up a lot of storage space.
  • the embodiments of the present application provide an efficient and interpretable data storage method.
  • the method includes:
  • the data storage method in the embodiment of the present application may be implemented by a processing system, and the processing system is any system capable of implementing the data storage method in the embodiment of the present application.
  • the processing system is any system capable of implementing the data storage method in the embodiment of the present application.
  • the processing system may be a device, including: a processor, a memory, a communication interface, and a bus; the processor, the memory, and a communication interface are connected through a bus and complete communication with each other; the memory stores executable program code; the processor reads the memory by The executable program code stored in the program runs the program corresponding to the executable program code, and is used to execute the data storage method of the embodiment of the present application.
  • the processing system may also be an application program for executing the data storage method of the embodiment of the present application at runtime.
  • the processing system may also be a storage medium for storing executable code, and the executable code is used to execute the data storage method of the embodiments of the present application.
  • the weight value of the intermediate feature map and the output activation of each style type filter bank capable of style transfer to the intermediate feature map is obtained.
  • the preset convolutional neural network model may be as shown in FIG. 11 and includes an encoder (Encoder), a decoder (Decoder), and a style representation part.
  • the style representation part is composed of style base (Style Basis) and style weights (Style Weights).
  • the pictures received by the preset convolutional neural network include: a set of content images and a set of style images. For each input content image, randomly select a mini-batch size style image from the style image set and train with the content image. It should be noted that the random sampling of style sets can ultimately guarantee the traversal of style image sets.
  • the specific training process can include:
  • the style training is: after obtaining the intermediate feature map of the content image, the style weight and the style base are weighted to obtain the style representation. Operate the intermediate feature map of the content image according to the style representation to obtain a stylized intermediate feature map, and then use the decoder to decode the stylized intermediate feature map into a stylized image. Then, input the stylized image and the input content image into the loss network at the same time, calculate the loss (Loss), and optimize the network through the back propagation algorithm (BackPropagationAlgorithm), and adjust the relevant values of all parts of the network.
  • the training process ends and the style weight corresponding to any style is finally determined.
  • the training process corresponds to the solid line in Figure 11.
  • the training of the self-encoder is: after obtaining the intermediate feature map of the content image, directly use the decoder to decode to obtain the reconstructed content image. Then calculate the mean square error (Mean Square Error) of the reconstructed image and the input image. Then through the back propagation algorithm (BackPropagationAlgorithm) to optimize the network, and adjust the network encoder and decoder related values. When the subjective judgment of the stylized image is qualified, the training process ends.
  • the training process corresponds to the dotted line in FIG. 11.
  • S102 Store the weight value of the output activation of each of the above-mentioned style-type filter banks relative to the above-mentioned intermediate feature map and the above-mentioned intermediate feature map.
  • the processing system stores the weight values of the output activation of each style type filter bank relative to the intermediate feature map and the intermediate feature map to a designated location for use in subsequent style transfer.
  • the weight of the intermediate feature value may be a set of weight value arrays used to represent different feature graph styles, and different types of styles may be represented by different weight value arrays.
  • the data storage method according to the embodiment of the present application may be based on a style separation framework, such as Style Bank.
  • style separation framework such as Style Bank.
  • the style is represented by the filter bank and Block-Wise (block dimension) coding, and the training of the decoding network is partially separated.
  • the filter bank in the Style Bank framework has better interpretation, but the utilization rate of the filter bank used in the style is actually low, and the exploration of redundancy between styles is feasible.
  • the parameters of the style can be shared, and all the styles that need to be expressed are represented by the same set of filters.
  • a set of weights representing different feature maps are used to represent each specific style. Therefore, the parameters of each style type can be expressed using the same set of filter banks. For each style itself, it only needs to be represented by a set of weight values.
  • the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
  • this method explores the association and redundancy between styles, so that the associations in styles can be expressed using shared parameters, thereby significantly reducing the parameters representing styles.
  • the method further includes:
  • S103 Obtain a style transfer image to be converted, a target style type to be converted, and the above intermediate feature map.
  • the user When the user needs to perform the style transfer, the user will determine the image to be style transferred, that is, the style transfer image, and the user will input the style type into which the style transfer image is converted, that is, select the target style type to be converted.
  • the processing system obtains the image to be style transferred, the target style type to be converted and the preset intermediate feature map.
  • S104 Acquire the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type.
  • the processing system stores the weight value of the output activation of the filter bank of each style type relative to the intermediate feature map in advance, and the processing system determines the weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map, that is, the target weight value And get the target weight value.
  • S105 Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation.
  • the processing system adjusts the weight of each feature in the intermediate feature map according to the target weight value to obtain the weight-adjusted feature map, that is, the output of the target filter bank is activated.
  • S106 Activate and process the image to be style-transferred through the output of the target filter bank to obtain an image after style transfer.
  • the processing system uses the output of the target filter bank to activate the processing of the image to be styled, converts the style type of the image to be styled to the target style type, and obtains the image after style transfer.
  • the target filter bank output activation required for conversion to the target style type is obtained through the target weight value and the intermediate feature map, and the target filter bank output activation is used to perform the style migration of the style migration image to realize the image Move to the specified style.
  • An embodiment of the present application also provides a method for transferring image styles. Referring to FIG. 3, the method includes:
  • S301 Obtain a style transfer image, a target style type to be converted, and a preset intermediate feature map.
  • the image style migration method in the embodiment of the present application may be implemented by a migration system, and the migration system is any system that can implement the image style migration method of the embodiment of the present application.
  • the migration system is any system that can implement the image style migration method of the embodiment of the present application.
  • the migration system may be a device, including: a processor, a memory, a communication interface, and a bus; the processor, the memory, and a communication interface are connected through a bus and complete communication with each other; the memory stores executable program code; the processor reads the memory by The executable program code stored in the program runs the program corresponding to the executable program code, and is used to execute the image style transfer method of the embodiment of the present application.
  • the migration system may also be an application program for executing the image style migration method of the embodiment of the present application at runtime.
  • the migration system may also be a storage medium for storing executable code, and the executable code is used to execute the image style migration method of the embodiment of the present application.
  • the user When the user needs to perform the style transfer, the user will determine the image to be style transferred, that is, the style transfer image, and the user will input the style type into which the style transfer image is converted, that is, select the target style type to be converted.
  • the migration system obtains the migration image to be styled, the target style type to be converted and the preset intermediate feature map.
  • the preset intermediate feature map can be obtained by training a preset convolutional neural network model.
  • S302 Acquire the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type.
  • the migration system stores the weight value of the output activation of the filter bank of each style type relative to the intermediate feature map in advance, and the migration system determines the weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map, that is, the target weight value And get the target weight value.
  • the step of pre-storing the weight values of each style type and the preset filter bank includes: inputting images of multiple style types into a preset convolutional neural network model for training to obtain an intermediate feature map and each of the above styles
  • the group filter output of the type filter activates the weight value relative to the above-mentioned intermediate feature map; the weight value of the output activation of each style-type filter bank relative to the above-mentioned intermediate feature map and the above-mentioned intermediate feature map are stored.
  • the migration system adjusts the weight of each feature in the intermediate feature map according to the target weight value to obtain the weight-adjusted feature map, that is, the output of the target filter bank is activated.
  • S304 Activate and process the to-be-style-transferred image through the above-mentioned target filter bank output activation to obtain the style-transferred image.
  • the migration system uses the target filter bank output to activate the processing of the image to be styled, converts the style type of the image to be styled to the target style type, and obtains the image after style transfer.
  • the above image style transfer method is based on a style separation framework, such as Style Bank.
  • style separation framework such as Style Bank.
  • the style is represented by the filter bank and the encoding, and the training of the decoding network is partially separated.
  • the filter bank in the Style Bank framework has better interpretation, the utilization rate of the filter bank used by the style is actually low, and the exploration of redundancy between styles is feasible.
  • the parameters of the style can be shared, and all the styles that need to be expressed are represented by the same set of filters.
  • a set of weights representing different feature maps are used to represent each specific style. Therefore, the parameters of each style type can be expressed using the same set of filters. For each style itself, it only needs to be represented by a set of weight values.
  • the target filter bank output activation required for conversion to the target style type is obtained through the target weight value and the preset intermediate feature map, and the target filter bank output activation is used to perform the style migration of the style migration image to achieve In order to transfer the image to the specified style.
  • the output of the filter bank that stores each style type activates the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than that of the feature map, so compared to A separate feature map is stored for each style of filter bank, which can reduce the amount of storage space occupied and save storage space.
  • the association and redundancy between styles are explored, so that the associations in styles can be expressed in the form of shared parameters, so that the parameters representing styles are significantly reduced.
  • An embodiment of the present application further provides a data storage device.
  • the device includes:
  • the weight value determination module 401 is configured to input images of various styles into a preset convolutional neural network model for training to obtain an intermediate feature map and group output activation of each of the aforementioned style type filters relative to the aforementioned intermediate feature map Weight value
  • the data storage module 402 is configured to store the weight value of the output activation of each of the aforementioned style-type filter banks relative to the aforementioned intermediate feature map and the aforementioned intermediate feature map.
  • the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
  • the data storage device of the embodiment of the present application is based on a style separation framework.
  • the data storage device further includes:
  • the first parameter obtaining module 403 is configured to obtain an image to be styled to be transferred, a target style type to be converted, and the above intermediate feature map;
  • the target weight value determination module 404 is configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
  • the target filter bank determination module 405 is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
  • the style transfer module 406 is configured to process the image to be style transferred through the output of the target filter bank to obtain an image after the style transfer.
  • An embodiment of the present application further provides an image style transfer device.
  • the device includes:
  • the second parameter obtaining module 601 is configured to obtain the image to be style-transferred, the target style type to be converted and the preset intermediate feature map;
  • the weight value obtaining module 602 is configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
  • the filter adjustment module 603 is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain a target filter bank output activation;
  • the image processing module 604 is configured to process the image to be style-transferred through the output of the target filter bank to obtain an image after style transfer.
  • the image style migration device is based on a style separation framework.
  • An embodiment of the present application also provides an electronic device, referring to FIG. 7, including:
  • a memory 702 for storing executable instructions of the processor 701;
  • processor 701 is configured as:
  • the weight value of the output activation of each of the aforementioned style-type filter banks with respect to the aforementioned intermediate feature map and the aforementioned intermediate feature map are stored.
  • the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
  • the electronic device of the embodiment of the present application is based on a style separation framework.
  • processor 701 may also execute:
  • the above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
  • the electronic device in this embodiment of the present application may be the apparatus 800 shown in FIG. 8.
  • the device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and so on.
  • the device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, ⁇ 816.
  • a processing component 802 a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, ⁇ 816.
  • the processing component 802 generally controls the overall operations of the 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 these data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, and so on.
  • the memory 804 may be implemented by any type of volatile or non-volatile 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 device 800.
  • the power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
  • the multimedia component 808 includes a screen that provides an output interface between the 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 When the device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, 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 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 device 800, and the sensor component 814 can also detect the position change of the device 800 or a component of the device 800 The presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and the temperature change of the 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 device 800 and other devices.
  • the 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 apparatus 800 may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are implemented to perform the above method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor or other electronic components are implemented to perform the above method.
  • a non-transitory computer-readable storage medium including instructions such as a memory 804 including instructions, is also provided.
  • the above instructions can be executed by the processor 820 of the 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.
  • the electronic device in this embodiment of the present application may be the apparatus 900 shown in FIG. 9.
  • the device 900 may be provided as a server.
  • the device 900 includes a processing component 922, which further includes one or more processors, and memory resources represented by the memory 932, for storing instructions executable by the processing component 922, such as application programs.
  • the application programs stored in the memory 932 may include one or more modules each corresponding to a set of instructions.
  • the processing component 922 is configured to execute instructions to perform the above method.
  • the device 900 may also include a power component 926 configured to perform power management of the device 900, a wired or wireless network interface 950 configured to connect the device 900 to the network, and an input/output (I/O) interface 958.
  • the device 900 can operate based on an operating system stored in the memory 932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
  • An embodiment of the present application also provides an electronic device, referring to FIG. 10, including:
  • the processor 1001 is configured as:
  • the above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
  • the electronic device of the embodiment of the present application is based on a style separation framework.
  • the electronic device in the embodiment of the present application may be the apparatus shown in FIG. 8 or FIG. 9.
  • An embodiment of the present application provides a non-transitory computer-readable storage medium.
  • the instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal can execute a data storage method.
  • the method includes:
  • the weight value of the output activation of each of the aforementioned style-type filter banks with respect to the aforementioned intermediate feature map and the aforementioned intermediate feature map are stored.
  • the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
  • the data storage method according to an embodiment of the present application is based on a style separation framework.
  • the method further includes:
  • the above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
  • An embodiment of the present application further provides a non-transitory computer-readable storage medium.
  • the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal can perform a method for transferring image styles.
  • the method includes:
  • the above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
  • the image style transfer method according to an embodiment of the present application is based on a style separation framework.
  • An embodiment of the present application also provides a computer program product.
  • a data storage method is implemented. The method includes:
  • the weight value of the output activation of each of the aforementioned style-type filter banks with respect to the aforementioned intermediate feature map and the aforementioned intermediate feature map are stored.
  • the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
  • the data storage method according to an embodiment of the present application is based on a style separation framework.
  • the method further includes:
  • the above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product is executed on a processor, a method for transferring image styles is implemented.
  • the method includes:
  • the above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
  • the image style transfer method according to an embodiment of the present application is based on a style separation framework.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Processing (AREA)

Abstract

An image style transfer and data storage method and apparatus, and an electronic device. The present invention is applicable in the technical field of image processing. The data storage method comprises: inputting images of a plurality of styles to a preset convolutional neural network model and performing training, obtaining intermediate feature maps and weights of output activation of each style filter bank with respect to the intermediate feature maps (S101); storing the intermediate feature maps and the weights of the output activation of each style filter bank with respect to the intermediate feature maps (S102). The data storage method stores, for a plurality of styles, the intermediate feature maps and the weights of the output activation of each style filter bank with respect to the intermediate feature maps, and the data volume of the weights is far less than that of the feature maps. Therefore, in comparison to storing one feature map for each style filter bank separately, the method can reduce the volume occupied in a storage space, thereby saving storage space.

Description

图像风格迁移及数据存储方法、装置和电子设备Image style transfer and data storage method, device and electronic equipment
本申请要求于2018年12月07日提交中国专利局、申请号为201811496794.X发明名称为“图像风格迁移及数据存储方法、装置和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the Chinese Patent Office on December 07, 2018, with the application number 201811496794.X and the invention titled "Image Style Migration and Data Storage Method, Device, and Electronic Equipment", all of which are approved by The reference is incorporated in this application.
技术领域Technical field
本申请涉及图像处理技术领域,特别是涉及图像风格迁移及数据存储方法、装置和电子设备。The present application relates to the field of image processing technology, and in particular, to image style transfer and data storage methods, devices, and electronic equipment.
背景技术Background technique
Style Transfer(风格迁移)是近年来在图像处理及计算机视觉领域中备受关注,并且具有实际应用价值的技术。风格迁移可以将一张Original Image(原始图像),转变成一张经过艺术加工的Stylized Image(风格化图像)。其中风格元素来自于Style Image(风格图像)的图像。例如,通过风格迁移将任意一张图像变为拥有梵高著名油画《星空》风格的图像。Style Transfer is a technology that has received much attention in the field of image processing and computer vision in recent years, and has practical application value. The style transfer can transform an Original Image into an artistically processed Stylized Image. The style elements come from the image of Style Image. For example, any image can be transformed into an image with the style of Van Gogh's famous oil painting "Starry Sky" through style transfer.
在基于Style Bank(风格分离)框架的风格迁移方法中,不同的风格是通过中间的128维的Filter Bank(滤波器组)来表示的,每一种风格都有自己的滤波器组,需要分别存储各风格类型的录波器组的输出激活的特征图,因此当风格越来越多,存储的数据将线性增长,占用大量存储空间。In the style transfer method based on the Style Bank framework, different styles are represented by the 128-dimensional Filter Bank in the middle, and each style has its own filter bank, which needs to be separately The feature map of the output activation of the oscilloscope group of each style type is stored, so when more and more styles, the stored data will grow linearly, taking up a lot of storage space.
发明内容Summary of the invention
本申请实施例的目的在于提供一种图像风格迁移及数据存储方法、装置和电子设备,以实现降低存储空间的占用量。具体技术方案如下:The purpose of the embodiments of the present application is to provide an image style transfer and data storage method, device and electronic equipment, so as to reduce the storage space occupation. The specific technical solutions are as follows:
第一方面,本申请实施例提供了一种数据存储方法,所述方法包括:In a first aspect, an embodiment of the present application provides a data storage method. The method includes:
将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各所述风格类型滤波器的组输出激活相对于所述中间特征图的权重值;Input images of multiple styles into a preset convolutional neural network model for training to obtain an intermediate feature map and a group output of each of the style type filters to activate a weight value relative to the intermediate feature map;
存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图。The output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
可选的,本申请实施例的数据存储方法基于风格分离框架。Optionally, the data storage method according to an embodiment of the present application is based on a style separation framework.
可选的,在所述存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图之后,所述方法还包括:Optionally, after the storing the output of each style-type filter bank activates the weight value relative to the intermediate feature map and the intermediate feature map, the method further includes:
获取待风格迁移图像、待转换的目标风格类型及所述中间特征图;Obtain the image to be styled, the target style type to be converted, and the intermediate feature map;
按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到 风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
第二方面,本申请实施例提供了一种图像风格迁移方法,所述方法包括:In a second aspect, an embodiment of the present application provides a method for transferring image styles. The method includes:
获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
可选的,本申请实施例的图像风格迁移方法基于风格分离框架。Optionally, the image style transfer method according to an embodiment of the present application is based on a style separation framework.
第三方面,本申请实施例提供了一种数据存储装置,所述装置包括:In a third aspect, an embodiment of the present application provides a data storage device. The device includes:
权重值确定模块,被配置为将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各所述风格类型滤波器的组输出激活相对于所述中间特征图的权重值;The weight value determination module is configured to input images of various styles into a preset convolutional neural network model for training to obtain an intermediate feature map and group output of each of the style type filters. Activation is relative to the intermediate features The weight value of the graph;
数据存储模块,被配置为存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图。The data storage module is configured to store the weight value of the output activation of each style type filter bank relative to the intermediate feature map and the intermediate feature map.
可选的,本申请实施例的数据存储装置基于风格分离框架。Optionally, the data storage device of the embodiment of the present application is based on a style separation framework.
可选的,本申请实施例的数据存储装置还包括:Optionally, the data storage device of the embodiment of the present application further includes:
第一参数获取模块,被配置为获取待风格迁移图像、待转换的目标风格类型及所述中间特征图;The first parameter acquisition module is configured to acquire an image to be styled to be transferred, a target style type to be converted, and the intermediate feature map;
目标权重值确定模块,被配置为按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;A target weight value determination module, configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
目标滤波器组确定模块,被配置为按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;The target filter bank determination module is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
风格迁移模块,被配置为通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The style transfer module is configured to process the to-be-style-transferred image through the output of the target filter bank to obtain the style-transferred image.
第四方面,本申请实施例提供了一种图像风格迁移装置,所述装置包括:According to a fourth aspect, an embodiment of the present application provides an image style transfer device, the device including:
第二参数获取模块,被配置为获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;The second parameter acquisition module is configured to acquire the image to be styled, the target style type to be converted, and the preset intermediate feature map;
权重值获取模块,被配置为按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;A weight value obtaining module configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
滤波器调整模块,被配置为按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;The filter adjustment module is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
图像处理模块,被配置为通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The image processing module is configured to process the to-be-style-transferred image through the target filter bank output activation to obtain the style-transferred image.
可选的,本申请实施例的图像风格迁移装置基于风格分离框架。Optionally, the image style migration device according to the embodiment of the present application is based on a style separation framework.
第五方面,本申请实施例提供了一种电子设备,包括:According to a fifth aspect, an embodiment of the present application provides an electronic device, including:
处理器;processor;
用于存储处理器可执行指令的存储器;Memory for storing processor executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured to:
将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各所述风格类型滤波器的组输出激活相对于所述中间特征图的权重值;Input images of multiple styles into a preset convolutional neural network model for training to obtain an intermediate feature map and a group output of each of the style type filters to activate a weight value relative to the intermediate feature map;
存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图。The output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
可选的,本申请实施例的电子设备基于风格分离框架。Optionally, the electronic device of the embodiment of the present application is based on a style separation framework.
可选的,上述处理器还可以执行:Optionally, the above processor may also execute:
获取待风格迁移图像、待转换的目标风格类型及所述中间特征图;Obtain the image to be styled, the target style type to be converted, and the intermediate feature map;
按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
第六方面,本申请实施例提供了一种电子设备,包括:According to a sixth aspect, an embodiment of the present application provides an electronic device, including:
处理器;processor;
用于存储处理器可执行指令的存储器;Memory for storing processor executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured to:
获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
可选的,本申请实施例的电子设备基于风格分离框架。Optionally, the electronic device of the embodiment of the present application is based on a style separation framework.
第七方面,本申请实施例提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种数据存储方法,其特征在于,所述方法包括:According to a seventh aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal can execute a data storage method. Characteristically, the method includes:
将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各所述风格类型滤波器的组输出激活相对于所述中间特征图的权重值;Input images of multiple styles into a preset convolutional neural network model for training to obtain an intermediate feature map and a group output of each of the style type filters to activate a weight value relative to the intermediate feature map;
存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图。The output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
可选的,本申请实施例的数据存储方法基于风格分离框架。Optionally, the data storage method according to an embodiment of the present application is based on a style separation framework.
可选的,在上述存储各上述风格类型的权重值及上述预设滤波器组之后,上述方法还包括:Optionally, after storing the weight values of the above style types and the preset filter bank, the method further includes:
获取待风格迁移图像、待转换的目标风格类型及所述中间特征图;Obtain the image to be styled, the target style type to be converted, and the intermediate feature map;
按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
第八方面,本申请实施例提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种图像风格迁移方法,其特征在于,所述方法包括:In an eighth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal can perform an image style transfer method, It is characterized in that the method includes:
获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
可选的,本申请实施例的图像风格迁移方法基于风格分离框架。Optionally, the image style transfer method according to an embodiment of the present application is based on a style separation framework.
第九方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品在处理器上被执行时,实现:In a ninth aspect, an embodiment of the present application provides a computer program product. When the computer program product is executed on a processor, it implements:
将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各所述风格类型滤波器的组输出激活相对于所述中间特征图的权重值;Input images of multiple styles into a preset convolutional neural network model for training to obtain an intermediate feature map and a group output of each style type filter to activate a weight value relative to the intermediate feature map;
存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图。The output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
可选的,本申请实施例的数据存储方法基于风格分离框架。Optionally, the data storage method according to an embodiment of the present application is based on a style separation framework.
可选的,在所述存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图之后,所述方法还包括:Optionally, after the storing the output of each style-type filter bank activates the weight value relative to the intermediate feature map and the intermediate feature map, the method further includes:
获取待风格迁移图像、待转换的目标风格类型及所述中间特征图;Obtain the image to be styled, the target style type to be converted, and the intermediate feature map;
按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
第十方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品在处理器上被执行时,实现:According to a tenth aspect, an embodiment of the present application provides a computer program product, which, when executed on a processor, implements:
获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
可选的,本申请实施例的图像风格迁移方法基于风格分离框架。Optionally, the image style transfer method according to an embodiment of the present application is based on a style separation framework.
本申请的实施例提供的技术方案可以包括以下有益效果:在本申请实施例中,针对多种风格类型,存储各风格类型的滤波器组的输出激活相对于中间特征图的权重值及中间特征图,而权重值的数据量远远小于特征图的数据量的,因此相比于针对每个风格类型的滤波器组单独存储一个特征图,可以降低存储空间的占用量,节约存储空间,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。The technical solution provided by the embodiments of the present application may include the following beneficial effects: In the embodiments of the present application, for multiple style types, the weight values and intermediate features of the output activation of the filter bank of each style type relative to the intermediate feature map are stored The data volume of the weight value is much smaller than the data volume of the feature map, so compared to storing a feature map for each style type filter bank separately, it can reduce the storage space occupation and save storage space. The general description and the detailed description below are only exemplary and explanatory, and do not limit the present disclosure.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, without paying any creative work, other drawings can be obtained based on these drawings.
图1是本申请实施例的数据存储方法的一种流程示意图;FIG. 1 is a schematic flowchart of a data storage method according to an embodiment of the present application;
图2是本申请实施例的数据存储方法的另一种流程示意图;2 is another schematic flowchart of a data storage method according to an embodiment of the present application;
图3是本申请实施例的图像风格迁移方法的一种流程示意图;3 is a schematic flowchart of a method for transferring image styles according to an embodiment of the present application;
图4是本申请实施例的数据存储装置的一种示意图;4 is a schematic diagram of a data storage device according to an embodiment of the present application;
图5是本申请实施例的数据存储装置的另一种示意图;5 is another schematic diagram of a data storage device according to an embodiment of the present application;
图6是本申请实施例的图像风格迁移装置的一种示意图;6 is a schematic diagram of an image style migration device according to an embodiment of the present application;
图7是本申请实施例的电子设备的第一种示意图;7 is a first schematic diagram of an electronic device according to an embodiment of this application;
图8是本申请实施例的电子设备的第二种示意图;8 is a second schematic diagram of an electronic device according to an embodiment of the present application;
图9是本申请实施例的电子设备的第三种示意图;9 is a third schematic diagram of the electronic device of the embodiment of the present application;
图10是本申请实施例的电子设备的第四种示意图;10 is a fourth schematic diagram of the electronic device of the embodiment of the present application;
图11是本申请实施例的预设卷积神经网络模型的一种示意图。FIG. 11 is a schematic diagram of a preset convolutional neural network model according to an embodiment of the present application.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail here, examples of which are shown in the drawings. When referring to the drawings below, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of devices and methods consistent with some aspects of the application as detailed in the appended claims.
首先对本申请实施例中的专业术语进行解释:First, the technical terms in the embodiments of the present application are explained:
风格迁移是一项近年来在图像处理/计算机视觉领域中受到众多学者关注的、并且有着实际应用价值的技术。风格迁移可以将一张原始图像,转变成一张经过艺术加工的风格化图像。其中风格元素来自于另一张称为风格图像的图像。一个典型的例子是将任意一张图像变为拥有梵高著名油画《星空》风格的图像。Style transfer is a technology that has attracted the attention of many scholars in the field of image processing/computer vision in recent years and has practical application value. Style transfer can transform an original image into a stylized image after artistic processing. The style element comes from another image called style image. A typical example is to transform any image into an image with the style of Van Gogh's famous oil painting "Starry Sky".
Texture Synthesis(纹理生成)是风格迁移的前身,纹理生成的方法是在像素级建模纹理的方法。此阶段的主要目的是在像素层面对纹理建模,并将给定的纹理迁移到原始图像中,生成最终的纹理图像。在将卷积神经网络引入这一经典问题后。该领域得到了惊人的进步。使得最终生成的纹理图像质量极大提高,在风格迁移中称为风格化图像,因此便有了风格迁移这一领域。风格迁移是基于深度特征来进行纹理建模的方法。因此风格迁移不仅完成的是更一般的纹理生成,同时,其技术特点也与纹理生成几乎不相同了。Texture (Synthesis) is the predecessor of style transfer. The method of texture generation is to model the texture at the pixel level. The main purpose of this stage is to model the texture at the pixel level and migrate the given texture into the original image to generate the final texture image. After introducing the convolutional neural network into this classic problem. The field has made amazing progress. The quality of the final texture image is greatly improved, which is called stylized image in style transfer, so there is the field of style transfer. Style transfer is a method of texture modeling based on depth features. Therefore, the style transfer not only completes the more general texture generation, but also its technical characteristics are almost different from the texture generation.
风格迁移的具体方法是将原始图像,风格图像一同放入一个预训练好的卷积神经网络,例如VGG19(Visual Geometry Group Network 19,视觉几何组网络19)。通过将原始图像的深度特征转变为与风格图像相似的深度特征,来达到将原始图像转变成风格图像的目的。The specific method of style transfer is to put the original image and the style image into a pre-trained convolutional neural network, such as VGG19 (Visual Geometry Group Network 19, Visual Geometry Group Network 19). By transforming the depth features of the original image into depth features similar to the style image, the purpose of transforming the original image into a style image is achieved.
Activations(输出激活),也称为激活函数或激励函数,在人工神经网络的神经元上运行的函数,负责将神经元的输入映射到输出端。Activations (output activation), also called activation functions or excitation functions, are functions that run on the neurons of the artificial neural network and are responsible for mapping the inputs of the neurons to the output.
在相关的风格迁移方案中,一般可以分为3种迁移类型:单风格迁移、多风格迁移及任意风格迁移。单风格迁移的经典方法包括:FNS(Fast Neural Style,快速神经风格)。多风格迁移的典型方法包括:基于CIN(Conditional Instance Normalization,条件实例归一化)的多风格方法,及Style Bank(风格银行)方法。任意风格迁移包括:基于优化的方法NS(Neural Style,神经风格),基于亮度和颜色转换的WCT(whitening and coloring transforms,亮度和色度转换)方法,及基于交换深度特征的方法等。In the related style migration scheme, there are generally three types of migration: single style migration, multi-style migration and arbitrary style migration. Classic methods for single style transfer include: FNS (Fast Neural Style). Typical methods of multi-style transfer include: multi-style method based on CIN (Conditional Instance Normalization), and Style Bank method. Arbitrary style transfer includes: NS (Neural Style) based on optimization methods, WCT (whitening and coloring transforms) methods based on brightness and color conversion, and methods based on exchanging depth features.
在多风格的迁移方法中主要有:基于CIN的方法及Style Bank方法。这两个方法都是基于FNS)改进,因此,它们的网络结构中都有自编码器结构,即编码网络和解码网络。在CIN方法中,不同的风格是通过不同的IN层的参数来表示的。这就表示,每一种不同的风格,都有各自的不同的IN参数。在Style Bank方法中,不同的风格是通过中间的128维的Filter Banks(滤波器组)来表示的,同样,每一种风格都有自己的滤波器组。Among the multi-style migration methods are: CIN-based method and Style Bank method. Both of these methods are based on FNS) improvements. Therefore, they have a self-encoder structure in their network structure, namely the encoding network and the decoding network. In the CIN method, different styles are represented by different IN layer parameters. This means that each different style has its own different IN parameters. In the Style Bank method, different styles are represented by the middle 128-dimensional Filter Banks (filter bank). Similarly, each style has its own filter bank.
上述两种方法中,无论是CIN方法还是Style Bank方法,由于风格由IN层的参数或者滤波器组的参数来表示,而内容的表示则由网络中的其他参数所共同表示。当风格越来越多,存储的数据将线性增长,会占用大量存储空间。In the above two methods, whether it is the CIN method or the Style Bank method, the style is expressed by the parameters of the IN layer or the parameters of the filter bank, and the content is expressed by other parameters in the network. When the style is more and more, the stored data will grow linearly, which will take up a lot of storage space.
有鉴于此,本申请实施例提供了一种高效的可解释的数据存储方法,参见图1,该方法包括:In view of this, the embodiments of the present application provide an efficient and interpretable data storage method. Referring to FIG. 1, the method includes:
S101,将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图(Intermediate Feature Maps)及各上述风格类型滤波器组的输出激活相对于上述中间特征图的权重值。S101, input images of various styles into a preset convolutional neural network model for training, and obtain intermediate feature maps (Intermediate Features) and output weights of the above-mentioned style type filter banks relative to the weights of the above intermediate feature maps value.
本申请实施例中的数据存储方法可以通过处理系统实现,处理系统为任意能够实现本申请实施例的数据存储方法的系统。例如:The data storage method in the embodiment of the present application may be implemented by a processing system, and the processing system is any system capable of implementing the data storage method in the embodiment of the present application. E.g:
处理系统可以为一种设备,包括:处理器、存储器、通信接口和总线;处理器、存储器和通信接口通过总线连接并完成相互间的通信;存储器存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行本申请实施例的数据存储方法。The processing system may be a device, including: a processor, a memory, a communication interface, and a bus; the processor, the memory, and a communication interface are connected through a bus and complete communication with each other; the memory stores executable program code; the processor reads the memory by The executable program code stored in the program runs the program corresponding to the executable program code, and is used to execute the data storage method of the embodiment of the present application.
处理系统还可以为一种应用程序,用于在运行时执行本申请实施例的数据存储方法。The processing system may also be an application program for executing the data storage method of the embodiment of the present application at runtime.
处理系统还可以为一种存储介质,用于存储可执行代码,可执行代码用于执行本申请实施例的数据存储方法。The processing system may also be a storage medium for storing executable code, and the executable code is used to execute the data storage method of the embodiments of the present application.
通过相关的神经网络训练方法,得到中间特征图及可风格迁移的各风格类型的滤波器组的输出激活对于中间特征图的权重值。Through the related neural network training method, the weight value of the intermediate feature map and the output activation of each style type filter bank capable of style transfer to the intermediate feature map is obtained.
预设卷积神经网络模型可以如图11所示,包括:编码器(Encoder),解码器(Decoder),以及风格表示部分。其中风格表示部分又由风格基(Style Basis)和风格权值(Style Weights)组成。The preset convolutional neural network model may be as shown in FIG. 11 and includes an encoder (Encoder), a decoder (Decoder), and a style representation part. The style representation part is composed of style base (Style Basis) and style weights (Style Weights).
在训练过程中,预设卷积神经网络接收的图片包括:内容图像集合及风格图像集合。对每一张输入的内容图像,随机从风格图像集合中抽取最小批处理大小(mini-batch size)张的风格图像与该内容图像一起训练。需要注意的是,随机对风格集合的抽样,最终是可以保证遍历风格图像集合。具体训练过程可以包括:During the training process, the pictures received by the preset convolutional neural network include: a set of content images and a set of style images. For each input content image, randomly select a mini-batch size style image from the style image set and train with the content image. It should be noted that the random sampling of style sets can ultimately guarantee the traversal of style image sets. The specific training process can include:
将内容图像输入到编码器中得到中间特征图,然后采用T+1的训练策略,包括T轮进行风格训练,1轮进行自编码器训练。Input the content image into the encoder to get the intermediate feature map, and then use T+1 training strategy, including T round for style training and 1 round for self-encoder training.
其中,风格训练为:当得到内容图像的中间特征图后,由风格权值和风格基,加权计算得到风格表示。按照该风格表示对内容图像的中间特征图操作得到风格化的中间特征图,然后用解码器将风格化的中间特征图解码为风格化图像。再接着,将风格化的图像和输入的内容图像同时输入损失网络中,计算损失(Loss),并通过反向传播算法(Back Propagation Algorithm)优化网络,并且调节网络中所有部分的相关值。当最终风格化图像主观判定合格时,训练过程结束,最终确定任意风格所对应的风格权值。训练过程对应图11中实 线部分。Among them, the style training is: after obtaining the intermediate feature map of the content image, the style weight and the style base are weighted to obtain the style representation. Operate the intermediate feature map of the content image according to the style representation to obtain a stylized intermediate feature map, and then use the decoder to decode the stylized intermediate feature map into a stylized image. Then, input the stylized image and the input content image into the loss network at the same time, calculate the loss (Loss), and optimize the network through the back propagation algorithm (BackPropagationAlgorithm), and adjust the relevant values of all parts of the network. When the subjective judgment of the final stylized image is qualified, the training process ends and the style weight corresponding to any style is finally determined. The training process corresponds to the solid line in Figure 11.
自编码器的训练为:当得到内容图像的中间特征图后,直接使用解码器解码得到重构的内容图像。然后计算重构图像和输入图像的均方误差(Mean Square Error)。再通过反向传播算法(Back Propagation Algorithm)优化网络,并且调节网络中编码器和解码器的相关值。当风格化图像主观判定合格时,训练过程结束。训练过程对应图11中虚线部分。The training of the self-encoder is: after obtaining the intermediate feature map of the content image, directly use the decoder to decode to obtain the reconstructed content image. Then calculate the mean square error (Mean Square Error) of the reconstructed image and the input image. Then through the back propagation algorithm (BackPropagationAlgorithm) to optimize the network, and adjust the network encoder and decoder related values. When the subjective judgment of the stylized image is qualified, the training process ends. The training process corresponds to the dotted line in FIG. 11.
S102,存储各上述风格类型滤波器组的输出激活相对于上述中间特征图的权重值及上述中间特征图。S102: Store the weight value of the output activation of each of the above-mentioned style-type filter banks relative to the above-mentioned intermediate feature map and the above-mentioned intermediate feature map.
处理系统将各风格类型的滤波器组的输出激活相对于中间特征图的权重值及中间特征图存储到指定位置,以供后续进行风格迁移时使用。The processing system stores the weight values of the output activation of each style type filter bank relative to the intermediate feature map and the intermediate feature map to a designated location for use in subsequent style transfer.
其中,上述中间特征值的权重可以为用于表示不同特征图风格的一组权重值数组,不同类型的风格可以通过不同的权重值数组进行表示。Wherein, the weight of the intermediate feature value may be a set of weight value arrays used to represent different feature graph styles, and different types of styles may be represented by different weight value arrays.
可选的,本申请实施例的数据存储方法可以基于风格分离框架,例如Style Bank等。在风格分离的框架中,通过滤波器组与Block-Wise(块维度的)编码表示风格,解码网络的训练是部分分离的。在风格分离框架,例如Style Bank框架中的滤波器组具有更好的解释性,但风格所使用的滤波器组的利用率实际偏低,风格之间的冗余性的探索是可行的。基于此,可以将风格的参数共享,所有需要表示的风格均使用同一组滤波器来表示,对于不同的风格,使用一组表示不同特征图的权重来表示各特定的风格。因此,各风格类型的参数可以使用同一组滤波器组来表示。对于每一种风格本身而言,只需要用一组权重值来表示即可。Optionally, the data storage method according to the embodiment of the present application may be based on a style separation framework, such as Style Bank. In the framework of style separation, the style is represented by the filter bank and Block-Wise (block dimension) coding, and the training of the decoding network is partially separated. In the style separation framework, for example, the filter bank in the Style Bank framework has better interpretation, but the utilization rate of the filter bank used in the style is actually low, and the exploration of redundancy between styles is feasible. Based on this, the parameters of the style can be shared, and all the styles that need to be expressed are represented by the same set of filters. For different styles, a set of weights representing different feature maps are used to represent each specific style. Therefore, the parameters of each style type can be expressed using the same set of filter banks. For each style itself, it only needs to be represented by a set of weight values.
在本申请实施例中,针对多种风格类型,存储各风格类型的滤波器组的输出激活相对于中间特征图的权重值及中间特征图,而权重值的数据量远远小于特征图的数据量的,因此相比于针对每个风格类型的滤波器组单独存储一个特征图,可以降低存储空间的占用量,节约存储空间。除此之外,本方法探索了风格之间的关联和冗余性,使得风格中的关联性得以使用共享参数的方式表达,从而使得表示风格的参数明显减少。使用风格分离的框架来单独表示风格,同时,使单独表示的风格尽量共享参数。得益于各风格类型之间的额关联性表示,使得存储风格的参数降低。同时保留少量的通道权值来表示独立的风格。In the embodiment of the present application, for multiple style types, the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space. In addition, this method explores the association and redundancy between styles, so that the associations in styles can be expressed using shared parameters, thereby significantly reducing the parameters representing styles. Use a style-separated framework to express styles individually, and at the same time, make the styles expressed separately share parameters as much as possible. Thanks to the representation of the correlation between each style type, the parameters of the stored style are reduced. At the same time, a small number of channel weights are reserved to represent independent styles.
可选的,参见图2,在上述存储各上述风格类型滤波器组的输出激活相对于上述中间特征图的权重值及上述中间特征图之后,上述方法还包括:Optionally, referring to FIG. 2, after the storage of the output of each of the above-mentioned style type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map, the method further includes:
S103,获取待风格迁移图像、待转换的目标风格类型及上述中间特征图。S103: Obtain a style transfer image to be converted, a target style type to be converted, and the above intermediate feature map.
在用户需要进行风格迁移时,用户会确定待进行风格迁移的图像,即待风格迁移图像,同时用户会输入将待风格迁移图像转换为何种风格类型,即选定待转换的目标风格类型。处理系统获取待风格迁移图像、待转换的目标风格类型及预设中间特征图。When the user needs to perform the style transfer, the user will determine the image to be style transferred, that is, the style transfer image, and the user will input the style type into which the style transfer image is converted, that is, select the target style type to be converted. The processing system obtains the image to be style transferred, the target style type to be converted and the preset intermediate feature map.
S104,按照上述目标风格类型,获取上述目标风格类型的滤波器组的输 出激活相对于上述中间特征图的目标权重值。S104: Acquire the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type.
处理系统提前存储了各风格类型的滤波器组的输出激活相对于中间特征图的权重值,处理系统确定目标风格类型的滤波器组的输出激活相对于中间特征图的权重值,即目标权重值,并获取目标权重值。The processing system stores the weight value of the output activation of the filter bank of each style type relative to the intermediate feature map in advance, and the processing system determines the weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map, that is, the target weight value And get the target weight value.
S105,按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活。S105: Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation.
处理系统按照目标权重值,调整中间特征图中各特征的权重,得到权重调整后的特征图,即目标滤波器组输出激活。The processing system adjusts the weight of each feature in the intermediate feature map according to the target weight value to obtain the weight-adjusted feature map, that is, the output of the target filter bank is activated.
S106,通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。S106: Activate and process the image to be style-transferred through the output of the target filter bank to obtain an image after style transfer.
处理系统通过目标滤波器组输出激活对待风格迁移图像进行处理,将待风格迁移图像的风格类型转换为目标风格类型,得到风格迁移后的图像。The processing system uses the output of the target filter bank to activate the processing of the image to be styled, converts the style type of the image to be styled to the target style type, and obtains the image after style transfer.
在本申请实施例中,通过目标权重值及中间特征图,得到转换为目标风格类型所需的目标滤波器组输出激活,利用目标滤波器组输出激活对待风格迁移图像进行风格迁移,实现了图像向指定类型的风格迁移。In the embodiment of the present application, the target filter bank output activation required for conversion to the target style type is obtained through the target weight value and the intermediate feature map, and the target filter bank output activation is used to perform the style migration of the style migration image to realize the image Move to the specified style.
本申请实施例还提供了一种图像风格迁移方法,参见图3,该方法包括:An embodiment of the present application also provides a method for transferring image styles. Referring to FIG. 3, the method includes:
S301,获取待风格迁移图像、待转换的目标风格类型及预设中间特征图。S301: Obtain a style transfer image, a target style type to be converted, and a preset intermediate feature map.
本申请实施例中的图像风格迁移方法可以通过迁移系统实现,迁移系统为任意能够实现本申请实施例的图像风格迁移方法的系统。例如:The image style migration method in the embodiment of the present application may be implemented by a migration system, and the migration system is any system that can implement the image style migration method of the embodiment of the present application. E.g:
迁移系统可以为一种设备,包括:处理器、存储器、通信接口和总线;处理器、存储器和通信接口通过总线连接并完成相互间的通信;存储器存储可执行程序代码;处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行本申请实施例的图像风格迁移方法。The migration system may be a device, including: a processor, a memory, a communication interface, and a bus; the processor, the memory, and a communication interface are connected through a bus and complete communication with each other; the memory stores executable program code; the processor reads the memory by The executable program code stored in the program runs the program corresponding to the executable program code, and is used to execute the image style transfer method of the embodiment of the present application.
迁移系统还可以为一种应用程序,用于在运行时执行本申请实施例的图像风格迁移方法。The migration system may also be an application program for executing the image style migration method of the embodiment of the present application at runtime.
迁移系统还可以为一种存储介质,用于存储可执行代码,可执行代码用于执行本申请实施例的图像风格迁移方法。The migration system may also be a storage medium for storing executable code, and the executable code is used to execute the image style migration method of the embodiment of the present application.
在用户需要进行风格迁移时,用户会确定待进行风格迁移的图像,即待风格迁移图像,同时用户会输入将待风格迁移图像转换为何种风格类型,即选定待转换的目标风格类型。迁移系统获取待风格迁移图像、待转换的目标风格类型及预设中间特征图。预设中间特征图可以通过预设卷积神经网络模型训练得到。When the user needs to perform the style transfer, the user will determine the image to be style transferred, that is, the style transfer image, and the user will input the style type into which the style transfer image is converted, that is, select the target style type to be converted. The migration system obtains the migration image to be styled, the target style type to be converted and the preset intermediate feature map. The preset intermediate feature map can be obtained by training a preset convolutional neural network model.
S302,按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值。S302: Acquire the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type.
迁移系统提前存储了各风格类型的滤波器组的输出激活相对于中间特征图的权重值,迁移系统确定目标风格类型的滤波器组的输出激活相对于中间特征图的权重值,即目标权重值,并获取目标权重值。The migration system stores the weight value of the output activation of the filter bank of each style type relative to the intermediate feature map in advance, and the migration system determines the weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map, that is, the target weight value And get the target weight value.
可选的,预先存储各风格类型的权重值及预设滤波器组的步骤包括:将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各上述风格类型滤波器的组输出激活相对于上述中间特征图的权重值;存储各上述风格类型滤波器组的输出激活相对于上述中间特征图的权重值及上述中间特征图。Optionally, the step of pre-storing the weight values of each style type and the preset filter bank includes: inputting images of multiple style types into a preset convolutional neural network model for training to obtain an intermediate feature map and each of the above styles The group filter output of the type filter activates the weight value relative to the above-mentioned intermediate feature map; the weight value of the output activation of each style-type filter bank relative to the above-mentioned intermediate feature map and the above-mentioned intermediate feature map are stored.
S303,按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活。S303: Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation.
迁移系统按照目标权重值,调整中间特征图中各特征的权重,得到权重调整后的特征图,即目标滤波器组输出激活。The migration system adjusts the weight of each feature in the intermediate feature map according to the target weight value to obtain the weight-adjusted feature map, that is, the output of the target filter bank is activated.
S304,通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。S304: Activate and process the to-be-style-transferred image through the above-mentioned target filter bank output activation to obtain the style-transferred image.
迁移系统通过目标滤波器组输出激活对待风格迁移图像进行处理,将待风格迁移图像的风格类型转换为目标风格类型,得到风格迁移后的图像。The migration system uses the target filter bank output to activate the processing of the image to be styled, converts the style type of the image to be styled to the target style type, and obtains the image after style transfer.
可选的,上述图像风格迁移方法基于风格分离框架,例如Style Bank等。在风格分离的框架中,通过滤波器组与编码表示风格,解码网络的训练是部分分离的。在风格分离框架,例如Style Bank框架中的滤波器组具有更好的解释性,风格所使用的滤波器组的利用率实际偏低,风格之间的冗余性的探索是可行的。基于此,可以将风格的参数共享,所有需要表示的风格均使用同一组滤波器来表示,对于不同的风格,使用一组表示不同特征图的权重来表示各特定的风格。因此,各风格类型的参数可以使用同一组滤波器来表示。对于每一种风格本身而言,只需要用一组权重值来表示即可。Optionally, the above image style transfer method is based on a style separation framework, such as Style Bank. In the framework of style separation, the style is represented by the filter bank and the encoding, and the training of the decoding network is partially separated. In the style separation framework, for example, the filter bank in the Style Bank framework has better interpretation, the utilization rate of the filter bank used by the style is actually low, and the exploration of redundancy between styles is feasible. Based on this, the parameters of the style can be shared, and all the styles that need to be expressed are represented by the same set of filters. For different styles, a set of weights representing different feature maps are used to represent each specific style. Therefore, the parameters of each style type can be expressed using the same set of filters. For each style itself, it only needs to be represented by a set of weight values.
在本申请实施例中,通过目标权重值及预设中间特征图,得到转换为目标风格类型所需的目标滤波器组输出激活,利用目标滤波器组输出激活对待风格迁移图像进行风格迁移,实现了图像向指定类型的风格迁移。针对多种风格类型,存储各风格类型的滤波器组的输出激活相对于中间特征图的权重值及中间特征图,而权重值的数据量远远小于特征图的数据量的,因此相比于针对每个风格类型的滤波器组单独存储一个特征图,可以降低存储空间的占用量,节约存储空间。探索了风格之间的关联和冗余性,使得风格中的关联性得以使用共享参数的方式表达,从而使得表示风格的参数明显减少。使用风格分离的框架来单独表示风格,同时,使单独表示的风格尽量共享参数。得益于各风格类型之间的额关联性表示,使得存储风格的参数降低。同时保留少量的通道权值来表示独立的风格。In the embodiment of the present application, the target filter bank output activation required for conversion to the target style type is obtained through the target weight value and the preset intermediate feature map, and the target filter bank output activation is used to perform the style migration of the style migration image to achieve In order to transfer the image to the specified style. For multiple style types, the output of the filter bank that stores each style type activates the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than that of the feature map, so compared to A separate feature map is stored for each style of filter bank, which can reduce the amount of storage space occupied and save storage space. The association and redundancy between styles are explored, so that the associations in styles can be expressed in the form of shared parameters, so that the parameters representing styles are significantly reduced. Use a style-separated framework to express styles individually, and at the same time, make the styles expressed separately share parameters as much as possible. Thanks to the representation of the correlation between each style type, the parameters of the stored style are reduced. At the same time, a small number of channel weights are reserved to represent independent styles.
本申请实施例还提供了一种数据存储装置,参见图4,该装置包括:An embodiment of the present application further provides a data storage device. Referring to FIG. 4, the device includes:
权重值确定模块401,被配置为将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各上述风格类型滤波器的组输出激活相对于上述中间特征图的权重值;The weight value determination module 401 is configured to input images of various styles into a preset convolutional neural network model for training to obtain an intermediate feature map and group output activation of each of the aforementioned style type filters relative to the aforementioned intermediate feature map Weight value
数据存储模块402,被配置为存储各上述风格类型滤波器组的输出激活相对于上述中间特征图的权重值及上述中间特征图。The data storage module 402 is configured to store the weight value of the output activation of each of the aforementioned style-type filter banks relative to the aforementioned intermediate feature map and the aforementioned intermediate feature map.
在本申请实施例中,针对多种风格类型,存储各风格类型的滤波器组的输出激活相对于中间特征图的权重值及中间特征图,而权重值的数据量远远小于特征图的数据量的,因此相比于针对每个风格类型的滤波器组单独存储一个特征图,可以降低存储空间的占用量,节约存储空间。In the embodiment of the present application, for multiple style types, the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
可选的,本申请实施例的数据存储装置基于风格分离框架。Optionally, the data storage device of the embodiment of the present application is based on a style separation framework.
可选的,参见图5,本申请实施例的数据存储装置还包括:Optionally, referring to FIG. 5, the data storage device according to an embodiment of the present application further includes:
第一参数获取模块403,被配置为获取待风格迁移图像、待转换的目标风格类型及上述中间特征图;The first parameter obtaining module 403 is configured to obtain an image to be styled to be transferred, a target style type to be converted, and the above intermediate feature map;
目标权重值确定模块404,被配置为按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值;The target weight value determination module 404 is configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
目标滤波器组确定模块405,被配置为按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活;The target filter bank determination module 405 is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
风格迁移模块406,被配置为通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。The style transfer module 406 is configured to process the image to be style transferred through the output of the target filter bank to obtain an image after the style transfer.
本申请实施例还提供了一种图像风格迁移装置,参见图6,该装置包括:An embodiment of the present application further provides an image style transfer device. Referring to FIG. 6, the device includes:
第二参数获取模块601,被配置为获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;The second parameter obtaining module 601 is configured to obtain the image to be style-transferred, the target style type to be converted and the preset intermediate feature map;
权重值获取模块602,被配置为按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值;The weight value obtaining module 602 is configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
滤波器调整模块603,被配置为按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活;The filter adjustment module 603 is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain a target filter bank output activation;
图像处理模块604,被配置为通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。The image processing module 604 is configured to process the image to be style-transferred through the output of the target filter bank to obtain an image after style transfer.
可选的,本申请实施例的图像风格迁移装置基于风格分离框架。Optionally, the image style migration device according to the embodiment of the present application is based on a style separation framework.
本申请实施例还提供了一种电子设备,参见图7,包括:An embodiment of the present application also provides an electronic device, referring to FIG. 7, including:
处理器701; Processor 701;
用于存储处理器701可执行指令的存储器702;A memory 702 for storing executable instructions of the processor 701;
其中,上述处理器701被配置为:Wherein, the above processor 701 is configured as:
将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各上述风格类型滤波器的组输出激活相对于上述中间特征图的权重值;Input images of various styles into a preset convolutional neural network model for training to obtain the intermediate feature map and the group output of each of the above style type filters to activate the weight value relative to the above intermediate feature map;
存储各上述风格类型滤波器组的输出激活相对于上述中间特征图的权重值及上述中间特征图。The weight value of the output activation of each of the aforementioned style-type filter banks with respect to the aforementioned intermediate feature map and the aforementioned intermediate feature map are stored.
在本申请实施例中,针对多种风格类型,存储各风格类型的滤波器组的输出激活相对于中间特征图的权重值及中间特征图,而权重值的数据量远远小于特征图的数据量的,因此相比于针对每个风格类型的滤波器组单独存储 一个特征图,可以降低存储空间的占用量,节约存储空间。In the embodiment of the present application, for multiple style types, the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
可选的,本申请实施例的电子设备基于风格分离框架。Optionally, the electronic device of the embodiment of the present application is based on a style separation framework.
可选的,上述处理器701还可以执行:Optionally, the processor 701 may also execute:
获取待风格迁移图像、待转换的目标风格类型及上述中间特征图;Obtain the image to be style transferred, the target style type to be converted and the above intermediate feature map;
按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值;Obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活;According to the above target weight value, adjust the weight of each feature in the above intermediate feature map to obtain the target filter bank output activation;
通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。The above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
可选的,本申请实施例的电子设备可以为如图8所示的装置800。例如,装置800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Optionally, the electronic device in this embodiment of the present application may be the apparatus 800 shown in FIG. 8. For example, the device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and so on.
参照图8,装置800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。8, the device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814,与通信组816.
处理组件802通常控制装置800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operations of the 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. In addition, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
存储器804被配置为存储各种类型的数据以支持在设备800的操作。这些数据的示例包括用于在装置800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operation at the device 800. Examples of these data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, and so on. The memory 804 may be implemented by any type of volatile or non-volatile 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.
电源组件806为装置800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为装置800生成、管理和分配电力相关联的组件。The power supply component 806 provides power to various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
多媒体组件808包括在所述装置800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组 件808包括一个前置摄像头和/或后置摄像头。当设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, 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. In some embodiments, 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.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当装置800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC). When the device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, 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. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。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.
传感器组件814包括一个或多个传感器,用于为装置800提供各个方面的状态评估。例如,传感器组件814可以检测到设备800的打开/关闭状态,组件的相对定位,例如所述组件为装置800的显示器和小键盘,传感器组件814还可以检测装置800或装置800一个组件的位置改变,用户与装置800接触的存在或不存在,装置800方位或加速/减速和装置800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor component 814 includes one or more sensors for providing the device 800 with status assessment in various aspects. For example, 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 device 800, and the sensor component 814 can also detect the position change of the device 800 or a component of the device 800 The presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and the temperature change of the 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. In some embodiments, the sensor component 814 may further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件816被配置为便于装置800和其他设备之间有线或无线方式的通信。装置800可以接入基于通信标准的无线网络,如WiFi,运营商网络(如2G、3G、4G或5G),或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The 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. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, 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.
在示例性实施例中,装置800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the apparatus 800 may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are implemented to perform the above method.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由装置800的处理器820执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as a memory 804 including instructions, is also provided. The above instructions can be executed by the processor 820 of the device 800 to complete the above method. For example, 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.
可选的,本申请实施例的电子设备可以为如图9所示的装置900。例如, 装置900可以被提供为一服务器。参照图9,装置900包括处理组件922,其进一步包括一个或多个处理器,以及由存储器932所代表的存储器资源,用于存储可由处理组件922的执行的指令,例如应用程序。存储器932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件922被配置为执行指令,以执行上述方法。Optionally, the electronic device in this embodiment of the present application may be the apparatus 900 shown in FIG. 9. For example, the device 900 may be provided as a server. 9, the device 900 includes a processing component 922, which further includes one or more processors, and memory resources represented by the memory 932, for storing instructions executable by the processing component 922, such as application programs. The application programs stored in the memory 932 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 922 is configured to execute instructions to perform the above method.
装置900还可以包括一个电源组件926被配置为执行装置900的电源管理,一个有线或无线网络接口950被配置为将装置900连接到网络,和一个输入输出(I/O)接口958。装置900可以操作基于存储在存储器932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。The device 900 may also include a power component 926 configured to perform power management of the device 900, a wired or wireless network interface 950 configured to connect the device 900 to the network, and an input/output (I/O) interface 958. The device 900 can operate based on an operating system stored in the memory 932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
本申请实施例还提供了一种电子设备,参见图10,包括:An embodiment of the present application also provides an electronic device, referring to FIG. 10, including:
处理器1001; Processor 1001;
用于存储处理器1001可执行指令的存储器1002;A memory 1002 for storing executable instructions of the processor 1001;
其中,上述处理器1001被配置为:Among them, the processor 1001 is configured as:
获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值;Obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活;According to the above target weight value, adjust the weight of each feature in the above intermediate feature map to obtain the target filter bank output activation;
通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。The above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
可选的,本申请实施例的电子设备基于风格分离框架。可选的,本申请实施例的电子设备可以为图8或图9所示的装置。Optionally, the electronic device of the embodiment of the present application is based on a style separation framework. Optionally, the electronic device in the embodiment of the present application may be the apparatus shown in FIG. 8 or FIG. 9.
本申请实施例提供了一种非临时性计算机可读存储介质,当上述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种数据存储方法,该方法包括:An embodiment of the present application provides a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal can execute a data storage method. The method includes:
将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各上述风格类型滤波器的组输出激活相对于上述中间特征图的权重值;Input images of various styles into a preset convolutional neural network model for training to obtain the intermediate feature map and the group output of each of the above style type filters to activate the weight value relative to the above intermediate feature map;
存储各上述风格类型滤波器组的输出激活相对于上述中间特征图的权重值及上述中间特征图。The weight value of the output activation of each of the aforementioned style-type filter banks with respect to the aforementioned intermediate feature map and the aforementioned intermediate feature map are stored.
在本申请实施例中,针对多种风格类型,存储各风格类型的滤波器组的输出激活相对于中间特征图的权重值及中间特征图,而权重值的数据量远远小于特征图的数据量的,因此相比于针对每个风格类型的滤波器组单独存储一个特征图,可以降低存储空间的占用量,节约存储空间。In the embodiment of the present application, for multiple style types, the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
可选的,本申请实施例的数据存储方法基于风格分离框架。Optionally, the data storage method according to an embodiment of the present application is based on a style separation framework.
可选的,在上述存储各上述风格类型的权重值及上述预设滤波器组之后, 上述方法还包括:Optionally, after storing the weight values of the above style types and the preset filter bank, the method further includes:
获取待风格迁移图像、待转换的目标风格类型及上述中间特征图;Obtain the image to be style transferred, the target style type to be converted and the above intermediate feature map;
按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值;Obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活;According to the above target weight value, adjust the weight of each feature in the above intermediate feature map to obtain the target filter bank output activation;
通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。The above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
本申请实施例还提供了一种非临时性计算机可读存储介质,当上述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种图像风格迁移方法,该方法包括:An embodiment of the present application further provides a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal can perform a method for transferring image styles. The method includes:
获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值;Obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活;According to the above target weight value, adjust the weight of each feature in the above intermediate feature map to obtain the target filter bank output activation;
通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。The above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
可选的,本申请实施例的图像风格迁移方法基于风格分离框架。Optionally, the image style transfer method according to an embodiment of the present application is based on a style separation framework.
本申请实施例还提供了一种计算机程序产品,上述计算机程序产品在处理器上被执行时,实现一种数据存储方法,该方法包括:An embodiment of the present application also provides a computer program product. When the computer program product is executed on a processor, a data storage method is implemented. The method includes:
将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各上述风格类型滤波器的组输出激活相对于上述中间特征图的权重值;Input images of various styles into a preset convolutional neural network model for training to obtain the intermediate feature map and the group output of each of the above style type filters to activate the weight value relative to the above intermediate feature map;
存储各上述风格类型滤波器组的输出激活相对于上述中间特征图的权重值及上述中间特征图。The weight value of the output activation of each of the aforementioned style-type filter banks with respect to the aforementioned intermediate feature map and the aforementioned intermediate feature map are stored.
在本申请实施例中,针对多种风格类型,存储各风格类型的滤波器组的输出激活相对于中间特征图的权重值及中间特征图,而权重值的数据量远远小于特征图的数据量的,因此相比于针对每个风格类型的滤波器组单独存储一个特征图,可以降低存储空间的占用量,节约存储空间。In the embodiment of the present application, for multiple style types, the output value of the filter bank of each style type is stored to activate the weight value and the intermediate feature map relative to the intermediate feature map, and the data amount of the weight value is much smaller than the data of the feature map Quantitative, so compared to storing a feature map for each style type filter bank separately, it can reduce the amount of storage space occupied and save storage space.
可选的,本申请实施例的数据存储方法基于风格分离框架。Optionally, the data storage method according to an embodiment of the present application is based on a style separation framework.
可选的,在上述存储各上述风格类型的权重值及上述预设滤波器组之后,上述方法还包括:Optionally, after storing the weight values of the above style types and the preset filter bank, the method further includes:
获取待风格迁移图像、待转换的目标风格类型及上述中间特征图;Obtain the image to be style transferred, the target style type to be converted and the above intermediate feature map;
按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值;Obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活;According to the above target weight value, adjust the weight of each feature in the above intermediate feature map to obtain the target filter bank output activation;
通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。The above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
本申请实施例还提供了一种计算机程序产品,上述计算机程序产品在处理器上被执行时,实现一种图像风格迁移方法,该方法包括:An embodiment of the present application also provides a computer program product. When the computer program product is executed on a processor, a method for transferring image styles is implemented. The method includes:
获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
按照上述目标风格类型,获取上述目标风格类型的滤波器组的输出激活相对于上述中间特征图的目标权重值;Obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
按照上述目标权重值,调整上述中间特征图中各特征的权重,得到目标滤波器组输出激活;According to the above target weight value, adjust the weight of each feature in the above intermediate feature map to obtain the target filter bank output activation;
通过上述目标滤波器组输出激活对上述待风格迁移图像进行处理,得到风格迁移后的图像。The above-mentioned target filter bank output activation is used to process the to-be-style-transferred image to obtain a style-transferred image.
可选的,本申请实施例的图像风格迁移方法基于风格分离框架。Optionally, the image style transfer method according to an embodiment of the present application is based on a style separation framework.
本领域技术人员在考虑说明书及实践这里公开的申请后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。After considering the description and practice of the application disclosed herein, those skilled in the art will easily think of other embodiments of the application. This application is intended to cover any variations, uses, or adaptive changes of this application, which follow the general principles of this application and include common general knowledge or customary technical means in the technical field not disclosed in this application . The description and examples are to be considered exemplary only, and the true scope and spirit of this application are pointed out by the following claims.
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。It should be understood that the present application is not limited to the precise structure that has been described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of this application is limited only by the appended claims.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above are only the preferred embodiments of this application and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application should be included in this application Within the scope of protection.

Claims (14)

  1. 一种数据存储方法,其特征在于,所述方法包括:A data storage method, characterized in that the method includes:
    将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各所述风格类型滤波器的组输出激活相对于所述中间特征图的权重值;Input images of multiple styles into a preset convolutional neural network model for training to obtain an intermediate feature map and a group output of each of the style type filters to activate a weight value relative to the intermediate feature map;
    存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图。The output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
  2. 根据权利要求1所述的方法,其特征在于,所述数据存储方法基于风格分离框架。The method according to claim 1, wherein the data storage method is based on a style separation framework.
  3. 根据权利要求1所述的方法,其特征在于,在所述存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图之后,所述方法还包括:The method according to claim 1, characterized in that after the output of the storage of each style-type filter bank activates the weight value relative to the intermediate feature map and the intermediate feature map, the method further include:
    获取待风格迁移图像、待转换的目标风格类型及所述中间特征图;Obtain the image to be styled, the target style type to be converted, and the intermediate feature map;
    按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
    按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
    通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  4. 一种图像风格迁移方法,其特征在于,所述方法包括:An image style transfer method, characterized in that the method includes:
    获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
    按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
    按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
    通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
  5. 根据权利要求4所述的方法,其特征在于,所述图像风格迁移方法基于风格分离框架。The method according to claim 4, wherein the image style transfer method is based on a style separation framework.
  6. 一种数据存储装置,其特征在于,所述装置包括:A data storage device, characterized in that the device includes:
    权重值确定模块,被配置为将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各所述风格类型滤波器的组输出激活相对于所述中间特征图的权重值;The weight value determination module is configured to input images of various styles into a preset convolutional neural network model for training to obtain an intermediate feature map and group output of each of the style type filters. Activation is relative to the intermediate features The weight value of the graph;
    数据存储模块,被配置为存储各所述风格类型滤波器组的输出激活相对 于所述中间特征图的权重值及所述中间特征图。The data storage module is configured to store the weight value of the output activation of each style type filter bank relative to the intermediate feature map and the intermediate feature map.
  7. 根据权利要求6所述的装置,其特征在于,所述数据存储装置基于风格分离框架。The device of claim 6, wherein the data storage device is based on a style separation framework.
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:The device according to claim 6, wherein the device further comprises:
    第一参数获取模块,被配置为获取待风格迁移图像、待转换的目标风格类型及所述中间特征图;The first parameter acquisition module is configured to acquire an image to be styled to be transferred, a target style type to be converted, and the intermediate feature map;
    目标权重值确定模块,被配置为按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;A target weight value determination module, configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
    目标滤波器组确定模块,被配置为按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;The target filter bank determination module is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
    风格迁移模块,被配置为通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The style transfer module is configured to process the to-be-style-transferred image through the output of the target filter bank to obtain the style-transferred image.
  9. 一种图像风格迁移装置,其特征在于,所述装置包括:An image style transfer device, characterized in that the device includes:
    第二参数获取模块,被配置为获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;The second parameter acquisition module is configured to acquire the image to be styled, the target style type to be converted, and the preset intermediate feature map;
    权重值获取模块,被配置为按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;A weight value obtaining module configured to obtain the target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map according to the target style type;
    滤波器调整模块,被配置为按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;The filter adjustment module is configured to adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
    图像处理模块,被配置为通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The image processing module is configured to process the to-be-style-transferred image through the target filter bank output activation to obtain the style-transferred image.
  10. 根据权利要求9所述的装置,其特征在于,所述图像风格迁移装置基于风格分离框架。The device according to claim 9, wherein the image style transfer means is based on a style separation framework.
  11. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it includes:
    处理器;processor;
    用于存储处理器可执行指令的存储器;Memory for storing processor executable instructions;
    其中,所述处理器被配置为在运行时执行权利要求1-3中任一所述的数据存储方法。Wherein, the processor is configured to execute the data storage method according to any one of claims 1-3 at runtime.
  12. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it includes:
    处理器;processor;
    用于存储处理器可执行指令的存储器;Memory for storing processor executable instructions;
    其中,所述处理器被配置为在运行时执行权利要求4-5中任一所述的风格 迁移方法。Wherein, the processor is configured to execute the style transfer method according to any one of claims 4-5 at runtime.
  13. 一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种数据存储方法,其特征在于,所述方法包括:A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enabling the mobile terminal to execute a data storage method, characterized in that the method includes:
    将多种风格类型的图像输入到预设卷积神经网络模型中进行训练,得到中间特征图及各所述风格类型滤波器的组输出激活相对于所述中间特征图的权重值;Input images of multiple styles into a preset convolutional neural network model for training to obtain an intermediate feature map and a group output of each of the style type filters to activate a weight value relative to the intermediate feature map;
    存储各所述风格类型滤波器组的输出激活相对于所述中间特征图的权重值及所述中间特征图。The output value of each of the style-type filter banks activates the weight value relative to the intermediate feature map and the intermediate feature map.
  14. 一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种图像风格迁移方法,其特征在于,所述方法包括:A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enable the mobile terminal to perform a method for transferring image styles, characterized in that the method includes:
    获取待风格迁移图像、待转换的目标风格类型及预设中间特征图;Obtain the image to be style transferred, the target style type to be converted and the preset intermediate feature map;
    按照所述目标风格类型,获取所述目标风格类型的滤波器组的输出激活相对于所述中间特征图的目标权重值;According to the target style type, obtain a target weight value of the output activation of the filter bank of the target style type relative to the intermediate feature map;
    按照所述目标权重值,调整所述中间特征图中各特征的权重,得到目标滤波器组输出激活;Adjust the weight of each feature in the intermediate feature map according to the target weight value to obtain the target filter bank output activation;
    通过所述目标滤波器组输出激活对所述待风格迁移图像进行处理,得到风格迁移后的图像。The target filter bank output is activated to process the to-be-style-transferred image to obtain the style-transferred image.
PCT/CN2019/108272 2018-12-07 2019-09-26 Image style transfer and data storage method and apparatus, and electronic device WO2020114047A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811496794.XA CN109636712B (en) 2018-12-07 2018-12-07 Image style migration and data storage method and device and electronic equipment
CN201811496794.X 2018-12-07

Publications (1)

Publication Number Publication Date
WO2020114047A1 true WO2020114047A1 (en) 2020-06-11

Family

ID=66072110

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/108272 WO2020114047A1 (en) 2018-12-07 2019-09-26 Image style transfer and data storage method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN109636712B (en)
WO (1) WO2020114047A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734827A (en) * 2021-01-07 2021-04-30 京东鲲鹏(江苏)科技有限公司 Target detection method and device, electronic equipment and storage medium
CN112911324A (en) * 2021-01-29 2021-06-04 北京达佳互联信息技术有限公司 Content display method and device for live broadcast room, server and storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636712B (en) * 2018-12-07 2022-03-01 北京达佳互联信息技术有限公司 Image style migration and data storage method and device and electronic equipment
CN110189246B (en) * 2019-05-15 2023-02-28 北京字节跳动网络技术有限公司 Image stylization generation method and device and electronic equipment
CN110728722B (en) * 2019-09-18 2022-08-02 苏宁云计算有限公司 Image color migration method and device, computer equipment and storage medium
CN110956654B (en) * 2019-12-02 2023-09-19 Oppo广东移动通信有限公司 Image processing method, device, equipment and storage medium
CN111223039A (en) * 2020-01-08 2020-06-02 广东博智林机器人有限公司 Image style conversion method and device, electronic equipment and storage medium
CN111738911B (en) * 2020-06-17 2024-02-27 杭州云汽配配科技有限公司 Image style transferring method and system
CN114615421B (en) * 2020-12-07 2023-06-30 华为技术有限公司 Image processing method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110229022A1 (en) * 2010-03-19 2011-09-22 Hideshi Yamada Image processing apparatus, method and program
CN107274381A (en) * 2017-07-20 2017-10-20 深圳市唯特视科技有限公司 A kind of dynamic texture synthetic method based on double identification stream convolutional networks
CN108734749A (en) * 2017-04-20 2018-11-02 微软技术许可有限责任公司 The visual style of image converts
CN109636712A (en) * 2018-12-07 2019-04-16 北京达佳互联信息技术有限公司 Image Style Transfer and date storage method, device and electronic equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106296567B (en) * 2015-05-25 2019-05-07 北京大学 A kind of conversion method and device of the multi-level image style based on rarefaction representation
CN108205813B (en) * 2016-12-16 2022-06-03 微软技术许可有限责任公司 Learning network based image stylization
CN108537720A (en) * 2017-03-01 2018-09-14 杭州九言科技股份有限公司 A kind of image processing method and device
CN107171932B (en) * 2017-04-27 2021-06-08 腾讯科技(深圳)有限公司 Picture style conversion method, device and system
CN107767328B (en) * 2017-10-13 2021-12-17 上海媒智科技有限公司 Migration method and system of any style and content generated based on small amount of samples
CN107977414B (en) * 2017-11-22 2021-10-12 西安财经学院 Image style migration method and system based on deep learning
CN108090496A (en) * 2017-12-22 2018-05-29 银河水滴科技(北京)有限公司 The method and apparatus of image procossing based on convolutional neural networks
CN108510058B (en) * 2018-02-28 2021-07-20 中国科学院计算技术研究所 Weight storage method in neural network and processor based on method
CN108647560B (en) * 2018-03-22 2022-06-14 中山大学 CNN-based face transfer method for keeping expression information
CN108682044A (en) * 2018-05-21 2018-10-19 深圳市唯特视科技有限公司 A kind of three-dimensional style metastasis model based on dual path stylization network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110229022A1 (en) * 2010-03-19 2011-09-22 Hideshi Yamada Image processing apparatus, method and program
CN108734749A (en) * 2017-04-20 2018-11-02 微软技术许可有限责任公司 The visual style of image converts
CN107274381A (en) * 2017-07-20 2017-10-20 深圳市唯特视科技有限公司 A kind of dynamic texture synthetic method based on double identification stream convolutional networks
CN109636712A (en) * 2018-12-07 2019-04-16 北京达佳互联信息技术有限公司 Image Style Transfer and date storage method, device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112734827A (en) * 2021-01-07 2021-04-30 京东鲲鹏(江苏)科技有限公司 Target detection method and device, electronic equipment and storage medium
CN112911324A (en) * 2021-01-29 2021-06-04 北京达佳互联信息技术有限公司 Content display method and device for live broadcast room, server and storage medium
CN112911324B (en) * 2021-01-29 2022-10-28 北京达佳互联信息技术有限公司 Content display method and device for live broadcast room, server and storage medium

Also Published As

Publication number Publication date
CN109636712B (en) 2022-03-01
CN109636712A (en) 2019-04-16

Similar Documents

Publication Publication Date Title
WO2020114047A1 (en) Image style transfer and data storage method and apparatus, and electronic device
WO2020140798A1 (en) Gesture recognition method, device, electronic apparatus, and storage medium
US20210312902A1 (en) Method and electronic device for separating mixed sound signal
WO2020134556A1 (en) Image style transfer method, device, electronic apparatus, and storage medium
US20180082407A1 (en) Style transfer-based image content correction
CN107690811A (en) It is presented and shows HDR content
CN111510630B (en) Image processing method, device and storage medium
CN109919829B (en) Image style migration method, device and computer readable storage medium
EP4171014A1 (en) Photographing method, graphical interface and related apparatus
RU2745737C1 (en) Video recording method and video recording terminal
WO2022156150A1 (en) Image processing method and apparatus, electronic device, storage medium, and computer program
US11308692B2 (en) Method and device for processing image, and storage medium
CN107948498B (en) A kind of elimination camera Morie fringe method and mobile terminal
TWI718631B (en) Method, device and electronic apparatus for face image processing and storage medium thereof
CN108073986B (en) Neural network model training method and device and electronic equipment
JP2022518520A (en) Image deformation control method, equipment and hardware equipment
CN110766610B (en) Reconstruction method of super-resolution image and electronic equipment
US20230386001A1 (en) Image display method and apparatus, and device and medium
WO2020114097A1 (en) Boundary box determining method and apparatus, electronic device, and storage medium
WO2023185671A1 (en) Style image generation method and apparatus, device and medium
US11989348B2 (en) Media content items with haptic feedback augmentations
CN116630518A (en) Rendering method, electronic equipment and medium
KR20210041757A (en) Electronic apparatus and control method thereof
KR102409103B1 (en) Method for editing image
KR20140141419A (en) Display apparatus and control method thereof

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: 19892453

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: 19892453

Country of ref document: EP

Kind code of ref document: A1