CN115760625A - Terminal image quality enhancement method and device and computer readable storage medium - Google Patents

Terminal image quality enhancement method and device and computer readable storage medium Download PDF

Info

Publication number
CN115760625A
CN115760625A CN202211460861.9A CN202211460861A CN115760625A CN 115760625 A CN115760625 A CN 115760625A CN 202211460861 A CN202211460861 A CN 202211460861A CN 115760625 A CN115760625 A CN 115760625A
Authority
CN
China
Prior art keywords
image quality
image
quality enhancement
enhancement
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211460861.9A
Other languages
Chinese (zh)
Inventor
朱丹
高艳
段然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202211460861.9A priority Critical patent/CN115760625A/en
Publication of CN115760625A publication Critical patent/CN115760625A/en
Priority to PCT/CN2023/123375 priority patent/WO2024104000A1/en
Pending legal-status Critical Current

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/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration

Landscapes

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

Abstract

A terminal image quality enhancement method and device and a computer readable storage medium are provided, the terminal image quality enhancement method comprises the following steps: acquiring image quality enhancement parameters of a user; determining the number of times J of circulation for enhancing the image quality by using an image quality enhancement model according to the image quality enhancement parameters of the user; receiving an image to be enhanced, and circularly using the image quality enhancement model to enhance the image quality of the image to be enhanced for J times, wherein the input image of the image quality enhancement model at the 1 st cycle is the image to be enhanced, the input image of the image quality enhancement model at the jth cycle is the output image of the image quality enhancement model at the J-1 th cycle, the internal parameters of the image quality enhancement model used in the J cycle process are the same, and J is more than or equal to J and is more than 1.

Description

Terminal image quality enhancement method and device and computer readable storage medium
Technical Field
The embodiment of the disclosure relates to but is not limited to the technical field of image quality enhancement, and in particular relates to a terminal image quality enhancement method and device and a computer-readable storage medium.
Background
The picture quality refers to picture quality, and in an actual playing scene, it is often necessary to improve the picture quality of a terminal such as a television. For example, when standard definition video is played by using a 2K-resolution television, or standard definition or 2K-resolution video is played by using a 4K-resolution television, the problem of poor display effect such as blurred picture and jagged display is caused due to the mismatch between the resolution of the video source and the screen display resolution. However, the current image quality enhancement method for a terminal such as a television cannot always satisfy the requirement of light weight in an actual scene because of limited computing power and storage space of the terminal.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the disclosure provides a terminal image quality enhancement method, which includes:
acquiring image quality enhancement parameters of a user;
determining the number of times J of circulation for enhancing the image quality by using an image quality enhancement model according to the image quality enhancement parameters of the user;
receiving an image to be enhanced, and circularly using the image quality enhancement model to enhance the image quality of the image to be enhanced J times, wherein the input image of the image quality enhancement model in the 1 st cycle is the image to be enhanced, the input image of the image quality enhancement model in the jth cycle is the output image of the image quality enhancement model in the J-1 st cycle, the internal parameters of the image quality enhancement model used in the J-th cycle process are the same, and J is more than or equal to J and is greater than 1.
The embodiment of the disclosure also provides a terminal image quality enhancing device, which comprises a memory; and a processor connected to the memory, the memory being used for storing instructions, the processor being configured to perform the steps of the terminal image quality enhancement method according to any of the embodiments of the present disclosure based on the instructions stored in the memory.
The embodiment of the disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the computer program implements the method for enhancing the image quality of the terminal according to any embodiment of the disclosure.
Other aspects will become apparent upon reading the attached drawings and the detailed description.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosed embodiments and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the example serve to explain the principles of the disclosure and not to limit the disclosure. The shapes and sizes of the various elements in the drawings are not to be considered as true proportions, but are merely intended to illustrate the present disclosure.
Fig. 1 is a schematic flowchart of a method for enhancing image quality of a terminal according to an exemplary embodiment of the disclosure;
fig. 2 is a schematic diagram of a scheme for enhancing image quality by using a super resolution image (SR) model according to an exemplary embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an image super-resolution model provided by an exemplary embodiment of the present disclosure;
fig. 4 is a schematic diagram illustrating a scheme for enhancing image quality by using a sharpness enhancement (BP) model according to an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a sharpness enhancement model provided in an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating a training method of an image super-resolution model according to an exemplary embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a process of performing Float32 precision training first and then performing Int8 quantization training according to an exemplary embodiment of the disclosure;
FIG. 8 is a schematic diagram of a method for training a sharpness enhancement model according to an exemplary embodiment of the disclosure;
fig. 9 is a schematic diagram of an image quality enhancing module of a television terminal according to an exemplary embodiment of the disclosure;
fig. 10 is a schematic diagram illustrating a method for setting parameters of a front end of a terminal image quality enhancement module according to an exemplary embodiment of the disclosure;
fig. 11 is a schematic structural diagram of a terminal image quality enhancing apparatus according to an exemplary embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict.
Unless otherwise defined, technical or scientific terms used in the disclosure of the embodiments of the present disclosure should have the ordinary meaning as understood by those having ordinary skill in the art to which the present disclosure belongs. The use of "first," "second," and similar terms in the embodiments of the disclosure is not intended to indicate any order, quantity, or importance, but rather to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item preceding the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items.
As shown in fig. 1, an embodiment of the present disclosure provides a method for enhancing a terminal image quality, including the following steps:
step 101, obtaining image quality enhancement parameters of a user;
step 102, determining the number of times J of circulation for image quality enhancement by using an image quality enhancement model according to the image quality enhancement parameters of a user;
103, receiving an image to be enhanced, and circularly using the image quality enhancement model to enhance the image quality of the image to be enhanced J times, wherein the input image of the image quality enhancement model in the 1 st cycle is the image to be enhanced, the input image of the image quality enhancement model in the jth cycle is the output image of the image quality enhancement model in the J-1 st cycle, the internal parameters of the image quality enhancement model used in the J-time cycle process are the same, and J is more than or equal to J >1.
According to the terminal image quality enhancement method, the number of times J of circulation for image quality enhancement by using the image quality enhancement model is determined according to the image quality enhancement parameters of the user, then the image quality enhancement model is circularly used for performing image quality enhancement on the image to be enhanced for J times, and the internal parameters of the image quality enhancement model used in the circulation process for J times (the internal parameters of the image quality enhancement model are the optimal parameters obtained by training samples in model training) are the same.
In some exemplary embodiments, as shown in fig. 2, the image quality enhancement model may be a Super Resolution (SR) model, and the image quality enhancement parameter is a first image quality enhancement parameter s, where J = s and x =2 s And x is the resolution enhancement magnification between the output image of the image super-resolution model in the J-th cycle and the image to be enhanced. In the embodiment of the present disclosure, the first image quality enhancement parameter s may be understood as the number of times of the super-divide cycle, and may be, for example, selected from no super-divide (s = 0), 2-time super-divide (s = 1), 4-time super-divide (s = 2), 8-time super-divide (s = 3), 16-time super-divide (s = 4), 32-time super-divide (s = 5), and the like. The SR in fig. 2 can be regarded as a 2-fold hyper-resolution module, and the internal parameters of the image super-resolution model used in the multiple-cycle process (the internal parameters of the image super-resolution model here refer to the optimal parameters obtained by training samples in the model training) are the same.
In some exemplary embodiments, as shown in fig. 3, the image super-resolution model includes a first feature extraction layer FE1, a first truncation layer Clip1, m spatial attention layers SA connected in series, a channel adjustment layer CC, a first upsampling layer Piexl Shuffle1, and a second truncation layer Clip2, m being a natural number between 2 and 5, in which:
a first feature extraction layer FE1 configured to extract a feature map of an input image of the image super-resolution model;
the first slice layer Clip1 is configured to limit the numerical value of the feature map output by the first feature extraction layer FE1 within a preset range;
the m spatial attention layers SA are connected in series and are configured to carry out feature screening and enhancement on a feature map output by the first section Clip 1;
a channel adjustment layer CC configured to adjust the number of channels of the feature map;
the first up-sampling layer Piexl Shuffle1 is configured to convert a characteristic diagram output by the channel adjustment layer CC into a high-resolution image;
and a second truncation layer Clip2 configured to limit the value of the high-resolution image output by the first upsampling layer Piexl Shuffle1 to be within a preset range.
In practical use, m may be set according to hardware conditions of the terminal, and may be set to 2 or 3, for example.
In some exemplary embodiments, as shown in fig. 3, each spatial attention layer SA includes a second feature extraction layer FE2, a third truncation layer Clip3, a weighted feature mapping layer WFM, a third feature extraction layer FE3, and a fourth truncation layer Clip4, where:
a second feature extraction layer FE2, configured to perform feature refinement on the feature map input by the current spatial attention layer SA;
a third cut layer Clip3 configured to limit the numerical value of the feature map output by the second feature extraction layer FE2 within a preset range;
the weighted feature mapping layer WFM is configured to calculate a spatial attention weight, and the calculated spatial attention weight is multiplied by a feature map output by the third cut-off layer Clip3 to obtain a weighted feature map;
a third feature extraction layer FE3 configured to perform feature refinement on the weighted feature map;
and the fourth truncation layer Clip4 is configured to limit the numerical value of the feature map output by the third feature extraction layer FE3 within a preset range.
In some exemplary embodiments, as shown in fig. 3, the weighted feature mapping layer WFM may include a first branch, a second branch, and a multiplier, the first branch and the second branch each being disposed between the third truncated layer Clip3 and the multiplier, the first branch including a first convolution layer Conv, a seventh truncated layer Clip7, and an activation function layer Sigmoid connected in series in this order.
In some exemplary embodiments, the first convolution layer Conv may be a convolution layer having a convolution kernel size of 1*1 or 3*3, however, embodiments of the present disclosure do not limit this. The first convolution layer Conv adopts a convolution layer with a convolution kernel size of 1*1, and can further reduce the computational power requirement of the terminal.
In some exemplary embodiments, the first feature extraction layer FE1 may be a convolution layer with a convolution kernel size of 3*3, however, this is not limited by the embodiments of the present disclosure.
In some exemplary embodiments, the second feature extraction layer FE2 may be a convolution layer with a convolution kernel size of 3*3, however, this is not limited by the disclosed embodiments.
In some exemplary embodiments, the third feature extraction layer FE3 may be a convolution layer with a convolution kernel size of 1*1 or 3*3, however, this is not limited by the embodiments of the present disclosure. The third feature extraction layer FE3 adopts a convolution layer with the convolution kernel size of 1*1, and the computational power requirement of the terminal can be further reduced.
In some exemplary embodiments, the channel adjustment layer CC may be a convolution layer with a convolution kernel size of 1*1, however, this is not limited by the embodiments of the present disclosure.
In some exemplary embodiments, the truncated layer Clip (which may be any one of the first truncated layer Clip1, the second truncated layer Clip2, the third truncated layer Clip3, the third truncated layer Clip4, and the seventh truncated layer Clip7, and may also be any one of the fifth truncated layer Clip5 and the sixth truncated layer Clip6 described later) performs a truncation function, and the truncation value may be between 0 and 1 (when the model output value is a normalized value) or between 0 and 255 (when the model output value is not normalized), and is formulated as follows:
Figure BDA0003955362660000061
or;
Figure BDA0003955362660000062
the function of the truncation layer Clip is to ensure that the numerical value output by each layer of convolution function is between 0 and 1 (or 0 and 255), which is beneficial to the subsequent model quantization training and reduces the quantization loss. According to the image super-resolution model disclosed by the embodiment of the disclosure, the truncation layer Clip is adopted after each convolution layer, so that the accuracy performance of the model can be kept to the maximum extent during Int8 quantitative training.
In some exemplary embodiments, the image quality enhancement model may be a sharpness enhancement model, and the image quality enhancement parameter is a second image quality enhancement parameter w, wherein 0 < w ≦ 100%.
As shown in fig. 4, BP can be regarded as a primary sharpness enhancement module, and the internal parameters of the sharpness enhancement model (the internal parameters of the sharpness enhancement model herein refer to the optimal parameters obtained by training samples in the model training) used in the multiple-cycle process are the same. In the disclosed embodiment, the sharpness enhancement model is a Back Projection (Back Projection) structure, which includes a down-sampling layer (Piexl UnShuffle or other) and an up-sampling layer (Piexl Shuffle or other). The input of the BP structure is an image, the output of the BP structure is also an image, and the structure of the BP structure is a residual structure, that is, the substance obtained by the sharpness enhancement module is the residual of the enhancement map and the input map, that is, the detail of the enhancement. The second image quality enhancement parameter w is the intensity coefficient of the current user adjustment enhancement effect, and the value of w is between 0 and 100 percent.
In some exemplary embodiments, determining the number of cycles J of the image quality enhancement using the image quality enhancement model according to the image quality enhancement parameter of the user includes:
determining the maximum cycle number I, and dividing 0-100% into I equal parts, wherein the enhancement percentage corresponding to the ith equal part is A x 100%, wherein (I-1)/I is more than A and less than or equal to I/I, and I is a natural number between 1 and I;
and determining the number of equal parts corresponding to the second image quality enhancement parameter w as the cycle number J for image quality enhancement by using the definition enhancement model.
When actually using the sharpness enhancement model of the embodiment of the present disclosure to perform image quality enhancement, a user may control an enhancement effect by adjusting the second image quality enhancement parameter w, and for example, assuming that the maximum cycle number I =5, the enhancement degree may be divided into the following 5 steps (the number of steps is the maximum cycle number):
0%——20%——40%——60%——80%——100%
when a user adjusts the slide bar with the enhancement effect, if the second image quality enhancement parameter w is 0%, no enhancement is performed, namely, the image quality enhancement is not performed by using a definition enhancement model;
when the size of the second image quality enhancement parameter w is (0%, 20%)]In between, use the sharpness enhancement model to perform image quality enhancement 1 time: pout = BP 1 (P)=BP(P);
When the size of the second picture quality enhancement parameter w is (20%, 40%)]In between, the sharpness enhancement model is cyclically used for image quality enhancement 2 times: pout = BP 2 (P)=BP(BP 1 (P));
When the second picture quality enhancement parameter w is (40%, 60%)]In between, the sharpness enhancement model is cyclically used for image quality enhancement 3 times (may be set as a default configuration): pout = BP 3 (P)=BP(BP 2 (P));
When the size of the second image quality enhancement parameter w is (60%, 80%)]In between, the sharpness enhancement model is cyclically used for image quality enhancement 4 times: pout = BP 4 (P)=BP(BP 3 (P));
When the size of the second picture quality enhancement parameter w is (80%, 100%)]In between, the sharpness enhancement model is cyclically used for image quality enhancement 5 times: pout = BP 5 (P)=BP(BP 4 (P))。
In some exemplary embodiments, when the second image quality enhancement parameter w is not equal to an integer multiple of 1/I, the terminal image quality enhancement method further includes:
calculating a difference coefficient w ', w' = w × I-J +1 according to the following formula;
determining the output image as BP J-1 (P)+w′*(BP J (P)-BP J-1 (P)), wherein BP J-1 (P) is the output image of the sharpness enhancement model at cycle J-1, BP J (P) is an output image of the sharpness enhancement model at cycle J.
In the embodiment of the disclosure, in order to enable the user to obtain a continuous sharpness variation process between each gear, when the second image quality enhancement parameter w falls into a certain gear, for example, it is assumed that the user adjustsFalls in (20%, 40%) with the second picture quality enhancement parameter w =35%]In the gear, the definition enhancement model is cyclically used for image quality enhancement for 2 times, and 35 percent of the image quality is adjusted to be (20 percent and 40 percent)]In the interval, w '= (35% -20%)/(40% -20%) =0.75 (i.e. w' = w × I-J +1=35% + 5-2+1= 0.75) is linearly mapped according to 0-1, and then the enhanced picture is Pout = BP 1 (P)+0.75*(BP 2 (P)-BP 1 (P))。
Also as assumed the user adjusted picture quality enhancement parameter w =65%, this time falls in (60%, 80%)]And a gear, namely circularly using the definition enhancement model to carry out image quality enhancement for 4 times at the moment, and obtaining the following calculation according to the following steps: w '= (65% -60%)/(80% -60%) =0.25 (i.e., w' = w × I-J +1=65% × 5-4+1= 0.25), and the picture enhanced at this time is Pout = BP 3 (P)+0.25*(BP 4 (P)-BP 3 (P))。
Thus, the user can obtain the continuous enhancement effect through the sliding strip. When the method is used, 3 times of circulation can be configured by default, 4 times or 5 times of circulation is set by program support, and when the original video picture needing to be enhanced is particularly blurred, more times of sharpness enhancement are needed to achieve a more ideal effect, so that a wider-space enhancement effect is provided for a user.
In some exemplary embodiments, determining the maximum number of cycles I comprises:
detecting a calculation force space M which can be provided for an image quality enhancement algorithm by a current terminal;
judging whether M is greater than or equal to I2M bp Wherein, I2 is the maximum cycle number of the terminal supporting the cyclic use of the definition enhancement model under the ideal condition, M bp A computational space required for performing primary image quality enhancement on an image to be enhanced by using a definition enhancement model;
when M is greater than or equal to I2M bp When the number of the maximum circulation times is larger than I = I2;
when M is less than I2M bp In time, set the maximum number of cycles
Figure BDA0003955362660000081
Wherein the content of the first and second substances,
Figure BDA0003955362660000082
represents the pair M/M bp And rounding down.
In an ideal situation, it is considered that the computational power of a device such as a television or a mobile terminal can stably and reliably support the cyclic use of the sharpness enhancement model for image quality enhancement I2 (for example, I2= 5) times, but when the television starts many other modules simultaneously or the mobile terminal runs many other applications in the background simultaneously, a situation that the occasional computational power occupation cannot provide enough computational power for the sharpness enhancement model may occur. At this time, the terminal image quality enhancement method according to the embodiment of the present disclosure may adjust, in real time, the number of times of image quality enhancement using the sharpness enhancement model on line to complete the enhancement processing, which is specifically as follows:
assuming that M is the calculation power required for enhancing the image quality once by using the sharpness enhancement model bp Obtaining the computational power space M which can be provided for the image quality enhancement algorithm by the terminal equipment after online detection, and when M is more than or equal to I2M bp In this case, the maximum cycle number I = I2 is set, and the cycle number is determined according to the above logic to be enhanced. When M is<I2*M bp Then, the maximum number of cycles that can be run is recalculated
Figure BDA0003955362660000091
Wherein the content of the first and second substances,
Figure BDA0003955362660000092
represents the pair M/M bp Round down (not considering the case where 1 cycle is not run). Dividing 0-100% into I equal parts according to the maximum cycle number obtained by recalculation, and then determining the cycle number according to the logic for enhancement. The maximum cycle number I is reset according to the method, and the cycle enhancement times of the image to be enhanced by using the definition enhancement model can be adaptively controlled on line in real time according to the hardware performance.
For example, when I =5, the degree of enhancement can be divided into the following 5 steps:
0%——20%——40%——60%——80%——100%;
when I =4, the degree of enhancement can be divided into the following 4 steps:
0%——25%——50%——75%——100%;
when I =3, the degree of enhancement can be divided into the following 3 steps:
0%——33%——66%——100%;
when I =2, the degree of enhancement can be divided into the following 2 steps:
0%——50%——100%;
when I =1, the degree of enhancement can be divided into the following 1 step:
1 BP time zone is divided into: 0% to 100%.
The sharpness enhancement model of the disclosed embodiment is a Back Projection (Back Projection) structure, which is a residual structure as shown in fig. 5, and includes a down-sampling layer (Piexl un buffer or other) and an up-sampling layer (Piexl buffer or other).
In some exemplary embodiments, as shown in fig. 5, the sharpness enhancement model includes a first residual block RB1, the first residual block RB1 includes a first main branch, a first shortcut branch and a first adder, the first main branch and the first shortcut branch are disposed between the input image and the first adder, and the first residual block RB1 is configured to sum the input image and the input image processed by the first main branch and output the summed image; the first main branch comprises a down-sampling layer Piexl UnShuffle, a second residual block RB2, a fifth truncation layer Clip5, and a second up-sampling layer Piexl Shuffle2, connected in sequence, wherein:
the down-sampling layer Piexl Un Shuffle is configured to down-sample the input image to obtain a down-sampling image;
the second residual block RB2 includes a second main branch, a second shortcut branch and a second adder, the second main branch and the second shortcut branch are both disposed between the downsampling layer Piexl un shuffle and the second adder, the second main branch includes a plurality of second convolution layers Conv 'and a sixth truncation layer Clip6 disposed between the plurality of second convolution layers Conv';
a fifth truncation layer Clip5 configured to limit the numerical value of the feature map output by the second residual block RB2 within a preset range;
and a second upsampling layer Piexl Shuffle2 configured to convert the feature map output by the fifth truncation layer Clip5 into a high-resolution image.
In some exemplary embodiments, the second convolution layer Conv' may be a convolution layer having a convolution kernel size of 3*3, however, this is not limited by the embodiments of the present disclosure.
In some exemplary embodiments, the number of the second convolution layers Conv' in the second main branch may be between 1 and 3. For example, the number of the second convolution layers Conv' in the second main branch may be 2.
In the embodiment of the present disclosure, the function of the truncation layer Clip (any one of the fifth truncation layer Clip5 and the sixth truncation layer Clip 6) is to ensure that the value output by each layer of convolution function is between 0 and 1 (or 0 and 255), which is beneficial to subsequent model quantization training and reduces quantization loss. According to the definition enhancement model disclosed by the embodiment of the disclosure, the truncation layer Clip is adopted after each convolution layer, so that the precision performance of the model can be kept to the maximum extent during Int8 quantitative training.
In some exemplary embodiments, the training process of the image quality enhancement model includes:
training by using C serial image quality enhancement models with the same structure and the same internal parameters, and simultaneously calculating the loss of using 1 to C image quality enhancement models, wherein floating point type precision is adopted during training;
and quantizing the trained floating point image quality enhancement model into an integer image quality enhancement model.
In some exemplary embodiments, the training process of the image super-resolution model includes:
the method comprises the steps of training by using y image super-resolution models which are connected in series and have the same structure and the same internal parameters, wherein 1<y is not more than I1, I1 is the maximum cycle number of the terminal supporting cyclic use of the image super-resolution models, loss of using 1 to y image super-resolution models is calculated at the same time, and floating point type precision is adopted during training;
and quantizing the trained floating point type image super-resolution model into an integer type image super-resolution model.
In the embodiment of the disclosure, the training of the image super-resolution model comprises 2 steps:
1) Floating point training: as shown in fig. 6, when the image super-resolution model is trained in a floating point mode, internal parameters of multiple image super-resolution models are shared (assuming that y =3, that is, the above 3 image super-resolution models are all the same group of internal parameters of the same model, and the image super-resolution model is cycled three times), 2x/4x/8x super-resolution is trained at the same time, and 2x/4x/8x Loss is calculated at the same time, and the Loss function may use an absolute Loss function (L1 Loss) or a Mean Square Error (MSE) Loss function; during training, the model can be trained by adopting Float32 precision;
2) As shown in fig. 7, after the floating point Training is completed, the Float32 precision model is loaded for perceptual quantization Training (QAT), so that the quality precision of the model can be maintained on the basis of greatly reducing inference cost. This step training model can be trained with Int8 precision.
In some exemplary embodiments, the training process of the sharpness enhancement model includes:
training by using z definition enhancement models which are connected in series and have the same structure and the same internal parameters, wherein 1<z is not more than I2, I2 is the maximum cycle number of the definition enhancement model which is supported by the terminal to be recycled, the loss caused by using 1 to z definition enhancement models is calculated at the same time, and floating point type precision is adopted during training;
and quantizing the trained definition enhancement model into an integer definition enhancement model.
In the embodiment of the present disclosure, training the sharpness enhancement model includes 2 steps:
1) Floating point training: as shown in fig. 8, when the sharpness enhancement model is trained in floating point, internal parameters of multiple sharpness enhancement models are shared (assuming z =3, that is, the above 3 sharpness enhancement models are all the same set of internal parameters of the same model, and the sharpness enhancement model cycles three times), and the sharpness enhancement model is trained for 1 time/2 times/3 times and loss of the sharpness enhancement is calculated for 1 time/2 times/3 times at the same time, and the loss function may be an absolute loss function or a mean square error loss function; during training, the model can be trained by adopting Float32 precision;
2) As shown in fig. 7, after the floating point training is completed, the Float32 precision model is loaded for perceptual quantization training, so that the quality precision of the model can be maintained on the basis of greatly reducing the inference cost. This step training model can be trained with Int8 precision.
In some exemplary embodiments, the image quality enhancement model comprises a super-resolution image model and a sharpness enhancement model, and the image quality enhancement parameters comprise a first image quality enhancement parameter s and a second image quality enhancement parameter w;
the method for determining the number of times J of the cycle of image quality enhancement by using an image quality enhancement model according to the image quality enhancement parameter of a user comprises the following steps: determining the cycle number J1= s of image quality enhancement by using an image super-resolution model; determining the maximum cycle number I of image quality enhancement by using a definition enhancement model, and dividing 0-100% into I equal parts, wherein the enhancement percentage corresponding to the ith equal part is A x 100%, wherein (I-1)/I < A is not more than I/I, and I is a natural number between 1 and I; determining the number of equal parts corresponding to the second image quality enhancement parameter w as the cycle number J2 of image quality enhancement by using the definition enhancement model;
circularly using the image quality enhancement model to enhance the image quality of the image to be enhanced for J times, wherein the method comprises the following steps: the method comprises the steps of firstly, circularly using a definition enhancement model to carry out image quality enhancement J2 times on an image to be enhanced, and outputting a first image quality enhancement picture; and recycling the image super-resolution model to perform image quality enhancement on the first image quality enhanced picture J1 times, and outputting a second image quality enhanced picture.
The structures, the using methods and the training methods of the image super-resolution model and the sharpness enhancement model can refer to the foregoing descriptions, and the embodiments of the present disclosure are not described herein again.
The terminal image quality enhancement method of the embodiment of the disclosure can be applied to terminals such as a television/all-in-one machine/mobile terminal, taking the television terminal as an example, as shown in fig. 9, an image quality enhancement module is arranged in the television terminal, and the image quality enhancement module is divided into two parts, namely an ultra-resolution (i.e. image super-resolution) module and a definition enhancement module: the image quality enhancement module is started and then the modules are started.
As shown in fig. 10, the super-resolution module can select 1x (s = 0), 2x (s = 1), 4x (s = 2), and 8x (s = 3) magnifications for resolution enhancement by using the first image quality enhancement parameter s, where 1x represents that the super-resolution operation is not performed.
The sharpness enhancement module sets the slider mode, and the second image quality enhancement parameter w is set between [0, 100% ], and the specific rule refers to the aforementioned cycle setting logic of the sharpness enhancement model.
After the setting is completed, the first image quality enhancement parameter s is transmitted to the super-resolution module, and the second image quality enhancement parameter w is transmitted to the definition enhancement module, so that an image with enhanced image quality can be obtained.
The embodiment of the disclosure also provides a terminal image quality enhancing device, which comprises a memory; and a processor connected to the memory, the memory being used for storing instructions, the processor being configured to perform the steps of the terminal image quality enhancement method according to any of the embodiments of the present disclosure based on the instructions stored in the memory.
As shown in fig. 11, in an example, the terminal image quality enhancing apparatus may include: the image quality enhancement module comprises a processor 1110, a memory 1120, a bus system 1130 and a transceiver 1140, wherein the processor 1110, the memory 1120 and the transceiver 1140 are connected through the bus system 1130, the memory 1120 is used for storing instructions and image quality enhancement models, and the processor 1110 is used for executing the instructions stored in the memory 1120 to control the transceiver 1140 to transmit and receive signals. Specifically, the transceiver 1140 may obtain the image quality enhancement parameter of the user and receive the image to be enhanced under the control of the processor 1110, and the processor 1110 determines the number of cycles J for performing image quality enhancement using the image quality enhancement model according to the image quality enhancement parameter of the user; and circularly using the image quality enhancement model to enhance the image quality of the image to be enhanced J times, wherein the input image of the image quality enhancement model in the 1 st cycle is the image to be enhanced, the input image of the image quality enhancement model in the jth cycle is the output image of the image quality enhancement model in the J-1 st cycle, the internal parameters of the image quality enhancement model used in the J-th cycle are the same, J is more than or equal to J and is greater than 1, and the obtained output image is output to a display interface of a terminal through a transceiver 1140.
It should be understood that processor 1110 may be a Central Processing Unit (CPU), and processor 1110 may also be other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Memory 1120 may include read-only memory and random access memory, and provides instructions and data to processor 1110. A portion of the memory 1120 may also include non-volatile random access memory. For example, the memory 1120 may also store device type information.
The bus system 1130 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. For clarity of illustration, however, the various buses are designated as the bus system 1130 in figure 11.
In implementation, the processing performed by the processing device may be performed by instructions in the form of hardware, integrated logic circuits, or software in the processor 1110. That is, the method steps of the embodiments of the present disclosure may be implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor. The software module may be located in a storage medium such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1120, and the processor 1110 reads the information in the memory 1120 and performs the steps of the method in combination with the hardware thereof. To avoid repetition, it is not described in detail here.
The embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for enhancing image quality of a terminal according to any embodiment of the present disclosure. The method for driving prognosis analysis by executing the executable instruction is basically the same as the method for enhancing the image quality of the terminal provided by the embodiment of the disclosure, and is not described herein again.
In some possible embodiments, aspects of the terminal image quality enhancement method provided by the present application may also be implemented in a form of a program product, which includes program code for causing a computer device to execute the steps in the terminal image quality enhancement method according to various exemplary embodiments of the present application described above in this specification when the program product runs on the computer device, for example, the computer device may execute the terminal image quality enhancement method described in the embodiments of the present application.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Although the embodiments disclosed in the present disclosure are described above, the descriptions are only for the purpose of understanding the present disclosure, and are not intended to limit the present disclosure. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure, and that the scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (13)

1. A method for enhancing image quality of a terminal is characterized by comprising the following steps:
acquiring image quality enhancement parameters of a user;
determining the number of times J of circulation for enhancing the image quality by using an image quality enhancement model according to the image quality enhancement parameters of the user;
receiving an image to be enhanced, and circularly using the image quality enhancement model to enhance the image quality of the image to be enhanced J times, wherein the input image of the image quality enhancement model in the 1 st cycle is the image to be enhanced, the input image of the image quality enhancement model in the jth cycle is the output image of the image quality enhancement model in the J-1 st cycle, the internal parameters of the image quality enhancement model used in the J-cycle process are the same, and J is more than or equal to J and is greater than 1.
2. The terminal image quality enhancement method of claim 1, wherein the image quality enhancement model is a super-resolution image model, and the image quality enhancement parameter is a first image quality enhancement parameter s, wherein J = s and x =2 s And x is the resolution enhancement magnification between the output image of the image super-resolution model and the image to be enhanced in the J-th cycle.
3. The method for enhancing the image quality of the terminal according to claim 2, wherein the image super-resolution model comprises a first feature extraction layer, a first truncation layer, m spatial attention layers connected in series, a channel adjustment layer, a first upsampling layer and a second truncation layer, which are connected in sequence, wherein m is a natural number between 2 and 5, and wherein:
the first feature extraction layer is configured to extract a feature map of an input image of the image super-resolution model;
the first truncation layer is configured to limit the numerical value of the feature map output by the first feature extraction layer within a preset range;
the m serial spatial attention layers are configured to perform feature screening and enhancement on a feature map output by the first truncation layer;
the channel adjusting layer is configured to adjust the number of channels of the feature map;
the first up-sampling layer is configured to convert the characteristic diagram output by the channel adjustment layer into a high-resolution image;
the second truncation layer is configured to limit a numerical value of the high-resolution image output by the first upsampling layer to be within a preset range.
4. The terminal image quality enhancement method according to claim 3, wherein each of the spatial attention layers comprises a second feature extraction layer, a third truncation layer, a weighted feature mapping layer, a third feature extraction layer and a fourth truncation layer, wherein:
the second feature extraction layer is configured to perform feature refinement on a feature map currently input by the spatial attention layer;
the third interception layer is configured to limit the numerical value of the feature map output by the second feature extraction layer within a preset range;
the weighted feature mapping layer is configured to calculate a spatial attention weight, and multiply the calculated spatial attention weight by the feature map output by the third truncation layer to obtain a weighted feature map;
the third feature extraction layer is configured to perform feature refinement on the weighted feature map;
the fourth cutting layer is configured to limit the numerical value of the feature map output by the third feature extraction layer within a preset range.
5. The terminal image quality enhancement method according to claim 2, wherein the training process of the image super-resolution model comprises:
training by using y series-connected image super-resolution models with the same structure and the same internal parameters, wherein 1<y is not more than I1, I1 is the maximum cycle number of the terminal supporting cyclic use of the image super-resolution models, loss of using 1 to y image super-resolution models is calculated at the same time, and floating point type precision is adopted during training;
and quantizing the trained floating point type image super-resolution model into an integer type image super-resolution model.
6. The terminal image quality enhancement method of claim 1, wherein the image quality enhancement model is a sharpness enhancement model, and the image quality enhancement parameter is a second image quality enhancement parameter w, wherein w is greater than 0 and less than or equal to 100%;
the method for determining the number of times J of the cycle of image quality enhancement by using the image quality enhancement model according to the image quality enhancement parameters of the user comprises the following steps:
determining the maximum cycle number I of the definition enhancement model cyclically used by the terminal, and dividing 0-100% into I equal parts, wherein the enhancement percentage corresponding to the ith equal part is A x 100%, wherein (I-1)/I < A is less than or equal to I/I, and I is a natural number between 1 and I;
and determining the number of equal parts corresponding to the second image quality enhancement parameter w as the cycle number J for performing image quality enhancement by using the definition enhancement model.
7. The terminal image quality enhancement method according to claim 6, wherein the determining the maximum number of cycles I comprises:
detecting a calculation force space M which can be provided for an image quality enhancement algorithm by a current terminal;
judging whether M is greater than or equal to I2M bp Wherein, I2 is the maximum cycle number of the terminal supporting the cyclic use of the definition enhancing model under the ideal condition, M bp A computational space required for performing primary image quality enhancement on the image to be enhanced by using the definition enhancement model;
when M is greater than or equal to I2M bp When the number of the maximum circulation times is larger than I = I2;
when M is less than I2M bp In time, set the maximum number of cycles
Figure FDA0003955362650000031
Wherein the content of the first and second substances,
Figure FDA0003955362650000032
represent the pair M/M bp Rounded down.
8. The terminal image quality enhancement method according to claim 6, wherein when w is not equal to an integer multiple of 1/I, the method further comprises:
the difference coefficient w' is calculated according to the following formula: w' = w × I-J +1;
determining the output image as BP J-1 (P)+w′*(BP J (P)-BP J-1 (P)), wherein BP J-1 (P) the sharpness enhancement model at cycle J-1Output image of, BP J (P) is the output image of the sharpness enhancement model at cycle J.
9. The terminal image quality enhancement method according to claim 6, wherein the sharpness enhancement model comprises a first residual block, the first residual block comprises a first main branch, a first shortcut branch and a first adder, the first main branch and the first shortcut branch are both disposed between an input image and the first adder, and the first residual block is configured to sum the input image and the input image processed by the main branch for output; the first main branch comprises a down-sampling layer, a second residual block, a fifth truncation layer and a second up-sampling layer which are connected in sequence, wherein:
the down-sampling layer is configured to down-sample the input image to obtain a down-sampled image;
the second residual block includes a second main branch, a second shortcut branch, and a second adder, the second main branch and the second shortcut branch both disposed between the downsampling layer and the second adder, the second main branch including a plurality of second convolutional layers and a sixth truncation layer disposed between the plurality of second convolutional layers;
the fifth truncation layer is configured to limit the numerical value of the feature map output by the second residual block within a preset range;
the second up-sampling layer is configured to convert the feature map output by the fifth truncation layer into a high-resolution image.
10. The terminal image quality enhancement method according to claim 6, wherein the training process of the sharpness enhancement model comprises:
training by using z definition enhancement models which are connected in series and have the same structure and the same internal parameters, wherein 1<z is not more than I, loss of 1 to z definition enhancement models is calculated at the same time, and floating point type precision is adopted during training;
and quantizing the trained definition enhancement model into an integer definition enhancement model.
11. The terminal image quality enhancement method according to claim 1, wherein the image quality enhancement model comprises a super-resolution image model and a sharpness enhancement model, and the image quality enhancement parameters comprise a first image quality enhancement parameter s and a second image quality enhancement parameter w;
the method for determining the number of times J of the cycle of image quality enhancement by using an image quality enhancement model according to the image quality enhancement parameter of a user comprises the following steps: determining the cycle number J1= s of image quality enhancement by using the image super-resolution model; determining the maximum cycle number I of image quality enhancement by using the definition enhancement model, and dividing 0-100% into I equal parts, wherein the enhancement percentage corresponding to the ith equal part is A x 100%, wherein (I-1)/I < A is less than or equal to I/I, and I is a natural number between 1 and I; determining the number of equal parts corresponding to the second image quality enhancement parameter w as the cycle number J2 of image quality enhancement by using the definition enhancement model;
circularly using the image quality enhancement model to perform image quality enhancement on the image to be enhanced J times, wherein the image quality enhancement method comprises the following steps: circularly using the definition enhancement model to carry out image quality enhancement on the image to be enhanced J2 times, and outputting a first image quality enhancement picture; and recycling the image super-resolution model to perform image quality enhancement on the first image quality enhanced picture J1 times, and outputting a second image quality enhanced picture.
12. A terminal image quality enhancement device is characterized by comprising a memory; and a processor connected to the memory, the memory for storing instructions, the processor being configured to perform the steps of the terminal image quality enhancement method according to any one of claims 1 to 11 based on the instructions stored in the memory.
13. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the terminal image quality enhancement method according to any one of claims 1 to 11.
CN202211460861.9A 2022-11-17 2022-11-17 Terminal image quality enhancement method and device and computer readable storage medium Pending CN115760625A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211460861.9A CN115760625A (en) 2022-11-17 2022-11-17 Terminal image quality enhancement method and device and computer readable storage medium
PCT/CN2023/123375 WO2024104000A1 (en) 2022-11-17 2023-10-08 Terminal image quality enhancement method and device, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211460861.9A CN115760625A (en) 2022-11-17 2022-11-17 Terminal image quality enhancement method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115760625A true CN115760625A (en) 2023-03-07

Family

ID=85334457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211460861.9A Pending CN115760625A (en) 2022-11-17 2022-11-17 Terminal image quality enhancement method and device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN115760625A (en)
WO (1) WO2024104000A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024104000A1 (en) * 2022-11-17 2024-05-23 京东方科技集团股份有限公司 Terminal image quality enhancement method and device, and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021035629A1 (en) * 2019-08-29 2021-03-04 深圳市大疆创新科技有限公司 Method for acquiring image quality enhancement network, image quality enhancement method and apparatus, mobile platform, camera, and storage medium
KR102624027B1 (en) * 2019-10-17 2024-01-11 삼성전자주식회사 Image processing apparatus and method
CN113313650B (en) * 2021-06-09 2023-10-13 北京百度网讯科技有限公司 Image quality enhancement method, device, equipment and medium
CN115760625A (en) * 2022-11-17 2023-03-07 京东方科技集团股份有限公司 Terminal image quality enhancement method and device and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024104000A1 (en) * 2022-11-17 2024-05-23 京东方科技集团股份有限公司 Terminal image quality enhancement method and device, and computer readable storage medium

Also Published As

Publication number Publication date
WO2024104000A1 (en) 2024-05-23

Similar Documents

Publication Publication Date Title
CN111311629B (en) Image processing method, image processing device and equipment
CN110322400B (en) Image processing method and device, image processing system and training method thereof
CN110675404A (en) Image processing method, image processing apparatus, storage medium, and terminal device
WO2018205627A1 (en) Image processing system and method, and display apparatus
CN112862681A (en) Super-resolution method, device, terminal equipment and storage medium
CN111476719A (en) Image processing method, image processing device, computer equipment and storage medium
CN105900138B (en) Device, electronic equipment and method for enhancing image contrast
CN115760625A (en) Terminal image quality enhancement method and device and computer readable storage medium
CN111698508B (en) Super-resolution-based image compression method, device and storage medium
CN116547694A (en) Method and system for deblurring blurred images
CN113781318A (en) Image color mapping method and device, terminal equipment and storage medium
US20140092116A1 (en) Wide dynamic range display
CN116071279A (en) Image processing method, device, computer equipment and storage medium
CN111754406A (en) Image resolution processing method, device and equipment and readable storage medium
CN108230253B (en) Image restoration method and device, electronic equipment and computer storage medium
WO2020248706A1 (en) Image processing method, device, computer storage medium, and terminal
CN110136061B (en) Resolution improving method and system based on depth convolution prediction and interpolation
CN111953888B (en) Dim light imaging method and device, computer readable storage medium and terminal equipment
CN108629739B (en) HDR image generation method and device and mobile terminal
CN116739950A (en) Image restoration method and device, terminal equipment and storage medium
CN111724292A (en) Image processing method, device, equipment and computer readable medium
US11483577B2 (en) Processing of chroma-subsampled video using convolutional neural networks
CN114240750A (en) Video resolution improving method and device, storage medium and electronic equipment
CN114140348A (en) Contrast enhancement method, device and equipment
CN111383171B (en) Picture processing method, system and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination