A method, device and medium for improving image clarity
By calculating the blur degree information through a deep convolutional adversarial generation network and using adaptive instance normalization processing in the deconvolution layer, the image blur problem caused by shooting conditions is solved, and the adaptive deblurring and clarity improvement of the image are achieved.
Patent Information
- Application Number
- CN202010810604.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-11
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-08-11
AI Technical Summary
When shooting portraits, it is difficult to effectively improve the clarity of facial images due to blurring problems caused by lens out-of-focus and other reasons, especially in scenes where multiple people are taking photos together.
Through the deep convolution adversarial generation network, the blur degree information of the image is calculated, affine transformation is performed to obtain the feature components, and the adaptive instance normalization method is used to render the feature map in the deconvolution layer, and the blur degree parameter is introduced to achieve automatic Adaptive face deblurring.
It improves the image processing effect, realizes adaptive deblurring of images with different blur levels, and significantly improves the clarity of images.
Smart Images

Figure CN111915536B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device and medium for improving image clarity. Background Art
[0002] When users use smart terminals to take photos, due to the limitations of shooting conditions, the portraits in the captured images are often blurred. For example, lens out of focus and shooting distance are too far, which will cause the image of the person in the captured image to be blurred. In the scene of multiple people taking group photos, the situation of blurred portraits caused by lens out of focus often occurs, because the lens only focuses on one person, and the images of other people will be blurred.
[0003] How to improve the clarity of face images is a problem that needs to be solved. Summary of the invention
[0004] In order to overcome the problems existing in the related art, this article provides a method, device and medium for improving image clarity.
[0005] According to a first aspect of an embodiment of this document, a method for improving image clarity is provided, comprising:
[0006] When training the generative network in the deep convolutional adversarial generative network, the blur degree calculation network is used to calculate the blur degree information of the input image;
[0007] After performing multiple affine transformations according to the blur level information, multiple feature components are obtained;
[0008] Determine the target deconvolution layer corresponding to each feature component;
[0009] When deconvolution processing is performed on the convolution result of the input image, for each target deconvolution layer, a feature map output by the target deconvolution layer is rendered using a feature component corresponding to the target deconvolution layer.
[0010] In one implementation, the blur degree calculation network is formed by sequentially connecting more than one fully connected layers.
[0011] In one embodiment, the rendering process of the feature map output by the target deconvolution layer using the feature component corresponding to the target deconvolution layer includes:
[0012] Adopting an adaptive instance normalization method, the feature map output by the target deconvolution layer is rendered using the feature components corresponding to the target deconvolution layer.
[0013] In one embodiment, the method of using an adaptive instance normalization method to render a feature map output by the target deconvolution layer using a feature component corresponding to the target deconvolution layer includes:
[0014] The feature map output by the target deconvolution layer is rendered using the following formula:
[0015]
[0016] Among them, Ad(dc i ,w i ) refers to the result after rendering, dc i refers to the feature map output by the i-th target deconvolution layer, w i is the feature component corresponding to the i-th target deconvolution layer, w si It refers to the bias component of the feature component corresponding to the i-th target deconvolution layer, w bi It refers to the scaling component of the feature component corresponding to the i-th target deconvolution layer, mean(dc i ) refers to the mean of the feature maps output by the i-th target deconvolution layer, var(dc i ) refers to the variance of the feature map output by the i-th target deconvolution layer, where i is an integer greater than 0 and less than or equal to the number of target deconvolution layers.
[0017] In one embodiment, before rendering the feature map output by the target deconvolution layer using the feature component corresponding to the target deconvolution layer, the method further includes:
[0018] When the target deconvolution layer is the first deconvolution layer, a first deconvolution process is performed according to an output of a bottleneck layer connected to the last convolution layer and an output result of the last convolution layer, and a feature map is output;
[0019] When the target deconvolution layer is not the first deconvolution layer, deconvolution processing is performed according to an output result of a previous deconvolution layer of the target deconvolution layer and an output result of a target convolution layer corresponding to the target deconvolution layer, and a feature map is output.
[0020] According to a second aspect of the embodiments of this document, there is provided a device for improving image clarity, comprising:
[0021] A calculation module is configured to use a blur degree calculation network to calculate blur degree information of an input image when training a generation network in a deep convolutional adversarial generation network;
[0022] A transformation module, configured to obtain multiple feature components after performing multiple affine transformations according to the blur degree information;
[0023] A determination module configured to determine a target deconvolution layer corresponding to each feature component;
[0024] The deconvolution processing module is configured to, when performing deconvolution processing on the convolution result of the input image, render a feature map output by the target deconvolution layer for each target deconvolution layer using a feature component corresponding to the target deconvolution layer.
[0025] In one implementation, the blur degree calculation network is formed by sequentially connecting more than one fully connected layers.
[0026] In one embodiment, the deconvolution processing module is configured to render the feature map output by the target deconvolution layer using the feature components corresponding to the target deconvolution layer using the following method:
[0027] Adopting an adaptive instance normalization method, the feature map output by the target deconvolution layer is rendered using the feature components corresponding to the target deconvolution layer.
[0028] In one embodiment, the deconvolution processing module is further configured to use the following method to adopt an adaptive instance normalization method to render the feature map output by the target deconvolution layer using the feature components corresponding to the target deconvolution layer:
[0029] The following formula is used to render the feature map output by the target deconvolution layer:
[0030]
[0031] Among them, Ad(dc i ,w i ) refers to the result after rendering, dc i refers to the feature map output by the i-th target deconvolution layer, w i is the feature component corresponding to the i-th target deconvolution layer, w si It refers to the bias component of the feature component corresponding to the i-th target deconvolution layer, w bi It refers to the scaling component of the feature component corresponding to the i-th target deconvolution layer, mean(dc i ) refers to the mean of the feature maps output by the i-th target deconvolution layer, var(dc i ) refers to the variance of the feature map output by the i-th target deconvolution layer, where i is an integer greater than 0 and less than or equal to the number of target deconvolution layers.
[0032] In one embodiment, the deconvolution processing module is further configured to perform the following processing:
[0033] When the target deconvolution layer is the first deconvolution layer, performing a first deconvolution process according to an output of a bottleneck layer connected to the last convolution layer and an output result of the last convolution layer, and outputting a feature map;
[0034] When the target deconvolution layer is not the first deconvolution layer, deconvolution processing is performed according to an output result of a previous deconvolution layer of the target deconvolution layer and an output result of a target convolution layer corresponding to the target deconvolution layer, and a feature map is output.
[0035] According to a third aspect of the embodiments of this document, there is provided a device for improving image clarity, comprising:
[0036] processor;
[0037] a memory for storing processor-executable instructions;
[0038] Wherein, the processor is configured to execute the above method.
[0039] According to a fourth aspect of the embodiments of this document, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute the above method.
[0040] The technical solution provided by the embodiments of this article may include the following beneficial effects: when training the generative network in the deep convolutional adversarial generative network, the blur degree information of the input image is calculated, and multiple feature components are determined according to the blur degree information of the input image. Different feature components are used in different target deconvolution layers to render the feature map, so that in the entire training process, a new characterization parameter, namely the blur degree parameter, is introduced to characterize the input image, which adds a new training reference target to the network training, and different processing is performed on input images with different blur degrees, so as to realize an adaptive face deblurring process and improve the image processing effect.
[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present invention and, together with the description, serve to explain the principles of the present invention.
[0043] Figure 1 is a flow chart showing a method for improving image clarity according to an exemplary embodiment;
[0044] Figure 2 is a functional schematic diagram of a generation network according to an exemplary embodiment;
[0045] Figure 3 is a functional schematic diagram of a generation network according to an exemplary embodiment;
[0046] Figure 4 is a structural diagram of a device for improving image clarity according to an exemplary embodiment;
[0047] Figure 5 The figure is a structural diagram of a device for improving image definition according to an exemplary embodiment. DETAILED DESCRIPTION
[0048] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this document. Instead, they are merely examples of devices and methods consistent with some aspects of this document as detailed in the appended claims.
[0049] The present disclosure provides a method for improving image clarity. Figure 1 , Figure 1 FIG. 1 is a flow chart showing a method for improving image clarity according to an exemplary embodiment. Figure 1 As shown, this method includes:
[0050] Step S11, when training the generative network in the deep convolutional adversarial generative network, use the blur degree calculation network to calculate the blur degree information of the input image.
[0051] Step S12, performing multiple affine transformations according to the blur level information to obtain multiple feature components.
[0052] Step S13, determining the target deconvolution layer corresponding to each feature component.
[0053] Step S14, when performing deconvolution processing on the convolution result of the input image, for each target deconvolution layer, using the feature component corresponding to the target deconvolution layer to render the feature map output by the target deconvolution layer.
[0054] Deep Convolutional Generative Adversarial Networks (DCGAN) is a combination of convolutional neural networks and adversarial networks, including a generative network and a discriminative network. The generative network includes multiple sequentially connected convolutional layers, bottleneck layers, and multiple sequentially connected deconvolutional layers. The generative model and the discriminative model learn from each other, allowing the generative adversarial network to complete the learning process.
[0055] Affine transformation refers to a transformation in geometry where a vector space is transformed into another vector space by a linear transformation followed by a translation.
[0056] For example: the blur degree information is represented by v. After v undergoes N affine transformations, it is represented by w_i (i=1,2,…,N), where w_i=a_i*v+b_i, a_i refers to the proportional coefficient in the i-th affine transformation, and a_i refers to the offset coefficient in the i-th affine transformation.
[0057] In one embodiment, the fuzziness calculation network is formed by sequentially connecting more than one fully connected layer. The number of fully connected layers is a set number, for example, the set number is any value from 3 to 8.
[0058] In one embodiment, the number of target deconvolution layers is the number of all deconvolution layers in the generated network, that is, all deconvolution layers in the generated network are target deconvolution layers. Alternatively, the number of target deconvolution layers is less than the number of all deconvolution layers in the generated network, that is, some deconvolution layers in the generated network are target deconvolution layers, for example: the generated network includes 5 deconvolution layers connected in sequence, wherein a plurality of continuous target deconvolution layers are target deconvolution layers, for example, the 1st, 2nd, 3rd, and 4th deconvolution layers are target deconvolution layers, or wherein a plurality of discontinuous target deconvolution layers are target deconvolution layers, for example, the 1st, 3rd, and 4th deconvolution layers are target deconvolution layers.
[0059] In one embodiment, the method further includes constructing a plurality of sample pairs for training a generative network in a deep convolutional adversarial generative network, each sample pair including a clear image and a blurred image, the blurred image being obtained by artificially blurring the clear image after adding artificial noise, or the blurred image being obtained by artificially blurring the clear image and then adding artificial noise.
[0060] In this embodiment, when the generative network in the deep convolutional adversarial generative network is trained, the blur degree information of the input image is calculated, and multiple feature components are determined according to the blur degree information of the input image. Different feature components are used in different target deconvolution layers to render the feature map. Therefore, in the entire training process, a new characterization parameter, namely the blur degree parameter, is introduced to characterize the input image, which adds a new training reference target to the network training. Different processing is performed on input images with different blur degrees, thereby realizing an adaptive face deblurring process and improving the image processing effect.
[0061] The following is an explanation using a specific example.
[0062] like Figure 2As shown, the generated network includes 2 convolutional layers and 2 deconvolutional layers. The processing of the convolutional layer is equivalent to the encoding process, and the processing of the deconvolutional layer is equivalent to the decoding process. During the training process, the sample face image x is input to the first convolutional layer. After being processed by all convolutional layers and the bottleneck layer in sequence, the spatial resolution of the image gradually decreases and reaches the minimum resolution at the output of the bottleneck layer. In addition, the blur degree calculation network is used to calculate the blur degree information of the sample face image x, and two affine transformations are performed according to the blur degree information to obtain two feature components. Figure 2 A in represents affine transformation. Each feature component corresponds to a deconvolution layer. After the output of the bottleneck layer is processed by all deconvolution layers, the spatial resolution of the image gradually increases, and finally the image y is obtained. When performing deconvolution processing, for each deconvolution layer, the feature map output by the deconvolution layer is rendered using the feature component corresponding to the deconvolution layer, and finally the image y is obtained. Compared with the sample face image x, the image y has a deblurring effect.
[0063] The present disclosure provides a method for improving image clarity, the method comprising: Figure 1 The method shown, and: in step S14, the feature component corresponding to the target deconvolution layer is used to render the feature map output by the target deconvolution layer, including:
[0064] Adaptive Instance Normalization (AdaIN) is adopted to render the feature map output by the target deconvolution layer using the feature components corresponding to the target deconvolution layer.
[0065] In one embodiment, the method of using an adaptive instance normalization method to render a feature map output by the target deconvolution layer using a feature component corresponding to the target deconvolution layer includes:
[0066] The feature map output by the target deconvolution layer is rendered using the following formula (1):
[0067]
[0068] Among them, Ad(dc i ,w i ) refers to the result after rendering, dc i refers to the feature map output by the i-th target deconvolution layer, w i is the feature component corresponding to the i-th target deconvolution layer, w si It refers to the bias component of the feature component corresponding to the i-th target deconvolution layer, w bi It refers to the scaling component of the feature component corresponding to the i-th target deconvolution layer, mean(dci ) refers to the mean of the feature maps output by the i-th target deconvolution layer, var(dc i ) refers to the variance of the feature map output by the i-th target deconvolution layer, where i is an integer greater than 0 and less than or equal to the number of target deconvolution layers.
[0069] The present disclosure provides a method for improving image clarity, the method comprising: Figure 1 The method as shown, and: in step S14, the feature component corresponding to the target deconvolution layer is used to render the feature map output by the target deconvolution layer, before that, it also includes:
[0070] When the target deconvolution layer is the first deconvolution layer, a first deconvolution process is performed according to an output of a bottleneck layer connected to the last convolution layer and an output result of the last convolution layer, and a feature map is output;
[0071] When the target deconvolution layer is not the first deconvolution layer, deconvolution processing is performed according to an output result of a previous deconvolution layer of the target deconvolution layer and an output result of a target convolution layer corresponding to the target deconvolution layer, and a feature map is output.
[0072] For example, the generated network includes 4 convolutional layers, and the structure of these 4 convolutional layers includes the 1st convolutional layer, the 2nd convolutional layer, the 3rd convolutional layer and the 4th convolutional layer connected in sequence according to the data transmission direction. The generated network includes 4 deconvolutional layers, and the structure of these 4 deconvolutional layers includes the 1st deconvolutional layer, the 2nd deconvolutional layer, the 3rd deconvolutional layer and the 4th deconvolutional layer connected in sequence according to the data transmission direction.
[0073] The correspondence between the deconvolution layer and the convolution layer in the generated network is: the 1st deconvolution layer corresponds to the 4th convolution layer, the 2nd deconvolution layer corresponds to the 3rd convolution layer, the 3rd deconvolution layer corresponds to the 2nd convolution layer, and the 4th deconvolution layer corresponds to the 1st convolution layer.
[0074] In this embodiment, a jump connection is added from the convolution layer to the deconvolution layer. This jump connection connects the convolution layer to the deconvolution layer in a concat function manner, so that the feature map of the convolution layer can be directly input into the deconvolution layer, thereby improving the efficiency of information flow and the effect of deblurring processing.
[0075] The following is an explanation using a specific example.
[0076] like Figure 3 As shown, the generated network is Figure 2On the basis of the above, the jump connection from the first convolution layer to the second deconvolution layer, and the jump connection from the second convolution layer to the first deconvolution layer are added. Therefore, during the deconvolution process, the feature map of the convolution layer is used for deconvolution, and the feature map output by the deconvolution layer is rendered using the feature component, which can further improve the deblurring effect.
[0077] The present disclosure provides a device for improving image clarity. Figure 4 , Figure 4 FIG. 1 is a structural diagram of a device for improving image clarity according to an exemplary embodiment. Figure 4 As shown, the device comprises:
[0078] The calculation module 401 is configured to use the blur degree calculation network to calculate blur degree information of the input image when training the generation network in the deep convolutional adversarial generation network;
[0079] A transformation module 402 is configured to obtain multiple feature components after performing multiple affine transformations according to the blur level information;
[0080] A determination module 403 is configured to determine a target deconvolution layer corresponding to each feature component;
[0081] The deconvolution processing module 404 is configured to, when performing deconvolution processing on the convolution result of the input image, render a feature map output by the target deconvolution layer for each target deconvolution layer using a feature component corresponding to the target deconvolution layer.
[0082] In one implementation, the blur degree calculation network is formed by sequentially connecting more than one fully connected layers.
[0083] The present disclosure provides a device for improving image clarity, the device comprising: Figure 4 The device shown, and:
[0084] The deconvolution processing module 404 is configured to render the feature map output by the target deconvolution layer using the feature components corresponding to the target deconvolution layer by using the following method:
[0085] Adopting an adaptive instance normalization method, the feature map output by the target deconvolution layer is rendered using the feature components corresponding to the target deconvolution layer.
[0086] In one embodiment, the deconvolution processing module 404 is further configured to use the following method to adopt an adaptive instance normalization method to render the feature map output by the target deconvolution layer using the feature components corresponding to the target deconvolution layer:
[0087] The feature map output by the target deconvolution layer is rendered using the following formula:
[0088]
[0089] Among them, Ad(dc i ,w i ) refers to the result after rendering, dc i refers to the feature map output by the i-th target deconvolution layer, w i is the feature component corresponding to the i-th target deconvolution layer, w si It refers to the bias component of the feature component corresponding to the i-th target deconvolution layer, w bi It refers to the scaling component of the feature component corresponding to the i-th target deconvolution layer, mean(dc i ) refers to the mean of the feature maps output by the i-th target deconvolution layer, var(dc i ) refers to the variance of the feature map output by the i-th target deconvolution layer, where i is an integer greater than 0 and less than or equal to the number of target deconvolution layers.
[0090] The present disclosure provides a device for improving image clarity, the device comprising: Figure 4 The device shown, and:
[0091] The deconvolution processing module 404 is further configured to perform the following processing:
[0092] When the target deconvolution layer is the first deconvolution layer, performing a first deconvolution process according to an output of a bottleneck layer connected to the last convolution layer and an output result of the last convolution layer, and outputting a feature map;
[0093] When the target deconvolution layer is not the first deconvolution layer, deconvolution processing is performed according to an output result of a previous deconvolution layer of the target deconvolution layer and an output result of a target convolution layer corresponding to the target deconvolution layer, and a feature map is output.
[0094] The present disclosure provides a device for improving image clarity, including:
[0095] processor;
[0096] a memory for storing processor-executable instructions;
[0097] Wherein, the processor is configured to execute the above method.
[0098] In an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute the above method.
[0099] Figure 5 1 is a block diagram of a device 500 for improving image clarity according to an exemplary embodiment. For example, the device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0100] Reference Figure 5 , the device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0101] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0102] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0103] The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 500.
[0104] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0105] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0106] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0107] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, and the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0108] The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0109] In an exemplary embodiment, the apparatus 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0110] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by the processor 520 of the device 500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0111] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0112] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed herein. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0113] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for improving image clarity, characterized in that: include: When training the generative network in the deep convolutional adversarial generative network, the blur degree calculation network is used to calculate the blur degree information of the input image; After performing multiple affine transformations according to the blur level information, multiple feature components are obtained; Determine the target deconvolution layer corresponding to each feature component; When performing deconvolution processing on the convolution result of the input image, for each target deconvolution layer, rendering processing is performed on a feature map output by the target deconvolution layer using a feature component corresponding to the target deconvolution layer; The rendering process is used to perform processing according to the feature component and the feature map, so that the processing result reflects the influence of the feature component on the feature map.
2. The method according to claim 1, characterized in that The fuzzy degree calculation network is formed by connecting more than one fully connected layers in sequence.
3. The method according to claim 1, characterized in that The rendering process of the feature map output by the target deconvolution layer using the feature component corresponding to the target deconvolution layer includes: Adopting an adaptive instance normalization method, the feature map output by the target deconvolution layer is rendered using the feature components corresponding to the target deconvolution layer.
4. The method according to claim 3, characterized in that The method of using an adaptive instance normalization method to render a feature map output by the target deconvolution layer using a feature component corresponding to the target deconvolution layer includes: The following formula is used to render the feature map output by the target deconvolution layer: Among them, Ad(dc i ,w i ) refers to the result after rendering, dc i refers to the feature map output by the i-th target deconvolution layer, w i is the feature component corresponding to the i-th target deconvolution layer, w si It refers to the bias component of the feature component corresponding to the i-th target deconvolution layer, w bi It refers to the scaling component of the feature component corresponding to the i-th target deconvolution layer, mean(dc i ) refers to the mean of the feature maps output by the i-th target deconvolution layer, var(dc i ) refers to the variance of the feature map output by the i-th target deconvolution layer, where i is an integer greater than 0 and less than or equal to the number of target deconvolution layers.
5. The method according to any one of claims 1 to 4, characterized in that: Before rendering the feature map output by the target deconvolution layer using the feature components corresponding to the target deconvolution layer, the method further includes: When the target deconvolution layer is the first deconvolution layer, a first deconvolution process is performed according to an output of a bottleneck layer connected to the last convolution layer and an output result of the last convolution layer, and a feature map is output; When the target deconvolution layer is not the first deconvolution layer, deconvolution processing is performed according to an output result of a previous deconvolution layer of the target deconvolution layer and an output result of a target convolution layer corresponding to the target deconvolution layer, and a feature map is output.
6. A device for improving image clarity, characterized in that: include: A calculation module is configured to use a blur degree calculation network to calculate blur degree information of an input image when training a generation network in a deep convolutional adversarial generation network; A transformation module, configured to obtain multiple feature components after performing multiple affine transformations according to the blur degree information; A determination module configured to determine a target deconvolution layer corresponding to each feature component; a deconvolution processing module configured to, when performing deconvolution processing on the convolution result of the input image, render a feature map output by the target deconvolution layer using a feature component corresponding to the target deconvolution layer for each target deconvolution layer; The rendering process is used to perform processing according to the feature component and the feature map, so that the processing result reflects the influence of the feature component on the feature map.
7. The device according to claim 6, characterized in that The fuzzy degree calculation network is formed by connecting more than one fully connected layers in sequence.
8. The device according to claim 6, characterized in that The deconvolution processing module is configured to use the feature components corresponding to the target deconvolution layer to render the feature map output by the target deconvolution layer using the following method: Adopting an adaptive instance normalization method, the feature map output by the target deconvolution layer is rendered using the feature components corresponding to the target deconvolution layer.
9. The device according to claim 8, characterized in that The deconvolution processing module is further configured to use the following method to adopt an adaptive instance normalization method to render the feature map output by the target deconvolution layer using the feature components corresponding to the target deconvolution layer: The following formula is used to render the feature map output by the target deconvolution layer: Among them, Ad(dc i ,w i ) refers to the result after rendering, dc i refers to the feature map output by the i-th target deconvolution layer, w i is the feature component corresponding to the i-th target deconvolution layer, w si It refers to the bias component of the feature component corresponding to the i-th target deconvolution layer, w bi It refers to the scaling component of the feature component corresponding to the i-th target deconvolution layer, mean(dc i ) refers to the mean of the feature maps output by the i-th target deconvolution layer, var(dc i ) refers to the variance of the feature map output by the i-th target deconvolution layer, where i is an integer greater than 0 and less than or equal to the number of target deconvolution layers.
10. The device according to any one of claims 6 to 9, characterized in that The deconvolution processing module is further configured to perform the following processing: When the target deconvolution layer is the first deconvolution layer, performing a first deconvolution process according to an output of a bottleneck layer connected to the last convolution layer and an output result of the last convolution layer, and outputting a feature map; When the target deconvolution layer is not the first deconvolution layer, deconvolution processing is performed according to an output result of a previous deconvolution layer of the target deconvolution layer and an output result of a target convolution layer corresponding to the target deconvolution layer, and a feature map is output.
11. A device for improving image clarity, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method of any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute the method of any one of claims 1 to 5.
