WO2020186888A1 - Method and apparatus for constructing image processing model, and terminal device - Google Patents

Method and apparatus for constructing image processing model, and terminal device Download PDF

Info

Publication number
WO2020186888A1
WO2020186888A1 PCT/CN2019/130876 CN2019130876W WO2020186888A1 WO 2020186888 A1 WO2020186888 A1 WO 2020186888A1 CN 2019130876 W CN2019130876 W CN 2019130876W WO 2020186888 A1 WO2020186888 A1 WO 2020186888A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
degradation level
adjustment layer
image processing
feature adjustment
Prior art date
Application number
PCT/CN2019/130876
Other languages
French (fr)
Chinese (zh)
Inventor
乔宇
何静雯
董超
Original Assignee
深圳先进技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳先进技术研究院 filed Critical 深圳先进技术研究院
Publication of WO2020186888A1 publication Critical patent/WO2020186888A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration

Definitions

  • the invention belongs to the technical field of image processing, and in particular relates to a method, device and terminal equipment for building an image processing model.
  • the degradation levels of images are continuous.
  • the traditional method can only train many image restoration models for different degradation levels, or train one large enough The image restoration model to solve a wide range of degraded images.
  • this method will bring a very large amount of calculation and lack of flexibility.
  • the embodiments of the present invention provide an image processing model construction method, device, and terminal equipment to solve the problem that the existing image restoration processing has a single degradation level and lacks flexibility in processing degraded images with multiple degradation levels. .
  • the first aspect of the embodiments of the present invention provides a method for constructing an image processing model, including:
  • the base model includes a convolution layer, an activation function layer, and an image upsampling layer ;
  • Interpolation is performed on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the initial degradation level to the end degradation level.
  • a second aspect of the embodiments of the present invention provides an image processing model construction device, including:
  • the first configuration training unit is used to configure the initial degradation level parameters of the base model based on the residual module, and to train the configured base model to adjust the network parameters of the base model.
  • the base model includes a convolutional layer, Activation function layer, image upsampling layer;
  • a model generation unit configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
  • the second configuration training unit is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
  • the model adjustment unit is used to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
  • a third aspect of the embodiments of the present invention provides a terminal device, including:
  • the computer program includes:
  • the first configuration training unit is used to configure the initial degradation level parameters of the base model based on the residual module, and to train the configured base model to adjust the network parameters of the base model.
  • the base model includes a convolutional layer, Activation function layer, image upsampling layer;
  • a model generation unit configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
  • the second configuration training unit is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
  • the model adjustment unit is used to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
  • a fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the first aspect of the embodiments of the present invention Provide the steps of the method for constructing the image processing model.
  • the computer program includes:
  • the first configuration training unit is used to configure the initial degradation level parameters of the base model based on the residual module, and to train the configured base model to adjust the network parameters of the base model.
  • the base model includes a convolutional layer, Activation function layer, image upsampling layer;
  • a model generation unit configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
  • the second configuration training unit is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
  • the model adjustment unit is used to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
  • the embodiment of the present invention has the beneficial effect of configuring the initial degradation level parameter of the base model based on the residual module, and training the configured base model to adjust the network parameters of the base model. , Then add the feature adjustment layer to the trained base model to generate an adaptive model, configure the end degradation level parameters of the adaptive model, and then train the configured adaptive model to adjust the feature adjustment Then, perform interpolation operation on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize the image processing of any degradation level from the start degradation level to the end degradation level, thereby Realizes the image restoration task of any degradation level, and realizes the continuous adjustment of the restoration intensity, and since no new image noise is introduced, the user can adjust the adjustment coefficient of the feature adjustment layer according to their preferences to achieve a satisfactory image processing effect , The user experience is better.
  • FIG. 1 is an implementation flowchart of an image processing model construction method provided by an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a network architecture of a base model provided by an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a network architecture of an adaptive model provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of an image processing model construction device provided by an embodiment of the present invention.
  • Fig. 5 is a schematic diagram of a terminal device provided by an embodiment of the present invention.
  • FIG. 1 shows an implementation process of an image processing model construction method provided by an embodiment of the present invention, which is detailed as follows:
  • step S101 the initial degradation level parameter of the base model based on the residual module is configured, and the configured base model is trained to adjust the network parameters of the base model.
  • the base model based on the residual module is mainly used to solve the image restoration of the initial degradation level, which includes a convolution layer, an activation function layer, and an image upsampling layer.
  • the embodiment of the present invention is preferably a network architecture similar to SRResNet with a residual module as the core. It is mainly composed of a convolutional layer, an activation function layer, and an image up-sampling layer. Please refer to Figure 2 for details.
  • the stride of the first convolutional layer in the base model is 2, so that the image passing through the convolutional layer The length and width becomes 1/2 of the original, thereby improving the processing efficiency of the residual module, and after being processed by the residual module, it is input to the convolutional layer connected to the residual module, and the output image of the convolutional layer is input to The image is up-sampled to restore the original size.
  • the model performs well in Gaussian denoising, super-resolution and JPEG lossy compression and restoration tasks.
  • the pre-configured degradation level parameters are obtained, and the pre-configured degradation level parameters include a start degradation level parameter and an end degradation level parameter. Then according to the pre-configured degradation level parameters, configure the starting degradation level parameters of the base model.
  • both the start degradation level parameter and the end degradation level parameter include: Gaussian noise parameters, JPEG compression quality parameters and bi-cubic downsampling parameters, where:
  • the initial degradation level parameters are: Gaussian noise, ⁇ 15; JPEG compression quality, q80; Bi-cubic downsampling, ⁇ 3;
  • the corresponding end degradation level parameters are: Gaussian noise, ⁇ 75; JPEG compression quality, q10; Bi-cubic downsampling, ⁇ 4.
  • start degradation level parameter and the end degradation level parameter are not limited to the specific parameters mentioned above, and the specific parameters mentioned above are only an example and not specific specific parameters.
  • step S102 the feature adjustment layer is added to the trained base model to generate an adaptive model.
  • the feature adjustment layer is composed of multiple convolution kernels. Since the depth-level convolution kernel is operated based on a single feature map, it is much faster than the general convolution kernel.
  • the feature adjustment layer is composed of multiple depthwise convolution filters.
  • the convolution kernel constituting the feature adjustment layer can be composed of a convolution kernel with a corresponding calculation speed, and is not limited to a depth-level convolution kernel.
  • the size of the convolution kernel can be 1 ⁇ 1, 3 ⁇ 3, 5 ⁇ 5, 7 ⁇ 7, etc., which is not specifically limited here.
  • the larger the size of the convolution kernel the better performance of the adaptive model on image restoration tasks that end the degradation level, but as the convolution kernel increases, this improvement is not obvious.
  • setting the size of the convolution kernel to 1 ⁇ 1 can get very ideal results.
  • the size of the convolution kernel must be set to at least 5 ⁇ 5.
  • the adaptive model is mainly used to add a feature adjustment layer on the basis of the base model, so that the formed adaptive model can handle the image restoration task of the end degradation level, and because only the convolution kernel is added
  • the feature adjustment layer is composed of not many network parameters. For example, for the feature adjustment layer with the convolution kernel size of 1 ⁇ 1 and 5 ⁇ 5, only 0.15% and 3.65% of the network parameters are added, which is not much. Increase the amount of calculation of the network model.
  • Figure 3 for the specific structure of the adaptive model. It is added after the convolutional layer of the base model or after the convolutional layer of the residual structure on the basis of the base model.
  • the model formed by the feature adjustment layer, the residual structure referred to here is a structure composed of 16 residual modules, where the residual module includes a convolutional layer, and the activation layer connected to the convolutional layer, And another convolutional layer connected to the activation layer.
  • step S102 is specifically:
  • the feature adjustment layer is placed after all the convolutional layers of the trained base model to generate an adaptive model.
  • step S102 is specifically:
  • the feature adjustment layer is placed after the convolutional layer in the residual structure of the trained base model to generate an adaptive model.
  • the feature adjustment layer in order to facilitate the adjustment of the feature map after the convolution operation, the feature adjustment layer needs to be placed behind the convolution layer. Specifically, it can be placed after all the convolution layers of the base model, or it can be placed on the base model. After the convolutional layer in the residual structure of the model, there is no specific limitation here.
  • step S102 specifically includes:
  • Step S1021 Configure the size parameter of the convolution kernel of the feature adjustment layer.
  • Step S1022 adding the configured feature adjustment layer to the trained base model to generate an adaptive model.
  • the size of the convolution kernel in the corresponding feature adjustment layer is different.
  • the size of the convolution kernel in the feature adjustment layer can be configured according to the actual situation, for example, by the adaptive model
  • the size of the convolution kernel is set to 1 ⁇ 1; when the image super-resolution task is to be processed, the size of the convolution kernel is set to 5 ⁇ 5 or more.
  • the size parameters of the convolution kernel of the configuration feature adjustment layer can be pre-configured.
  • the image processing task for the user to be selected on the adaptive model interface can be found according to the comparison table of the image processing task and the configuration parameters Corresponding configuration parameters; it can also be configured by the user, and there is no specific limitation here.
  • step S103 the end degradation level parameter of the adaptive model is configured, and the configured adaptive model is trained to adjust the parameters of the feature adjustment layer.
  • the end degradation level parameter of the adaptive model is configured according to the acquired pre-configured degradation level parameter, and the end degradation level parameter of the adaptive model is configured. Training is performed so that the adaptive model can output a better quality restored image.
  • the adaptive model is trained only by adjusting the parameters of the feature adjustment layer, and the training effect of image restoration is achieved after multiple training and adjustment of the parameters of the feature adjustment layer.
  • the training samples used are the images corresponding to the corresponding degradation levels.
  • step S104 interpolation is performed on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
  • the adjustment test is performed on the adaptive model, specifically by testing all the feature adjustment layers in the adaptive model.
  • Perform interpolation operation so that the finally formed image processing model can realize the image restoration of any degradation level between "start” and "end", where "start” is the beginning of the degradation level, and "end” is the end of the degradation level.
  • Interpolation is performed In essence, it can also be understood as multiplying the parameters of all the characteristic adjustment layers of the adaptive model by an adjustment coefficient.
  • the adjustment coefficient ranges from 0 to 1. By changing the adjustment coefficient, you can continuously change the The restoration strength of an image with a certain degradation level.
  • the restoration strength of the image with a given degradation level will also change accordingly, and if the degradation degree of the initial degradation level is less than that of the end degradation level, increase the adjustment coefficient, The higher the degree of restoration of degraded images.
  • the convolutional neural network performs convolution processing on the degraded image in the training sample and the clear image corresponding to the degraded image to extract the unique features inside the image, and then The network parameters in the base model and the parameters of the feature adjustment layer in the adaptive model are trained and adjusted to learn the mapping relationship from the degraded image to the clear image.
  • the mean square error is used to calculate the error between the target image and the learned image, and then the network parameters are adjusted and updated through backpropagation.
  • the model converges, the network parameters reach the optimal after multiple optimization iterations Value.
  • the initial degradation level parameter of the base model based on the residual module is configured, and the configured base model is trained to adjust the network parameters of the base model, and then the feature adjustment layer is added to the economics
  • the trained base model an adaptive model is generated, and the end degradation level parameters of the adaptive model are configured, and then the configured adaptive model is trained to adjust the parameters of the feature adjustment layer, and then the trained
  • the feature adjustment layer in the adaptive model performs interpolation operations, so that the finally formed image processing model can realize image processing at any degradation level from the start degradation level to the end degradation level, thereby achieving the image restoration task at any degradation level , And realizes the continuous adjustment of restoration intensity, and because no new image noise is introduced, users can adjust the adjustment coefficient of the feature adjustment layer according to their preferences to achieve a satisfactory image processing effect, and the user experience is better.
  • FIG. 4 shows a schematic diagram of a device for constructing an image processing model provided by an embodiment of the present invention. The relevant part of the embodiment of the invention.
  • the device includes:
  • the first configuration training unit 41 is configured to configure the initial degradation level parameters of the base model based on the residual module, and train the configured base model to adjust the network parameters of the base model, the base model including a convolutional layer , Activation function layer, image upsampling layer;
  • the model generating unit 42 is configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
  • the second configuration training unit 43 is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
  • the model adjustment unit 44 is configured to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level .
  • model generating unit 42 is specifically configured to:
  • the feature adjustment layer is placed after all the convolutional layers of the trained base model to generate an adaptive model.
  • model generating unit 42 is specifically configured to:
  • the feature adjustment layer is placed after the convolutional layer in the residual structure of the trained base model to generate an adaptive model.
  • both the start degradation level parameter and the end degradation level parameter include: Gaussian noise parameters, JPEG compression quality parameters, and bi-cubic downsampling parameters.
  • the convolution kernel is a depth-level convolution kernel.
  • the model generating unit 42 includes:
  • the convolution kernel configuration subunit is used to configure the size parameters of the convolution kernel of the feature adjustment layer
  • the model generation word unit is used to add the configured feature adjustment layer to the trained base model to generate an adaptive model.
  • the initial degradation level parameter of the base model based on the residual module is configured, and the configured base model is trained to adjust the network parameters of the base model, and then the feature adjustment layer is added to the economics
  • the trained base model an adaptive model is generated, and the end degradation level parameters of the adaptive model are configured, and then the configured adaptive model is trained to adjust the parameters of the feature adjustment layer, and then the trained
  • the feature adjustment layer in the adaptive model performs interpolation operations, so that the finally formed image processing model can realize image processing at any degradation level from the start degradation level to the end degradation level, thereby achieving the image restoration task at any degradation level , And realizes the continuous adjustment of restoration intensity, and because no new image noise is introduced, users can adjust the adjustment coefficient of the feature adjustment layer according to their preferences to achieve a satisfactory image processing effect, and the user experience is better.
  • Fig. 5 is a schematic diagram of a terminal according to an embodiment of the present invention.
  • the terminal device 5 of this embodiment includes a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and running on the processor 50.
  • the processor 50 executes the computer program 52, the steps in the embodiment of the method for constructing each image processing model described above are implemented, for example, steps 101 to 104 shown in FIG. 1.
  • the processor 50 executes the computer program 52, the functions of the units in the foregoing system embodiments, such as the functions of the modules 41 to 44 shown in FIG. 4, are realized.
  • the computer program 52 may be divided into one or more units, and the one or more units are stored in the memory 51 and executed by the processor 50 to complete the present invention.
  • the one or more units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the terminal device 5.
  • the computer program 52 can be divided into a first configuration training unit 41, a model generation unit 42, a second configuration training unit 43, and a model adjustment unit 44.
  • the specific functions of each unit are as follows:
  • the first configuration training unit 41 is configured to configure the initial degradation level parameters of the base model based on the residual module, and train the configured base model to adjust the network parameters of the base model, the base model including a convolutional layer , Activation function layer, image upsampling layer;
  • the model generating unit 42 is configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
  • the second configuration training unit 43 is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
  • the model adjustment unit 44 is configured to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level .
  • model generating unit 42 is specifically configured to:
  • the feature adjustment layer is placed after all the convolutional layers of the trained base model to generate an adaptive model.
  • model generating unit 42 is specifically configured to:
  • the feature adjustment layer is placed after the convolutional layer in the residual structure of the trained base model to generate an adaptive model.
  • both the start degradation level parameter and the end degradation level parameter include: Gaussian noise parameters, JPEG compression quality parameters, and bi-cubic downsampling parameters.
  • the convolution kernel is a depth-level convolution kernel.
  • the model generating unit 42 includes:
  • the convolution kernel configuration subunit is used to configure the size parameters of the convolution kernel of the feature adjustment layer
  • the model generation word unit is used to add the configured feature adjustment layer to the trained base model to generate an adaptive model.
  • the terminal device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art can understand that FIG. 5 is only an example of the terminal device 5, and does not constitute a limitation on the terminal device 5. It may include more or less components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
  • the so-called processor 50 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5.
  • the memory 51 may also be an external storage device of the terminal device 5, for example, a plug-in hard disk equipped on the terminal device 5, a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD) Card, Flash Card, etc. Further, the memory 51 may also include both an internal storage unit of the terminal device 5 and an external storage device.
  • the memory 51 is used to store the computer program and other programs and data required by the terminal.
  • the memory 51 can also be used to temporarily store data that has been output or will be output.
  • the disclosed system/terminal device and method may be implemented in other ways.
  • the system/terminal device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units.
  • components can be combined or integrated into another system, or some features can be omitted or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, systems or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the present invention implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include: any entity or system capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signal telecommunications signal
  • software distribution media any entity or system capable of carrying the computer program code
  • recording medium U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media.

Landscapes

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

Abstract

A method and apparatus for constructing an image processing model, and a terminal device. The method comprises: configuring a start degradation level parameter of a base model based on a residual module, and training the configured base model to adjust a network parameter of the base model (S101); adding a feature adjusting layer into the base model, and generating an adaptive model (S102); configuring an end degradation level parameter of the adaptive model, and training the configured adaptive model to adjust parameters of the feature adjusting layer (S103); performing interpolation operation on the feature adjusting layer in the trained adaptive model, so that the finally formed image processing model can achieve image processing at any degradation level from the start degradation level to the end degradation level (S104). The method achieves continuous adjustability of restoration intensity, and the user experience is better.

Description

一种图像处理模型的构建方法、装置及终端设备Method, device and terminal equipment for constructing image processing model 技术领域Technical field
本发明属于图像处理技术领域,尤其涉及一种图像处理模型的构建方法、装置及终端设备。The invention belongs to the technical field of image processing, and in particular relates to a method, device and terminal equipment for building an image processing model.
背景技术Background technique
现有的基于深度学习的图像复原技术,都是针对某个具体退化级别的图像复原训练一个单独的模型。如果使用退化级别不匹配的模型来复原退化图像,将会带来过度平滑或者过对锐化的效果,复原图像的质量较差,达不到用户的要求。Existing image restoration technologies based on deep learning all train a separate model for image restoration of a specific degradation level. If a model that does not match the degradation level is used to restore the degraded image, it will bring about an over-smoothing or over-sharpening effect, and the quality of the restored image will be poor, which will not meet the requirements of users.
在现实生活中,图像的退化级别是连续的,这样一来,为了解决退化图像的复原为题,传统的方法只能通过训练很多个针对不同退化级别的图像复原模型,或者是训练一个足够大的图像复原模型以解决大范围的退化程度的退化图像。然而这样的方式,会带来非常大的计算量且欠缺灵活性。In real life, the degradation levels of images are continuous. In this way, in order to solve the problem of restoration of degraded images, the traditional method can only train many image restoration models for different degradation levels, or train one large enough The image restoration model to solve a wide range of degraded images. However, this method will bring a very large amount of calculation and lack of flexibility.
技术问题technical problem
有鉴于此,本发明实施例提供了一种图像处理模型的构建方法、装置及终端设备,以解决现有图像复原处理退化级别单一,在处理多种退化级别的退化图像时欠缺灵活性的问题。In view of this, the embodiments of the present invention provide an image processing model construction method, device, and terminal equipment to solve the problem that the existing image restoration processing has a single degradation level and lacks flexibility in processing degraded images with multiple degradation levels. .
技术解决方案Technical solutions
本发明实施例的第一方面提供了一种图像处理模型的构建方法,包括:The first aspect of the embodiments of the present invention provides a method for constructing an image processing model, including:
配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数,所述基模型包括卷积层、激活函数层、图像上采样层;Configure the initial degradation level parameters of the base model based on the residual module, and train the configured base model to adjust the network parameters of the base model. The base model includes a convolution layer, an activation function layer, and an image upsampling layer ;
将特征调节层添加至经训练好的基模型中,生成自适应模型,所述特征调节层由多个卷积核组成;Adding a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数;Configuring the end degradation level parameter of the adaptive model, and training the configured adaptive model to adjust the parameters of the feature adjustment layer;
对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。Interpolation is performed on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the initial degradation level to the end degradation level.
本发明实施例的第二方面提供了一种图像处理模型的构建装置,包括:A second aspect of the embodiments of the present invention provides an image processing model construction device, including:
第一配置训练单元,用于配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数,所述基模型包括卷积层、激活函数层、图像上采样层;The first configuration training unit is used to configure the initial degradation level parameters of the base model based on the residual module, and to train the configured base model to adjust the network parameters of the base model. The base model includes a convolutional layer, Activation function layer, image upsampling layer;
模型生成单元,用于将特征调节层添加至经训练好的基模型中,生成自适应模型,所述特征调节层由多个卷积核组成;A model generation unit, configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
第二配置训练单元,用于配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数;The second configuration training unit is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
模型调节单元,用于对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。The model adjustment unit is used to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
本发明实施例的第三方面提供了一种终端设备,包括:A third aspect of the embodiments of the present invention provides a terminal device, including:
存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现本发明实施例的第一方面提供的图像处理模型的构建方法的步骤。A memory, a processor, and a computer program that is stored in the memory and can run on the processor, wherein the processor implements the image processing model provided in the first aspect of the embodiment of the present invention when the processor executes the computer program The steps of the construction method.
其中,所述计算机程序包括:Wherein, the computer program includes:
第一配置训练单元,用于配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数,所述基模型包括卷积层、激活函数层、图像上采样层;The first configuration training unit is used to configure the initial degradation level parameters of the base model based on the residual module, and to train the configured base model to adjust the network parameters of the base model. The base model includes a convolutional layer, Activation function layer, image upsampling layer;
模型生成单元,用于将特征调节层添加至经训练好的基模型中,生成自适 应模型,所述特征调节层由多个卷积核组成;A model generation unit, configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
第二配置训练单元,用于配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数;The second configuration training unit is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
模型调节单元,用于对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。The model adjustment unit is used to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
本发明实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现本发明实施例的第一方面提供的图像处理模型的构建方法的步骤。A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the first aspect of the embodiments of the present invention Provide the steps of the method for constructing the image processing model.
其中,所述计算机程序包括:Wherein, the computer program includes:
第一配置训练单元,用于配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数,所述基模型包括卷积层、激活函数层、图像上采样层;The first configuration training unit is used to configure the initial degradation level parameters of the base model based on the residual module, and to train the configured base model to adjust the network parameters of the base model. The base model includes a convolutional layer, Activation function layer, image upsampling layer;
模型生成单元,用于将特征调节层添加至经训练好的基模型中,生成自适应模型,所述特征调节层由多个卷积核组成;A model generation unit, configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
第二配置训练单元,用于配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数;The second configuration training unit is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
模型调节单元,用于对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。The model adjustment unit is used to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
有益效果Beneficial effect
本发明实施例与现有技术相比存在的有益效果是:通过配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数后,再将特征调节层添加至经训练好的基模型中,生成自适应模 型,并配置所述自适应模型的结束退化级别参数,再对配置好的自适应模型进行训练以调整所述特征调节层的参数,然后对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理,从而实现了任意退化级别的图像复原任务,并实现了复原强度的连续可调性,而且由于未带入新的图像噪声,使得用户可以根据喜好调节特征调节层的调节系数以达到满意的图像处理效果,用户体验更好。Compared with the prior art, the embodiment of the present invention has the beneficial effect of configuring the initial degradation level parameter of the base model based on the residual module, and training the configured base model to adjust the network parameters of the base model. , Then add the feature adjustment layer to the trained base model to generate an adaptive model, configure the end degradation level parameters of the adaptive model, and then train the configured adaptive model to adjust the feature adjustment Then, perform interpolation operation on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize the image processing of any degradation level from the start degradation level to the end degradation level, thereby Realizes the image restoration task of any degradation level, and realizes the continuous adjustment of the restoration intensity, and since no new image noise is introduced, the user can adjust the adjustment coefficient of the feature adjustment layer according to their preferences to achieve a satisfactory image processing effect , The user experience is better.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only of the present invention. For some embodiments, for those of ordinary skill in the art, other drawings can be obtained from these drawings without creative labor.
图1是本发明实施例提供的一种图像处理模型的构建方法的实现流程图;FIG. 1 is an implementation flowchart of an image processing model construction method provided by an embodiment of the present invention;
图2是本发明实施例提供的一种基模型的网络架构的示意图;2 is a schematic diagram of a network architecture of a base model provided by an embodiment of the present invention;
图3是本发明实施例提供的一种自适应模型的网络架构的示意图;3 is a schematic diagram of a network architecture of an adaptive model provided by an embodiment of the present invention;
图4是本发明实施例提供的一种图像处理模型的构建装置的示意图;4 is a schematic diagram of an image processing model construction device provided by an embodiment of the present invention;
图5是本发明实施例提供的一种终端设备的示意图。Fig. 5 is a schematic diagram of a terminal device provided by an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本发明实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、系统、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, systems, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of the present invention.
为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。请参考图1,图1示出了本发明实施例提供的一种图像处理模型的构建方法的实现流程,详述如下:In order to illustrate the technical solution of the present invention, specific embodiments are used for description below. Please refer to FIG. 1. FIG. 1 shows an implementation process of an image processing model construction method provided by an embodiment of the present invention, which is detailed as follows:
在步骤S101中,配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数。In step S101, the initial degradation level parameter of the base model based on the residual module is configured, and the configured base model is trained to adjust the network parameters of the base model.
在本发明实施例中,基于残差模块的基模型主要是用于解决开始退化级别的图像复原,其包括卷积层、激活函数层、图像上采样层。In the embodiment of the present invention, the base model based on the residual module is mainly used to solve the image restoration of the initial degradation level, which includes a convolution layer, an activation function layer, and an image upsampling layer.
在这里,基模型的网络架构的选择是较为灵活的,任何能够处理图像复原任务的卷积网络模型均能够实现,本发明实施例优选为和SRResNet类似的以残差模块为核心的网络架构,其主要由卷积层、激活函数层、图像上采样层构成,具体请参考图2,其中,基模型中的第一个卷积层的步幅为2,这样使得经过该卷积层的图像的长宽变为原来的1/2,从而提高残差模块的处理效率,并且在经残差模块处理后输入到与残差模块连接的卷积层,将该卷积层的输出图像输入到图像上采样层,让图像恢复为原来的大小。该模型在高斯去噪、超分辨和JPEG有损压缩复原任务上都有很好的表现。Here, the choice of the network architecture of the base model is relatively flexible. Any convolutional network model that can handle image restoration tasks can be implemented. The embodiment of the present invention is preferably a network architecture similar to SRResNet with a residual module as the core. It is mainly composed of a convolutional layer, an activation function layer, and an image up-sampling layer. Please refer to Figure 2 for details. Among them, the stride of the first convolutional layer in the base model is 2, so that the image passing through the convolutional layer The length and width becomes 1/2 of the original, thereby improving the processing efficiency of the residual module, and after being processed by the residual module, it is input to the convolutional layer connected to the residual module, and the output image of the convolutional layer is input to The image is up-sampled to restore the original size. The model performs well in Gaussian denoising, super-resolution and JPEG lossy compression and restoration tasks.
在构建好以残差模块为核心的基模型后,获取预配置的退化级别参数,预配置的退化级别参数包括开始退化级别参数和结束退化级别参数。再按照预配置的退化级别参数,配置该基模型的开始退化级别参数。After the base model with the residual module as the core is constructed, the pre-configured degradation level parameters are obtained, and the pre-configured degradation level parameters include a start degradation level parameter and an end degradation level parameter. Then according to the pre-configured degradation level parameters, configure the starting degradation level parameters of the base model.
在这里,开始退化级别参数和结束退化级别参数中均包括有:高斯噪声参数、JPEG压缩质量参数和双三次下采样参数,其中:Here, both the start degradation level parameter and the end degradation level parameter include: Gaussian noise parameters, JPEG compression quality parameters and bi-cubic downsampling parameters, where:
开始退化级别参数为:高斯噪声,σ15;JPEG压缩质量,q80;双三次下采样,×3;The initial degradation level parameters are: Gaussian noise, σ15; JPEG compression quality, q80; Bi-cubic downsampling, ×3;
对应的结束退化级别参数为:高斯噪声,σ75;JPEG压缩质量,q10;双三次下采样,×4。The corresponding end degradation level parameters are: Gaussian noise, σ75; JPEG compression quality, q10; Bi-cubic downsampling, ×4.
可以理解的是,开始退化级别参数和结束退化级别参数不仅仅限于上文中的具体参数,上文中的具体参数仅作为一种示例,并不是特定的具体参数。It can be understood that the start degradation level parameter and the end degradation level parameter are not limited to the specific parameters mentioned above, and the specific parameters mentioned above are only an example and not specific specific parameters.
在步骤S102中,将特征调节层添加至经训练好的基模型中,生成自适应模型。In step S102, the feature adjustment layer is added to the trained base model to generate an adaptive model.
在本发明实施例中,特征调节层由多个卷积核组成,由于深度级卷积核是基于单个特征图进行运算的,其要比一般卷积核的运算速度快得多,优选的,特征调节层由多个深度级卷积核(depthwise convolution filters)组成。In the embodiment of the present invention, the feature adjustment layer is composed of multiple convolution kernels. Since the depth-level convolution kernel is operated based on a single feature map, it is much faster than the general convolution kernel. Preferably, The feature adjustment layer is composed of multiple depthwise convolution filters.
可以理解的是,如果想要基模型的运算速度较快,组成特征调节层的卷积核可以由相应运算速度的卷积核构成,并不仅仅限于深度级卷积核。It is understandable that, if the calculation speed of the base model is desired to be faster, the convolution kernel constituting the feature adjustment layer can be composed of a convolution kernel with a corresponding calculation speed, and is not limited to a depth-level convolution kernel.
在这里,卷积核的大小可以为1×1,3×3,5×5,7×7等等,这里并不做具体限定。一般而言,卷积核的大小越大,自适应模型在结束退化级别的图像复原任务上表现更好,但随着卷积核的增大,这种提高表现得并不明显。实验表明,在JPEG有损图像复原和高斯去噪任务上,将卷积核大小设置为1×1就可以得到很理想的效果。而在图像超分辨任务上,卷积核大小至少得设置成5×5。Here, the size of the convolution kernel can be 1×1, 3×3, 5×5, 7×7, etc., which is not specifically limited here. Generally speaking, the larger the size of the convolution kernel, the better performance of the adaptive model on image restoration tasks that end the degradation level, but as the convolution kernel increases, this improvement is not obvious. Experiments show that in the task of JPEG lossy image restoration and Gaussian denoising, setting the size of the convolution kernel to 1×1 can get very ideal results. For image super-resolution tasks, the size of the convolution kernel must be set to at least 5×5.
在这里,自适应模型主要是用于通过在基模型的基础上所添加特征调节层,使得所形成的自适应模型能够处理结束退化级别的图像复原任务,并且由于仅是增加了由卷积核组成的特征调节层,所增加的网络参数并不多,比如对于卷积核大小为1×1和5×5的特征调节层,仅增加了01.5%和3.65%的网络参数,也就没怎么增加网络模型的计算量,自适应模型的具体结构请参考图3,其为在基模型的基础上,通过在基模型的各个卷积层之后,或者在残差结构的卷积层之后所添加的特征调节层而形成的模型,这里所指的残差结构为由16个残差模块所组成的结构,其中,残差模块中包括有卷积层,与该卷积层连接的激活层,以及与激活层连接的另一卷积层。Here, the adaptive model is mainly used to add a feature adjustment layer on the basis of the base model, so that the formed adaptive model can handle the image restoration task of the end degradation level, and because only the convolution kernel is added The feature adjustment layer is composed of not many network parameters. For example, for the feature adjustment layer with the convolution kernel size of 1×1 and 5×5, only 0.15% and 3.65% of the network parameters are added, which is not much. Increase the amount of calculation of the network model. Please refer to Figure 3 for the specific structure of the adaptive model. It is added after the convolutional layer of the base model or after the convolutional layer of the residual structure on the basis of the base model. The model formed by the feature adjustment layer, the residual structure referred to here is a structure composed of 16 residual modules, where the residual module includes a convolutional layer, and the activation layer connected to the convolutional layer, And another convolutional layer connected to the activation layer.
可选的,步骤S102具体为:Optionally, step S102 is specifically:
将所述特征调节层放置在经训练好的基模型的所有卷积层之后,生成自适应模型。The feature adjustment layer is placed after all the convolutional layers of the trained base model to generate an adaptive model.
可选的,步骤S102具体为:Optionally, step S102 is specifically:
将所述特征调节层放置在经训练好的基模型的残差结构中的卷积层之后,生成自适应模型。The feature adjustment layer is placed after the convolutional layer in the residual structure of the trained base model to generate an adaptive model.
在本发明实施例中,为了便于对卷积操作后的特征图进行调节,特征调节层需要放置在卷积层的后面,具体可以放置在基模型的所有卷积层之后,也可以放置在基模型的残差结构中的卷积层之后,这里不做具体限定。In the embodiment of the present invention, in order to facilitate the adjustment of the feature map after the convolution operation, the feature adjustment layer needs to be placed behind the convolution layer. Specifically, it can be placed after all the convolution layers of the base model, or it can be placed on the base model. After the convolutional layer in the residual structure of the model, there is no specific limitation here.
可选的,步骤S102具体包括:Optionally, step S102 specifically includes:
步骤S1021,配置所述特征调节层的卷积核的大小参数。Step S1021: Configure the size parameter of the convolution kernel of the feature adjustment layer.
步骤S1022,将配置好的特征调节层添加至经训练好的基模型中,生成自适应模型。Step S1022, adding the configured feature adjustment layer to the trained base model to generate an adaptive model.
在本发明实施例中,由于不同的图像处理任务,对应的特征调节层中的卷积核的大小也不相同,可以根据实际情况配置特征调节层的卷积核的大小,比如由自适应模型组成的图像处理模型要处理JPEG有损图像复原和高斯去噪任务时,将卷积核的大小设置为1×1;当要处理图像超分辨任务时,将卷积核的大小设置为5×5以上。In the embodiment of the present invention, due to different image processing tasks, the size of the convolution kernel in the corresponding feature adjustment layer is different. The size of the convolution kernel in the feature adjustment layer can be configured according to the actual situation, for example, by the adaptive model When the composed image processing model is to handle JPEG lossy image restoration and Gaussian denoising tasks, the size of the convolution kernel is set to 1×1; when the image super-resolution task is to be processed, the size of the convolution kernel is set to 5× 5 or more.
在这里,配置特征调节层的卷积核的大小参数可以预先配置好的,比如在自适应模型界面上显示供用户选择的图像处理任务,根据该图像处理任务与配置参数的对照表可以查找到对应的配置参数;也可以是用户自行配置的,这里不做具体限定。Here, the size parameters of the convolution kernel of the configuration feature adjustment layer can be pre-configured. For example, the image processing task for the user to be selected on the adaptive model interface can be found according to the comparison table of the image processing task and the configuration parameters Corresponding configuration parameters; it can also be configured by the user, and there is no specific limitation here.
在步骤S103中,配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数。In step S103, the end degradation level parameter of the adaptive model is configured, and the configured adaptive model is trained to adjust the parameters of the feature adjustment layer.
在本发明实施例中,在生成自适应模型后,根据所获取的预配置的退化级别参数,配置自适应模型的结束退化级别参数,并在配置好自适应模型的结束退化级别参数后对其进行训练,以使得自适应模型能够输出质量较好的复原图像。In the embodiment of the present invention, after the adaptive model is generated, the end degradation level parameter of the adaptive model is configured according to the acquired pre-configured degradation level parameter, and the end degradation level parameter of the adaptive model is configured. Training is performed so that the adaptive model can output a better quality restored image.
在这里,在对自适应模型进行训练的过程中,仅调整特征调节层的参数,其他的网络参数保持不变,也即在对自适应模型进行训练的过程中,固定住自适应模型中与基模型相同的网络参数以使得其保持不变,仅通过调整特征调节层的参数以对自适应模型进行训练,并经多次训练以及调整特征调节层的参数后达到图像复原的训练效果。Here, in the process of training the adaptive model, only the parameters of the feature adjustment layer are adjusted, and the other network parameters remain unchanged, that is, during the training of the adaptive model, fix the adaptive model and The same network parameters of the base model are kept unchanged. The adaptive model is trained only by adjusting the parameters of the feature adjustment layer, and the training effect of image restoration is achieved after multiple training and adjustment of the parameters of the feature adjustment layer.
在这里,在对基模型和自适应模型进行训练过程中,所采用的训练样本为相应的退化级别对应的图像。Here, in the process of training the base model and the adaptive model, the training samples used are the images corresponding to the corresponding degradation levels.
在步骤S104中,对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。In step S104, interpolation is performed on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
在本发明实施例中,在对自适应模型进行训练,并将特征调节层的参数调整到最优状态时,对该自适应模型进行调节测试,具体通过对自适应模型中的所有特征调节层进行插值运算,使得最终形成的图像处理模型能够实现“开始”到“结束”之间任意退化级别的图像复原,这里的“开始”即开始退化级别,“结束”即结束退化级别,进行插值运算实质上也可以理解为对自适应模型的所有特征调节层的参数乘以一个调节系数,该调节系数的范围在0到1之间,通过改变该调节系数,可以实现连续地改变对某个给定退化级别的图像的复原强度。通过改变调节系数的大小,使得对于给定退化级别的图像的复原强度也随之发生变化,并且,如果开始退化级别的退化程度比结束退化级别的退化程 度要轻,那么增大该调节系数,对退化图像的复原程度越高。In the embodiment of the present invention, when the adaptive model is trained and the parameters of the feature adjustment layer are adjusted to the optimal state, the adjustment test is performed on the adaptive model, specifically by testing all the feature adjustment layers in the adaptive model. Perform interpolation operation, so that the finally formed image processing model can realize the image restoration of any degradation level between "start" and "end", where "start" is the beginning of the degradation level, and "end" is the end of the degradation level. Interpolation is performed In essence, it can also be understood as multiplying the parameters of all the characteristic adjustment layers of the adaptive model by an adjustment coefficient. The adjustment coefficient ranges from 0 to 1. By changing the adjustment coefficient, you can continuously change the The restoration strength of an image with a certain degradation level. By changing the size of the adjustment coefficient, the restoration strength of the image with a given degradation level will also change accordingly, and if the degradation degree of the initial degradation level is less than that of the end degradation level, increase the adjustment coefficient, The higher the degree of restoration of degraded images.
在这里,对基模型和自适应模型进行训练过程中,卷积神经网络通过将训练样本中的退化图像和与该退化图像对应的清晰图像进行卷积处理,提取去图像内部特有的特征,再对基模型中的各个网络参数和自适应模型中的特征调节层的参数进行训练调整,从而学得从退化图像到清晰图像的映射关系。在训练过程中,利用均方误差计算目标图像和学得的图像之间的误差,再通过反向传播对网络参数进行调整更新,当模型收敛后,网络参数在多次优化迭代后达到最优的值。Here, in the process of training the base model and the adaptive model, the convolutional neural network performs convolution processing on the degraded image in the training sample and the clear image corresponding to the degraded image to extract the unique features inside the image, and then The network parameters in the base model and the parameters of the feature adjustment layer in the adaptive model are trained and adjusted to learn the mapping relationship from the degraded image to the clear image. In the training process, the mean square error is used to calculate the error between the target image and the learned image, and then the network parameters are adjusted and updated through backpropagation. When the model converges, the network parameters reach the optimal after multiple optimization iterations Value.
在本发明实施例中,通过配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数后,再将特征调节层添加至经训练好的基模型中,生成自适应模型,并配置所述自适应模型的结束退化级别参数,再对配置好的自适应模型进行训练以调整所述特征调节层的参数,然后对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理,从而实现了任意退化级别的图像复原任务,并实现了复原强度的连续可调性,而且由于未带入新的图像噪声,使得用户可以根据喜好调节特征调节层的调节系数以达到满意的图像处理效果,用户体验更好。In the embodiment of the present invention, the initial degradation level parameter of the base model based on the residual module is configured, and the configured base model is trained to adjust the network parameters of the base model, and then the feature adjustment layer is added to the economics In the trained base model, an adaptive model is generated, and the end degradation level parameters of the adaptive model are configured, and then the configured adaptive model is trained to adjust the parameters of the feature adjustment layer, and then the trained The feature adjustment layer in the adaptive model performs interpolation operations, so that the finally formed image processing model can realize image processing at any degradation level from the start degradation level to the end degradation level, thereby achieving the image restoration task at any degradation level , And realizes the continuous adjustment of restoration intensity, and because no new image noise is introduced, users can adjust the adjustment coefficient of the feature adjustment layer according to their preferences to achieve a satisfactory image processing effect, and the user experience is better.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑控制,而不应对本发明实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution, and the execution sequence of each process should be controlled by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
对应于上文实施例所述的一种图像处理模型的构建方法,图4示出了本发明实施例提供的一种图像处理模型的构建装置的示意图,为了便于说明,仅示 出了与本发明实施例相关的部分。Corresponding to the method for constructing an image processing model described in the above embodiment, FIG. 4 shows a schematic diagram of a device for constructing an image processing model provided by an embodiment of the present invention. The relevant part of the embodiment of the invention.
参照图4,所述装置包括:Referring to Figure 4, the device includes:
第一配置训练单元41,用于配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数,所述基模型包括卷积层、激活函数层、图像上采样层;The first configuration training unit 41 is configured to configure the initial degradation level parameters of the base model based on the residual module, and train the configured base model to adjust the network parameters of the base model, the base model including a convolutional layer , Activation function layer, image upsampling layer;
模型生成单元42,用于将特征调节层添加至经训练好的基模型中,生成自适应模型,所述特征调节层由多个卷积核组成;The model generating unit 42 is configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
第二配置训练单元43,用于配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数;The second configuration training unit 43 is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
模型调节单元44,用于对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。The model adjustment unit 44 is configured to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level .
可选的,所述模型生成单元42具体用于:Optionally, the model generating unit 42 is specifically configured to:
将所述特征调节层放置在经训练好的基模型的所有卷积层之后,生成自适应模型。The feature adjustment layer is placed after all the convolutional layers of the trained base model to generate an adaptive model.
可选的,所述模型生成单元42具体用于:Optionally, the model generating unit 42 is specifically configured to:
将所述特征调节层放置在经训练好的基模型的残差结构中的卷积层之后,生成自适应模型。The feature adjustment layer is placed after the convolutional layer in the residual structure of the trained base model to generate an adaptive model.
可选的,所述开始退化级别参数和所述结束退化级别参数中均包括有:高斯噪声参数、JPEG压缩质量参数和双三次下采样参数。Optionally, both the start degradation level parameter and the end degradation level parameter include: Gaussian noise parameters, JPEG compression quality parameters, and bi-cubic downsampling parameters.
可选的,所述卷积核为深度级卷积核。Optionally, the convolution kernel is a depth-level convolution kernel.
可选的,所述模型生成单元42包括:Optionally, the model generating unit 42 includes:
卷积核配置子单元,用于配置所述特征调节层的卷积核的大小参数;The convolution kernel configuration subunit is used to configure the size parameters of the convolution kernel of the feature adjustment layer;
模型生成字单元,用于将配置好的特征调节层添加至经训练好的基模型中,生成自适应模型。The model generation word unit is used to add the configured feature adjustment layer to the trained base model to generate an adaptive model.
在本发明实施例中,通过配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数后,再将特征调节层添加至经训练好的基模型中,生成自适应模型,并配置所述自适应模型的结束退化级别参数,再对配置好的自适应模型进行训练以调整所述特征调节层的参数,然后对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理,从而实现了任意退化级别的图像复原任务,并实现了复原强度的连续可调性,而且由于未带入新的图像噪声,使得用户可以根据喜好调节特征调节层的调节系数以达到满意的图像处理效果,用户体验更好。In the embodiment of the present invention, the initial degradation level parameter of the base model based on the residual module is configured, and the configured base model is trained to adjust the network parameters of the base model, and then the feature adjustment layer is added to the economics In the trained base model, an adaptive model is generated, and the end degradation level parameters of the adaptive model are configured, and then the configured adaptive model is trained to adjust the parameters of the feature adjustment layer, and then the trained The feature adjustment layer in the adaptive model performs interpolation operations, so that the finally formed image processing model can realize image processing at any degradation level from the start degradation level to the end degradation level, thereby achieving the image restoration task at any degradation level , And realizes the continuous adjustment of restoration intensity, and because no new image noise is introduced, users can adjust the adjustment coefficient of the feature adjustment layer according to their preferences to achieve a satisfactory image processing effect, and the user experience is better.
图5是本发明一实施例提供的一种终端的示意图。如图5所示,该实施例的终端设备5包括:处理器50、存储器51以及存储在所述存储器51中并可在所述处理器50上运行的计算机程序52。所述处理器50执行所述计算机程序52时实现上述各个图像处理模型的构建方法实施例中的步骤,例如图1所示的步骤101至104。或者,所述处理器50执行所述计算机程序52时实现上述各系统实施例中各单元的功能,例如图4所示模块41至44的功能。Fig. 5 is a schematic diagram of a terminal according to an embodiment of the present invention. As shown in FIG. 5, the terminal device 5 of this embodiment includes a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and running on the processor 50. When the processor 50 executes the computer program 52, the steps in the embodiment of the method for constructing each image processing model described above are implemented, for example, steps 101 to 104 shown in FIG. 1. Alternatively, when the processor 50 executes the computer program 52, the functions of the units in the foregoing system embodiments, such as the functions of the modules 41 to 44 shown in FIG. 4, are realized.
示例性的,所述计算机程序52可以被分割成一个或多个单元,所述一个或者多个单元被存储在所述存储器51中,并由所述处理器50执行,以完成本发明。所述一个或多个单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序52在所述终端设备5中的执行过程。例如,所述计算机程序52可以被分割成第一配置训练单元41、模型生成单元 42、第二配置训练单元43、模型调节单元44,各单元具体功能如下:Exemplarily, the computer program 52 may be divided into one or more units, and the one or more units are stored in the memory 51 and executed by the processor 50 to complete the present invention. The one or more units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 can be divided into a first configuration training unit 41, a model generation unit 42, a second configuration training unit 43, and a model adjustment unit 44. The specific functions of each unit are as follows:
第一配置训练单元41,用于配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数,所述基模型包括卷积层、激活函数层、图像上采样层;The first configuration training unit 41 is configured to configure the initial degradation level parameters of the base model based on the residual module, and train the configured base model to adjust the network parameters of the base model, the base model including a convolutional layer , Activation function layer, image upsampling layer;
模型生成单元42,用于将特征调节层添加至经训练好的基模型中,生成自适应模型,所述特征调节层由多个卷积核组成;The model generating unit 42 is configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
第二配置训练单元43,用于配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数;The second configuration training unit 43 is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
模型调节单元44,用于对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。The model adjustment unit 44 is configured to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level .
可选的,所述模型生成单元42具体用于:Optionally, the model generating unit 42 is specifically configured to:
将所述特征调节层放置在经训练好的基模型的所有卷积层之后,生成自适应模型。The feature adjustment layer is placed after all the convolutional layers of the trained base model to generate an adaptive model.
可选的,所述模型生成单元42具体用于:Optionally, the model generating unit 42 is specifically configured to:
将所述特征调节层放置在经训练好的基模型的残差结构中的卷积层之后,生成自适应模型。The feature adjustment layer is placed after the convolutional layer in the residual structure of the trained base model to generate an adaptive model.
可选的,所述开始退化级别参数和所述结束退化级别参数中均包括有:高斯噪声参数、JPEG压缩质量参数和双三次下采样参数。Optionally, both the start degradation level parameter and the end degradation level parameter include: Gaussian noise parameters, JPEG compression quality parameters, and bi-cubic downsampling parameters.
可选的,所述卷积核为深度级卷积核。Optionally, the convolution kernel is a depth-level convolution kernel.
可选的,所述模型生成单元42包括:Optionally, the model generating unit 42 includes:
卷积核配置子单元,用于配置所述特征调节层的卷积核的大小参数;The convolution kernel configuration subunit is used to configure the size parameters of the convolution kernel of the feature adjustment layer;
模型生成字单元,用于将配置好的特征调节层添加至经训练好的基模型 中,生成自适应模型。The model generation word unit is used to add the configured feature adjustment layer to the trained base model to generate an adaptive model.
所述终端设备5可包括,但不仅限于,处理器50、存储器51。本领域技术人员可以理解,图5仅仅是终端设备5的示例,并不构成对终端设备5的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端还可以包括输入输出设备、网络接入设备、总线等。The terminal device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art can understand that FIG. 5 is only an example of the terminal device 5, and does not constitute a limitation on the terminal device 5. It may include more or less components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.
所称处理器50可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 50 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
所述存储器51可以是所述终端设备5的内部存储单元,例如终端设备5的硬盘或内存。所述存储器51也可以是所述终端设备5的外部存储设备,例如所述终端设备5上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器51还可以既包括所述终端设备5的内部存储单元也包括外部存储设备。所述存储器51用于存储所述计算机程序以及所述终端所需的其他程序和数据。所述存储器51还可以用于暂时地存储已经输出或者将要输出的数据。The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, for example, a plug-in hard disk equipped on the terminal device 5, a smart memory card (Smart Media Card, SMC), and a Secure Digital (SD) Card, Flash Card, etc. Further, the memory 51 may also include both an internal storage unit of the terminal device 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the terminal. The memory 51 can also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述系统的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功 能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and conciseness of description, only the division of the above-mentioned functional units and modules is used as an example. In practical applications, the above-mentioned functions can be allocated to different functional units and modules as required. Module completion, that is, divide the internal structure of the system into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only used to facilitate distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which is not repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own focus. For parts that are not detailed or recorded in a certain embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present invention.
在本发明所提供的实施例中,应该理解到,所揭露的系统/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的系统/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,系统或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided by the present invention, it should be understood that the disclosed system/terminal device and method may be implemented in other ways. For example, the system/terminal device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units. Or components can be combined or integrated into another system, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, systems or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部 单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或系统、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may include: any entity or system capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media. It should be noted that the content contained in the computer-readable medium can be appropriately added or deleted in accordance with the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, the computer-readable medium Does not include electrical carrier signals and telecommunication signals.
以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present invention, not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in Within the protection scope of the present invention.

Claims (10)

  1. 一种图像处理模型的构建方法,其特征在于,所述方法包括:A method for constructing an image processing model, characterized in that the method includes:
    配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数,所述基模型包括卷积层、激活函数层、图像上采样层;Configure the initial degradation level parameters of the base model based on the residual module, and train the configured base model to adjust the network parameters of the base model. The base model includes a convolution layer, an activation function layer, and an image upsampling layer ;
    将特征调节层添加至经训练好的基模型中,生成自适应模型,所述特征调节层由多个卷积核组成;Adding a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
    配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数;Configuring the end degradation level parameter of the adaptive model, and training the configured adaptive model to adjust the parameters of the feature adjustment layer;
    对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。Interpolation is performed on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the initial degradation level to the end degradation level.
  2. 如权利要求1所述的方法,其特征在于,所述将特征调节层添加至经训练好的基模型中,生成自适应模型的步骤,包括:The method of claim 1, wherein the step of adding the feature adjustment layer to the trained base model to generate an adaptive model comprises:
    将所述特征调节层放置在经训练好的基模型的所有卷积层之后,生成自适应模型。The feature adjustment layer is placed after all the convolutional layers of the trained base model to generate an adaptive model.
  3. 如权利要求1所述的方法,其特征在于,所述将特征调节层添加至经训练好的基模型中,生成自适应模型的步骤,包括:The method of claim 1, wherein the step of adding the feature adjustment layer to the trained base model to generate an adaptive model comprises:
    将所述特征调节层放置在经训练好的基模型的残差结构中的卷积层之后,生成自适应模型。The feature adjustment layer is placed after the convolutional layer in the residual structure of the trained base model to generate an adaptive model.
  4. 如权利要求1所述的方法,其特征在于,所述开始退化级别参数和所述结束退化级别参数中均包括有:高斯噪声参数、JPEG压缩质量参数和双三次下采样参数。The method according to claim 1, wherein the start degradation level parameter and the end degradation level parameter both include: Gaussian noise parameters, JPEG compression quality parameters, and bi-cubic downsampling parameters.
  5. 如权利要求1所述的方法,其特征在于,所述卷积核为深度级卷积核。The method of claim 1, wherein the convolution kernel is a depth-level convolution kernel.
  6. 如权利要求1至5任一所述的方法,其特征在于,所述将特征调节层添加至经训练好的基模型中,生成自适应模型的步骤,包括:The method according to any one of claims 1 to 5, wherein the step of adding the feature adjustment layer to the trained base model to generate an adaptive model comprises:
    配置所述特征调节层的卷积核的大小参数;Configuring the size parameter of the convolution kernel of the feature adjustment layer;
    将配置好的特征调节层添加至经训练好的基模型中,生成自适应模型。The configured feature adjustment layer is added to the trained base model to generate an adaptive model.
  7. 一种图像处理模型的构建装置,其特征在于,所述装置包括:An image processing model building device, characterized in that the device includes:
    第一配置训练单元,用于配置基于残差模块的基模型的开始退化级别参数,并对配置好的基模型进行训练以调整所述基模型的网络参数,所述基模型包括卷积层、激活函数层、图像上采样层;The first configuration training unit is used to configure the initial degradation level parameters of the base model based on the residual module, and to train the configured base model to adjust the network parameters of the base model. The base model includes a convolutional layer, Activation function layer, image upsampling layer;
    模型生成单元,用于将特征调节层添加至经训练好的基模型中,生成自适应模型,所述特征调节层由多个卷积核组成;A model generation unit, configured to add a feature adjustment layer to the trained base model to generate an adaptive model, where the feature adjustment layer is composed of multiple convolution kernels;
    第二配置训练单元,用于配置所述自适应模型的结束退化级别参数,并对配置好的自适应模型进行训练以调整所述特征调节层的参数;The second configuration training unit is configured to configure the end degradation level parameters of the adaptive model, and train the configured adaptive model to adjust the parameters of the feature adjustment layer;
    模型调节单元,用于对经训练好的自适应模型中的特征调节层进行插值运算,以使得最终形成的图像处理模型能够实现从开始退化级别到结束退化级别之间任意退化级别的图像处理。The model adjustment unit is used to perform interpolation operations on the feature adjustment layer in the trained adaptive model, so that the finally formed image processing model can realize image processing of any degradation level from the start degradation level to the end degradation level.
  8. 如权利要求7所述的图像处理模型的构建装置,其特征在于,所述模型生成单元具体用于:8. The image processing model building device according to claim 7, wherein the model generating unit is specifically configured to:
    将所述特征调节层放置在经训练好的基模型的所有卷积层之后,生成自适应模型。The feature adjustment layer is placed after all the convolutional layers of the trained base model to generate an adaptive model.
  9. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至6任一项所述图像处理模型的构建方法的步骤。A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program as claimed in claims 1 to 6. Steps of any one of the image processing model construction methods.
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述图像处理模型的构建方法的步骤。A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to realize the construction of the image processing model according to any one of claims 1 to 6 Method steps.
PCT/CN2019/130876 2019-03-21 2019-12-31 Method and apparatus for constructing image processing model, and terminal device WO2020186888A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910217717.4 2019-03-21
CN201910217717.4A CN110047044B (en) 2019-03-21 2019-03-21 Image processing model construction method and device and terminal equipment

Publications (1)

Publication Number Publication Date
WO2020186888A1 true WO2020186888A1 (en) 2020-09-24

Family

ID=67274921

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/130876 WO2020186888A1 (en) 2019-03-21 2019-12-31 Method and apparatus for constructing image processing model, and terminal device

Country Status (2)

Country Link
CN (1) CN110047044B (en)
WO (1) WO2020186888A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112669240A (en) * 2021-01-22 2021-04-16 深圳市格灵人工智能与机器人研究院有限公司 High-definition image restoration method and device, electronic equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110047044B (en) * 2019-03-21 2021-01-29 深圳先进技术研究院 Image processing model construction method and device and terminal equipment
CN111028174B (en) * 2019-12-10 2023-08-04 深圳先进技术研究院 Multi-dimensional image restoration method and device based on residual connection
CN111275620B (en) * 2020-01-17 2023-08-01 金华青鸟计算机信息技术有限公司 Image super-resolution method based on Stacking integrated learning
CN111539337A (en) * 2020-04-26 2020-08-14 上海眼控科技股份有限公司 Vehicle posture correction method, device and equipment
CN112906554B (en) * 2021-02-08 2022-12-23 智慧眼科技股份有限公司 Model training optimization method and device based on visual image and related equipment
CN113222855B (en) * 2021-05-28 2023-07-11 北京有竹居网络技术有限公司 Image recovery method, device and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106709875A (en) * 2016-12-30 2017-05-24 北京工业大学 Compressed low-resolution image restoration method based on combined deep network
CN108288251A (en) * 2018-02-11 2018-07-17 深圳创维-Rgb电子有限公司 Image super-resolution method, device and computer readable storage medium
CN108765338A (en) * 2018-05-28 2018-11-06 西华大学 Spatial target images restored method based on convolution own coding convolutional neural networks
WO2019026407A1 (en) * 2017-07-31 2019-02-07 株式会社日立製作所 Medical imaging device and medical image processing method
CN110047044A (en) * 2019-03-21 2019-07-23 深圳先进技术研究院 A kind of construction method of image processing model, device and terminal device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8907973B2 (en) * 2012-10-22 2014-12-09 Stmicroelectronics International N.V. Content adaptive image restoration, scaling and enhancement for high definition display
CN106251289A (en) * 2016-07-21 2016-12-21 北京邮电大学 A kind of based on degree of depth study and the video super-resolution method for reconstructing of self-similarity
CN108932697B (en) * 2017-05-26 2020-01-17 杭州海康威视数字技术股份有限公司 Distortion removing method and device for distorted image and electronic equipment
CN108537746B (en) * 2018-03-21 2021-09-21 华南理工大学 Fuzzy variable image blind restoration method based on deep convolutional network
CN109146788B (en) * 2018-08-16 2023-04-18 广州视源电子科技股份有限公司 Super-resolution image reconstruction method and device based on deep learning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106709875A (en) * 2016-12-30 2017-05-24 北京工业大学 Compressed low-resolution image restoration method based on combined deep network
WO2019026407A1 (en) * 2017-07-31 2019-02-07 株式会社日立製作所 Medical imaging device and medical image processing method
CN108288251A (en) * 2018-02-11 2018-07-17 深圳创维-Rgb电子有限公司 Image super-resolution method, device and computer readable storage medium
CN108765338A (en) * 2018-05-28 2018-11-06 西华大学 Spatial target images restored method based on convolution own coding convolutional neural networks
CN110047044A (en) * 2019-03-21 2019-07-23 深圳先进技术研究院 A kind of construction method of image processing model, device and terminal device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112669240A (en) * 2021-01-22 2021-04-16 深圳市格灵人工智能与机器人研究院有限公司 High-definition image restoration method and device, electronic equipment and storage medium
CN112669240B (en) * 2021-01-22 2024-05-10 深圳市格灵人工智能与机器人研究院有限公司 High-definition image restoration method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110047044A (en) 2019-07-23
CN110047044B (en) 2021-01-29

Similar Documents

Publication Publication Date Title
WO2020186888A1 (en) Method and apparatus for constructing image processing model, and terminal device
CN108830816B (en) Image enhancement method and device
WO2021208151A1 (en) Model compression method, image processing method and device
CN110490296A (en) A kind of method and system constructing convolutional neural networks (CNN) model
CN109325928A (en) A kind of image rebuilding method, device and equipment
WO2019194299A1 (en) Learning device, learning method, and learning program
CN109616102B (en) Acoustic model training method and device and storage medium
CN112768056A (en) Disease prediction model establishing method and device based on joint learning framework
CN109102468B (en) Image enhancement method and device, terminal equipment and storage medium
CN109616103B (en) Acoustic model training method and device and storage medium
CN115034375B (en) Data processing method and device, neural network model, equipment and medium
CN112201272A (en) Method, device and equipment for reducing noise of audio data and storage medium
CN108230253A (en) Image recovery method, device, electronic equipment and computer storage media
US20220405561A1 (en) Electronic device and controlling method of electronic device
CN111158907A (en) Data processing method and device, electronic equipment and storage medium
CN115511754A (en) Low-illumination image enhancement method based on improved Zero-DCE network
TW202244758A (en) Fingerprint recognition method, fingerprint module, and electronic device
CN109271499A (en) Recommended method, device and the terminal device of answer user in a kind of knowledge question
CN112561822B (en) Beautifying method and device, electronic equipment and storage medium
CN112184568A (en) Image processing method and device, electronic equipment and readable storage medium
CN111382772B (en) Image processing method and device and terminal equipment
TW202219750A (en) Machine learning model training method, electronic device, controller, and storage medium
CN111062886A (en) Super-resolution method, system, electronic product and medium for hotel pictures
CN112036461A (en) Handwritten digital image recognition method, device, equipment and computer storage medium
CN114067785B (en) Voice deep neural network training method and device, storage medium and electronic device

Legal Events

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

Ref document number: 19919784

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19919784

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.02.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19919784

Country of ref document: EP

Kind code of ref document: A1