CN110689478B - Image stylization processing method and device, electronic equipment and readable medium - Google Patents
Image stylization processing method and device, electronic equipment and readable medium Download PDFInfo
- Publication number
- CN110689478B CN110689478B CN201910910696.4A CN201910910696A CN110689478B CN 110689478 B CN110689478 B CN 110689478B CN 201910910696 A CN201910910696 A CN 201910910696A CN 110689478 B CN110689478 B CN 110689478B
- Authority
- CN
- China
- Prior art keywords
- image
- background
- processed
- complexity
- stylized
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 29
- 238000012545 processing Methods 0.000 claims abstract description 142
- 238000000034 method Methods 0.000 claims abstract description 57
- 238000012549 training Methods 0.000 claims description 42
- 238000012795 verification Methods 0.000 claims description 25
- 238000012986 modification Methods 0.000 claims description 12
- 230000004048 modification Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 10
- 238000003708 edge detection Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 description 16
- 230000006870 function Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 230000000694 effects Effects 0.000 description 10
- 230000003287 optical effect Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000003062 neural network model Methods 0.000 description 5
- 230000003796 beauty Effects 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 230000011218 segmentation Effects 0.000 description 3
- 239000000463 material Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010428 oil painting Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- 238000012916 structural analysis Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域Technical field
本公开实施例涉及互联网技术领域,尤其涉及一种图像风格化处理方法、装置、电子设备及可读介质。The embodiments of the present disclosure relate to the field of Internet technology, and in particular, to an image stylization processing method, device, electronic device, and readable medium.
背景技术Background technique
现有的终端设备大都配置有拍照功能,为了满足终端用户个性化的需求,终端设备的拍照功能下通常都具备图像处理功能,实现对终端用户拍摄到的图像进行风格化处理。Most of the existing terminal devices are equipped with a camera function. In order to meet the personalized needs of end users, the camera function of the terminal device usually has an image processing function to stylize the images captured by the end user.
目前,终端设备在对图像进行风格化处理时,采用的方法是通过神经网络模型采用风格化处理算法直接对整张图像进行风格化处理。但是由于不同图像的内容复杂度是不一样的,现有方法在实际执行风格化处理时,很难满足不同复杂度的图像的风格化处理需求,容易出现风格化处理结果粗糙,影响美观度的情况,亟需改进。Currently, when terminal devices stylize images, they use a stylization algorithm through a neural network model to directly stylize the entire image. However, because the content complexity of different images is different, it is difficult for existing methods to meet the stylization needs of images of different complexity when actually performing stylization processing, and it is easy to produce rough stylization results that affect the aesthetics. The situation needs to be improved urgently.
发明内容Contents of the invention
本公开实施例提供一种图像风格化处理方法、装置、电子设备及可读介质,在对图像进行风格化处理时,考虑了图像背景的复杂程度,提高了图像风格化处理结果的精细度和美观度。Embodiments of the present disclosure provide an image stylization processing method, device, electronic device, and readable medium. When stylizing an image, the complexity of the image background is taken into consideration, thereby improving the precision and accuracy of the image stylization processing results. Aesthetics.
第一方面,本公开实施例提供了一种图像风格化处理方法,该方法包括:In a first aspect, embodiments of the present disclosure provide an image stylization processing method, which method includes:
若确定待处理图像的背景复杂度低于复杂度阈值,则将所述待处理图像的原始背景替换为模板背景,得到目标图像;If it is determined that the background complexity of the image to be processed is lower than the complexity threshold, the original background of the image to be processed is replaced with the template background to obtain the target image;
将所述目标图像输入风格化处理模型中,得到初步风格化处理图像;Input the target image into the stylized processing model to obtain a preliminary stylized image;
将所述初步风格化处理图像的背景替换为所述原始背景,得到最终的风格化处理图像。The background of the preliminary stylized image is replaced with the original background to obtain a final stylized image.
第二方面,本公开实施例还提供了一种图像风格化处理装置,其特征在于,包括:In a second aspect, embodiments of the present disclosure also provide an image stylization processing device, which is characterized in that it includes:
背景替换模块,用于若确定待处理图像的背景复杂度低于复杂度阈值,则将所述待处理图像的原始背景替换为模板背景,得到目标图像;A background replacement module, used to replace the original background of the image to be processed with the template background to obtain the target image if it is determined that the background complexity of the image to be processed is lower than the complexity threshold;
风格化处理模块,用于将所述目标图像输入风格化处理模型中,得到初步风格化处理图像;A stylization processing module, used to input the target image into the stylization processing model to obtain a preliminary stylization processing image;
所述背景替换模块,还用于将所述初步风格化处理图像的背景替换为所述原始背景,得到最终的风格化处理图像。The background replacement module is also used to replace the background of the preliminary stylized image with the original background to obtain the final stylized image.
第三方面,本公开实施例还提供了一种电子设备,该电子设备包括:In a third aspect, embodiments of the present disclosure also provide an electronic device, which includes:
一个或多个处理器;one or more processors;
存储器,用于存储一个或多个程序;Memory, used to store one or more programs;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开任意实施例所述的图像风格化处理方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the image stylization processing method described in any embodiment of the present disclosure.
第四方面,本公开实施例提供了一种可读介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开任意实施例所述的图像风格化处理方法。In a fourth aspect, embodiments of the present disclosure provide a readable medium on which a computer program is stored. When the program is executed by a processor, the image stylization processing method as described in any embodiment of the present disclosure is implemented.
本公开实施例提供了一种图像风格化处理方法、装置、电子设备及可读介质,判断待处理图像的背景复杂度是否低于复杂度阈值,若是,则将该待处理图像的原始背景替换为预设的模板背景,得到目标图像;由风格化处理模型对目标图像进行风格化处理后,将处理得到的初步风格化处理图像的背景替换为原始背景,得到最终的风格化处理图像。本公开实施例的方案在对图像进行风格化处理时,考虑了图像背景的复杂程度,当待处理图像背景复杂度较低时,采用为待处理图像更换模板背景后再进行风格化处理的方法,避免了对背景复杂度较低的待处理图像采用现有风格化处理方法,出现处理结果粗糙的情况,提高了图像风格化处理结果的精细度和美观度。Embodiments of the present disclosure provide an image stylization processing method, device, electronic device and readable medium to determine whether the background complexity of the image to be processed is lower than the complexity threshold, and if so, replace the original background of the image to be processed As the preset template background, the target image is obtained; after the stylization processing model stylizes the target image, the background of the preliminary stylized image obtained is replaced with the original background to obtain the final stylized image. The solution of the embodiment of the present disclosure takes the complexity of the image background into consideration when stylizing the image. When the background complexity of the image to be processed is low, the method of changing the template background for the image to be processed and then performing stylization processing is adopted. , which avoids the rough processing results caused by the existing stylization processing method for images to be processed with low background complexity, and improves the precision and beauty of the image stylization processing results.
附图说明Description of the drawings
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。The above and other features, advantages, and aspects of various embodiments of the present disclosure will become more apparent with reference to the following detailed description taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It is to be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
图1A-1B示出了现有技术对待处理图像进行风格化处理的效果示意图;Figures 1A-1B show a schematic diagram of the effect of stylizing the image to be processed using the prior art;
图2A示出了本公开实施例一提供的一种图像风格化处理方法的流程图;Figure 2A shows a flow chart of an image stylization processing method provided by Embodiment 1 of the present disclosure;
图2B-2E示出了本公开实施例一提供的对待处理图像进行风格化处理的效果示意图;2B-2E are schematic diagrams showing the effect of stylizing the image to be processed provided by Embodiment 1 of the present disclosure;
图3示出了本公开实施例二提供的另一种图像风格化处理方法的流程图;Figure 3 shows a flow chart of another image stylization processing method provided by Embodiment 2 of the present disclosure;
图4示出了本公开实施例三提供的另一种图像风格化处理方法的流程图;Figure 4 shows a flow chart of another image stylization processing method provided by Embodiment 3 of the present disclosure;
图5示出了本公开实施例四提供的一种图像风格化处理装置的结构示意图;Figure 5 shows a schematic structural diagram of an image stylization processing device provided in Embodiment 4 of the present disclosure;
图6示出了本公开实施例五提供的一种电子设备的结构示意图。FIG. 6 shows a schematic structural diagram of an electronic device provided in Embodiment 5 of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, which rather are provided for A more thorough and complete understanding of this disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that various steps described in the method implementations of the present disclosure may be executed in different orders and/or in parallel. Furthermore, method embodiments may include additional steps and/or omit performance of illustrated steps. The scope of the present disclosure is not limited in this regard.
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "include" and its variations are open-ended, ie, "including but not limited to." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; and the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below.
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as “first” and “second” mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units. Or interdependence.
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。本公开实施方式中的多方之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。It should be noted that the modifications of "one" and "plurality" mentioned in this disclosure are illustrative and not restrictive. Those skilled in the art will understand that unless the context clearly indicates otherwise, it should be understood as "one or Multiple”. The names of messages or information exchanged between multiple parties in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
需要说明的是,在介绍本公开实施例之前,先对本公开实施例的图像风格化处理方法、装置、电子设备及可读介质的适用场景进行说明。具体的,本公开实施例适用于对用户通过电子设备(如手机、平板电脑、可穿戴设备以及照相机等)拍摄的图像、电子设备图库中已存的图像进行风格化处理的过程,以为用户生成个性化的图像。在对待处理图像进行风格化处理时,通常预先训练好的神经网络模型对整张图像进行风格化处理,此时当待处理图像的背景部分复杂度比较低时,容易出现风格化处理结果粗糙的情况。示例性的,图1A为背景图像复杂度较低的待处理图像,图1B为对图1A所示的待处理图像按照现有方法进行漫画风格处理后的效果图,该效果图整体效果较差,严重影响漫画风格处理的美观度。因此,亟需改进现有的图像风格化处理方法。It should be noted that before introducing the embodiments of the present disclosure, the applicable scenarios of the image stylization processing methods, devices, electronic devices and readable media according to the embodiments of the present disclosure will be described. Specifically, the embodiments of the present disclosure are applicable to the process of stylizing images taken by users through electronic devices (such as mobile phones, tablets, wearable devices, cameras, etc.) and images already stored in the electronic device gallery, so as to generate images for the user. Personalized images. When stylizing the image to be processed, the pre-trained neural network model usually stylizes the entire image. At this time, when the complexity of the background part of the image to be processed is relatively low, the stylization result is prone to be rough. Condition. For example, Figure 1A is an image to be processed with a low background image complexity. Figure 1B is a rendering of the image to be processed shown in Figure 1A after being processed in a comic style according to the existing method. The overall effect of the rendering is poor. , seriously affecting the aesthetics of comic-style processing. Therefore, there is an urgent need to improve existing image stylization processing methods.
下面针对本公开下述实施例提供的一种图像风格化处理方法、装置、电子设备及可读介质进行详细阐述。An image stylization processing method, device, electronic device, and readable medium provided by the following embodiments of the present disclosure will be described in detail below.
实施例一Embodiment 1
图2A示出了本公开实施例一提供的一种图像风格化处理方法的流程图;如2B-2E示出了本公开实施例一提供的对待处理图像进行风格化处理的效果示意图。本实施例可适用于对待处理图像进行风格化处理的情况,尤其适用于对背景复杂度低于复杂度阈值的待处理图像进行风格化处理的情况。该方法可以由图像风格化处理装置或电子设备来执行,该装置可以通过软件和/或硬件的方式来实现,该装置可以配置在电子设备中。可选的,该电子设备可以是手机、平板电脑、可穿戴设备以及照相机等具有图像处理功能的终端设备。Figure 2A shows a flow chart of an image stylization processing method provided in Embodiment 1 of the present disclosure; Figures 2B-2E show schematic diagrams of the effect of stylizing an image to be processed provided in Embodiment 1 of the present disclosure. This embodiment can be applied to the situation of stylizing the image to be processed, and is particularly suitable to the situation of stylizing the image to be processed whose background complexity is lower than the complexity threshold. The method can be performed by an image stylization processing device or an electronic device. The device can be implemented by software and/or hardware. The device can be configured in the electronic device. Optionally, the electronic device may be a terminal device with image processing functions such as a mobile phone, a tablet computer, a wearable device, and a camera.
可选的,如图2A所示,本实施例中的方法可以包括如下步骤:Optionally, as shown in Figure 2A, the method in this embodiment may include the following steps:
S201,若确定待处理图像的背景复杂度低于复杂度阈值,则将待处理图像的原始背景替换为模板背景,得到目标图像。S201, if it is determined that the background complexity of the image to be processed is lower than the complexity threshold, replace the original background of the image to be processed with the template background to obtain the target image.
其中,待处理图像可以是本实施例中待进行风格化处理的图像,其可以是电子设备上的摄像头当前拍摄的图像,也可以是从电子设备本地图库中根据用户的点击操作选择的已存图像。待处理图像的原始背景可以是待处理图像自身原有的背景,例如,图2B所示的待处理图像,其原始背景为灰色背景。模板背景是预先设置的高复杂度的背景图像,可选的,本实施例中的模板背景的个数可以有一个或多个,当模板背景有多个时,可以是设置多个不同复杂度的背景图像作为模板背景。复杂度阈值可以是预先设置的用于判断是否对待处理图像进行背景替换的评判标准。该复杂度阈值可以是针对背景复杂度设置的阈值。背景复杂度可以是待处理图像中背景区域的复杂程度,例如,当待处理图像的背景区域为墙壁、蓝天、大海等简单的纯色背景时,则背景复杂度低;当待处理图像的背景区域为马路、公园等杂乱背景时,则背景复杂度高。The image to be processed may be the image to be stylized in this embodiment, it may be the image currently captured by the camera on the electronic device, or it may be an existing image selected from the local gallery of the electronic device according to the user's click operation. image. The original background of the image to be processed may be the original background of the image to be processed. For example, the original background of the image to be processed shown in Figure 2B is a gray background. The template background is a preset high-complexity background image. Optionally, the number of template backgrounds in this embodiment can be one or more. When there are multiple template backgrounds, multiple template backgrounds can be set with different complexity. background image as template background. The complexity threshold may be a preset criterion used to determine whether to perform background replacement on the image to be processed. The complexity threshold may be a threshold set for background complexity. Background complexity can be the complexity of the background area in the image to be processed. For example, when the background area of the image to be processed is a simple solid color background such as a wall, blue sky, sea, etc., the background complexity is low; when the background area of the image to be processed is When it is a cluttered background such as a road or a park, the background complexity is high.
可选的,本步骤在确定待处理图像的背景复杂度是否低于复杂度阈值的一种可实施方式可以是,对待处理图像的背景区域进行像素点灰度直方图统计,若直方图中灰度值分布范围越广,则说明背景复杂度越高。第二种可实施方式可以是提取待处理图像的原始背景的纹理特征,并根据所述纹理特征,确定待处理图像的背景复杂度是否低于复杂度阈值。具体的,可以是先采用纹理特征提取算法从待处理图像的原始背景中提取纹理特征,其中,提取纹理特征的算法可以包括但不限于统计法、几何法、模型法、结构分析法以及信号处理法等。在提取到待处理图像的原始背景的纹理特征后,可以将纹理特征对应像素点的数量或纹理特征对应的像素点占原始背景总像素点的比值作为待处理图像的背景复杂度,然后判断该背景复杂度是否低于预先设置的复杂度阈值。Optionally, in this step, an implementation method for determining whether the background complexity of the image to be processed is lower than the complexity threshold may be to perform pixel grayscale histogram statistics on the background area of the image to be processed. If the gray level in the histogram is The wider the distribution range of degree values, the higher the background complexity. The second possible implementation may be to extract texture features of the original background of the image to be processed, and determine whether the background complexity of the image to be processed is lower than a complexity threshold based on the texture features. Specifically, a texture feature extraction algorithm may be first used to extract texture features from the original background of the image to be processed. The algorithm for extracting texture features may include but is not limited to statistical methods, geometric methods, model methods, structural analysis methods, and signal processing. Law etc. After extracting the texture features of the original background of the image to be processed, the number of pixels corresponding to the texture features or the ratio of the pixels corresponding to the texture features to the total pixels of the original background can be used as the background complexity of the image to be processed, and then the Whether the background complexity is lower than the preset complexity threshold.
优选实施例,本步骤在执行上述第二种可实施方式时的一种优选执行方法可以是:对所述待处理图像的原始背景进行边缘检测,得到所述原始背景的纹理特征;确定所述纹理特征在所述原始背景中的像素占比,作为待处理图像的背景复杂度;确定待处理图像的背景复杂度是否低于复杂度阈值。具体的,该方法可以是通过对待处理图像的原始背景内容进行边缘检测,将边缘检测结果作为原始图像的纹理特征。其中,边缘检测算法可以包括但不限于canny算法、Roberts算法以及Sobel算法等。然后确定边缘结果对应的像素点数量在原始背景的总像素点数量的像素占比,作为待处理图像的背景复杂度,将其与预先设置的复杂度阈值进行比较,判断待处理图像的背景复杂度是否低于复杂度阈值。In a preferred embodiment, a preferred execution method of this step when executing the above second implementation mode may be: performing edge detection on the original background of the image to be processed to obtain the texture characteristics of the original background; determining the The pixel ratio of the texture feature in the original background is used as the background complexity of the image to be processed; it is determined whether the background complexity of the image to be processed is lower than the complexity threshold. Specifically, the method may be to perform edge detection on the original background content of the image to be processed, and use the edge detection results as texture features of the original image. Among them, edge detection algorithms may include but are not limited to canny algorithm, Roberts algorithm, Sobel algorithm, etc. Then determine the pixel ratio of the number of pixels corresponding to the edge result to the total number of pixels in the original background, as the background complexity of the image to be processed, compare it with the preset complexity threshold, and determine the background complexity of the image to be processed. Is the degree below the complexity threshold?
可选的,通常情况下,在对待处理图像进行风格化处理时,若背景复杂度较低,则会出现处理结果粗糙的情况。所以本步骤可以在待处理图像的背景复杂度高于或等于复杂度阈值时,说明待处理图像的背景复杂度为高复杂度,此时采用统一的风格化处理方法就可以准确完成对待处理图像的风格化处理操作,即可以直接将待处理图像输入风格化处理模型中,获取风格化处理模型输出的结果作为该待处理图像的风格化处理图像。当待处理图像的背景复杂度低于复杂度阈值时,说明待处理图像的背景复杂度比较低,容易出现处理结果粗糙的情况,需要对待处理图像进行背景更换,将待处理图像的原始背景替换为预先设置好的模板背景,得到目标图像。示例性的,图2B为本实施例的待处理图像,该待处理图像的原始背景为纯灰色低复杂度的背景,若该待处理图像的背景复杂度低于复杂度阈值,则可以是将该图2B的灰色原始背景替换为预先设置的高复杂度的桃花源模板背景,得到如图2C所示的目标图像。Optional. Usually, when stylizing the image to be processed, if the background complexity is low, the processing results will be rough. Therefore, this step can indicate that the background complexity of the image to be processed is high complexity when the background complexity of the image to be processed is higher than or equal to the complexity threshold. At this time, a unified stylization processing method can be used to accurately complete the image to be processed. Stylization processing operation, that is, you can directly input the image to be processed into the stylization processing model, and obtain the output result of the stylization processing model as the stylized processing image of the image to be processed. When the background complexity of the image to be processed is lower than the complexity threshold, it means that the background complexity of the image to be processed is relatively low, and rough processing results are prone to occur. The background of the image to be processed needs to be replaced, and the original background of the image to be processed is replaced. Get the target image for the preset template background. Exemplarily, Figure 2B shows an image to be processed in this embodiment. The original background of the image to be processed is a pure gray low-complexity background. If the background complexity of the image to be processed is lower than the complexity threshold, it can be The gray original background in Figure 2B is replaced with the preset high-complexity Peach Blossom Spring template background, and the target image shown in Figure 2C is obtained.
可选的,本步骤无论是判断待处理图像的背景复杂度,还是执行背景替换操作,都需要先确定待处理图像的背景区域和前景区域,具体的确定方法可以是采用图像识别或图像聚类算法对待处理图像进行区域分割,得到待处理图像的背景区域和前景区域;还可以是预先训练背景分割模型,由背景分割模型来对待处理图像进行区域分割,得到待处理图像的背景区域和前景区域;还可以是由用户手动选择待处理图像的背景区域和前景区域。对此本实施例不进行限定。Optionally, whether this step is to determine the background complexity of the image to be processed or to perform a background replacement operation, it is necessary to first determine the background area and foreground area of the image to be processed. The specific determination method may be to use image recognition or image clustering. The algorithm performs area segmentation on the image to be processed to obtain the background area and foreground area of the image to be processed; it can also pre-train the background segmentation model, and use the background segmentation model to segment the area on the image to be processed to obtain the background area and foreground area of the image to be processed. ; It is also possible for the user to manually select the background area and foreground area of the image to be processed. This embodiment is not limited to this.
S202,将目标图像输入风格化处理模型中,得到初步风格化处理图像。S202: Input the target image into the stylized processing model to obtain a preliminary stylized image.
其中,风格化处理模型可以是预先训练好的,可以实现对图像中的内容进行风格化处理的神经网络模型。该风格化处理模型的具体训练过程将在后续实施例进行详细介绍。Among them, the stylization processing model can be pre-trained, and can implement a neural network model that stylizes the content in the image. The specific training process of this stylized processing model will be introduced in detail in subsequent embodiments.
可选的,本步骤可以是将S201对待处理图像进行背景替换后得到的目标图像作为输入参数,调用并运行预先训练好的风格化处理模型的程序代码,此时该风格化处理模型会基于训练时的风格化处理算法,对输入的目标图像中的内容进行风格化处理,输出风格化处理后的图像,即初步风格化处理图像。Optionally, this step can be to use the target image obtained after background replacement of the image to be processed in S201 as an input parameter, and call and run the program code of the pre-trained stylized processing model. At this time, the stylized processing model will be based on the training The current stylization algorithm stylizes the content in the input target image and outputs the stylized image, which is the preliminary stylized image.
示例性的,将图2C所示的目标图像作为风格化处理模型的输入数据,调用并运行预先训练好的风格化处理模型的程序代码,此时该风格化处理模型会基于训练时的漫画风格处理算法,对图2C所示的目标图像进行漫画风格化处理,得到图2D所示的初步风格化处理图像。For example, the target image shown in Figure 2C is used as the input data of the stylization processing model, and the program code of the pre-trained stylization processing model is called and run. At this time, the stylization processing model will be based on the comic style during training. The processing algorithm performs comic stylization on the target image shown in Figure 2C to obtain the preliminary stylized image shown in Figure 2D.
可选的,本步骤的风格化处理模型对目标图像进行的风格化处理操作可以包括但不限于:漫画风格处理、像素化风格处理、素描风格处理或油画风格处理等多种滤镜形式的风格化处理。Optionally, the stylization processing operation performed on the target image by the stylization processing model in this step may include but is not limited to: comic style processing, pixelation style processing, sketch style processing or oil painting style processing and other styles in the form of filters. chemical treatment.
S203,将初步风格化处理图像的背景替换为原始背景,得到最终的风格化处理图像。S203: Replace the background of the preliminary stylized image with the original background to obtain the final stylized image.
可选的,在得到初步风格化处理图像后,由于该初步风格化处理图像的背景不是待处理图像的原始图像,为了保证处理后的图像与原图像的一致性,本步骤还需要将初步风格化图像的当前背景替换为待处理图像的原始背景。具体的执行过程可以是先对初步风格化处理图像进行背景区域识别,确定初步风格化处理图像的当前背景(具体的确定方法与从待处理图像中确定原始背景的过程一样,对此不进行赘述),并将待处理图像的原始背景替换初步风格化处理图像的当前背景,得到最终的对待处理图像进行风格化处理后的风格化处理图像。示例性的,确定图2D所示的初步风格化处理图像的当前背景,并将图2B所示的待处理图像的原始背景替换图2D中的当前背景,得到图2E所示的最终的风格化处理图像。Optionally, after obtaining the preliminary stylized image, since the background of the preliminary stylized image is not the original image of the image to be processed, in order to ensure the consistency between the processed image and the original image, this step also needs to change the preliminary style Replaces the current background of the image with the original background of the image to be processed. The specific execution process may be to first perform background area recognition on the preliminary stylized image, and determine the current background of the preliminary stylized image (the specific determination method is the same as the process of determining the original background from the image to be processed, and will not be described in detail. ), and replace the current background of the preliminary stylized image with the original background of the image to be processed, to obtain the final stylized image that is stylized on the image to be processed. Exemplarily, the current background of the preliminary stylized image shown in Figure 2D is determined, and the original background of the image to be processed shown in Figure 2B is replaced with the current background in Figure 2D to obtain the final stylized image shown in Figure 2E Process images.
可选的,本步骤若直接采用待处理图像的原始背景替换初步风格化处理图像的背景,生成最终的风格化处理图像,最终得到的图像的背景部分并没有执行风格化处理操作。为了提高待处理图像风格化处理的一致性和美观性,本步骤在执行将所述初步风格化处理图像的背景替换为所述原始背景时,还可以是将原始背景输入背景处理模型中,得到处理后原始背景;将所述初步风格化处理图像的背景替换为处理后的原始背景。其中,背景处理模型是预先训练的专门对待处理图像的原始背景进行风格化处理的神经网络模型。该背景处理模型进行的风格化处理类型与S202中的风格化处理模型进行的风格化处理类型相同,两模型的训练过程也类似,只是训练后的各模型在具体执行风格化处理时的算法参数不同。具体的执行过程可以是将S201替换掉的原始背景作为背景处理模型的输入数据,调用并运行背景处理模型的程序代码,此时该背景处理模型会基于训练时的风格化处理算法,对输入的原始背景进行风格化处理操作,得到风格化处理后的原始背景,然后再执行将初步风格化处理图像的背景替换为风格化处理后的原始背景,得到最终的风格化处理图像。Optionally, if this step directly uses the original background of the image to be processed to replace the background of the preliminary stylized image to generate the final stylized image, the background part of the final image will not be stylized. In order to improve the consistency and aesthetics of the stylized image to be processed, when performing this step of replacing the background of the preliminary stylized image with the original background, the original background can also be input into the background processing model, and we obtain The processed original background; replace the background of the preliminary stylized image with the processed original background. Among them, the background processing model is a pre-trained neural network model that specializes in stylizing the original background of the image to be processed. The type of stylization processing performed by this background processing model is the same as the type of stylization processing performed by the stylization processing model in S202. The training process of the two models is also similar, except that the algorithm parameters of each model after training are used to specifically perform stylization processing. different. The specific execution process can be to use the original background replaced by S201 as the input data of the background processing model, and call and run the program code of the background processing model. At this time, the background processing model will process the input based on the stylized processing algorithm during training. The original background is stylized to obtain the stylized original background, and then the background of the preliminary stylized image is replaced with the stylized original background to obtain the final stylized image.
本公开实施例提供了一种图像风格化处理方法,判断待处理图像的背景复杂度是否低于复杂度阈值,若是,则将该待处理图像的原始背景替换为预设的模板背景,得到目标图像;由风格化处理模型对目标图像进行风格化处理后,将处理得到的初步风格化处理图像的背景替换为原始背景,得到最终的风格化处理图像。本公开实施例的方案在对图像进行风格化处理时,考虑了图像背景的复杂程度,当待处理图像背景复杂度较低时,采用为待处理图像更换模板背景后再进行风格化处理的方法,避免了对背景复杂度较低的待处理图像采用现有风格化处理方法,出现处理结果粗糙的情况,提高了图像风格化处理结果的精细度和美观度。Embodiments of the present disclosure provide an image stylization processing method to determine whether the background complexity of the image to be processed is lower than the complexity threshold. If so, replace the original background of the image to be processed with a preset template background to obtain the target Image; after the target image is stylized by the stylization processing model, the background of the preliminary stylized image obtained is replaced with the original background to obtain the final stylized image. The solution of the embodiment of the present disclosure takes the complexity of the image background into consideration when stylizing the image. When the background complexity of the image to be processed is low, the method of changing the template background for the image to be processed and then performing stylization processing is adopted. , which avoids the rough processing results caused by the existing stylization processing method for images to be processed with low background complexity, and improves the precision and beauty of the image stylization processing results.
实施例二Embodiment 2
图3示出了本公开实施例二提供的另一种视频学习素材的提供方法的流程图;本实施例在上述实施例提供的各可选方案的基础上进行了优化,具体给出了如何训练风格化处理模型的详细介绍。Figure 3 shows a flow chart of another method for providing video learning materials provided by Embodiment 2 of the present disclosure; this embodiment is optimized based on each option provided by the above embodiment, and specifically provides how Detailed introduction to training stylization processing models.
可选的,如图3所示,本实施例中的方法可以包括如下步骤:Optionally, as shown in Figure 3, the method in this embodiment may include the following steps:
S301,构建初始网络模型。S301. Build an initial network model.
可选的,本步骤可以根据实际风格化处理的需求,预先构建一个预设层数的卷积神经网络,并为各层设置对应初始参数,其中,初始参数可以是初始的通道数、损失权重值、通道参数、风格化处理算法及其算法参数等,从而完成初始网络模型的构建,本步骤构建的初始网络模型不能直接用于对待处理图像进行风格化处理操作,需要先对构建的初始网络模型进行训练。Optionally, this step can pre-construct a convolutional neural network with a preset number of layers according to the actual stylization processing requirements, and set corresponding initial parameters for each layer, where the initial parameters can be the initial number of channels and loss weight. values, channel parameters, stylization processing algorithm and its algorithm parameters, etc., to complete the construction of the initial network model. The initial network model constructed in this step cannot be directly used to stylize the image to be processed. The constructed initial network needs to be first The model is trained.
S302,采用样本图像数据对初始网络模型进行风格化处理训练。S302: Use the sample image data to perform stylized processing training on the initial network model.
其中,样本图像数据可以是训练初始网络模型所需要的训练数据,其可以是由多组原图和各原图的风格化处理图像构成。The sample image data may be training data required to train the initial network model, which may be composed of multiple sets of original images and stylized images of each original image.
可选的,本步骤在对S301构建的初始网络模型进行风格化训练时,可以是依次将样本图像数据中的每一组原图和原图的风格化处理图像作为一组输入数据,输入到初始网络模型中,对初始网络模型中设置的相关初始参数进行训练。具体的训练过程可以与现有技术对执行图像风格化处理的神经网络模型的训练方式类似,对此本实施例不进行限定。Optionally, in this step, when performing stylized training on the initial network model constructed by S301, each set of original images and stylized images of the original images in the sample image data can be used as a set of input data and input into In the initial network model, the relevant initial parameters set in the initial network model are trained. The specific training process may be similar to the training method of the neural network model that performs image stylization processing in the prior art, which is not limited in this embodiment.
S303,采用验证图像数据验证训练后的初始网络模型输出图像的属性参数是否大于参数阈值,若否,则执行S304,若是,则执行S305。S303. Use the verification image data to verify whether the attribute parameters of the initial network model output image after training are greater than the parameter threshold. If not, perform S304. If yes, perform S305.
其中,验证图像数据可以是用于验证训练后的初始网络模型是否能够高质量的执行风格化处理操作的验证数据。可选的,验证图像数据可以是在获取样本图像的过程中,将获取的图像中一定比例(如80%)的图像数据作为样本图像数据,剩余比例(如20%)的图像数据作为验证图像数据;还可以是专门选择出的各种拍摄场景下的图像数据。输出图像的属性参数可以是用于验证输出图像风格化处理效果的评判参数,其中,属性参数可以包括但不限于饱和度参数、边缘平滑度参数和阴影参数中的至少一个,针对其中的每一维度的属性参数可以通过固定的公式或算法来确定。The verification image data may be verification data used to verify whether the trained initial network model can perform stylization processing operations with high quality. Optionally, verifying the image data can be during the process of obtaining the sample image, using a certain proportion (such as 80%) of the image data in the obtained image as the sample image data, and the remaining proportion (such as 20%) of the image data as the verification image. Data; it can also be specially selected image data under various shooting scenarios. The attribute parameters of the output image may be evaluation parameters used to verify the stylization processing effect of the output image, wherein the attribute parameters may include but are not limited to at least one of a saturation parameter, an edge smoothness parameter, and a shadow parameter, for each of which The attribute parameters of dimensions can be determined through fixed formulas or algorithms.
可选的,本步骤可以是在采用一组或多组的样本图像数据对初始网络模型进行风格化处理训练后,采用验证图像数据对S302训练得到的初始网络模型是否能够高质量的执行风格化处理操作进行验证,也就是说验证S302训练得到的初始网络模型是否可以作为可实际使用的风格化处理模型。具体的验证过程可以是将验证图像作为输入数据,调用并运行训练后的初始网络模型的程序代码,此时训练后的初始网络模型会根据训练时的算法,对输入的验证图像进行风格化处理操作,输出风格化处理结果,即验证风格化处理图像。可选的,针对该验证风格化图像确定属性参数时,可以是计算该图像的饱和度作为饱和度参数;计算该图像中边缘轮廓的平滑程度作为边缘平滑度参数;计算该图像边缘轮廓以外的其他区域的平滑程度作为阴影参数。在判断计算出的属性参数是否大于参数阈值时,可以针对属性参数中的每一种参数都设置其对应的参数阈值,判断各种属性参数是否都大于其对应的参数阈值。若训练后的初始网络模型输出图像的属性参数中的各参数值都大于其对应的参数阈值,则说明此时初始网络模型已经训练好,可以执行S305,将训练后的初始网络模型作为所述风格化处理模型。否则,说明此时的初始网络模型进行风格化处理的效果不是很好,需要进一步的优化,此时执行S304对初始网络模型的模型参数进行调整优化。Optionally, this step can be to use one or more sets of sample image data to stylize and train the initial network model, and then use the verification image data to determine whether the initial network model trained in S302 can perform stylization with high quality. The processing operation is verified, that is to say, it is verified whether the initial network model obtained by S302 training can be used as a stylized processing model that can be actually used. The specific verification process can be to use the verification image as input data, call and run the program code of the initial network model after training, and then the initial network model after training will stylize the input verification image according to the algorithm during training. Operation, output the stylized processing result, that is, verify the stylized image. Optionally, when determining the attribute parameters for the verification stylized image, you can calculate the saturation of the image as the saturation parameter; calculate the smoothness of the edge contour in the image as the edge smoothness parameter; calculate the edge contour other than the image. The smoothness of other areas is used as a shading parameter. When determining whether the calculated attribute parameters are greater than the parameter threshold, a corresponding parameter threshold can be set for each parameter in the attribute parameters to determine whether each attribute parameter is greater than its corresponding parameter threshold. If each parameter value in the attribute parameters of the output image of the trained initial network model is greater than its corresponding parameter threshold, it means that the initial network model has been trained at this time, and S305 can be executed to use the trained initial network model as the above Stylized processing model. Otherwise, it means that the stylization effect of the initial network model at this time is not very good and further optimization is needed. At this time, S304 is executed to adjust and optimize the model parameters of the initial network model.
可选的,本实施例为了保证准确的对训练后的初始网络模型进行验证,可以是选择至少两组验证图像数据对训练后的初始网络模型进行本步骤的操作。当至少两组验证图像数据验证的结果都是输出图像的属性参数大于参数阈值时,执行S305,将训练后的初始网络模型作为所述风格化处理模型。Optionally, in this embodiment, in order to ensure accurate verification of the initial network model after training, at least two sets of verification image data may be selected to perform this step on the initial network model after training. When the verification results of at least two sets of verification image data are that the attribute parameters of the output image are greater than the parameter threshold, S305 is executed, and the trained initial network model is used as the stylization processing model.
S304,若否,则在预设修改范围内调整初始网络模型的模型参数,并对调整模型参数后的初始网络模型返回执行S302的操作。S304, if not, adjust the model parameters of the initial network model within the preset modification range, and return to perform the operation of S302 on the initial network model after adjusting the model parameters.
可选的,本步骤在调整S302训练后的初始网络模型的模型参数时,可以是从模型内部执行数据处理操作的层数、各层的通道数以及损失权重值中的至少一个维度进行调整。可选的,在对初始网络模型的模型参数进行调整时,可以是为层数、通道数和损失权重值设置优先级,按照优先级每次针对一个维度的模型参数,在该模型参数对应的预设修改范围内对该模型参数进行调整,修改完一个维度的模型参数后就返回执行S302-S303,采用样本图像数据对调整模型参数后的初始网络模型重新进行风格化处理训练,以及采用验证图像数据验证训练后的初始网络模型输出图像的属性参数是否大于参数阈值的操作。优选的,若各模型参数的优先级为层数高于通道数,通道数高于损失权重值,则可以是先调整通道数,将通道数增加1后返回执行S302-S303,采用样本图像数据对增加层数后的初始网络模型重新进行风格化处理训练,并验证训练后的输出初始网络模型的输出图像的属性参数是否大于参数阈值,如果还是未大于参数阈值,则再调整初始网络模型的通道数,将通道数增加1.2倍后返回执行S302-S303的操作。可选的,本步骤在对初始网络模型的通道数进行调整时,可以优先选择对初始网络模型的组卷积层的通道数进行调整。Optionally, in this step, when adjusting the model parameters of the initial network model after training in S302, at least one dimension of the number of layers performing data processing operations within the model, the number of channels in each layer, and the loss weight value can be adjusted. Optionally, when adjusting the model parameters of the initial network model, you can set the priority for the number of layers, the number of channels, and the loss weight value. According to the priority, for each dimension of the model parameters, in the corresponding model parameter Adjust the model parameters within the preset modification range. After modifying the model parameters of one dimension, return to execute S302-S303. Use sample image data to re-stylize and train the initial network model after adjusting the model parameters, and use verification Image data verifies whether the attribute parameters of the initial network model output image after training are greater than the parameter threshold. Preferably, if the priority of each model parameter is that the number of layers is higher than the number of channels, and the number of channels is higher than the loss weight value, you can first adjust the number of channels, increase the number of channels by 1, and then return to execute S302-S303, using the sample image data Re-train the initial network model after adding layers, and verify whether the attribute parameters of the output image of the trained output initial network model are greater than the parameter threshold. If they are still not greater than the parameter threshold, then adjust the initial network model. The number of channels, increase the number of channels by 1.2 times and then return to perform operations S302-S303. Optionally, when adjusting the number of channels of the initial network model in this step, you may first choose to adjust the number of channels of the group convolution layer of the initial network model.
需要说明的是,预设修改范围可以是预先设置第一个修改范围;也可以是预先设置的至少两个可选修改数值,优选的,对于损失权重值和层数,可以是设置一个修改范围;对于通道数可以设置增加1.2倍、1.5倍和1.6倍等多个可选修改数值。It should be noted that the preset modification range can be the first modification range set in advance; it can also be at least two optional modification values set in advance. Preferably, for the loss weight value and the number of layers, a modification range can be set ; For the number of channels, you can set multiple optional modification values such as 1.2 times, 1.5 times and 1.6 times.
可选的,本步骤在对初始网络模型的模型参数进行调整时,除了可以一次调整一个模型参数外,还可以是一次同时调整至少两个模型参数,对此本步骤不进行限定。Optionally, when adjusting the model parameters of the initial network model in this step, in addition to adjusting one model parameter at a time, at least two model parameters can also be adjusted at a time, and this step is not limited to this.
S305,若是,则将训练后的初始网络模型作为风格化处理模型。S305, if yes, use the trained initial network model as the stylization processing model.
可选的,若采用验证图像数据验证训练后的初始网络模型输出图像的属性参数大于参数阈值,则说明此时初始网络模型训练完成,将此时的初始网络模型的程序代码封装后,作为风格化处理模型的程序代码。Optionally, if the verification image data is used to verify that the attribute parameters of the initial network model output image after training are greater than the parameter threshold, it means that the initial network model training is completed at this time, and the program code of the initial network model at this time is encapsulated as the style Process the model's program code.
S306,若确定待处理图像的背景复杂度低于复杂度阈值,则将待处理图像的原始背景替换为模板背景,得到目标图像。S306, if it is determined that the background complexity of the image to be processed is lower than the complexity threshold, replace the original background of the image to be processed with the template background to obtain the target image.
S307,将目标图像输入风格化处理模型中,得到初步风格化处理图像。S307: Input the target image into the stylized processing model to obtain a preliminary stylized image.
S308,将初步风格化处理图像的背景替换为原始背景,得到最终的风格化处理图像。S308: Replace the background of the preliminary stylized image with the original background to obtain the final stylized image.
本公开实施例提供了一种图像风格化处理方法,采用样本图像数据对构建的初始网络模型进行训练后,若通过采用验证图像数据验证训练后的初始网络模型输出的风格化处理图像的多维度属性参数未大于参数阈值,则对初始网络模型的多维度模型参数进行调整后重新训练,否则完成初始网络模型的训练,得到风格化处理模型。本实施例在训练初始网络模型的过程中,通过多维度属性参数的验证以及多维度模型参数的调整,极大的提高了风格化处理模型的处理效果的质量,为后续对待处理图像的风格化处理操作奠定了基础。在对待处理图像进行风格化处理时,若待处理图像的背景复杂度低于复杂度阈值,则将该待处理图像的原始背景替换为预设的模板背景后,再采用风格化处理模型进行风格化处理操作,并对得到的初步风格化处理图像的背景替换为原始背景后得到最终的风格化处理图像,考虑了待处理图像的背景复杂程度,进一步提高了图像风格化处理结果的精细度和美观度。Embodiments of the present disclosure provide an image stylization processing method. After using sample image data to train the constructed initial network model, if the multi-dimensional stylized processing image output by using the verification image data to verify the output of the trained initial network model is If the attribute parameters are not greater than the parameter threshold, the multi-dimensional model parameters of the initial network model are adjusted and then retrained. Otherwise, the training of the initial network model is completed and the stylized processing model is obtained. In the process of training the initial network model, this embodiment greatly improves the quality of the processing effect of the stylized processing model through the verification of multi-dimensional attribute parameters and the adjustment of multi-dimensional model parameters, and provides a basis for the subsequent stylization of the image to be processed. Processing operations lay the foundation. When stylizing the image to be processed, if the background complexity of the image to be processed is lower than the complexity threshold, the original background of the image to be processed is replaced with the preset template background, and then the stylization processing model is used for stylization. stylization processing operation, and replace the background of the obtained preliminary stylized image with the original background to obtain the final stylized image, taking into account the background complexity of the image to be processed, and further improving the precision and accuracy of the image stylization results. Aesthetics.
实施例三Embodiment 3
图4示出了本公开实施例三提供的另一种视频学习素材的提供方法的流程图;本实施例在上述实施例提供的各可选方案的基础上进行了优化,具体给出了将所述目标图像输入风格化处理模型中,得到初步风格化处理图像的详细介绍。Figure 4 shows a flow chart of another method for providing video learning materials provided by Embodiment 3 of the present disclosure; this embodiment is optimized based on each option provided by the above embodiment, and specifically provides the following: The target image is input into the stylization processing model to obtain a detailed introduction of the preliminary stylization processing image.
可选的,如图4所示,本实施例中的方法可以包括如下步骤:Optionally, as shown in Figure 4, the method in this embodiment may include the following steps:
S401,若确定待处理图像的背景复杂度低于复杂度阈值,则将待处理图像的原始背景替换为模板背景,得到目标图像。S401, if it is determined that the background complexity of the image to be processed is lower than the complexity threshold, replace the original background of the image to be processed with the template background to obtain the target image.
S402,根据接收到的区域选择指令,确定待处理区域。S402: Determine the area to be processed according to the received area selection instruction.
可选的,本实施例为了提高用户对待处理图像进行风格化处理的个性化需求,可以是根据用户的选择,只对用户选择区域进行风格化处理。具体的,用户在选择待处理图像后,通过在待处理图像上的滑动操作,触发区域选择指令,其中,该区域选择指令中包含用户选择的待处理区域。可选的,若该区域选择指令是用户在待处理图像上的非闭合滑动操作触发的,则可以是将用户滑动操作所对应的区域作为待处理区域,并将该待处理区域对应的位置坐标添加到区域选择指令中传输给电子设备;若该区域选择指令是用户在待处理图像上的闭合滑动操作触发的,则可以是将用户滑动操作对应的闭合框选区域作为待处理区域,并将该待处理区域对应的位置坐标添加到区域选择指令中传输给电子设备。电子设备在接收到用户触发的区域选择指令后,从区域选择指令中获取待处理区域的具体坐标位置。Optionally, in order to improve the user's personalized needs for stylizing the image to be processed, this embodiment may stylize only the user-selected area according to the user's selection. Specifically, after the user selects the image to be processed, the user triggers an area selection instruction through a sliding operation on the image to be processed, where the area selection instruction includes the area to be processed selected by the user. Optionally, if the area selection instruction is triggered by the user's non-closed sliding operation on the image to be processed, the area corresponding to the user's sliding operation can be used as the area to be processed, and the position coordinates corresponding to the area to be processed can be Added to the area selection instruction and transmitted to the electronic device; if the area selection instruction is triggered by the user's closed sliding operation on the image to be processed, the closed frame selection area corresponding to the user's sliding operation can be used as the area to be processed, and The position coordinates corresponding to the area to be processed are added to the area selection command and transmitted to the electronic device. After receiving the area selection instruction triggered by the user, the electronic device obtains the specific coordinate position of the area to be processed from the area selection instruction.
S403,将目标图像和待处理区域输入风格化处理模型中,并控制风格化处理模型对目标图像的待处理区域的内容进行风格化处理,得到初步风格化处理图像。S403. Input the target image and the area to be processed into the stylization processing model, and control the stylization processing model to stylize the content of the area to be processed in the target image to obtain a preliminary stylized image.
可选的,本步骤可以是将S401得到的目标图像和S402确定待处理区域一并作为输入数据,调用并运行风格化处理模型的程序代码,此时风格化处理模型基于输入的目标图像和待处理区域,按照训练时的算法,只对目标图像的待处理区域的内容进行风格化处理操作,得到的初步风格化处理图像中只有待处理区域内显示的是风格化处理的效果,其余区域还是未进行风格化处理的效果。Optionally, this step can be to use the target image obtained in S401 and the area to be processed determined in S402 as input data, and call and run the program code of the stylized processing model. At this time, the stylized processing model is based on the input target image and the area to be processed. In the processing area, according to the algorithm during training, only the content of the area to be processed of the target image is stylized. In the obtained preliminary stylized image, only the area to be processed shows the effect of stylization, and the remaining areas are still The effect without stylization.
S404,将初步风格化处理图像的背景替换为原始背景,得到最终的风格化处理图像。S404: Replace the background of the preliminary stylized image with the original background to obtain the final stylized image.
可选的,若S402确定的待处理区域不包含背景区域,则本步骤可以是将S403得到的初始风格化处理图像的背景替换为待处理图像的原始背景即可得到最终的风格化处理图像。若S402确定的待处理区域包含背景区域,则本步骤可以是确定待处理区域在背景区域对应的位置坐标,然后将原始背景和待处理区域在背景区域对应的位置坐标一并作为输入数据,输入背景处理模型中,控制背景处理模型只对原始背景中该位置坐标区域的内容进行风格化处理操作,得到处理后原始背景;最后将S403得到的初始风格化处理图像的背景替换为处理后的原始背景,得到最终的风格化处理图像。Optionally, if the area to be processed determined in S402 does not include a background area, this step may be to replace the background of the initial stylized image obtained in S403 with the original background of the image to be processed to obtain the final stylized image. If the area to be processed determined in S402 includes a background area, this step may be to determine the position coordinates of the area to be processed in the background area, and then use the original background and the position coordinates of the area to be processed in the background area as input data, and input In the background processing model, the background processing model is controlled to only stylize the content of the position coordinate area in the original background to obtain the processed original background; finally, the background of the initial stylized image obtained in S403 is replaced with the processed original background to get the final stylized image.
本公开实施例提供了一种图像风格化处理方法,若用户在选择待处理图像时触发了区域选择指令,则在待处理图像的背景复杂度低于复杂度阈值时,将该待处理图像的原始背景替换为预设的模板背景,得到目标图像后,根据用户触发的区域选择指令确定待处理区域,控制风格化处理模型只对目标图像的待处理区域进行风格化处理后,将处理得到的初步风格化处理图像的背景替换为原始背景,得到最终的风格化处理图像。本公开实施例的方案在对待处理图像进行风格化处理时,不但考虑了图像背景的复杂程度,提高图像风格化处理结果的精细度和美观度;还可以针对用户的区域选择指令,为用户生成个性化的风格化处理效果,提高了图像风格化处理的趣味性。Embodiments of the present disclosure provide an image stylization processing method. If the user triggers a region selection instruction when selecting an image to be processed, when the background complexity of the image to be processed is lower than the complexity threshold, the background complexity of the image to be processed is changed. The original background is replaced with the preset template background. After obtaining the target image, the area to be processed is determined according to the area selection instruction triggered by the user. The stylized processing model is controlled to stylize only the area to be processed of the target image, and the processed area is processed. The background of the preliminary stylized image is replaced with the original background to obtain the final stylized image. When stylizing the image to be processed, the solution of the embodiment of the present disclosure not only takes into account the complexity of the image background and improves the sophistication and beauty of the image stylization processing results; it can also generate region selection instructions for the user. Personalized stylized processing effects make image stylized processing more interesting.
实施例四Embodiment 4
图5示出了本公开实施例四提供的一种图像风格化处理装置的结构示意图,本公开实施例可适用于对待处理图像进行风格化处理的情况,尤其适用于对背景复杂度低于复杂度阈值的待处理图像进行风格化处理的情况。该装置可以通过软件和/或硬件来实现,并集成在执行本方法的电子设备中,如图5所示,该装置可以包括:Figure 5 shows a schematic structural diagram of an image stylization processing device provided in Embodiment 4 of the present disclosure. The embodiment of the present disclosure can be applied to the situation of stylizing the image to be processed, especially suitable for background complexity less than complex. The situation where the image to be processed is stylized with a threshold value. The device can be implemented by software and/or hardware, and integrated in the electronic device that executes the method. As shown in Figure 5, the device can include:
背景替换模块501,用于若确定待处理图像的背景复杂度低于复杂度阈值,则将所述待处理图像的原始背景替换为模板背景,得到目标图像;The background replacement module 501 is used to, if it is determined that the background complexity of the image to be processed is lower than the complexity threshold, replace the original background of the image to be processed with the template background to obtain the target image;
风格化处理模块502,用于将所述目标图像输入风格化处理模型中,得到初步风格化处理图像;The stylization processing module 502 is used to input the target image into the stylization processing model to obtain a preliminary stylization processing image;
所述背景替换模块501,还用于将所述初步风格化处理图像的背景替换为所述原始背景,得到最终的风格化处理图像。The background replacement module 501 is also used to replace the background of the preliminary stylized image with the original background to obtain the final stylized image.
本公开实施例提供了一种图像风格化处理装置,判断待处理图像的背景复杂度是否低于复杂度阈值,若是,则将该待处理图像的原始背景替换为预设的模板背景,得到目标图像;由风格化处理模型对目标图像进行风格化处理后,将处理得到的初步风格化处理图像的背景替换为原始背景,得到最终的风格化处理图像。本公开实施例的方案在对图像进行风格化处理时,考虑了图像背景的复杂程度,当待处理图像背景复杂度较低时,采用为待处理图像更换模板背景后再进行风格化处理的方法,避免了对背景复杂度较低的待处理图像采用现有风格化处理方法,出现处理结果粗糙的情况,提高了图像风格化处理结果的精细度和美观度。Embodiments of the present disclosure provide an image stylization processing device that determines whether the background complexity of the image to be processed is lower than the complexity threshold. If so, the original background of the image to be processed is replaced with a preset template background to obtain the target Image; after the target image is stylized by the stylization processing model, the background of the preliminary stylized image obtained is replaced with the original background to obtain the final stylized image. The solution of the embodiment of the present disclosure takes the complexity of the image background into consideration when stylizing the image. When the background complexity of the image to be processed is low, the method of changing the template background for the image to be processed and then performing stylization processing is adopted. , which avoids the rough processing results caused by the existing stylization processing method for images to be processed with low background complexity, and improves the precision and beauty of the image stylization processing results.
进一步的,所述装置还包括复杂度判断模型,所述复杂度判断模型在执行确定待处理图像的背景复杂度低于复杂度阈值时用于:Further, the device further includes a complexity judgment model, which is used when determining that the background complexity of the image to be processed is lower than the complexity threshold:
提取待处理图像的原始背景的纹理特征,并根据所述纹理特征,确定待处理图像的背景复杂度是否低于复杂度阈值。Texture features of the original background of the image to be processed are extracted, and based on the texture features, it is determined whether the background complexity of the image to be processed is lower than a complexity threshold.
进一步的,所述复杂度判断模型具体用于:Further, the complexity judgment model is specifically used for:
对所述待处理图像的原始背景进行边缘检测,得到所述原始背景的纹理特征;Perform edge detection on the original background of the image to be processed to obtain texture features of the original background;
确定所述纹理特征在所述原始背景中的像素占比,作为待处理图像的背景复杂度;Determine the pixel proportion of the texture feature in the original background as the background complexity of the image to be processed;
确定所述待处理图像的背景复杂度是否低于复杂度阈值。Determine whether the background complexity of the image to be processed is lower than a complexity threshold.
进一步的,所述装置还包括:模型训练模块,所述模型训练模块包括:Further, the device also includes: a model training module, the model training module includes:
训练单元,用于采用样本图像数据对构建的初始网络模型进行风格化处理训练;The training unit is used to use sample image data to stylize and train the initial network model constructed;
验证单元,用于采用验证图像数据验证训练后的初始网络模型输出图像的属性参数是否大于参数阈值;其中,所述属性参数包括:饱和度参数、边缘平滑度参数和阴影参数中的至少一个;A verification unit, configured to use verification image data to verify whether the attribute parameters of the initial network model output image after training are greater than the parameter threshold; wherein the attribute parameters include: at least one of a saturation parameter, an edge smoothness parameter, and a shadow parameter;
模型确定单元,用于若训练后的初始网络模型输出图像的属性参数大于参数阈值,则将训练后的初始网络模型作为所述风格化处理模型。A model determination unit configured to use the trained initial network model as the stylization processing model if the attribute parameters of the output image of the trained initial network model are greater than the parameter threshold.
进一步的,所述模型训练模块还包括:Further, the model training module also includes:
参数调整单元,用于若训练后的初始网络模型输出图像的属性参数小于或等于参数阈值,则在预设修改范围内调整所述初始网络模型的模型参数;其中,所述模型参数包括初始网络模型的层数、通道数、损失权重值中的至少一个;A parameter adjustment unit configured to adjust the model parameters of the initial network model within a preset modification range if the attribute parameters of the trained initial network model output image are less than or equal to the parameter threshold; wherein the model parameters include the initial network At least one of the number of layers, the number of channels, and the loss weight value of the model;
所述训练单元,还用于采用样本图像数据对调整模型参数后的初始网络模型重新进行风格化处理训练。The training unit is also used to use sample image data to re-train the initial network model after adjusting the model parameters in a stylized manner.
进一步的,所述风格化处理模块502具体用于:Further, the stylization processing module 502 is specifically used to:
根据接收到的区域选择指令,确定待处理区域;Determine the area to be processed according to the received area selection instruction;
将所述目标图像和所述待处理区域输入风格化处理模型中,并控制所述风格化处理模型对所述目标图像的待处理区域的内容进行风格化处理,得到初步风格化处理图像。The target image and the area to be processed are input into the stylization processing model, and the stylization processing model is controlled to stylize the content of the area to be processed of the target image to obtain a preliminary stylized image.
进一步的,所述背景替换模块501在执行将所述初步风格化处理图像的背景替换为所述原始背景时,具体用于:Further, when the background replacement module 501 replaces the background of the preliminary stylized image with the original background, it is specifically used to:
将原始背景输入背景处理模型中,得到处理后原始背景;Input the original background into the background processing model to obtain the processed original background;
将所述初步风格化处理图像的背景替换为处理后的原始背景。Replace the background of the preliminary stylized image with the processed original background.
本公开实施例提供的图像风格化处理装置,与上述各实施例提供的图像风格化处理方法属于同一发明构思,未在本公开实施例中详尽描述的技术细节可参见上述各实施例,并且本公开实施例与上述各实施例具有相同的有益效果。The image stylization processing device provided by the embodiments of the present disclosure belongs to the same inventive concept as the image stylization processing method provided by the above embodiments. Technical details that are not described in detail in the embodiments of the present disclosure can be referred to the above embodiments, and this disclosure The disclosed embodiments have the same beneficial effects as the above-mentioned embodiments.
实施例五Embodiment 5
下面参考图6,其示出了适于用来实现本公开实施例的电子设备600的结构示意图。该电子设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图6示出的电子设备600仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 6 , a schematic structural diagram of an electronic device 600 suitable for implementing embodiments of the present disclosure is shown. The electronic device may include, but is not limited to, a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Computer), a PMP (Portable Multimedia Player), a vehicle-mounted terminal (such as a vehicle-mounted navigation terminal), etc. mobile terminals such as digital TVs, desktop computers, etc. The electronic device 600 shown in FIG. 6 is only an example and should not bring any limitations to the functions and usage scope of the embodiments of the present disclosure.
如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6, the electronic device 600 may include a processing device (eg, central processing unit, graphics processor, etc.) 601, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 602 or from a storage device 608. The program in the memory (RAM) 603 executes various appropriate actions and processes. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, ROM 602 and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 607 such as a computer; a storage device 608 including a magnetic tape, a hard disk, etc.; and a communication device 609. Communication device 609 may allow electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although FIG. 6 illustrates electronic device 600 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such embodiments, the computer program may be downloaded and installed from the network via communication device 609, or from storage device 608, or from ROM 602. When the computer program is executed by the processing device 601, the above functions defined in the method of the embodiment of the present disclosure are performed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmed read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device . Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the above.
在一些实施方式中,电子设备可以利用诸如HTTP(HyperText TransferProtocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, electronic devices may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and may communicate with any form or medium of digital data (e.g., , communication network) interconnection. Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or developed in the future network of.
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备内部进程执行:若确定待处理图像的背景复杂度低于复杂度阈值,则将所述待处理图像的原始背景替换为模板背景,得到目标图像;将所述目标图像输入风格化处理模型中,得到初步风格化处理图像;将所述初步风格化处理图像的背景替换为所述原始背景,得到最终的风格化处理图像。The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the internal process of the electronic device is executed: if it is determined that the background complexity of the image to be processed is lower than the complexity threshold, Then replace the original background of the image to be processed with the template background to obtain the target image; input the target image into the stylized processing model to obtain a preliminary stylized image; replace the background of the preliminary stylized image with The original background is used to obtain the final stylized image.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages—such as "C" or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider through Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments of the present disclosure can be implemented in software or hardware. Among them, the name of a unit does not constitute a limitation on the unit itself under certain circumstances.
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
根据本公开的一个或多个实施例提供的一种图像风格化处理方法,该方法包括:An image stylization processing method is provided according to one or more embodiments of the present disclosure. The method includes:
若确定待处理图像的背景复杂度低于复杂度阈值,则将所述待处理图像的原始背景替换为模板背景,得到目标图像;If it is determined that the background complexity of the image to be processed is lower than the complexity threshold, the original background of the image to be processed is replaced with the template background to obtain the target image;
将所述目标图像输入风格化处理模型中,得到初步风格化处理图像;Input the target image into the stylized processing model to obtain a preliminary stylized image;
将所述初步风格化处理图像的背景替换为所述原始背景,得到最终的风格化处理图像。The background of the preliminary stylized image is replaced with the original background to obtain a final stylized image.
根据本公开的一个或多个实施例,上述方法中,确定待处理图像的背景复杂度低于复杂度阈值,包括:According to one or more embodiments of the present disclosure, in the above method, determining that the background complexity of the image to be processed is lower than a complexity threshold includes:
提取待处理图像的原始背景的纹理特征,并根据所述纹理特征,确定待处理图像的背景复杂度是否低于复杂度阈值。Texture features of the original background of the image to be processed are extracted, and based on the texture features, it is determined whether the background complexity of the image to be processed is lower than a complexity threshold.
根据本公开的一个或多个实施例,上述方法中,提取待处理图像的原始背景的纹理特征,并根据所述纹理特征,确定待处理图像的背景复杂度是否低于复杂度阈值,包括:According to one or more embodiments of the present disclosure, in the above method, extracting texture features of the original background of the image to be processed, and determining whether the background complexity of the image to be processed is lower than a complexity threshold based on the texture features, includes:
对所述待处理图像的原始背景进行边缘检测,得到所述原始背景的纹理特征;Perform edge detection on the original background of the image to be processed to obtain texture features of the original background;
确定所述纹理特征在所述原始背景中的像素占比,作为待处理图像的背景复杂度;Determine the pixel proportion of the texture feature in the original background as the background complexity of the image to be processed;
确定所述待处理图像的背景复杂度是否低于复杂度阈值。Determine whether the background complexity of the image to be processed is lower than a complexity threshold.
根据本公开的一个或多个实施例,上述方法中,在将所述目标图像输入风格化处理模型中之前,还包括:According to one or more embodiments of the present disclosure, in the above method, before inputting the target image into the stylization processing model, the method further includes:
采用样本图像数据对构建的初始网络模型进行风格化处理训练;Use sample image data to stylize and train the initial network model built;
采用验证图像数据验证训练后的初始网络模型输出图像的属性参数是否大于参数阈值;其中,所述属性参数包括:饱和度参数、边缘平滑度参数和阴影参数中的至少一个;Verification image data is used to verify whether the attribute parameters of the initial network model output image after training are greater than the parameter threshold; wherein the attribute parameters include: at least one of a saturation parameter, an edge smoothness parameter, and a shadow parameter;
若是,则将训练后的初始网络模型作为所述风格化处理模型。If so, the trained initial network model is used as the stylization processing model.
根据本公开的一个或多个实施例,上述方法中,在采用验证图像数据验证训练后的初始网络模型输出图像的属性参数是否大于参数阈值之后,还包括:According to one or more embodiments of the present disclosure, in the above method, after using the verification image data to verify whether the attribute parameters of the initial network model output image after training are greater than the parameter threshold, it also includes:
若否,则在预设修改范围内调整所述初始网络模型的模型参数;其中,所述模型参数包括初始网络模型的层数、通道数、损失权重值中的至少一个;If not, adjust the model parameters of the initial network model within the preset modification range; wherein the model parameters include at least one of the number of layers, the number of channels, and the loss weight value of the initial network model;
采用样本图像数据对调整模型参数后的初始网络模型重新进行风格化处理训练。The sample image data is used to re-train the initial network model after adjusting the model parameters for stylization processing.
根据本公开的一个或多个实施例,上述方法中,将所述目标图像输入风格化处理模型中,得到初步风格化处理图像,包括:According to one or more embodiments of the present disclosure, in the above method, the target image is input into the stylization processing model to obtain a preliminary stylization processing image, including:
根据接收到的区域选择指令,确定待处理区域;Determine the area to be processed according to the received area selection instruction;
将所述目标图像和所述待处理区域输入风格化处理模型中,并控制所述风格化处理模型对所述目标图像的待处理区域的内容进行风格化处理,得到初步风格化处理图像。The target image and the area to be processed are input into the stylization processing model, and the stylization processing model is controlled to stylize the content of the area to be processed of the target image to obtain a preliminary stylized image.
根据本公开的一个或多个实施例,上述方法中,将所述初步风格化处理图像的背景替换为所述原始背景,包括:According to one or more embodiments of the present disclosure, in the above method, replacing the background of the preliminary stylized image with the original background includes:
将原始背景输入背景处理模型中,得到处理后原始背景;Input the original background into the background processing model to obtain the processed original background;
将所述初步风格化处理图像的背景替换为处理后的原始背景。Replace the background of the preliminary stylized image with the processed original background.
根据本公开的一个或多个实施例提供的一种图像风格化处理装置,该装置包括:An image stylization processing device is provided according to one or more embodiments of the present disclosure. The device includes:
背景替换模块,用于若确定待处理图像的背景复杂度低于复杂度阈值,则将所述待处理图像的原始背景替换为模板背景,得到目标图像;A background replacement module, used to replace the original background of the image to be processed with the template background to obtain the target image if it is determined that the background complexity of the image to be processed is lower than the complexity threshold;
风格化处理模块,用于将所述目标图像输入风格化处理模型中,得到初步风格化处理图像;A stylization processing module, used to input the target image into the stylization processing model to obtain a preliminary stylization processing image;
所述背景替换模块,还用于将所述初步风格化处理图像的背景替换为所述原始背景,得到最终的风格化处理图像。The background replacement module is also used to replace the background of the preliminary stylized image with the original background to obtain the final stylized image.
根据本公开的一个或多个实施例,上述装置还包括复杂度判断模型,所述复杂度判断模型在执行确定待处理图像的背景复杂度低于复杂度阈值时用于:According to one or more embodiments of the present disclosure, the above-mentioned device further includes a complexity judgment model, which is used when determining that the background complexity of the image to be processed is lower than a complexity threshold:
提取待处理图像的原始背景的纹理特征,并根据所述纹理特征,确定待处理图像的背景复杂度是否低于复杂度阈值。Texture features of the original background of the image to be processed are extracted, and based on the texture features, it is determined whether the background complexity of the image to be processed is lower than a complexity threshold.
根据本公开的一个或多个实施例,上述装置中的所述复杂度判断模型具体用于:According to one or more embodiments of the present disclosure, the complexity judgment model in the above device is specifically used to:
对所述待处理图像的原始背景进行边缘检测,得到所述原始背景的纹理特征;Perform edge detection on the original background of the image to be processed to obtain texture features of the original background;
确定所述纹理特征在所述原始背景中的像素占比,作为待处理图像的背景复杂度;Determine the pixel proportion of the texture feature in the original background as the background complexity of the image to be processed;
确定所述待处理图像的背景复杂度是否低于复杂度阈值。Determine whether the background complexity of the image to be processed is lower than a complexity threshold.
根据本公开的一个或多个实施例,上述装置还包括:模型训练模块,所述模型训练模块包括:According to one or more embodiments of the present disclosure, the above device further includes: a model training module, where the model training module includes:
训练单元,用于采用样本图像数据对构建的初始网络模型进行风格化处理训练;The training unit is used to use sample image data to stylize and train the initial network model constructed;
验证单元,用于采用验证图像数据验证训练后的初始网络模型输出图像的属性参数是否大于参数阈值;其中,所述属性参数包括:饱和度参数、边缘平滑度参数和阴影参数中的至少一个;A verification unit, configured to use verification image data to verify whether the attribute parameters of the initial network model output image after training are greater than the parameter threshold; wherein the attribute parameters include: at least one of a saturation parameter, an edge smoothness parameter, and a shadow parameter;
模型确定单元,用于若训练后的初始网络模型输出图像的属性参数大于参数阈值,则将训练后的初始网络模型作为所述风格化处理模型。A model determination unit configured to use the trained initial network model as the stylization processing model if the attribute parameters of the output image of the trained initial network model are greater than the parameter threshold.
根据本公开的一个或多个实施例,上述装置中的所述模型训练模块还包括:According to one or more embodiments of the present disclosure, the model training module in the above device further includes:
参数调整单元,用于若训练后的初始网络模型输出图像的属性参数小于或等于参数阈值,则在预设修改范围内调整所述初始网络模型的模型参数;其中,所述模型参数包括初始网络模型的层数、通道数、损失权重值中的至少一个;A parameter adjustment unit configured to adjust the model parameters of the initial network model within a preset modification range if the attribute parameters of the trained initial network model output image are less than or equal to the parameter threshold; wherein the model parameters include the initial network At least one of the number of layers, the number of channels, and the loss weight value of the model;
所述训练单元,还用于采用样本图像数据对调整模型参数后的初始网络模型重新进行风格化处理训练。The training unit is also used to use sample image data to re-train the initial network model after adjusting the model parameters in a stylized manner.
根据本公开的一个或多个实施例,上述装置中的所述风格化处理模块具体用于:According to one or more embodiments of the present disclosure, the stylization processing module in the above device is specifically used to:
根据接收到的区域选择指令,确定待处理区域;Determine the area to be processed according to the received area selection instruction;
将所述目标图像和所述待处理区域输入风格化处理模型中,并控制所述风格化处理模型对所述目标图像的待处理区域的内容进行风格化处理,得到初步风格化处理图像。The target image and the area to be processed are input into the stylization processing model, and the stylization processing model is controlled to stylize the content of the area to be processed of the target image to obtain a preliminary stylized image.
根据本公开的一个或多个实施例,上述装置中的所述背景替换模块在执行将所述初步风格化处理图像的背景替换为所述原始背景时,具体用于:According to one or more embodiments of the present disclosure, when the background replacement module in the above device replaces the background of the preliminary stylized image with the original background, it is specifically used to:
将原始背景输入背景处理模型中,得到处理后原始背景;Input the original background into the background processing model to obtain the processed original background;
将所述初步风格化处理图像的背景替换为处理后的原始背景。Replace the background of the preliminary stylized image with the processed original background.
根据本公开的一个或多个实施例提供的一种电子设备,该电子设备包括:An electronic device is provided according to one or more embodiments of the present disclosure. The electronic device includes:
一个或多个处理器;one or more processors;
存储器,用于存储一个或多个程序;Memory, used to store one or more programs;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开任意实施例所述的图像风格化处理方法。When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the image stylization processing method described in any embodiment of the present disclosure.
根据本公开的一个或多个实施例提供的一种可读介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开任意实施例所述的图像风格化处理方法。A readable medium provided according to one or more embodiments of the present disclosure has a computer program stored thereon, and when the program is executed by a processor, the image stylization processing method as described in any embodiment of the present disclosure is implemented.
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a description of the preferred embodiments of the present disclosure and the technical principles applied. Those skilled in the art should understand that the disclosure scope involved in the present disclosure is not limited to technical solutions composed of specific combinations of the above technical features, but should also cover solutions composed of the above technical features or without departing from the above disclosed concept. Other technical solutions formed by any combination of equivalent features. For example, a technical solution is formed by replacing the above features with technical features with similar functions disclosed in this disclosure (but not limited to).
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。Furthermore, although operations are depicted in a specific order, this should not be understood as requiring that these operations be performed in the specific order shown or performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims (8)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910910696.4A CN110689478B (en) | 2019-09-25 | 2019-09-25 | Image stylization processing method and device, electronic equipment and readable medium |
PCT/CN2020/113974 WO2021057463A1 (en) | 2019-09-25 | 2020-09-08 | Image stylization processing method and apparatus, and electronic device and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910910696.4A CN110689478B (en) | 2019-09-25 | 2019-09-25 | Image stylization processing method and device, electronic equipment and readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110689478A CN110689478A (en) | 2020-01-14 |
CN110689478B true CN110689478B (en) | 2023-12-01 |
Family
ID=69110569
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910910696.4A Active CN110689478B (en) | 2019-09-25 | 2019-09-25 | Image stylization processing method and device, electronic equipment and readable medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110689478B (en) |
WO (1) | WO2021057463A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110689478B (en) * | 2019-09-25 | 2023-12-01 | 北京字节跳动网络技术有限公司 | Image stylization processing method and device, electronic equipment and readable medium |
CN111445383B (en) * | 2020-03-20 | 2024-02-13 | 北京迈格威科技有限公司 | Image parameter adjustment method, device and system |
CN113012082A (en) * | 2021-02-09 | 2021-06-22 | 北京字跳网络技术有限公司 | Image display method, apparatus, device and medium |
CN114463241A (en) * | 2022-02-11 | 2022-05-10 | 北京世纪好未来教育科技有限公司 | Image synthesis method, image synthesis device, electronic equipment and storage medium |
CN114926326A (en) * | 2022-06-28 | 2022-08-19 | 北京字跳网络技术有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108154518A (en) * | 2017-12-11 | 2018-06-12 | 广州华多网络科技有限公司 | A kind of method, apparatus of image procossing, storage medium and electronic equipment |
CN108961349A (en) * | 2018-06-29 | 2018-12-07 | 广东工业大学 | A kind of generation method, device, equipment and the storage medium of stylization image |
CN109344724A (en) * | 2018-09-05 | 2019-02-15 | 深圳伯奇科技有限公司 | A kind of certificate photo automatic background replacement method, system and server |
CN109523460A (en) * | 2018-10-29 | 2019-03-26 | 北京达佳互联信息技术有限公司 | Moving method, moving apparatus and the computer readable storage medium of image style |
CN110211017A (en) * | 2019-05-15 | 2019-09-06 | 北京字节跳动网络技术有限公司 | Image processing method, device and electronic equipment |
CN110222722A (en) * | 2019-05-14 | 2019-09-10 | 华南理工大学 | Interactive image stylization processing method, calculates equipment and storage medium at system |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101794454B (en) * | 2010-04-08 | 2012-01-04 | 西安交通大学 | Oil painting stylizing method based on image |
CN104869346A (en) * | 2014-02-26 | 2015-08-26 | 中国移动通信集团公司 | Method and electronic equipment for processing image in video call |
CN105989594B (en) * | 2015-02-12 | 2019-02-12 | 阿里巴巴集团控股有限公司 | A kind of image region detection method and device |
US9672414B2 (en) * | 2015-11-11 | 2017-06-06 | Adobe Systems Incorporated | Enhancement of skin, including faces, in photographs |
CN106920212A (en) * | 2015-12-24 | 2017-07-04 | 掌赢信息科技(上海)有限公司 | A kind of method and electronic equipment for sending stylized video |
CN106327448A (en) * | 2016-08-31 | 2017-01-11 | 上海交通大学 | Picture stylization processing method based on deep learning |
US10165259B2 (en) * | 2017-02-15 | 2018-12-25 | Adobe Systems Incorporated | Generating novel views of a three-dimensional object based on a single two-dimensional image |
US10318889B2 (en) * | 2017-06-26 | 2019-06-11 | Konica Minolta Laboratory U.S.A., Inc. | Targeted data augmentation using neural style transfer |
CN107507173B (en) * | 2017-08-15 | 2021-07-27 | 上海交通大学 | A no-reference sharpness assessment method and system for whole slice images |
CN110689478B (en) * | 2019-09-25 | 2023-12-01 | 北京字节跳动网络技术有限公司 | Image stylization processing method and device, electronic equipment and readable medium |
-
2019
- 2019-09-25 CN CN201910910696.4A patent/CN110689478B/en active Active
-
2020
- 2020-09-08 WO PCT/CN2020/113974 patent/WO2021057463A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108154518A (en) * | 2017-12-11 | 2018-06-12 | 广州华多网络科技有限公司 | A kind of method, apparatus of image procossing, storage medium and electronic equipment |
CN108961349A (en) * | 2018-06-29 | 2018-12-07 | 广东工业大学 | A kind of generation method, device, equipment and the storage medium of stylization image |
CN109344724A (en) * | 2018-09-05 | 2019-02-15 | 深圳伯奇科技有限公司 | A kind of certificate photo automatic background replacement method, system and server |
CN109523460A (en) * | 2018-10-29 | 2019-03-26 | 北京达佳互联信息技术有限公司 | Moving method, moving apparatus and the computer readable storage medium of image style |
CN110222722A (en) * | 2019-05-14 | 2019-09-10 | 华南理工大学 | Interactive image stylization processing method, calculates equipment and storage medium at system |
CN110211017A (en) * | 2019-05-15 | 2019-09-06 | 北京字节跳动网络技术有限公司 | Image processing method, device and electronic equipment |
Non-Patent Citations (1)
Title |
---|
杨常青等.基于纹理的图像复杂度描述.《舰基图像处理技术原理与应用》.2015,电子文档第1-7页. * |
Also Published As
Publication number | Publication date |
---|---|
CN110689478A (en) | 2020-01-14 |
WO2021057463A1 (en) | 2021-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110689478B (en) | Image stylization processing method and device, electronic equipment and readable medium | |
WO2020155907A1 (en) | Method and apparatus for generating cartoon style conversion model | |
WO2020199931A1 (en) | Face key point detection method and apparatus, and storage medium and electronic device | |
WO2019242416A1 (en) | Video image processing method and apparatus, computer readable storage medium and electronic device | |
CN110189246B (en) | Image stylization generation method and device and electronic equipment | |
CN113689372B (en) | Image processing method, apparatus, storage medium, and program product | |
CN110689546A (en) | Method, device and equipment for generating personalized head portrait and storage medium | |
CN111414879A (en) | Face shielding degree identification method and device, electronic equipment and readable storage medium | |
CN117095006B (en) | Image aesthetic evaluation method, device, electronic equipment and storage medium | |
CN110211017B (en) | Image processing method and device and electronic equipment | |
CN110211195B (en) | Method, device, electronic equipment and computer-readable storage medium for generating image set | |
CN113902636A (en) | Image deblurring method and device, computer readable medium and electronic equipment | |
CN117011156A (en) | Image processing method, device, equipment and storage medium | |
CN111815748B (en) | Animation processing method and device, storage medium and electronic equipment | |
CN113780326A (en) | Image processing method and device, storage medium and electronic equipment | |
CN114898177B (en) | Defect image generation method, model training method, device, medium and product | |
CN111667553A (en) | Head-pixelized face color filling method and device and electronic equipment | |
US20230036366A1 (en) | Image attribute classification method, apparatus, electronic device, medium and program product | |
US11443537B2 (en) | Electronic apparatus and controlling method thereof | |
CN118042246A (en) | Video generation method, device, electronic equipment and readable storage medium | |
CN110197459A (en) | Image stylization generation method, device and electronic equipment | |
CN110619602A (en) | Image generation method and device, electronic equipment and storage medium | |
CN118537206A (en) | Model construction method, image generation method, device, equipment and medium | |
CN116977195A (en) | Method, device, equipment and storage medium for adjusting restoration model | |
WO2023040813A1 (en) | Facial image processing method and apparatus, and device and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TG01 | Patent term adjustment | ||
TG01 | Patent term adjustment |