Decoding and coding method, device and equipment
By using feature domain enhancement parameters and probability distribution parameters at the decoding and encoding ends for feature domain enhancement, the problem of insufficient encoding performance and decoding performance in the neural network encoding and decoding method is solved, and more efficient video image compression and lower complexity are achieved. Spend.
Patent Information
- Application Number
- CN202310445159.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2024-10-22
AI Technical Summary
The encoding and decoding method based on neural network has shortcomings in encoding performance and decoding performance, high complexity, and difficulty in effectively improving the compression efficiency of video images.
By using feature domain enhancement parameters and probability distribution parameters at the decoding end and encoding end respectively to perform feature domain enhancement and encoding, end-to-end compression of video images is achieved, encoding and decoding efficiency is improved, and complexity is reduced.
It improves the encoding performance and decoding performance, improves the quality of reconstructed images, reduces system complexity, and achieves more efficient video image compression.
Smart Images

Figure CN118828002A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of coding and decoding technology, and in particular to a decoding and coding method, device and equipment thereof. Background Art
[0002] In order to save space, video images are transmitted after being encoded. Complete video encoding can include prediction, transformation, quantization, entropy coding, filtering and other processes. For the prediction process, the prediction process can include intra-frame prediction and inter-frame prediction. Inter-frame prediction refers to the use of the correlation in the video time domain to use the pixels of the adjacent encoded images to predict the current pixel, so as to effectively remove the redundancy in the video time domain. Intra-frame prediction refers to the use of the correlation in the video space domain to use the pixels of the encoded blocks of the current frame image to predict the current pixel, so as to remove the redundancy in the video space domain.
[0003] With the rapid development of deep learning, deep learning has achieved success in many high-level computer vision problems, such as image classification and target detection. Deep learning has also gradually begun to be applied in the field of encoding and decoding, that is, neural networks can be used to encode and decode images. Although the encoding and decoding methods based on neural networks have shown great performance potential, they still have problems such as poor encoding performance, poor decoding performance and high complexity. Summary of the invention
[0004] In view of this, the present application provides a decoding and encoding method, device and equipment thereof to improve encoding performance and decoding performance.
[0005] The present application provides a decoding method, which is applied to a decoding end, and the method includes:
[0006] Decoding a first bitstream corresponding to a current image block to obtain coefficient hyperparameter features corresponding to the current image block;
[0007] Determine a probability distribution parameter based on the coefficient hyperparameter feature, and decode the second bitstream corresponding to the current image block based on the probability distribution parameter to obtain an initial reconstruction feature corresponding to the current image block;
[0008] Decoding a third bitstream corresponding to the current image block to obtain a feature domain enhancement parameter corresponding to the current image block;
[0009] The initial reconstruction feature is enhanced in the feature domain based on the feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature, and a target reconstructed image block corresponding to the current image block is determined based on the enhanced reconstruction feature.
[0010] The present application provides an encoding method, which is applied to an encoding end, and the method includes:
[0011] Encoding the coefficient hyper-parameter features corresponding to the current image block to obtain a first bitstream corresponding to the current image block;
[0012] Determine a probability distribution parameter based on the coefficient hyperparameter feature, and encode the initial image feature corresponding to the current image block based on the probability distribution parameter to obtain a second code stream corresponding to the current image block;
[0013] For each candidate feature domain enhancement parameter, based on the candidate feature domain enhancement parameter and the probability distribution parameter, the initial reconstructed feature is enhanced in the feature domain to obtain an enhanced reconstructed feature, a target reconstructed image block is determined based on the enhanced reconstructed feature, and a cost value corresponding to the candidate feature domain enhancement parameter is determined based on the target reconstructed image block;
[0014] Based on the cost value corresponding to each candidate feature domain enhancement parameter, a feature domain enhancement parameter corresponding to the current image block is selected from all candidate feature domain enhancement parameters, and the feature domain enhancement parameter is encoded to obtain a third code stream corresponding to the current image block.
[0015] The present application provides a decoding device, applied to a decoding end, the device comprising:
[0016] A decoding module, configured to decode a first bitstream corresponding to a current image block to obtain coefficient hyperparameter features corresponding to the current image block; determine probability distribution parameters based on the coefficient hyperparameter features, and decode a second bitstream corresponding to the current image block based on the probability distribution parameters to obtain initial reconstruction features corresponding to the current image block; and decode a third bitstream corresponding to the current image block to obtain feature domain enhancement parameters corresponding to the current image block;
[0017] A feature domain enhancement module, used to perform feature domain enhancement on the initial reconstruction feature based on the feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature;
[0018] A determination module is used to determine a target reconstructed image block corresponding to the current image block based on the enhanced reconstruction feature.
[0019] The present application provides an encoding device, applied to an encoding end, the device comprising:
[0020] An encoding module, configured to encode coefficient hyperparameter features corresponding to a current image block to obtain a first bitstream corresponding to the current image block; determine probability distribution parameters based on the coefficient hyperparameter features, and encode initial image features corresponding to the current image block based on the probability distribution parameters to obtain a second bitstream corresponding to the current image block;
[0021] A feature domain enhancement module is used to perform feature domain enhancement on the initial reconstruction feature based on each candidate feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature;
[0022] A determination module, configured to determine a target reconstructed image block based on the enhanced reconstruction feature, and determine a cost value corresponding to the candidate feature domain enhancement parameter based on the target reconstructed image block; and select a feature domain enhancement parameter corresponding to the current image block from all candidate feature domain enhancement parameters based on the cost value corresponding to each candidate feature domain enhancement parameter;
[0023] The encoding module is further used to encode the feature domain enhancement parameter to obtain a third code stream corresponding to the current image block.
[0024] The present application provides a decoding end device, the decoding end device comprising: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor;
[0025] The processor is used to execute machine executable instructions to implement the above decoding method.
[0026] The present application provides an encoding end device, the decoding end device comprising: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor;
[0027] The processor is used to execute machine executable instructions to implement the above encoding method.
[0028] The present application provides an electronic device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the above-mentioned decoding method; or, the processor is used to execute the machine-executable instructions to implement the above-mentioned encoding method.
[0029] The present application provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the above-mentioned decoding method is implemented; or, the above-mentioned encoding method is implemented.
[0030] It can be seen from the above technical scheme that in the embodiment of the present application, after obtaining the initial reconstruction feature corresponding to the current image block, the initial reconstruction feature can be enhanced in the feature domain based on the feature domain enhancement parameter and the probability distribution parameter to obtain the enhanced reconstruction feature, and the target reconstructed image block corresponding to the current image block is determined based on the enhanced reconstruction feature, thereby proposing an end-to-end video image compression method, which can realize the encoding and decoding of video images based on a neural network, and achieve the purpose of improving the encoding efficiency and decoding efficiency by combining the feature domain enhancement parameter and the probability distribution parameter. Combined with the network structure design and the header information code stream (such as the third code stream), the neural network effectively guarantees the quality of the reconstructed image block while maintaining low complexity, thereby achieving the purpose of improving the encoding performance and decoding performance, and reducing the complexity. The feature quality is enhanced by using the feature domain enhancement parameter and the probability distribution parameter. The encoding end does not directly change the feature information, but encodes the feature domain enhancement parameter into the header information code stream. The decoding end enhances the feature through the feature domain enhancement parameter, improves the encoding performance, and improves the quality of the reconstructed image. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a schematic diagram of a three-dimensional feature matrix in one embodiment of the present application;
[0032] Figure 2 is a flowchart of a decoding method in one embodiment of the present application;
[0033] Figure 3 It is a schematic diagram of a flow chart of an encoding method in one embodiment of the present application;
[0034] Figure 4 is a schematic diagram of a processing process of an encoding end in one implementation manner of the present application;
[0035] Figure 5 is a schematic diagram of a processing process of a decoding end in one embodiment of the present application;
[0036] Fig. 6A is a schematic diagram of the location of a feature domain enhancement module in one embodiment of the present application;
[0037] Figure 6B is a schematic diagram of the positions of a feature domain enhancement module and an image domain enhancement module in one embodiment of the present application;
[0038] Figure 6C is a schematic diagram of the location of an image domain enhancement module in one embodiment of the present application;
[0039] Fig. 7A is a hardware structure diagram of a decoding end device in one embodiment of the present application;
[0040] Figure 7BIt is a hardware structure diagram of an encoding end device in one implementation of the present application. DETAILED DESCRIPTION
[0041] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than for limiting the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items. It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information, depending on the context. In addition, the word "if" used can be interpreted as "at ... ", or "when ... ", or "in response to determination".
[0042] In the embodiments of the present application, a decoding method and an encoding method are proposed, which may involve the following concepts:
[0043] Entropy coding: Entropy coding is the coding process that does not lose any information according to the entropy principle. Information entropy is the average amount of information of the source (a measure of uncertainty). Entropy coding methods may include but are not limited to: Shannon coding, Huffman coding, and arithmetic coding.
[0044] Neural Network (NN): Neural network refers to artificial neural network. Neural network is a computing model composed of a large number of nodes (or neurons) connected to each other. In a neural network, neuron processing units can represent different objects, such as features, letters, concepts, or some meaningful abstract patterns. The types of processing units in a neural network can be divided into three categories: input units, output units, and hidden units. Input units receive signals and data from the outside world; output units realize the output of processing results; hidden units are units between input and output units and cannot be observed from outside the system. The connection weights between neurons reflect the connection strength between units, and the representation and processing of information are reflected in the connection relationship of processing units. Neural network is a non-programmed, brain-like information processing method. The essence of neural network is to obtain a parallel distributed information processing function through the transformation and dynamic behavior of neural network, and imitate the information processing function of human brain nervous system to different degrees and levels. In the field of video processing, commonly used neural networks may include but are not limited to: convolutional neural network (CNN), recurrent neural network (RNN), fully connected network, etc.
[0045] Convolutional Neural Network (CNN): Convolutional neural network is a feedforward neural network and one of the most representative network structures in deep learning technology. The artificial neurons of convolutional neural network can respond to surrounding units within a certain coverage range and have excellent performance in large-scale image processing. The basic structure of convolutional neural network includes two layers. One is the feature extraction layer (also called convolution layer). The input of each neuron is connected to the local receptive field of the previous layer and extracts the local features. Once the local feature is extracted, its positional relationship with other features is also determined. The second is the feature mapping layer (also called activation layer). Each computing layer of the neural network consists of multiple feature maps. Each feature map is a plane, and the weights of all neurons on the plane are equal. The feature mapping structure can use Sigmoid function, ReLU function, Leaky-ReLU function, PReLU function, GDN function, etc. as the activation function of the convolutional network. In addition, since the neurons on a mapping surface share weights, the number of free parameters of the network is reduced.
[0046] For example, one of the advantages of convolutional neural networks over image processing algorithms is that they avoid the complex pre-processing of images (extracting artificial features, etc.), and can directly input the original image for end-to-end learning. One of the advantages of convolutional neural networks over ordinary neural networks is that ordinary neural networks use a fully connected approach, that is, all neurons from the input layer to the hidden layer are connected, which will result in a huge number of parameters, making network training time-consuming or even difficult to train, while convolutional neural networks avoid this difficulty through local connections, weight sharing and other methods.
[0047] Deconvolution layer: Deconvolution layer is also called transposed convolution layer. The working process of deconvolution layer and convolution layer is very similar. The main difference is that deconvolution layer will make the output larger than the input through padding (of course, it can also remain the same). If stride is 1, it means that the output size is equal to the input size; if stride is N, it means that the width of the output feature is N times the width of the input feature, and the height of the output feature is N times the height of the input feature.
[0048] Generalization Ability: Generalization ability refers to the ability of a machine learning algorithm to adapt to fresh samples. The purpose of learning is to learn the rules hidden behind the data pairs. For data outside the learning set with the same rules, the trained network can also give appropriate outputs. This ability can be called generalization ability.
[0049] Feature: The feature involved in this application is a three-dimensional feature matrix or tensor of C*W*H, see Figure 1 As shown, it is a schematic diagram of a three-dimensional feature matrix, in which C represents the number of channels, H represents the feature height, and W represents the feature width. The three-dimensional feature matrix can be the input of a neural network, or the output of a neural network.
[0050] Rate-Distortion Optimized: There are two major indicators for evaluating coding efficiency: bit rate and PSNR (Peak Signal to Noise Ratio). The smaller the bit stream, the greater the compression rate, and the greater the PSNR, the better the quality of the reconstructed image. When selecting a mode, the discriminant formula is essentially a comprehensive evaluation of the two. For example, the cost corresponding to the mode: J(mode) = D + λ*R, where D represents Distortion, which can usually be measured using the SSE indicator. SSE refers to the mean square sum of the difference between the reconstructed image block and the source image. In order to achieve cost considerations, the SAD indicator can also be used. SAD refers to the sum of the absolute values of the difference between the reconstructed image block and the source image; λ is the Lagrange multiplier, and R is the actual number of bits required for encoding the image block in this mode, including the sum of bits required for encoding mode information, motion information, residuals, etc. When selecting a mode, if the rate-distortion principle is used to make a comparison decision on the encoding mode, the best encoding performance can usually be guaranteed.
[0051] A large number of coding tools have been proposed for each module of the encoding end, and each tool often has multiple modes. For different video sequences, the coding tools that can achieve the best coding performance are often different. Therefore, in the encoding process, RDO (Rate-Distortion Optimize) is usually used to compare the coding performance of different tools or modes to select the best mode. After determining the optimal tool or mode, the decision information of the tool or mode is transmitted by encoding the marker information in the bitstream. Although this method brings higher coding complexity, it can adaptively select the optimal mode combination for different content to obtain the best coding performance. The decoding end can obtain relevant mode information by directly parsing the flag information, and the complexity impact is small.
[0052] In the general framework of end-to-end image coding, it mainly includes the feature main information part and the super prior side information part. The feature main information part includes analysis network, quantization, normal entropy coding, normal entropy decoding and synthesis network, and the super prior side information includes super prior analysis network, quantization, factored entropy coding, factored entropy decoding and super prior synthesis network. The image component x is compressed and encoded and reconstructed and restored by the analysis network and synthesis network of the feature main information part respectively; the super prior side information part is mainly used to model the probability of the feature main information and guide the entropy coding and decoding of the feature main information. In the general framework of end-to-end image coding, there is a problem that the super prior side information is not fully utilized, and the image reconstruction quality is not fully improved.
[0053] In view of the above findings, in this embodiment, the characteristics of the end-to-end image coding framework are utilized, and the decoding end uses probability distribution parameters to enhance the quality of the features to improve the quality of the reconstructed image. The encoding end does not directly change the main information, but encodes the feature domain enhancement parameters into the header information bitstream (third bitstream), and the decoding end enhances the main information features through the feature domain enhancement parameters.
[0054] The decoding method and encoding method in the embodiments of the present application are described in detail below in combination with several specific embodiments.
[0055] Example 1: A decoding method is proposed in the embodiment of the present application, see Figure 2 As shown, it is a flowchart of the decoding method, which can be applied to a decoding end (also called a video decoder), and the method may include:
[0056] Step 201: decode the first bitstream corresponding to the current image block to obtain coefficient hyper-parameter features corresponding to the current image block.
[0057] Step 202: Determine a probability distribution parameter based on the coefficient hyperparameter feature, and decode the second code stream corresponding to the current image block based on the probability distribution parameter to obtain an initial reconstruction feature corresponding to the current image block.
[0058] Step 203: decode the third code stream corresponding to the current image block (the third code stream may also be referred to as the header information code stream corresponding to the current image block) to obtain the feature domain enhancement parameters corresponding to the current image block.
[0059] Step 204: Perform feature domain enhancement on the initial reconstructed features based on the feature domain enhancement parameters and the probability distribution parameters to obtain enhanced reconstructed features, and determine a target reconstructed image block corresponding to the current image block based on the enhanced reconstructed features.
[0060] Exemplarily, the feature domain enhancement parameters include important channel identifiers, the initial reconstruction features include C feature channel maps, the probability distribution parameters include C probability distribution channel maps, and the C probability distribution channel maps and C feature channels Figure 1 One by one, the feature channel map corresponding to the important channel identifier is selected from the C feature channel maps as the important feature channel map, and the remaining feature channel maps are selected as unimportant feature channel maps; the probability distribution channel map corresponding to the important feature channel map is selected as the important probability distribution channel map, and the probability distribution channel map corresponding to the unimportant feature channel map is selected as the unimportant probability distribution channel map.
[0061] Exemplarily, the initial reconstruction feature may include C feature channel maps, the probability distribution parameter may include C probability distribution channel maps, and the C probability distribution channel maps and the C feature channel maps may be Figure 1One to one correspondence, based on this, for each feature channel map, the number of consumed bits corresponding to the feature channel map can be determined based on the feature value in the feature channel map and the probability distribution value in the probability distribution channel map corresponding to the feature channel map; based on the number of consumed bits corresponding to each feature channel map, important feature channel maps are selected from the C feature channel maps, and the remaining feature channel maps are selected as unimportant feature channel maps; then, the probability distribution channel map corresponding to the important feature channel map is selected as the important probability distribution channel map, and the probability distribution channel map corresponding to the unimportant feature channel map is selected as the unimportant probability distribution channel map.
[0062] Exemplarily, the initial reconstructed features may include important feature channel maps and unimportant feature channel maps, and the probability distribution parameters may include important probability distribution channel maps corresponding to the important feature channel maps and unimportant probability distribution channel maps corresponding to the unimportant feature channel maps. The initial reconstructed features are feature-domain enhanced based on the feature domain enhancement parameters and the probability distribution parameters to obtain enhanced reconstructed features, which may include but are not limited to: performing feature-adaptive edge enhancement on the important feature channel map based on the feature domain enhancement parameters and the important probability distribution channel map to obtain a first reconstructed feature after feature-adaptive edge enhancement; performing feature-adaptive stretching on the unimportant feature channel map based on the feature domain enhancement parameters and the unimportant probability distribution channel map to obtain a second reconstructed feature after feature-adaptive stretching; and generating enhanced reconstruction features based on the first reconstructed features and the second reconstructed features.
[0063] Exemplarily, the feature domain enhancement parameters may include multiple edge enhancement segmentation strength values and multiple edge enhancement segmentation thresholds, the multiple edge enhancement segmentation thresholds may form multiple edge enhancement threshold intervals, and the multiple edge enhancement threshold intervals correspond one-to-one to the multiple edge enhancement segmentation strength values. On this basis, based on the feature domain enhancement parameters and the important probability distribution channel map, feature adaptive edge enhancement is performed on the important feature channel map to obtain the first reconstructed feature after feature adaptive edge enhancement, which may include but is not limited to: if the important probability distribution channel map includes multiple probability distribution values, then, for each probability distribution value, the edge enhancement segmentation strength value corresponding to the probability distribution value may be determined based on the edge enhancement threshold interval corresponding to the probability distribution value; then, based on the edge enhancement segmentation strength value corresponding to each probability distribution value, feature adaptive edge enhancement is performed on the important feature channel map to obtain the first reconstructed feature after feature adaptive edge enhancement.
[0064] Exemplarily, based on the edge enhancement segmented strength value corresponding to each probability distribution value, feature-adaptive edge enhancement is performed on the important feature channel map to obtain the first reconstructed feature after feature-adaptive edge enhancement, which may include but is not limited to: normalizing the important feature channel map to obtain a normalized feature map; generating a high-frequency detail image based on the important feature channel map and the normalized feature map; for each eigenvalue in the high-frequency detail image, edge enhancement is performed on the eigenvalue based on the edge enhancement segmented strength value corresponding to the probability distribution value corresponding to the eigenvalue to obtain an edge enhanced eigenvalue; based on the edge enhancement eigenvalue corresponding to each eigenvalue, an edge enhancement feature map is determined; and the edge enhancement feature map is denormalized to obtain the first reconstructed feature.
[0065] Exemplarily, the feature domain enhancement parameters may include stretching parameter values, and feature adaptive stretching is performed on the unimportant feature channel map based on the feature domain enhancement parameters and the unimportant probability distribution channel map to obtain a second reconstructed feature after feature adaptive stretching, which may include but is not limited to: if the unimportant feature channel map includes multiple eigenvalues, and the unimportant probability distribution channel map may include multiple probability distribution values, for each eigenvalue in the unimportant feature channel map, the stretched eigenvalue corresponding to the eigenvalue can be determined based on the eigenvalue, the stretching parameter value and the probability distribution value corresponding to the eigenvalue; then, the second reconstructed feature is determined based on the stretched eigenvalue corresponding to each eigenvalue in the unimportant feature channel map.
[0066] Exemplarily, determining the target reconstructed image block corresponding to the current image block based on the enhanced reconstruction feature may include but is not limited to: inputting the enhanced reconstruction feature to a synthetic transformation network to obtain the target reconstructed image block corresponding to the current image block. Alternatively, inputting the enhanced reconstruction feature to a synthetic transformation network to obtain an initial reconstructed image block corresponding to the current image block; performing image adaptive edge enhancement on the initial reconstructed image block based on the image domain enhancement parameters and probability distribution parameters corresponding to the current image block to obtain the target reconstructed image block corresponding to the current image block; wherein the image domain enhancement parameters are obtained by decoding the third code stream corresponding to the current image block, that is, decoding the third code stream to obtain the image domain enhancement parameters corresponding to the current image block.
[0067] Exemplarily, the image domain enhancement parameters may include multiple image enhancement segmentation intensity values and multiple image enhancement segmentation thresholds, and the multiple image enhancement segmentation thresholds may form multiple image enhancement threshold intervals, and the multiple image enhancement threshold intervals correspond one-to-one to the multiple image enhancement segmentation intensity values. Based on this, based on the image domain enhancement parameters and probability distribution parameters corresponding to the current image block, the initial reconstructed image block is image-adaptively enhanced at the edge to obtain the target reconstructed image block corresponding to the current image block, which may include but is not limited to: obtaining a target probability distribution channel map based on the probability distribution parameters; if the target probability distribution channel map includes multiple probability distribution values, for each probability distribution value, determining the image enhancement segmentation intensity value corresponding to the probability distribution value based on the image enhancement threshold interval corresponding to the probability distribution value; based on the image enhancement segmentation intensity value corresponding to each probability distribution value, the initial reconstructed image block is image-adaptively enhanced at the edge to obtain the target reconstructed image block corresponding to the current image block.
[0068] Exemplarily, obtaining a target probability distribution channel map based on probability distribution parameters may include, but is not limited to: if the probability distribution parameters include important probability distribution channel maps and unimportant probability distribution channel maps, then upsampling the important probability distribution channel map to obtain a target probability distribution channel map; the size of the target probability distribution channel map is the same as the size of the initial reconstructed image block.
[0069] Exemplarily, performing image adaptive edge enhancement on the initial reconstructed image block based on the image enhancement segmented intensity value corresponding to each probability distribution value to obtain a target reconstructed image block corresponding to the current image block may include but is not limited to: generating a high-frequency detail image based on the initial reconstructed image block; for each eigenvalue in the high-frequency detail image, performing edge enhancement on the eigenvalue based on the image enhancement segmented intensity value corresponding to the probability distribution value corresponding to the eigenvalue to obtain an image enhancement eigenvalue; and determining the target reconstructed image block based on the image enhancement eigenvalue corresponding to each eigenvalue in the high-frequency detail image.
[0070] Exemplarily, the feature domain enhancement of the initial reconstructed features based on the feature domain enhancement parameters and the probability distribution parameters to obtain the enhanced reconstructed features may include but is not limited to: the feature domain enhancement of the initial reconstructed features corresponding to the brightness component of the current image block based on the feature domain enhancement parameters and the probability distribution parameters to obtain the enhanced reconstructed features corresponding to the brightness component. The image-adaptive edge enhancement of the initial reconstructed image block based on the image domain enhancement parameters and the probability distribution parameters corresponding to the current image block to obtain the target reconstructed image block corresponding to the current image block may include but is not limited to: the image-adaptive edge enhancement of the initial reconstructed image block corresponding to the brightness component of the current image block based on the image domain enhancement parameters and the probability distribution parameters to obtain the target reconstructed image block corresponding to the brightness component; the image-adaptive edge enhancement of the initial reconstructed image block corresponding to the chrominance component of the current image block based on the image domain enhancement parameters and the probability distribution parameters to obtain the target reconstructed image block corresponding to the chrominance component.
[0071] Exemplarily, the above execution order is only for the convenience of describing the examples given. In practical applications, the execution order between the steps can also be changed, and there is no limitation on this execution order. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.
[0072] It can be seen from the above technical scheme that in the embodiment of the present application, after obtaining the initial reconstruction feature corresponding to the current image block, the initial reconstruction feature can be enhanced in the feature domain based on the feature domain enhancement parameter and the probability distribution parameter to obtain the enhanced reconstruction feature, and the target reconstructed image block corresponding to the current image block is determined based on the enhanced reconstruction feature, thereby proposing an end-to-end video image compression method, which can realize the encoding and decoding of video images based on a neural network, and achieve the purpose of improving the encoding efficiency and decoding efficiency by combining the feature domain enhancement parameter and the probability distribution parameter. Combined with the network structure design and the header information code stream (such as the third code stream), the neural network effectively guarantees the quality of the reconstructed image block while maintaining low complexity, thereby achieving the purpose of improving the encoding performance and decoding performance, and reducing the complexity. The feature quality is enhanced by using the feature domain enhancement parameter and the probability distribution parameter. The encoding end does not directly change the feature information, but encodes the feature domain enhancement parameter into the header information code stream. The decoding end enhances the feature through the feature domain enhancement parameter, improves the encoding performance, and improves the quality of the reconstructed image.
[0073] Example 2: This application proposes an encoding method, see Figure 3As shown, it is a schematic diagram of the process of the encoding method, which can be applied to an encoding end (also called a video encoder), and the method may include:
[0074] Step 301: Encode the coefficient hyperparameter features corresponding to the current image block to obtain a first code stream corresponding to the current image block.
[0075] Step 302: Determine probability distribution parameters based on coefficient hyperparameter features, and encode initial image features corresponding to the current image block based on the probability distribution parameters to obtain a second code stream corresponding to the current image block.
[0076] Step 303: For each candidate feature domain enhancement parameter, the initial reconstructed feature is enhanced in the feature domain based on the candidate feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstructed feature, a target reconstructed image block is determined based on the enhanced reconstructed feature, and a cost value corresponding to the candidate feature domain enhancement parameter is determined based on the target reconstructed image block.
[0077] Step 304: based on the cost value corresponding to each candidate feature domain enhancement parameter, select the feature domain enhancement parameter corresponding to the current image block from all candidate feature domain enhancement parameters, encode the feature domain enhancement parameter, and obtain a third code stream corresponding to the current image block (the third code stream may also be referred to as the header information code stream corresponding to the current image block).
[0078] Exemplarily, the initial reconstructed features include important feature channel maps and unimportant feature channel maps, and the probability distribution parameters include important probability distribution channel maps corresponding to the important feature channel maps and unimportant probability distribution channel maps corresponding to the unimportant feature channel maps. The initial reconstructed features are enhanced in the feature domain based on the candidate feature domain enhancement parameters and the probability distribution parameters to obtain enhanced reconstructed features, which may include but are not limited to: performing feature adaptive edge enhancement on the important feature channel map based on the candidate feature domain enhancement parameters and the important probability distribution channel map to obtain a first reconstructed feature after feature adaptive edge enhancement; performing feature adaptive stretching on the unimportant feature channel map based on the candidate feature domain enhancement parameters and the unimportant probability distribution channel map to obtain a second reconstructed feature after feature adaptive stretching; and generating an enhanced reconstruction feature based on the first reconstructed feature and the second reconstructed feature.
[0079] Exemplarily, determining the target reconstructed image block based on the enhanced reconstruction feature may include, but is not limited to: inputting the enhanced reconstruction feature into the synthesis transformation network to obtain an initial reconstructed image block corresponding to the current image block; for each candidate image domain enhancement parameter, performing image adaptive edge enhancement on the initial reconstructed image block based on the candidate image domain enhancement parameter and the probability distribution parameter to obtain a target reconstructed image block corresponding to the current image block. On this basis, for each candidate image domain enhancement parameter, a cost value corresponding to the candidate image domain enhancement parameter may also be determined based on the target reconstructed image block; based on the cost value corresponding to each candidate image domain enhancement parameter, an image domain enhancement parameter corresponding to the current image block is selected from all candidate image domain enhancement parameters, and the image domain enhancement parameter is encoded to obtain a third code stream corresponding to the current image block.
[0080] Exemplarily, the processing process of the encoding end is similar to the processing process of the decoding end, and the similarities are not repeated here. The processing process of the decoding end can be applied to the encoding end, that is, the encoding end adopts the same processing method.
[0081] Exemplarily, the above execution order is only for the convenience of describing the examples given. In practical applications, the execution order between the steps can also be changed, and there is no limitation on this execution order. Moreover, in other embodiments, the steps of the corresponding method are not necessarily executed in the order shown and described in this specification, and the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; multiple steps described in this specification may also be combined into a single step for description in other embodiments.
[0082] It can be seen from the above technical scheme that in the embodiment of the present application, after obtaining the initial reconstruction feature corresponding to the current image block, the initial reconstruction feature can be enhanced in the feature domain based on the feature domain enhancement parameter and the probability distribution parameter to obtain the enhanced reconstruction feature, and the target reconstructed image block corresponding to the current image block is determined based on the enhanced reconstruction feature, thereby proposing an end-to-end video image compression method, which can realize the encoding and decoding of video images based on a neural network, and achieve the purpose of improving the encoding efficiency and decoding efficiency by combining the feature domain enhancement parameter and the probability distribution parameter. Combined with the network structure design and the header information code stream (such as the third code stream), the neural network effectively guarantees the quality of the reconstructed image block while maintaining low complexity, thereby achieving the purpose of improving the encoding performance and decoding performance, and reducing the complexity. The feature quality is enhanced by using the feature domain enhancement parameter and the probability distribution parameter. The encoding end does not directly change the feature information, but encodes the feature domain enhancement parameter into the header information code stream. The decoding end enhances the feature through the feature domain enhancement parameter, improves the encoding performance, and improves the quality of the reconstructed image.
[0083] Embodiment 3: For Embodiment 1 and Embodiment 2, the processing process of the encoding end can be seen in Figure 4 As shown, of course, Figure 4 This is just an example of the processing process at the encoding end, and there is no limitation on the processing process at the encoding end.
[0084] After obtaining the current image block x (the current image block x may be the original image block x, i.e., the input image block), the encoder may analyze and transform the current image block x through an analysis transformation network (i.e., a neural network) to obtain an image feature y corresponding to the current image block x. Among them, performing feature transformation on the current image block x through the analysis transformation network means: transforming the current image block x to an image feature y in the latent domain, thereby facilitating all subsequent processes to operate on the latent domain.
[0085] The image can be divided into one image block or multiple image blocks. If the image is divided into one image block, the current image block x can also be an image, that is, the encoding and decoding process for the image block can also be directly used for the image.
[0086] After obtaining the image feature y, the encoding end performs coefficient hyperparameter feature transformation on the image feature y to obtain coefficient hyperparameter feature z. For example, the image feature y can be input into a hyperparameter encoding network (i.e., a neural network), and the hyperparameter encoding network performs coefficient hyperparameter feature transformation on the image feature y to obtain coefficient hyperparameter feature z. The hyperparameter encoding network can be a trained neural network, and there is no restriction on the training process of the hyperparameter encoding network, as long as the coefficient hyperparameter feature transformation can be performed on the image feature y. The image feature y in the latent domain obtains the super prior latent information z after passing through the hyperparameter encoding network.
[0087] After obtaining the coefficient hyperparameter feature z, the encoder can quantize the coefficient hyperparameter feature z to obtain the hyperparameter quantization feature corresponding to the coefficient hyperparameter feature z, that is, Figure 4 The Q operation in is the quantization process. After obtaining the hyperparameter quantization feature corresponding to the coefficient hyperparameter feature z, the hyperparameter quantization feature is encoded to obtain Bitstream#1 (i.e., the first bitstream) corresponding to the current image block, i.e. Figure 4 The AE operation in represents the encoding process, such as the entropy encoding process. Alternatively, the encoding end can also directly encode the coefficient hyperparameter feature z to obtain the Bitstream#1 corresponding to the current image block. Among them, the hyperparameter quantization feature or coefficient hyperparameter feature z carried in Bitstream#1 is mainly used to obtain the parameters of the mean and probability distribution model.
[0088] After obtaining the Bitstream#1 corresponding to the current image block, the encoder may send the Bitstream#1 corresponding to the current image block to the decoder. For the processing process of the decoder for the Bitstream#1 corresponding to the current image block, refer to the subsequent embodiments.
[0089] After obtaining the Bitstream#1 corresponding to the current image block, the encoder can also decode Bitstream#1 to obtain the hyperparameter quantization feature, that is, Figure 4 AD in it represents the decoding process. Then, the hyperparameter quantization feature is dequantized to obtain the coefficient hyperparameter feature z_hat. The coefficient hyperparameter feature z_hat can be the same as or different from the coefficient hyperparameter feature z. Figure 4 The IQ operation in is the inverse quantization process. Alternatively, after obtaining the Bitstream#1 corresponding to the current image block, the encoder can also decode the Bitstream#1 to obtain the coefficient hyperparameter feature z_hat without involving the inverse quantization process of the coefficient hyperparameter feature z_hat.
[0090] For the encoding process of Bitstream#1, the encoding method of the fixed probability density model can be adopted, and for the decoding process of Bitstream#1, the decoding method of the fixed probability density model can be adopted. There is no restriction on this encoding and decoding process.
[0091] After obtaining the coefficient hyperparameter feature z_hat, the encoding end can perform context-based prediction based on the coefficient hyperparameter feature z_hat of the current image block and the reconstruction feature y_hat of the previous image block (the determination process of the reconstruction feature y_hat is described in the subsequent embodiments) to obtain the prediction value mu (i.e., mean mu) corresponding to the current image block. For example, the coefficient hyperparameter feature z_hat and the reconstruction feature y_hat are input to the mean prediction network, and the mean prediction network determines the prediction value mu based on the coefficient hyperparameter feature z_hat and the reconstruction feature y_hat. There is no restriction on this prediction process. Among them, for the context-based prediction process, the input includes the coefficient hyperparameter feature z_hat and the decoded reconstruction feature y_hat, and the two are jointly input to obtain a more accurate prediction value mu. The prediction value mu is used to obtain the residual r_hat by subtracting from the original feature and the decoded residual is added to obtain the reconstructed feature y_hat.
[0092] It should be noted that the mean prediction network is an optional neural network, that is, there is no mean prediction network, that is, there is no need to determine the predicted value mu through the mean prediction network. Figure 4 The dashed box in indicates that the mean prediction network is optional.
[0093] After obtaining the image feature y, the encoder can determine the residual feature r based on the image feature y and the prediction value mu, such as taking the difference between the image feature y and the prediction value mu as the residual feature r. Then, the residual feature r is feature processed to obtain the image feature s. There is no restriction on this feature processing process, and it can be any feature processing method. In this case, it is necessary to deploy a mean prediction network, and the mean prediction network provides the prediction value mu. Alternatively, after obtaining the image feature y, the encoder can perform feature processing on the image feature y to obtain the image feature s. There is no restriction on this feature processing process, and it can be any feature processing method. In this case, there is no need to deploy a mean prediction network, and the dotted box indicates that the residual process is an optional process.
[0094] After obtaining the image feature s, the encoder can quantize the image feature s to obtain the image quantization feature corresponding to the image feature s, that is, Figure 4 The Q operation in is the quantization process. After obtaining the image quantization feature corresponding to the image feature s, the encoding end can encode the image quantization feature to obtain Bitstream#2 (i.e., the second bitstream) corresponding to the current image block, i.e. Figure 4 The AE operation in represents an encoding process, such as an entropy encoding process. Alternatively, the encoding end may directly encode the image feature s to obtain Bitstream#2 corresponding to the current image block without involving the quantization process of the image feature s.
[0095] After obtaining Bitstream#2 corresponding to the current image block, the encoder may send Bitstream#2 corresponding to the current image block to the decoder. For the processing of Bitstream#2 corresponding to the current image block by the decoder, refer to the subsequent embodiments.
[0096] After obtaining the Bitstream#2 corresponding to the current image block, the encoder can also decode Bitstream#2 to obtain the image quantization feature, that is, Figure 4 AD in the figure represents the decoding process. Then, the encoder can dequantize the image quantization feature to obtain the image feature s'. The image feature s' can be the same as or different from the image feature s. Figure 4 The IQ operation in is the inverse quantization process. Alternatively, after obtaining the Bitstream#2 corresponding to the current image block, the encoder can also decode the Bitstream#2 to obtain the image feature s' without involving the inverse quantization process of the image quantization feature.
[0097] After obtaining the image feature s', the encoder can perform feature recovery (i.e., the inverse process of feature processing) on the image feature s'. There is no restriction on this feature recovery process, and it can be any feature recovery method to obtain the residual feature r_hat. The residual feature r_hat and the residual feature r can be the same or different. After obtaining the residual feature r_hat, the encoder determines the image feature y_hat (i.e., the reconstructed feature) based on the residual feature r_hat and the prediction value mu. The image feature y_hat is the same or different from the image feature y. For example, the sum of the residual feature r_hat and the prediction value mu is used as the image feature y_hat. In this case, it is necessary to deploy a mean prediction network, and the mean prediction network provides the prediction value mu. Alternatively, after obtaining the image feature s', the encoder performs feature recovery (i.e., the inverse process of feature processing) on the image feature s' to obtain the image feature y_hat. The image feature y_hat and the image feature y can be the same or different. In this case, it is not necessary to deploy a mean prediction network, and the dotted box indicates that the residual process is an optional process.
[0098] After obtaining the image feature y_hat, the encoding end can perform a synthetic transformation on the image feature y_hat to obtain a reconstructed image block x_hat corresponding to the current image block x. For example, the image feature y_hat is input into the synthetic transformation network, and the synthetic transformation network performs a synthetic transformation on the image feature y_hat to obtain the reconstructed image block x_hat. At this point, the image reconstruction process is completed.
[0099] In a possible implementation, when the encoding end encodes the image quantization feature or the image feature s to obtain the Bitstream#2 corresponding to the current image block, the encoding end needs to first determine the probability distribution model, and then encode the image quantization feature or the image feature s based on the probability distribution model. In addition, when the encoding end decodes Bitstream#2, it also needs to first determine the probability distribution model, and then decode Bitstream#2 based on the probability distribution model.
[0100] To obtain the probability distribution model, continue to refer to Figure 4 As shown, after obtaining the coefficient hyperparameter feature z_hat, the encoding end can perform a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat to obtain the probability distribution parameter. For example, the coefficient hyperparameter feature z_hat is input to the probability hyperparameter decoding network, and the probability hyperparameter decoding network performs a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat to obtain the probability distribution parameter sigma. After obtaining the probability distribution parameter, a probability distribution model can be generated based on the probability distribution parameter. Among them, the probability hyperparameter decoding network can be a trained neural network, and there is no restriction on the training process of this probability hyperparameter decoding network, and it is sufficient to be able to perform a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat.
[0101] In a possible implementation, the processing process at the encoding end may be performed by a deep learning model or a neural network model, thereby realizing an end-to-end image compression and encoding process, without any limitation on the encoding process.
[0102] Embodiment 4: For Embodiment 1 and Embodiment 2, the processing process of the decoding end can be seen in Figure 5 As shown, of course, Figure 5 This is just an example of the processing process at the decoding end, and there is no limitation on the processing process at the decoding end.
[0103] After obtaining the Bitstream#1 corresponding to the current image block, the decoding end can also decode Bitstream#1 to obtain the hyperparameter quantization feature, that is, Figure 5 AD in it represents the decoding process. Then, the hyperparameter quantization feature is dequantized to obtain the coefficient hyperparameter feature z_hat. The coefficient hyperparameter feature z_hat can be the same as or different from the coefficient hyperparameter feature z. Figure 5 The IQ operation in is the inverse quantization process. Alternatively, after obtaining the Bitstream#1 corresponding to the current image block, the decoder can also decode the Bitstream#1 to obtain the coefficient hyperparameter feature z_hat without involving the inverse quantization process of the coefficient hyperparameter feature z_hat.
[0104] For the decoding process of Bitstream#1, a decoding method of a fixed probability density model may be used, and there is no restriction on this.
[0105] The image can be divided into one image block or multiple image blocks. If the image is divided into one image block, the current image block x can also be an image, that is, the decoding process for the image block can also be directly used for the image.
[0106] After obtaining the coefficient hyperparameter feature z_hat, the decoding end can perform context-based prediction based on the coefficient hyperparameter feature z_hat of the current image block and the reconstruction feature y_hat of the previous image block (the determination process of the reconstruction feature y_hat is shown in the subsequent embodiments) to obtain the prediction value mu (i.e., mean mu) corresponding to the current image block. For example, the coefficient hyperparameter feature z_hat and the reconstruction feature y_hat are input to the mean prediction network, and the mean prediction network determines the prediction value mu based on the coefficient hyperparameter feature z_hat and the reconstruction feature y_hat. There is no restriction on this prediction process. Among them, for the context-based prediction process, the input includes the coefficient hyperparameter feature z_hat and the decoded reconstruction feature y_hat, and the two are jointly input to obtain a more accurate prediction value mu.
[0107] It should be noted that the mean prediction network is an optional neural network, that is, there is no mean prediction network, that is, there is no need to determine the predicted value mu through the mean prediction network. Figure 5 The dashed box in indicates that the mean prediction network is optional.
[0108] After obtaining the Bitstream#2 corresponding to the current image block, the decoding end can also decode Bitstream#2 to obtain the image quantization feature, that is, Figure 5 AD in the figure represents the decoding process. Then, the decoding end can dequantize the image quantization feature to obtain the image feature s'. The image feature s' can be the same as or different from the image feature s. Figure 5 The IQ operation in is the inverse quantization process. Alternatively, after obtaining the Bitstream#2 corresponding to the current image block, the decoder can also decode the Bitstream#2 to obtain the image feature s' without involving the inverse quantization process of the image quantization feature.
[0109] After obtaining the image feature s', the decoder can perform feature recovery on the image feature s' (i.e., the inverse process of feature processing) to obtain the residual feature r_hat, which is the same as or different from the residual feature r. After obtaining the residual feature r_hat, the decoder determines the image feature y_hat (i.e., the reconstructed feature) based on the residual feature r_hat and the prediction value mu. The image feature y_hat is the same as or different from the image feature y, such as taking the sum of the residual feature r_hat and the prediction value mu as the image feature y_hat. In this case, it is necessary to deploy a mean prediction network, which provides the prediction value mu. Alternatively, after obtaining the image feature s', the decoder can perform feature recovery on the image feature s' to obtain the image feature y_hat, which is the same as or different from the image feature y. In this case, there is no need to deploy a mean prediction network, and the dotted box indicates that the residual process is an optional process.
[0110] After obtaining the image feature y_hat, the decoding end can perform a synthetic transformation on the image feature y_hat to obtain a reconstructed image block x_hat corresponding to the current image block x. For example, the image feature y_hat is input into the synthetic transformation network, and the synthetic transformation network performs a synthetic transformation on the image feature y_hat to obtain the reconstructed image block x_hat. At this point, the image reconstruction process is completed.
[0111] In a possible implementation, when decoding Bitstream#2, the decoding end needs to first determine the probability distribution model, and then decode Bitstream#2 based on the probability distribution model. To obtain the probability distribution model, continue to refer to Figure 5As shown, after obtaining the coefficient hyperparameter feature z_hat, the decoding end can perform a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat to obtain the probability distribution parameter sigma. For example, the coefficient hyperparameter feature z_hat is input into the probability hyperparameter decoding network, and the probability hyperparameter decoding network performs a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat to obtain the probability distribution parameter. After obtaining the probability distribution parameter, a probability distribution model can be generated based on the probability distribution parameter. Among them, the probability hyperparameter decoding network can be a trained neural network, and there is no restriction on the training process of this probability hyperparameter decoding network. It can perform a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat to obtain the probability distribution parameter.
[0112] In a possible implementation, the processing process at the above decoding end can be performed by a deep learning model or a neural network model, thereby realizing an end-to-end image compression and encoding process, without limiting the decoding process.
[0113] Example 5: Based on Example 3 and Example 4, a feature domain enhancement module can be added before the synthesis transformation network, see Fig. 6A As shown, the input feature of the feature domain enhancement module can be the image feature y_hat (hereinafter referred to as the initial reconstruction feature y_hat), and the output feature of the feature domain enhancement module can be the enhanced reconstruction feature y_hat_enhanced. The enhanced reconstruction feature y_hat_enhanced is input to the synthesis transformation network, and the synthesis transformation network performs a synthesis transformation on the enhanced reconstruction feature y_hat_enhanced to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0114] For the encoding end: After obtaining the current image block x, the current image block x is analyzed and transformed through the analysis transformation network to obtain the image feature y corresponding to the current image block x. The image feature y is subjected to coefficient hyperparameter feature transformation through the hyperparameter coding network to obtain the coefficient hyperparameter feature z. The coefficient hyperparameter feature corresponding to the current image block (which can be the coefficient hyperparameter feature z itself or the hyperparameter quantization feature of the coefficient hyperparameter feature z) is encoded to obtain the first code stream corresponding to the current image block.
[0115] The first bitstream corresponding to the current image block is decoded to obtain the coefficient hyperparameter feature z_hat corresponding to the current image block (e.g., the coefficient hyperparameter feature z_hat itself is decoded from the first bitstream, or the hyperparameter quantization feature is decoded from the first bitstream, and the hyperparameter quantization feature is dequantized to obtain the coefficient hyperparameter feature z_hat). Then, the coefficient hyperparameter feature z_hat is inversely transformed through the probability hyperparameter decoding network to obtain the probability distribution parameter sigma.
[0116] Based on the probability distribution parameter sigma, the initial image feature corresponding to the current image block is encoded (the initial image feature can be the image feature y, or the residual feature r corresponding to the image feature y, or the image feature s after feature processing of the image feature y or the residual feature r, or the image quantization feature corresponding to the image feature y, or the residual feature r, or the image feature s, and there is no restriction on this initial image feature) to obtain a second code stream corresponding to the current image block.
[0117] The second bitstream corresponding to the current image block is decoded based on the probability distribution parameter sigma to obtain the initial reconstruction feature y_hat corresponding to the current image block. For example, if the initial image feature is the image feature y, the initial reconstruction feature y_hat is decoded from the second bitstream. If the initial image feature is the image quantization feature corresponding to the image feature y, the image quantization feature is decoded from the second bitstream, and the image quantization feature is dequantized to obtain the initial reconstruction feature y_hat. For another example, if the initial image feature is the residual feature r corresponding to the image feature y, the residual feature r_hat is decoded from the second bitstream, and the initial reconstruction feature y_hat is determined based on the residual feature r_hat and the predicted value mu. If the initial image feature is the image quantization feature corresponding to the residual feature r, the image quantization feature is decoded from the second bitstream, and the image quantization feature is dequantized to obtain the residual feature r_hat, and the initial reconstruction feature y_hat is determined based on the residual feature r_hat and the predicted value mu. If the initial image feature is the image feature y or the image feature s corresponding to the residual feature r, the image feature s' is decoded from the second bitstream, and the image feature s' is restored to obtain the initial reconstructed feature y_hat or the residual feature r_hat. If the residual feature r_hat is obtained, the initial reconstructed feature y_hat can also be determined based on the residual feature r_hat and the predicted value mu. If the initial image feature is the image quantization feature corresponding to the image feature s, the image quantization feature is decoded from the second bitstream, and the image quantization feature is dequantized to obtain the image feature s'. The image feature s' is restored to obtain the initial reconstructed feature y_hat or the residual feature r_hat. If the residual feature r_hat is obtained, the initial reconstructed feature y_hat can also be determined based on the residual feature r_hat and the predicted value mu.
[0118] After obtaining the initial reconstructed feature y_hat, the initial reconstructed feature y_hat can be input into the feature domain enhancement module, which performs feature domain enhancement on the initial reconstructed feature y_hat to obtain the enhanced reconstructed feature y_hat_enhanced, and the enhanced reconstructed feature y_hat_enhanced is input into the synthesis transformation network, which performs synthesis transformation on the enhanced reconstructed feature y_hat_enhanced to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0119] For the decoding end: decode the first bitstream corresponding to the current image block to obtain the coefficient hyperparameter feature z_hat corresponding to the current image block (such as decoding the coefficient hyperparameter feature z_hat itself from the first bitstream, or decoding the hyperparameter quantization feature from the first bitstream, and dequantizing the hyperparameter quantization feature to obtain the coefficient hyperparameter feature z_hat). Then, perform a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat through the probability hyperparameter decoding network to obtain the probability distribution parameter sigma.
[0120] Based on the probability distribution parameter sigma, the second code stream corresponding to the current image block is decoded to obtain the initial reconstruction feature y_hat corresponding to the current image block. For example, the initial reconstruction feature y_hat is decoded from the second code stream. Alternatively, the image quantization feature is decoded from the second code stream, and the image quantization feature is dequantized to obtain the initial reconstruction feature y_hat. For another example, the residual feature r_hat is decoded from the second code stream, and the initial reconstruction feature y_hat is determined based on the residual feature r_hat and the predicted value mu. Alternatively, the image quantization feature is decoded from the second code stream, and the image quantization feature is dequantized to obtain the residual feature r_hat, and the initial reconstruction feature y_hat is determined based on the residual feature r_hat and the predicted value mu. For another example, the image feature s' is decoded from the second code stream, and the image feature s' is feature restored to obtain the initial reconstruction feature y_hat or the residual feature r_hat. If the residual feature r_hat is obtained, the initial reconstruction feature y_hat can also be determined based on the residual feature r_hat and the predicted value mu. Alternatively, the image quantization feature is decoded from the second bit stream, and the image quantization feature is dequantized to obtain the image feature s', and the image feature s' is restored to obtain the initial reconstructed feature y_hat or the residual feature r_hat. If the residual feature r_hat is obtained, the initial reconstructed feature y_hat can also be determined based on the residual feature r_hat and the predicted value mu.
[0121] After obtaining the initial reconstructed feature y_hat, the initial reconstructed feature y_hat can be input into the feature domain enhancement module, which performs feature domain enhancement on the initial reconstructed feature y_hat to obtain the enhanced reconstructed feature y_hat_enhanced, and the enhanced reconstructed feature y_hat_enhanced is input into the synthesis transformation network, which performs synthesis transformation on the enhanced reconstructed feature y_hat_enhanced to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0122] Example 6: Based on Example 3 and Example 4, a feature domain enhancement module can be added before the synthetic transformation network, and an image domain enhancement module can be added after the synthetic transformation network. Figure 6B As shown, the input feature of the feature domain enhancement module is the initial reconstructed feature y_hat, and the output feature of the feature domain enhancement module can be the enhanced reconstructed feature y_hat_enhanced. The enhanced reconstructed feature y_hat_enhanced can be input to the synthesis transformation network, and the synthesis transformation network performs a synthesis transformation on the enhanced reconstructed feature y_hat_enhanced to obtain the initial reconstructed image block x_hat corresponding to the current image block x. The input feature of the image domain enhancement module can be the initial reconstructed image block x_hat, and the output feature of the image domain enhancement module can be the target reconstructed image block x_hat_enhanced, that is, the image domain enhancement module can perform image domain enhancement on the initial reconstructed image block x_hat, so as to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0123] For the encoding end: the current image block x is analyzed and transformed through the analysis transformation network to obtain the image feature y corresponding to the current image block x. The image feature y is subjected to coefficient hyperparameter feature transformation through the hyperparameter coding network to obtain the coefficient hyperparameter feature z. The coefficient hyperparameter feature corresponding to the current image block is encoded to obtain the first code stream corresponding to the current image block. The first code stream corresponding to the current image block is decoded to obtain the coefficient hyperparameter feature z_hat corresponding to the current image block, and the coefficient hyperparameter feature z_hat is inversely transformed through the probability hyperparameter decoding network to obtain the probability distribution parameter sigma. Based on the probability distribution parameter sigma, the initial image feature corresponding to the current image block is encoded to obtain the second code stream corresponding to the current image block. Based on the probability distribution parameter sigma, the second code stream corresponding to the current image block is decoded to obtain the initial reconstruction feature y_hat corresponding to the current image block. Among them, the above process can be referred to Example 5, which will not be repeated here.
[0124] After obtaining the initial reconstructed feature y_hat, the initial reconstructed feature y_hat can be input into the feature domain enhancement module, which performs feature domain enhancement on the initial reconstructed feature y_hat to obtain the enhanced reconstructed feature y_hat_enhanced, and the enhanced reconstructed feature y_hat_enhanced is input into the synthesis transformation network, which performs synthesis transformation on the enhanced reconstructed feature y_hat_enhanced to obtain the initial reconstructed image block x_hat corresponding to the current image block x.
[0125] After obtaining the initial reconstructed image block x_hat corresponding to the current image block x, the image domain enhancement module may perform image domain enhancement on the initial reconstructed image block x_hat to obtain a target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0126] For the decoding end: decode the first bitstream corresponding to the current image block to obtain the coefficient hyperparameter feature z_hat corresponding to the current image block, and perform a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat through the probability hyperparameter decoding network to obtain the probability distribution parameter sigma. Based on the probability distribution parameter sigma, decode the second bitstream corresponding to the current image block to obtain the initial reconstruction feature y_hat corresponding to the current image block. The above process can be referred to Example 5, which will not be repeated here.
[0127] After obtaining the initial reconstructed feature y_hat, the initial reconstructed feature y_hat can be input into the feature domain enhancement module, which performs feature domain enhancement on the initial reconstructed feature y_hat to obtain the enhanced reconstructed feature y_hat_enhanced, and the enhanced reconstructed feature y_hat_enhanced is input into the synthesis transformation network, which performs synthesis transformation on the enhanced reconstructed feature y_hat_enhanced to obtain the initial reconstructed image block x_hat corresponding to the current image block x.
[0128] After obtaining the initial reconstructed image block x_hat corresponding to the current image block x, the image domain enhancement module may perform image domain enhancement on the initial reconstructed image block x_hat to obtain a target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0129] Example 7: Based on Example 3 and Example 4, an image domain enhancement module can be added after the synthesis transformation network, see Figure 6CAs shown, the input feature of the image domain enhancement module is the initial reconstructed image block x_hat, and the output feature of the image domain enhancement module is the target reconstructed image block x_hat_enhanced. That is to say, the image domain enhancement module can perform image domain enhancement on the initial reconstructed image block x_hat to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0130] For the encoding end: the current image block x is analyzed and transformed through the analysis transformation network to obtain the image feature y corresponding to the current image block x. The image feature y is subjected to coefficient hyperparameter feature transformation through the hyperparameter coding network to obtain the coefficient hyperparameter feature z. The coefficient hyperparameter feature corresponding to the current image block is encoded to obtain the first code stream corresponding to the current image block. The first code stream corresponding to the current image block is decoded to obtain the coefficient hyperparameter feature z_hat corresponding to the current image block, and the coefficient hyperparameter feature z_hat is inversely transformed through the probability hyperparameter decoding network to obtain the probability distribution parameter sigma. Based on the probability distribution parameter sigma, the initial image feature corresponding to the current image block is encoded to obtain the second code stream corresponding to the current image block. Based on the probability distribution parameter sigma, the second code stream corresponding to the current image block is decoded to obtain the initial reconstruction feature y_hat corresponding to the current image block. Among them, the above process can be referred to Example 5, which will not be repeated here.
[0131] After obtaining the initial reconstructed feature y_hat, the initial reconstructed feature y_hat can be input to the synthesis transformation network, and the synthesis transformation network performs synthesis transformation on the initial reconstructed feature y_hat to obtain the initial reconstructed image block x_hat corresponding to the current image block x. After obtaining the initial reconstructed image block x_hat corresponding to the current image block x, the image domain enhancement module can perform image domain enhancement on the initial reconstructed image block x_hat to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0132] For the decoding end: decode the first bitstream corresponding to the current image block to obtain the coefficient hyperparameter feature z_hat corresponding to the current image block, and perform a coefficient hyperparameter feature inverse transformation on the coefficient hyperparameter feature z_hat through the probability hyperparameter decoding network to obtain the probability distribution parameter sigma. Based on the probability distribution parameter sigma, decode the second bitstream corresponding to the current image block to obtain the initial reconstruction feature y_hat corresponding to the current image block. The above process can be referred to Example 5, which will not be repeated here.
[0133] After obtaining the initial reconstructed feature y_hat, the initial reconstructed feature y_hat can be input to the synthesis transformation network, which performs a synthesis transformation on the initial reconstructed feature y_hat to obtain the initial reconstructed image block x_hat corresponding to the current image block x. After obtaining the initial reconstructed image block x_hat corresponding to the current image block x, the image domain enhancement module can perform image domain enhancement on the initial reconstructed image block x_hat to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x.
[0134] Example 8: In Example 5 and Example 6, the initial reconstructed feature y_hat is input into the feature domain enhancement module, and the feature domain enhancement module performs feature domain enhancement on the initial reconstructed feature y_hat to obtain an enhanced reconstructed feature y_hat_enhanced. For example, the initial reconstructed feature y_hat can be enhanced in the feature domain based on the feature domain enhancement parameters and probability distribution parameters sigma corresponding to the current image block to obtain the enhanced reconstructed feature y_hat_enhanced. The feature domain enhancement can include feature adaptive edge enhancement and feature adaptive stretching. The probability distribution parameter sigma is used to assist in calculation, determine the channels that require feature adaptive edge enhancement and the channels that require feature adaptive stretching, and determine the strength of the stretching. The process is described below.
[0135] The initial reconstruction feature y_hat is C L xH L xW L The three-dimensional tensor, C L is the number of channels of the initial reconstructed feature y_hat (i.e., the number of channels in the feature domain and the number of channels in the Latent domain), H L is the feature height of the initial reconstructed feature y_hat (i.e., the feature height of the feature domain and the feature height of the Latent domain), W L is the feature width of the initial reconstructed feature y_hat (i.e., the feature width of the feature domain and the feature width of the Latent domain). For each channel of the initial reconstructed feature y_hat, take channel ch as an example, ch can be [1, 2, ..., C L ], the shape of channel ch is H L xW L The two-dimensional tensor y_hat_ch of C is called the feature channel map. Therefore, the initial reconstruction feature y_hat can include C L Feature channel map.
[0136] The probability distribution parameter sigma is also C L xH L xW L The three-dimensional tensor, C Lis the number of channels of the probability distribution parameter sigma, H L is the characteristic height of the probability distribution parameter sigma, W L is the characteristic width of the probability distribution parameter sigma. For each channel of the probability distribution parameter sigma, take channel ch as an example, ch can be [1, 2, ..., C L ], the shape of channel ch is H L xW L The two-dimensional tensor sigma_ch is called the probability distribution channel map, so the probability distribution parameter sigma can include C L probability distribution channel graph, and C L The probability distribution channel diagram and C L Feature Channels Figure 1 One-to-one correspondence, such as the first probability distribution channel map corresponds to the first feature channel map, the second probability distribution channel map corresponds to the second feature channel map, and so on. L The probability distribution channel diagram and the C L The feature channel map corresponds to
[0137] For C L feature channel map, C L The feature channel maps are divided into important feature channel maps and unimportant feature channel maps. There can be at least one important feature channel map and multiple unimportant feature channel maps. For example, C L At least one feature channel map is selected from the feature channel maps as an important feature channel map, and the remaining feature channel maps are selected as unimportant feature channel maps. L The probability distribution channel diagram and C L Feature Channels Figure 1 One-to-one correspondence, therefore, the probability distribution channel map corresponding to the important feature channel map can be selected as the important probability distribution channel map, and the probability distribution channel map corresponding to the unimportant feature channel map can be selected as the unimportant probability distribution channel map. For example, if the first feature channel map is an important feature channel map, the first probability distribution channel map corresponding to the first feature channel map is selected as the important probability distribution channel map.
[0138] In summary, the initial reconstructed feature y_hat may include an important feature channel map and an unimportant feature channel map, and the probability distribution parameter sigma may include an important probability distribution channel map corresponding to the important feature channel map and an unimportant probability distribution channel map corresponding to the unimportant feature channel map. For the important feature channel map, the important feature channel map may be feature-adaptively edge enhanced based on the feature domain enhancement parameters and the important probability distribution channel map to obtain a first reconstructed feature after feature-adaptive edge enhancement. For the unimportant feature channel map, the unimportant feature channel map may be feature-adaptively stretched based on the feature domain enhancement parameters and the unimportant probability distribution channel map to obtain a second reconstructed feature after feature-adaptive stretching. On this basis, an enhanced reconstructed feature y_hat_enhanced may be generated based on the first reconstructed feature and the second reconstructed feature.
[0139] For example, assuming that the feature channel Figure 1 is an important feature channel map, feature channel Figure 2 - Feature Channel Figure 4 is a non-important feature channel map, probability distribution channel Figure 1 It is an important probability distribution channel diagram, probability distribution channel Figure 2 -Probability distribution channel Figure 4 For non-important probability distribution channel graphs, then: the parameters and probability distribution channels can be enhanced based on the feature domain Figure 1 For feature channels Figure 1 Perform feature adaptive edge enhancement to obtain the first reconstructed feature 1 (i.e., the reconstructed feature of the first channel) after feature adaptive edge enhancement. Figure 2 For feature channels Figure 2 The feature is adaptively stretched to obtain the second reconstructed feature 2 (i.e., the reconstructed feature of the second channel) after the feature adaptive stretching. The feature domain enhancement parameters and probability distribution channels can be Figure 3 For feature channels Figure 3 The feature is adaptively stretched to obtain the second reconstructed feature 3 after the feature adaptive stretching. The feature domain enhancement parameters and probability distribution channels can be Figure 4 For feature channels Figure 4 The feature is adaptively stretched to obtain the second reconstruction feature 4 after feature adaptive stretching. Then, the first reconstruction feature 1, the second reconstruction feature 2, the second reconstruction feature 3 and the second reconstruction feature 4 can be combined according to the channel (such as splicing according to the channel), that is, the reconstruction features of the four channels are combined to obtain the enhanced reconstruction feature y_hat_enhanced.
[0140] Embodiment 9: In embodiment 8, it is necessary to replace C L The feature channel maps are divided into important feature channel maps and unimportant feature channel maps. For example, C is divided into important feature channel maps and unimportant feature channel maps in the following way.L The feature channel maps are divided into important feature channel maps and unimportant feature channel maps:
[0141] Method 1: The encoder encodes the important channel identifier in the third bitstream corresponding to the current image block, and the decoder decodes the important channel identifier from the third bitstream corresponding to the current image block, and the important channel identifier is used as a feature domain enhancement parameter.
[0142] For example, the encoding end will C L The feature channel map is divided into important feature channel maps and unimportant feature channel maps, and there is no restriction on this process. The important channel identifier (also called important channel number, recorded as important_channel) is encoded in the third bitstream corresponding to the current image block. After receiving the third bitstream, the decoding end decodes the important channel identifier from the third bitstream and obtains the important channel identifier from C L Among the feature channel maps, the feature channel map corresponding to the important channel identifier is selected as the important feature channel map, and the remaining feature channel maps are selected as unimportant feature channel maps, the probability distribution channel map corresponding to the important feature channel map is selected as the important probability distribution channel map, and the probability distribution channel map corresponding to the unimportant feature channel map is selected as the unimportant probability distribution channel map.
[0143] Among them, the encoding end is C L When the feature channel graphs are divided into important feature channel graphs and unimportant feature channel graphs, the feature values in each feature channel graph and the probability distribution values in each probability distribution channel graph can be used to obtain the feature channel graphs from C. L The important feature channel maps are selected from the feature channel maps, and the remaining feature channel maps are selected as unimportant feature channel maps.
[0144] Method 2: For both the encoding end and the decoding end, based on the feature values in each feature channel map and the probability distribution values in each probability distribution channel map, L Select the important feature channel maps from the feature channel maps.
[0145] For example, for each feature channel map, the number of consumed bits corresponding to the feature channel map can be determined based on the feature value in the feature channel map and the probability distribution value in the probability distribution channel map corresponding to the feature channel map. For example, the number of consumed bits corresponding to the feature channel map can be determined using the following expression, which is, of course, only an example.
[0146]
[0147] In the above expression, bits_per_ch is used to represent the number of consumed bits corresponding to the feature channel graph ch, y_hat_ch(i,j) is used to represent the eigenvalue of the feature point (i,j) in the feature channel graph ch, sigma_ch(i,j) is used to represent the probability distribution value of the feature point (i,j) in the probability distribution channel graph ch, and Φ(.) is the standard normal distribution cumulative function.
[0148] After performing the above processing on each feature channel map, the number of consumed bits corresponding to each feature channel map can be obtained. Based on the number of consumed bits corresponding to each feature channel map, it can be obtained from C L An important feature channel map is selected from the feature channel maps. For example, the feature channel map consuming the largest number of bits is selected as the important feature channel map, or K feature channel maps consuming a large number of bits are selected as the important feature channel maps, where K can be a positive integer greater than 1.
[0149] In from C L After selecting important feature channel maps from the feature channel maps, the remaining feature channel maps can be selected as unimportant feature channel maps, the probability distribution channel map corresponding to the important feature channel map can be selected as the important probability distribution channel map, and the probability distribution channel map corresponding to the unimportant feature channel map can be selected as the unimportant probability distribution channel map.
[0150] Method 3: For both the encoding and decoding ends, the bit rate consumption corresponding to each feature channel map is calculated from C L For example, based on the consumed bit rate corresponding to each feature channel map, C L The feature channel maps are sorted, and the top K feature channel maps are selected as important feature channel maps. Alternatively, based on the consumed bit rate corresponding to each feature channel map, the C feature channel maps can be sorted in order of the consumed bit rate from small to large. L The feature channel maps are sorted, and the K feature channel maps with the lowest sorting order are selected as important feature channel maps.
[0151] In from C L After selecting important feature channel maps from the feature channel maps, the remaining feature channel maps can be selected as unimportant feature channel maps, the probability distribution channel map corresponding to the important feature channel map can be selected as the important probability distribution channel map, and the probability distribution channel map corresponding to the unimportant feature channel map can be selected as the unimportant probability distribution channel map.
[0152] Method 4: For both the encoding end and the decoding end, the default feature channel map (i.e., the fixed feature channel map) is used as the important feature channel map. For example, the first feature channel map is pre-agreed as the important feature channel map, or the sixth feature channel map is pre-agreed as the important feature channel map, or the tenth feature channel map is pre-agreed as the important feature channel map. Of course, any feature channel map can be used as the important feature channel map without limitation.
[0153] Example 10: In Example 8, feature adaptive edge enhancement is performed on the important feature channel map based on the feature domain enhancement parameters and the important probability distribution channel map to obtain the first reconstructed feature. The feature adaptive edge enhancement process is described below.
[0154] Exemplarily, the feature domain enhancement parameters may include multiple edge enhancement segment strength values and multiple edge enhancement segment thresholds. For example, the encoder encodes multiple edge enhancement segment strength values and multiple edge enhancement segment thresholds in the third bitstream corresponding to the current image block, and the decoder decodes the multiple edge enhancement segment strength values and multiple edge enhancement segment thresholds from the third bitstream corresponding to the current image block, and the multiple edge enhancement segment strength values and multiple edge enhancement segment thresholds are used as feature domain enhancement parameters.
[0155] The number of edge enhancement segment strength values and the number of edge enhancement segment thresholds may be the same or different, taking the case where the two are the same as an example. The encoding end may also encode the number of edge enhancement segment strength values (or edge enhancement segment thresholds) in the third bitstream corresponding to the current image block, and the decoding end decodes the number of edge enhancement segment strength values from the third bitstream corresponding to the current image block, taking the case where the number of edge enhancement segment strength values is n as an example. The n edge enhancement segment strength values may be recorded as magl-1, magl-2, ..., magl-n, and the n edge enhancement segment thresholds may be recorded as thrl-1, thrl-2, ..., thrl-n.
[0156] Exemplarily, multiple edge enhancement segmentation thresholds may form multiple edge enhancement threshold intervals, and the multiple edge enhancement threshold intervals correspond one-to-one to the multiple edge enhancement segmentation strength values. See Table 1 for an example of the corresponding relationship.
[0157] Table 1
[0158] Edge enhancement threshold range Edge enhancement segment strength value Less than thrl-1 1 (no edge increase) [thrl-1, thrl-2) magl-1 [thrl-2, thrl-3) magl-2 [thrl-3, thrl-4) magl-3 … … [thrl-(n-1),thrl-n) magl-(n-1) Greater than or equal to thrl-n magl-n
[0159] Exemplarily, the important probability distribution channel map may include multiple probability distribution values. For each probability distribution value, the edge enhancement threshold interval corresponding to the probability distribution value is first determined, and the edge enhancement segment strength value corresponding to the probability distribution value is determined based on the edge enhancement threshold interval. For example, if the probability distribution value is within [thrl-2, thrl-3), the edge enhancement segment strength value corresponding to the probability distribution value is magl-2. If the probability distribution value is within [thrl-3, thrl-4), the edge enhancement segment strength value corresponding to the probability distribution value is magl-3, and so on. After obtaining the edge enhancement segment strength value corresponding to each probability distribution value, feature adaptive edge enhancement can be performed on the important feature channel map based on the edge enhancement segment strength value corresponding to each probability distribution value to obtain the first reconstructed feature after feature adaptive edge enhancement.
[0160] For example, the following steps can be used to perform feature adaptive edge enhancement on important feature channel maps:
[0161] Step S11, normalizing the important feature channel map to obtain a normalized feature map.
[0162] Exemplarily, normalization can be performed based on the important feature channel map, the mean feature corresponding to the important feature channel map, and the variance feature corresponding to the important feature channel map to obtain a normalized feature map. For example, the important channel feature map can be subtracted from the mean feature and then divided by the variance feature to obtain a normalized feature map. For another example, the important channel feature map can be subtracted from the mean feature and then divided by the variance feature to obtain an intermediate feature, and then the intermediate feature is converted to obtain a normalized feature map, such as multiplying the intermediate feature by 0.1 and adding 0.5 (0.1 and 0.5 are both examples), and then limiting the feature value to be between 0 and 1. Of course, the above are just a few examples of normalizing the important feature channel map, and there is no limitation on this normalization method.
[0163] Step S12: Generate a high-frequency detail image based on the important feature channel map and the normalized feature map.
[0164] Exemplarily, a convolution operation (such as a two-dimensional convolution operation) can be performed on the normalized feature map and a Gaussian blur convolution kernel (which can be a 3*3 convolution kernel or a convolution kernel of other sizes, and there is no limitation on this convolution kernel) to obtain a Gaussian blur image, and then the Gaussian blur image is subtracted from the important feature channel map to obtain a high-frequency detail image. Of course, the above is only an example of generating a high-frequency detail image, and there is no limitation on this as long as the high-frequency details of the important feature channel map can be obtained.
[0165] Step S13: for each eigenvalue in the high-frequency detail image, edge enhancement is performed on the eigenvalue based on the edge enhancement segment strength value corresponding to the probability distribution value corresponding to the eigenvalue to obtain an edge enhancement eigenvalue.
[0166] Exemplarily, the important feature channel map includes multiple eigenvalues, the important probability distribution channel map includes multiple probability distribution values, and the multiple probability distribution values correspond one-to-one to the multiple eigenvalues. Since the high-frequency detail image includes multiple eigenvalues (corresponding one-to-one to the multiple eigenvalues of the important feature channel map), the multiple probability distribution values of the important probability distribution channel map correspond one-to-one to the multiple eigenvalues of the high-frequency detail image. Based on this, for each eigenvalue in the high-frequency detail image, the probability distribution value corresponding to the eigenvalue can be determined from the important probability distribution channel map, and the edge enhancement threshold interval corresponding to the probability distribution value can be determined. Based on the edge enhancement threshold interval, the edge enhancement segmented strength value corresponding to the probability distribution value is determined.
[0167] After obtaining the edge enhancement segment strength value corresponding to the probability distribution value, the eigenvalue can be edge enhanced based on the edge enhancement segment strength value to obtain an edge enhancement eigenvalue, such as multiplying the eigenvalue by the edge enhancement segment strength value (such as magl-1, magl-2, etc.) to obtain an edge enhancement eigenvalue. Obviously, if the edge enhancement threshold interval is "less than thrl-1", the eigenvalue is multiplied by 1, that is, the eigenvalue is kept unchanged and the eigenvalue is not edge enhanced. If the edge enhancement threshold interval is [thrl-1, thrl-2), the eigenvalue is multiplied by magl-1, magl-1 is a value greater than 1, so that the eigenvalue is edge enhanced. Similarly, other edge enhancement segment strength values such as magl-2 are greater than 1, and edge enhancement can be achieved.
[0168] For each eigenvalue in the high-frequency detail image, the above method can be used to obtain the edge enhancement segment strength value corresponding to the eigenvalue, and then the edge enhancement feature map can be determined based on the edge enhancement eigenvalue corresponding to each eigenvalue. For example, the edge enhancement segment strength values corresponding to all eigenvalues can be combined to obtain an edge enhancement feature map.
[0169] Step S14: Denormalize the edge enhancement feature map to obtain a first reconstruction feature (ie, a first reconstruction feature map). The first reconstruction feature is a reconstruction feature map after feature adaptive edge enhancement is performed on the important feature channel map.
[0170] After obtaining the edge enhancement feature map, the edge enhancement feature map can be directly denormalized to obtain the first reconstructed feature. Alternatively, after obtaining the edge enhancement feature map, the edge enhancement feature map can be added to the normalized feature map to obtain a modified edge enhancement feature map, and the modified edge enhancement feature map can be denormalized to obtain the first reconstructed feature.
[0171] Exemplarily, the edge enhanced normalized feature map can be determined based on the edge enhanced feature map, and the first reconstruction feature can be determined based on the edge enhanced normalized feature map, the mean feature corresponding to the edge enhanced normalized feature map, and the variance feature corresponding to the edge enhanced normalized feature map. The first reconstruction feature can also be called y_hat_sharp.
[0172] For example, the edge enhancement feature map can be transformed to obtain a normalized feature map after edge enhancement. For example, the eigenvalues in the edge enhancement feature map are first limited to between 0 and 1, and then the eigenvalues in the edge enhancement feature map are subtracted by 0.5 and divided by 10 (0.5 and 10 are both examples) to obtain the normalized feature map after edge enhancement.
[0173] The normalized feature map after edge enhancement is multiplied by the variance feature, and then the mean feature is added to obtain the edge-enhanced feature map corresponding to the important feature channel map. The edge-enhanced feature map is recorded as the first reconstructed feature y_hat_sharp.
[0174] Of course, the above is only an example of denormalizing the edge enhancement feature map, and there is no limitation on the denormalization method.
[0175] In a possible implementation manner, the encoder needs to encode multiple edge enhancement segment strength values and multiple edge enhancement segment thresholds in the third bitstream corresponding to the current image block. For this process, the encoder may adopt the following method:
[0176] The encoding end can configure multiple candidate feature domain enhancement parameters. For each candidate feature domain enhancement parameter, the candidate feature domain enhancement parameter may include multiple edge enhancement segment strength values and multiple edge enhancement segment thresholds. The cost value corresponding to each candidate feature domain enhancement parameter can be determined. Based on the cost value corresponding to each candidate feature domain enhancement parameter, the feature domain enhancement parameter corresponding to the current image block can be selected from all candidate feature domain enhancement parameters, that is, the candidate feature domain enhancement parameter with the smallest cost value. The encoding end can encode the feature domain enhancement parameter to obtain a third code stream corresponding to the current image block.
[0177] For example, for each candidate feature domain enhancement parameter, the initial reconstructed feature can be enhanced in the feature domain based on the candidate feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstructed feature. The feature domain enhancement process is described in the above embodiment. The target reconstructed image block x_hat_enhanced is determined based on the enhanced reconstruction feature. The cost value corresponding to the candidate feature domain enhancement parameter is determined based on the target reconstructed image block x_hat_enhanced. There is no restriction on the method for determining this cost value.
[0178] For example, for each candidate feature domain enhancement parameter, the candidate feature domain enhancement parameter includes magl-1, magl-2, ..., magl-n, thrl-1, thrl-2, ..., thrl-n, based on the candidate feature domain enhancement parameter, the enhanced reconstruction feature can be obtained, and then the target reconstructed image block x_hat_enhanced is obtained, and the distortion index is used to calculate the distortion index value of the target reconstructed image block x_hat_enhanced and the current image block x. After obtaining the distortion index value corresponding to each candidate feature domain enhancement parameter, the candidate feature domain enhancement parameter corresponding to the minimum distortion index value can be selected as the feature domain enhancement parameter corresponding to the current image block, that is, the optimal feature domain enhancement parameter, and the encoding end encodes the feature domain enhancement parameter in the third bitstream.
[0179] Example 11: In Example 8, it is necessary to perform feature adaptive stretching on the unimportant feature channel map based on the feature domain enhancement parameters and the unimportant probability distribution channel map (i.e., the unimportant probability distribution channel map corresponding to the unimportant feature channel map) to obtain the second reconstructed feature after feature adaptive stretching. The feature adaptive stretching process is described below.
[0180] Exemplarily, the feature domain enhancement parameter may include a stretching parameter value. For example, the encoding end may encode the stretching parameter value in the third code stream corresponding to the current image block, and the decoding end may decode the stretching parameter value from the third code stream corresponding to the current image block. The stretching parameter value is used as the feature domain enhancement parameter, and the stretching parameter value may be denoted as ρ.
[0181] Exemplarily, the non-important feature channel map may include multiple eigenvalues, and the non-important probability distribution channel map corresponding to the non-important feature channel map may include multiple probability distribution values, and the multiple probability distribution values correspond to the multiple eigenvalues one-to-one. Based on this, for each eigenvalue in the non-important feature channel map, the stretched eigenvalue corresponding to the eigenvalue can be determined based on the eigenvalue, the stretching parameter value and the probability distribution value corresponding to the eigenvalue. For example, the stretched eigenvalue corresponding to the eigenvalue can be determined by using the following expression. Of course, the following expression is only an example and is not limited to this.
[0182] y_hat_scale=y_hat+ρ*clip3(sigma*y_hat,-0.5,0.5)
[0183] In the above expression, y_hat_scale represents the stretched eigenvalue, y_hat represents the eigenvalue in the unimportant feature channel map, ρ represents the stretching parameter value, sigma represents the probability distribution value in the unimportant probability distribution channel map, and the probability distribution value sigma corresponds to the eigenvalue y_hat, clip3 is a limit operation, which is used to limit sigma*y_hat between -0.5 and 0.5. -0.5 and 0.5 are configurable values and are not restricted. For example, when sigma*y_hat is less than -0.5, sigma*y_hat is limited to -0.5. When sigma*y_hat is greater than 0.5, sigma*y_hat is limited to 0.5. Other values remain unchanged.
[0184] After performing the above processing on each eigenvalue in the non-important feature channel map, the stretched eigenvalue corresponding to each eigenvalue can be obtained, and then the second reconstruction feature (i.e., the second reconstruction feature map) is determined based on the stretched eigenvalue corresponding to each eigenvalue. The second reconstruction feature is a reconstructed feature map after feature adaptive stretching of the non-important feature channel map. For example, the stretched eigenvalues corresponding to all eigenvalues are combined to obtain the second reconstruction feature. The second reconstruction feature is also called y_hat_scale.
[0185] The second reconstructed feature y_hat_scale corresponds to the unimportant feature channel map of the initial reconstructed feature y_hat, that is, the unimportant feature channel map is enhanced to obtain the second reconstructed feature y_hat_scale, the first reconstructed feature y_hat_sharp corresponds to the important feature channel map of the initial reconstructed feature y_hat, that is, the important feature channel map is enhanced to obtain the first reconstructed feature y_hat_sharp, and the second reconstructed feature y_hat_scale and the first reconstructed feature y_hat_sharp are merged to obtain the enhanced reconstructed feature y_hat_enhanced.
[0186] In a possible implementation, the encoding end needs to encode the stretching parameter value in the third code stream corresponding to the current image block. For this process, the encoding end can adopt the following method: the encoding end can configure multiple candidate stretching parameter values, and can determine the cost value corresponding to each candidate stretching parameter value. Based on the cost value corresponding to each candidate stretching parameter value, the stretching parameter value corresponding to the current image block can be selected from all candidate stretching parameter values, that is, the candidate stretching parameter value with the smallest cost value. The encoding end can encode the stretching parameter value to obtain the third code stream corresponding to the current image block.
[0187] For example, for each candidate stretching parameter value, feature adaptive stretching can be performed on the non-important feature channel map based on the candidate stretching parameter value and the non-important probability distribution channel map to obtain a second reconstruction feature after feature adaptive stretching, and then an enhanced reconstruction feature is obtained based on the second reconstruction feature, and a target reconstructed image block x_hat_enhanced is determined based on the enhanced reconstruction feature, and a cost value corresponding to the candidate stretching parameter value is determined based on the target reconstructed image block x_hat_enhanced.
[0188] For example, for each candidate stretch parameter value, an enhanced reconstruction feature can be obtained based on the candidate stretch parameter value, and then the target reconstructed image block x_hat_enhanced is obtained, and the distortion index is used to calculate the distortion index value of the target reconstructed image block x_hat_enhanced and the current image block x. After obtaining the distortion index value corresponding to each candidate stretch parameter value, the encoder can select the candidate stretch parameter value corresponding to the minimum distortion index value as the stretch parameter value corresponding to the current image block, that is, the optimal stretch parameter value, and the encoder can encode the stretch parameter value in the third bitstream.
[0189] In another possible implementation, the encoding end configures multiple candidate feature domain enhancement parameters, and for each candidate feature domain enhancement parameter, the candidate feature domain enhancement parameter includes multiple edge enhancement segment strength values, multiple edge enhancement segment thresholds and a stretching parameter value, determines the cost value corresponding to each candidate feature domain enhancement parameter, and based on the cost value corresponding to each candidate feature domain enhancement parameter, selects the feature domain enhancement parameter corresponding to the current image block from all candidate feature domain enhancement parameters, that is, the candidate feature domain enhancement parameter with the smallest cost value, and the encoding end encodes the feature domain enhancement parameter (that is, multiple edge enhancement segment strength values, multiple edge enhancement segment thresholds and a stretching parameter value) to obtain a third bitstream corresponding to the current image block. For example, for each candidate feature domain enhancement parameter, the initial reconstructed feature is enhanced in the feature domain based on the candidate feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstructed feature, determines the target reconstructed image block x_hat_enhanced based on the enhanced reconstructed feature, and determines the cost value corresponding to the candidate feature domain enhancement parameter based on the target reconstructed image block x_hat_enhanced.
[0190] Example 12: In Example 6 and Example 7, the initial reconstructed image block x_hat is input into the image domain enhancement module, and the image domain enhancement module performs image domain enhancement on the initial reconstructed image block x_hat to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x. For example, image adaptive edge enhancement can be performed on the initial reconstructed image block x_hat based on the image domain enhancement parameters and probability distribution parameters sigma corresponding to the current image block to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block. The image adaptive edge enhancement process is described below.
[0191] Exemplarily, the image domain enhancement parameters may include multiple image enhancement segment strength values and multiple image enhancement segment thresholds. For example, the encoding end encodes multiple image enhancement segment strength values and multiple image enhancement segment thresholds in the third bitstream corresponding to the current image block, and the decoding end decodes multiple image enhancement segment strength values and multiple image enhancement segment thresholds from the third bitstream corresponding to the current image block, and the multiple image enhancement segment strength values and multiple image enhancement segment thresholds are used as image domain enhancement parameters.
[0192] The number of image enhancement segmentation strength values and the number of image enhancement segmentation thresholds may be the same or different, taking the case where the two are the same as an example. The encoding end may also encode the number of image enhancement segmentation strength values (or image enhancement segmentation thresholds) in the third bitstream corresponding to the current image block, and the decoding end decodes the number of image enhancement segmentation strength values from the third bitstream corresponding to the current image block. Taking the number of image enhancement segmentation strength values as m as an example, the m image enhancement segmentation strength values are recorded as magy-1, magy-2, ..., magy-m, and the m image enhancement segmentation thresholds are recorded as thry-1, thry-2, ..., thry-m.
[0193] Exemplarily, multiple image enhancement segmentation thresholds may form multiple image enhancement threshold intervals, and the multiple image enhancement threshold intervals correspond one-to-one to the multiple image enhancement segmentation strength values. See Table 2 for an example of the correspondence.
[0194] Table 2
[0195] Image enhancement threshold range Image enhancement segment intensity value Less than thry-1 1 (no edge increase) [thry-1, thry-2) magy-1 [thry-2, thry-3) magy-2 [thry-3, thry-4) magy-3 … … [thry-(m-1), thry-m) magy-(m-1) Greater than or equal to thry-m magy-m
[0196] Exemplarily, the following steps may be used to perform image adaptive edge enhancement on the initial reconstructed image block x_hat:
[0197] Step S21, obtaining a target probability distribution channel map based on probability distribution parameters.
[0198] The initial reconstructed image block x_hat is a two-dimensional tensor of H×W, where H is the image height of the initial reconstructed image block x_hat and W is the image width of the initial reconstructed image block x_hat. The probability distribution parameter sigma is C L xH L xW L The three-dimensional tensor, C L is the number of channels of the probability distribution parameter sigma, H L is the characteristic height of the probability distribution parameter sigma, W L is the characteristic width of the probability distribution parameter sigma. The image height H of the initial reconstructed image block x_hat can be greater than the characteristic height H of the probability distribution parameter sigma. L , such as the image height H is the feature height H L 4 times, 8 times, 16 times, etc. The image width W of the initial reconstructed image block x_hat may be greater than the characteristic width W of the probability distribution parameter sigma L , such as the image width W is the feature width W L 4 times, 8 times, 16 times, etc.
[0199] In order to perform image adaptive edge enhancement on the initial reconstructed image block x_hat using probability distribution parameters, it is necessary to obtain a target probability distribution channel map based on the probability distribution parameters. The target probability distribution channel map is a two-dimensional tensor of H×W.
[0200] For example, from C L Select a probability distribution channel graph from the probability distribution channel graphs. Since the probability distribution parameter sigma includes an important probability distribution channel graph (one) and an unimportant probability distribution channel graph (multiple), we can select a probability distribution channel graph from C L Select an important probability distribution channel diagram from the probability distribution channel diagram, or select an important probability distribution channel diagram from C L A non-important probability distribution channel graph is selected from the probability distribution channel graphs, and the following description will be given by taking the selection of an important probability distribution channel graph as an example.
[0201] Then, the important probability distribution channel map is upsampled to obtain a target probability distribution channel map. There is no restriction on the upsampling method, and the size of the target probability distribution channel map can be the same as the size of the initial reconstructed image block x_hat.
[0202] For example, the nearest neighbor upsampling method can be used to upsample the important probability distribution channel map to obtain the target probability distribution channel map. For the nearest neighbor upsampling method, a pixel can be selected on the original low-resolution image (i.e., the important probability distribution channel map) as the center point of the corresponding area on the target high-resolution image (i.e., the target probability distribution channel map). The value of the pixel closest to the pixel on the original low-resolution image is used as the value of the corresponding pixel on the target high-resolution image. Repeat the above process until all pixels of the target high-resolution image are assigned values.
[0203] In summary, the important probability distribution channel map can be upsampled to the same size as the initial reconstructed image block x_hat, and the upsampled probability distribution channel map is recorded as the target probability distribution channel map sigma_channel_upscale.
[0204] Step S22: If the target probability distribution channel map includes multiple probability distribution values, for each probability distribution value, determine the image enhancement segmentation intensity value corresponding to the probability distribution value based on the image enhancement threshold interval corresponding to the probability distribution value.
[0205] Exemplarily, the target probability distribution channel map may include multiple probability distribution values. For each probability distribution value, the image enhancement threshold interval corresponding to the probability distribution value may be determined first, and the image enhancement segmentation intensity value corresponding to the probability distribution value may be determined based on the image enhancement threshold interval. For example, if the probability distribution value is within [thry-2, thry-3), the image enhancement segmentation intensity value corresponding to the probability distribution value may be magy-2; if the probability distribution value is within [thry-3, thry-4), the image enhancement segmentation intensity value corresponding to the probability distribution value may be magy-3, and so on.
[0206] Step S23: performing image adaptive edge enhancement on the initial reconstructed image block x_hat based on the image enhancement segment intensity value corresponding to each probability distribution value, to obtain a target reconstructed image block x_hat_enhanced corresponding to the current image block.
[0207] First, a high-frequency detail image can be generated based on the initial reconstructed image block x_hat. For example, a convolution operation (such as a two-dimensional convolution operation) can be performed on the initial reconstructed image block x_hat and a Gaussian blur convolution kernel (which can be a 3*3 convolution kernel or a convolution kernel of other sizes, and there is no restriction on this convolution kernel) to obtain a Gaussian blur image, and then the Gaussian blur image is subtracted from the initial reconstructed image block x_hat to obtain a high-frequency detail image. Of course, the above is only an example of generating a high-frequency detail image, and there is no restriction as long as the high-frequency details of the initial reconstructed image block x_hat can be obtained.
[0208] Then, for each eigenvalue in the high-frequency detail image, the eigenvalue is edge enhanced based on the image enhancement segmentation intensity value corresponding to the probability distribution value corresponding to the eigenvalue to obtain the image enhancement eigenvalue. For example, the initial reconstructed image block x_hat includes multiple eigenvalues, the target probability distribution channel map includes multiple probability distribution values, and the multiple probability distribution values correspond to the multiple eigenvalues one-to-one. Since the high-frequency detail image includes multiple eigenvalues (one-to-one corresponding to the multiple eigenvalues of the initial reconstructed image block x_hat), the multiple probability distribution values of the target probability distribution channel map correspond to the multiple eigenvalues of the high-frequency detail image one-to-one. Based on this, for each eigenvalue in the high-frequency detail image, the probability distribution value corresponding to the eigenvalue can be determined from the target probability distribution channel map, and the image enhancement threshold interval corresponding to the probability distribution value can be determined, and then the image enhancement segmentation intensity value corresponding to the probability distribution value can be determined based on the image enhancement threshold interval.
[0209] After obtaining the image enhancement segment strength value corresponding to the probability distribution value, the eigenvalue can be edge enhanced based on the image enhancement segment strength value to obtain an image enhancement eigenvalue, such as multiplying the eigenvalue by the image enhancement segment strength value (such as magy-1, magy-2, etc.) to obtain an image enhancement eigenvalue. Obviously, if the image enhancement threshold interval is "less than thry-1", the eigenvalue is multiplied by 1, that is, the eigenvalue is kept unchanged and the eigenvalue is not edge enhanced. If the image enhancement threshold interval is [thry-1, thry-2), the eigenvalue is multiplied by magy-1, magy-1 is a value greater than 1, so that the eigenvalue is edge enhanced. Similarly, other image enhancement segment strength values such as magy-2 are greater than 1, and edge enhancement can be achieved.
[0210] Then, the target reconstructed image block x_hat_enhanced is determined based on the image enhancement eigenvalue corresponding to each eigenvalue in the high-frequency detail image. For example, for each eigenvalue in the high-frequency detail image, the image enhancement eigenvalue corresponding to the eigenvalue can be obtained in the above manner, and then the image enhancement feature map can be determined based on the image enhancement eigenvalue corresponding to each eigenvalue. For example, the image enhancement eigenvalues corresponding to all eigenvalues can be combined to obtain an image enhancement feature map. Then, the image enhancement feature map is added to the initial reconstructed image block x_hat to obtain the final edge enhanced image, and the edge enhanced image is then limited to the image value range to obtain the target reconstructed image block x_hat_enhanced.
[0211] In a possible implementation manner, the encoder needs to encode multiple image enhancement segment strength values and multiple image enhancement segment thresholds in the third bitstream corresponding to the current image block. For this process, the encoder may adopt the following method:
[0212] The encoding end can configure multiple candidate image domain enhancement parameters. For each candidate image domain enhancement parameter, the candidate image domain enhancement parameter may include multiple image enhancement segmentation strength values and multiple image enhancement segmentation thresholds. The cost value corresponding to each candidate image domain enhancement parameter can be determined. Based on the cost value corresponding to each candidate image domain enhancement parameter, the image domain enhancement parameter corresponding to the current image block can be selected from all candidate image domain enhancement parameters, that is, the candidate image domain enhancement parameter with the smallest cost value. The encoding end can encode the image domain enhancement parameter to obtain a third code stream corresponding to the current image block.
[0213] For example, for each candidate image domain enhancement parameter, image adaptive edge enhancement is performed on the initial reconstructed image block x_hat based on the candidate image domain enhancement parameter and the probability distribution parameter to obtain a target reconstructed image block x_hat_enhanced corresponding to the current image block. The image adaptive edge enhancement process is described in the above embodiment and will not be repeated here. The cost value corresponding to the candidate image domain enhancement parameter is determined based on the target reconstructed image block x_hat_enhanced, and there is no restriction on the determination method.
[0214] For example, for each candidate image domain enhancement parameter, the candidate image domain enhancement parameter includes magy-1, magy-2, ..., magy-m, thry-1, thry-2, ..., thry-m, and the target reconstructed image block x_hat_enhanced can be obtained based on the candidate image domain enhancement parameter, and the distortion index is used to calculate the distortion index value of the target reconstructed image block x_hat_enhanced and the current image block x. After obtaining the distortion index value corresponding to each candidate image domain enhancement parameter, the candidate image domain enhancement parameter corresponding to the minimum distortion index value can be selected as the image domain enhancement parameter corresponding to the current image block, that is, the optimal image domain enhancement parameter, so that the encoding end can encode the image domain enhancement parameter in the third bitstream.
[0215] Example 13: For Example 5-Example 12, if a feature domain enhancement module is added before the synthetic transformation network, then the feature domain enhancement module can perform feature domain enhancement on the brightness component, can also perform feature domain enhancement on the chrominance component, and can also perform feature domain enhancement on both the brightness component and the chrominance component at the same time. In this embodiment, feature domain enhancement of the brightness component is taken as an example. In order to perform feature domain enhancement on the brightness component, the initial reconstructed feature y_hat corresponding to the brightness component of the current image block can be feature domain enhanced based on the feature domain enhancement parameters and the probability distribution parameters to obtain the enhanced reconstructed feature y_hat_enhanced corresponding to the brightness component. The feature domain enhancement process can be referred to Example 5-Example 12, which will not be repeated here.
[0216] For Example 5 to Example 12, if an image domain enhancement module is added after the synthetic transformation network, then the image domain enhancement module can perform image domain enhancement on the brightness component, can also perform image domain enhancement on the chrominance component, and can also perform image domain enhancement on the brightness component and the chrominance component at the same time. In this embodiment, the image domain enhancement of the brightness component and the chrominance component is taken as an example. For example, in order to perform image domain enhancement on the brightness component, the initial reconstructed image block x_hat corresponding to the brightness component of the current image block can be image-adaptively edge enhanced based on the image domain enhancement parameters and the probability distribution parameters to obtain the target reconstructed image block x_hat_enhanced corresponding to the brightness component. The image domain enhancement process can refer to Example 5 to Example 12, which will not be repeated here. In addition, in order to perform image domain enhancement on the chrominance component, the initial reconstructed image block x_hat corresponding to the chrominance component of the current image block can be image-adaptively edge enhanced based on the image domain enhancement parameters and the probability distribution parameters to obtain the target reconstructed image block x_hat_enhanced corresponding to the chrominance component.
[0217] When image adaptive edge enhancement is performed on the initial reconstructed image block x_hat corresponding to the chrominance component, the target probability distribution channel map of the chrominance component can be obtained based on the probability distribution parameters of the luminance component. For example, an important probability distribution channel map is selected from all probability distribution channel maps of the probability distribution parameters of the luminance component, and the important probability distribution channel map is upsampled to obtain the target probability distribution channel map of the chrominance component. The size of the target probability distribution channel map is the same as the size of the initial reconstructed image block x_hat of the chrominance component. For example, the important probability distribution channel map is upsampled using the nearest neighbor upsampling method to obtain the target probability distribution channel map of the chrominance component. For the nearest neighbor upsampling method, a pixel is selected on the original low-resolution image (i.e., the important probability distribution channel map) as the center point of the corresponding area on the target high-resolution image (i.e., the target probability distribution channel map). The value of the pixel closest to the pixel on the original low-resolution image is used as the value of the corresponding pixel on the target high-resolution image. Repeat the above process until all pixels of the target high-resolution image are assigned values.
[0218] After obtaining the target probability distribution channel map of the chroma component, for each probability distribution value in the target probability distribution channel map, the image enhancement segment intensity value corresponding to the probability distribution value is determined based on the image enhancement threshold interval corresponding to the probability distribution value, and the initial reconstructed image block x_hat corresponding to the chroma component is image-adaptively enhanced based on the image enhancement segment intensity value corresponding to each probability distribution value, to obtain the target reconstructed image block x_hat_enhanced corresponding to the chroma component. The image adaptive edge enhancement process can refer to Example 12, and the relevant operations can be performed on the chroma component.
[0219] Embodiment 14: This embodiment proposes a decoding method, which may include the following steps:
[0220] Step S31, decode the feature domain enhancement parameters and image domain enhancement parameters from Bitstream#3 (i.e., the third bitstream, which can also be called the feature enhancement header information bitstream) corresponding to the current image block. Among them, the feature domain enhancement parameters may include an important channel identifier (important channel number important_channel), multiple edge enhancement segmentation strength values (recorded as magl-1, magl-2, ..., magl-n), multiple edge enhancement segmentation thresholds (recorded as thrl-1, thrl-2, ..., thrl-n), and a stretching parameter value ρ, and the image domain enhancement parameters may include multiple image enhancement segmentation strength values (recorded as magy-1, magy-2, ..., magy-m), and multiple image enhancement segmentation thresholds (recorded as thry-1, thry-2, ..., thry-m). The feature domain enhancement parameters may also include the number n of edge enhancement segmentation strength values, and the image domain enhancement parameters may also include the number m of image enhancement segmentation strength values.
[0221] Step S32: The input features of the feature domain enhancement module are the initial reconstruction feature y_hat and the probability distribution parameter sigma. The initial reconstruction feature y_hat is a feature with a size of C L xH L xW L The three-dimensional tensor, C L is the number of channels in the feature domain, i.e., the Latent domain, H L is the characteristic height of the Latent domain, W L is the characteristic width of the Latent domain. The probability distribution parameter sigma is the size of C L xH L xW L When the channel of the initial reconstruction feature y_hat is [1, 2, …, C L ], this shape is H L xW L The two-dimensional tensor y_hat_ch is called the feature channel map. When the channel of the probability distribution parameter sigma is [1, 2, ..., C L ], this shape is H L xW L The two-dimensional tensor sigma_ch is called the probability distribution channel map.
[0222] Step S33: Initial reconstruction feature y_hat has C L feature channel graphs, and the probability distribution parameter sigma has CL probability distribution channel graph, C L The probability distribution channel diagram and C L Feature channels Figure 1 One-to-one correspondence, the probability distribution channel map is represented as sigma_ch. The feature channel map where the channel ch is an important channel identifier important_channel is subjected to feature adaptive edge enhancement, and the feature channel map where the channel ch is a non-important channel identifier is subjected to feature adaptive stretching.
[0223] Step S34, for the feature adaptive edge enhancement process, the input data are the important feature channel map y_hat_ch, the important probability distribution channel map sigma_ch, multiple edge enhancement segmentation strength values (magl-1, magl-2, ..., magl-n), and multiple edge enhancement segmentation thresholds (thrl-1, thrl-2, ..., thrl-n). Based on the above input data, the important feature channel map y_hat_ch can be feature-adaptively enhanced to obtain a reconstructed feature map after feature adaptive edge enhancement. The reconstructed feature map is called the first reconstructed feature y_hat_sharp. The feature adaptive edge enhancement process refers to Example 10, which will not be repeated here.
[0224] Step S35: for the feature adaptive stretching process, the input data is the non-important feature channel map (the remaining C L -1 non-important feature channel map), non-important probability distribution channel map (the remaining C L -1 non-important probability distribution channel map), stretching parameter value ρ, based on the above input data, feature adaptive stretching can be performed on each non-important feature channel map to obtain a reconstructed feature map after feature adaptive stretching, and the reconstructed feature map is called the second reconstructed feature y_hat_scale. The feature adaptive stretching process is shown in Example 11 and will not be repeated here. Among them, the size of the non-important feature channel map subjected to feature adaptive stretching is (C L -1)xH L xW L , and the size of the corresponding probability distribution parameter sigma is also (C L -1)xH L xW L Each element of this three-dimensional tensor can be stretched through the following adaptive stretching algorithm to obtain the second reconstruction feature after stretching: y_hat_scale = y_hat + ρ * clip3 (sigma *
[0225] y_hat,-0.5,0.5), clip3 is the limit operation, and the second reconstructed feature after the feature adaptive stretching algorithm is y_hat_scale.
[0226] Step S36, the second reconstruction feature y_hat_scale corresponds to the non-important channel enhancement of the initial reconstruction feature y_hat, the first reconstruction feature y_hat_sharp corresponds to the important channel enhancement of the initial reconstruction feature y_hat, and the first reconstruction feature y_hat_sharp and the second reconstruction feature y_hat_scale are merged to obtain the enhanced reconstruction feature y_hat_enhanced after image enhancement.
[0227] Step S37, input the enhanced reconstruction feature y_hat_enhanced after image enhancement to the synthesis transformation network to obtain the initial reconstructed image block x_hat, the initial reconstructed image block x_hat is a two-dimensional tensor with a size of H×W, and the important probability distribution channel map sigma_channel of the probability distribution parameter sigma is upsampled to the same size as the initial reconstructed image block x_hat, and the upsampled probability distribution channel map is recorded as the target probability distribution channel map sigma_channel_upscale.
[0228] Step S38, for the image domain enhancement process, the input data of the image domain enhancement module are the initial reconstructed image block x_hat, the target probability distribution channel map sigma_channel_upscale, multiple image enhancement segmentation intensity values (magy-1, magy-2, ..., magy-m), and multiple image enhancement segmentation thresholds (thry-1, thry-2, ..., thry-m). Based on the above input data, the image domain enhancement module can perform image domain enhancement on the initial reconstructed image block x_hat to obtain the target reconstructed image block x_hat_enhanced corresponding to the current image block x. The image domain enhancement process refers to Example 12 and will not be repeated here.
[0229] Embodiment 15: This embodiment proposes a coding method, which may include the following steps:
[0230] Step S41: Based on C L The feature channel map y_hat and C L A probability distribution channel graph sigma is used to determine the important channel identifier corresponding to the important feature channel graph (the important channel identifier is also called the important channel number important_channel).
[0231] For example, slice y_hat and sigma along the channel dimension, and get the current y_hat_channel and sigma_channel after slicing. Calculate the bits_per_ch of each feature channel map through these two tensors, as shown in the following expression, and repeat the above process C LThe bits_per_ch of each feature channel map is obtained, and the channel number corresponding to the maximum bits_per_ch is selected as the important channel identifier.
[0232]
[0233] Step S42, determining the stretching parameter value ρ corresponding to the feature adaptive stretching process. For example, select N1 candidate stretching parameter values ρ, obtain the enhanced reconstruction features and target reconstructed image block x_hat_enhanced corresponding to each candidate stretching parameter value ρ, use the distortion index to calculate the distortion index value of the target reconstructed image block x_hat_enhanced and the current image block x, and select the candidate stretching parameter value ρ corresponding to the minimum distortion index value as the optimal stretching parameter value ρ corresponding to the feature adaptive stretching process.
[0234] Step S43, determine the feature domain enhancement parameters corresponding to the feature adaptive edge enhancement process, the feature domain enhancement parameters include multiple edge enhancement segmentation strength values (magl-1, magl-2, ..., magl-n), multiple edge enhancement segmentation thresholds (thrl-1, thrl-2, ..., thrl-n). For example, select N2 candidate feature domain enhancement parameters, obtain the enhanced reconstruction features and target reconstructed image block x_hat_enhanced corresponding to each candidate feature domain enhancement parameter, use the distortion index to calculate the distortion index value of the target reconstructed image block x_hat_enhanced and the current image block x, and select the candidate feature domain enhancement parameter corresponding to the minimum distortion index value as the optimal feature domain enhancement parameter corresponding to the feature adaptive edge enhancement process.
[0235] Step S44, determine the image domain enhancement parameters corresponding to the image domain enhancement process, the image domain enhancement parameters may include multiple image enhancement segmentation strength values (magy-1, magy-2, ..., magy-m), multiple image enhancement segmentation thresholds (thry-1, thry-2, ..., thry-m). For example, select N3 candidate image domain enhancement parameters, obtain the enhanced reconstruction features and target reconstructed image block x_hat_enhanced corresponding to each candidate image domain enhancement parameter, use the distortion index to calculate the distortion index value of the target reconstructed image block x_hat_enhanced and the current image block x, and select the candidate image domain enhancement parameter corresponding to the minimum distortion index value as the optimal image domain enhancement parameter corresponding to the image domain enhancement process.
[0236] Step S45, encode the important channel identifier corresponding to the important feature channel map, the optimal stretching parameter value ρ, the optimal feature domain enhancement parameter, and the optimal image domain enhancement parameter into the header information bitstream (the third bitstream #Bitstreams3 corresponding to the current image block). It should be noted that the feature domain enhancement module and the image domain enhancement module will not change #Bitstreams1 and #Bitstreams2, but the encoding end and the decoding end will pass through the enhancement module when reconstructing the image, so the reconstructed image will be consistent at the encoding and decoding ends.
[0237] Embodiment 16: The method for image adaptive edge enhancement (i.e., the process in which the image domain enhancement module performs image domain enhancement on the initial reconstructed image block x_hat to obtain the target reconstructed image block x_hat_enhanced) may be a non-edge enhancement mask edge enhancement algorithm, i.e., a USM edge enhancement algorithm (Unsharp Masking edge enhancement), which includes:
[0238] Step S51, performing a two-dimensional convolution operation on the original reconstructed image and the Gaussian blur convolution kernel to obtain a Gaussian blur image.
[0239] Step S52: subtract the Gaussian blurred image from the original reconstructed image to obtain a high-frequency detail image.
[0240] Step S53: multiply the high-frequency detail image by an edge enhancement coefficient (ie, the image enhancement segment strength value corresponding to the probability distribution value corresponding to the eigenvalue), and add it to the original reconstructed image to obtain a final edge enhanced image.
[0241] Step S54: Limit the edge-enhanced image to the value range of the image.
[0242] Exemplarily, the original reconstructed image is the initial reconstructed image block x_hat. After limiting the edge enhanced image to the value range of the image, the target reconstructed image block x_hat_enhanced can be obtained. The process can be referred to in Example 12.
[0243] Embodiment 17: The method of feature adaptive edge enhancement (i.e., the process in which the feature domain enhancement module performs feature adaptive edge enhancement on the important feature channel map based on the feature domain enhancement parameters and the important probability distribution channel map to obtain the first reconstructed feature) can be a non-edge enhancement mask edge enhancement algorithm, i.e., a USM edge enhancement algorithm, which includes:
[0244] Step S61: subtract the mean from the important channel feature map y_hat_channel and divide it by the variance to obtain a normalized feature map.
[0245] Step S62: multiply the normalized feature map by 0.1 and add 0.5, and limit the feature value to between 0 and 1.
[0246] Step S63: Perform a two-dimensional convolution operation on the normalized feature map and the Gaussian blur convolution kernel to obtain a Gaussian blurred image.
[0247] Step S64: subtract the Gaussian blurred image from the original reconstructed image to obtain a high-frequency detail image.
[0248] Step S65: multiply the high-frequency detail image by an edge enhancement coefficient (ie, the edge enhancement segment strength value corresponding to the probability distribution value corresponding to the eigenvalue), and add the coefficient to the normalized feature map to obtain an edge enhancement feature map.
[0249] Step S66: limit the feature value of the edge enhancement feature map to between 0 and 1.
[0250] Step S67: subtract 0.5 from the edge enhancement feature map and divide the map by 10 to obtain a normalized feature map after edge enhancement.
[0251] Step S68, multiply the normalized feature map after edge enhancement by the variance and add the mean to obtain the important channel feature edge enhanced feature map y_hat_shap corresponding to the important channel feature map y_hat_channel, that is, the first reconstructed feature.
[0252] Exemplarily, the original reconstructed image is the important feature channel map y_hat_channel. The process can be referred to Example 10.
[0253] Illustratively, the above-mentioned embodiments can be implemented individually or in combination. For example, each embodiment in Embodiment 1 to Embodiment 17 can be implemented individually, and at least two embodiments in Embodiment 1 to Embodiment 17 can be implemented in combination.
[0254] Illustratively, in the above embodiments, the content of the encoding end can also be applied to the decoding end, that is, the decoding end can be processed in the same way, and the content of the decoding end can also be applied to the encoding end, that is, the encoding end can be processed in the same way.
[0255] Based on the same application concept as the above method, a decoding device is also proposed in the embodiment of the present application. The device is applied to the decoding end, and the device includes: a memory, which is configured to store video data; a decoder, which is configured to implement the decoding method in the above embodiments 1 to 17, that is, the processing flow of the decoding end.
[0256] For example, in one possible implementation, the decoder is configured to implement:
[0257] Decoding a first bitstream corresponding to a current image block to obtain coefficient hyperparameter features corresponding to the current image block;
[0258] Determine a probability distribution parameter based on the coefficient hyperparameter feature, and decode the second bitstream corresponding to the current image block based on the probability distribution parameter to obtain an initial reconstruction feature corresponding to the current image block;
[0259] Decoding a third bitstream corresponding to the current image block to obtain a feature domain enhancement parameter corresponding to the current image block;
[0260] The initial reconstruction feature is enhanced in the feature domain based on the feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature, and a target reconstructed image block corresponding to the current image block is determined based on the enhanced reconstruction feature.
[0261] Based on the same application concept as the above method, an encoding device is also proposed in the embodiment of the present application. The device is applied to the encoding end, and the device includes: a memory, which is configured to store video data; an encoder, which is configured to implement the encoding method in the above embodiments 1 to 17, that is, the processing flow of the encoding end.
[0262] For example, in one possible implementation, the encoder is configured to implement:
[0263] Encoding the coefficient hyper-parameter features corresponding to the current image block to obtain a first bitstream corresponding to the current image block;
[0264] Determine a probability distribution parameter based on the coefficient hyperparameter feature, and encode the initial image feature corresponding to the current image block based on the probability distribution parameter to obtain a second bitstream corresponding to the current image block;
[0265] For each candidate feature domain enhancement parameter, based on the candidate feature domain enhancement parameter and the probability distribution parameter, the initial reconstructed feature is enhanced in the feature domain to obtain an enhanced reconstructed feature, a target reconstructed image block is determined based on the enhanced reconstructed feature, and a cost value corresponding to the candidate feature domain enhancement parameter is determined based on the target reconstructed image block;
[0266] Based on the cost value corresponding to each candidate feature domain enhancement parameter, a feature domain enhancement parameter corresponding to the current image block is selected from all candidate feature domain enhancement parameters, and the feature domain enhancement parameter is encoded to obtain a third code stream corresponding to the current image block.
[0267] Based on the same application concept as the above method, the decoding end device (also referred to as a video decoder) provided in the embodiment of the present application, from the hardware level, its hardware architecture diagram can be specifically referred to as Fig. 7AAs shown. It includes: a processor 711 and a machine-readable storage medium 712, the machine-readable storage medium 712 stores machine-executable instructions that can be executed by the processor 711; the processor 711 is used to execute the machine-executable instructions to implement the decoding method of the above-mentioned embodiments 1-17 of the present application.
[0268] For example, in one possible implementation, the processor 711 executes the machine executable instructions to implement:
[0269] Decoding a first bitstream corresponding to a current image block to obtain coefficient hyperparameter features corresponding to the current image block;
[0270] Determine a probability distribution parameter based on the coefficient hyperparameter feature, and decode the second bitstream corresponding to the current image block based on the probability distribution parameter to obtain an initial reconstruction feature corresponding to the current image block;
[0271] Decoding a third bitstream corresponding to the current image block to obtain a feature domain enhancement parameter corresponding to the current image block;
[0272] The initial reconstruction feature is enhanced in the feature domain based on the feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature, and a target reconstructed image block corresponding to the current image block is determined based on the enhanced reconstruction feature.
[0273] Based on the same application concept as the above method, the encoding end device (also referred to as a video encoder) provided in the embodiment of the present application, from the hardware level, its hardware architecture diagram can be specifically referred to as Figure 7B As shown. It includes: a processor 721 and a machine-readable storage medium 722, the machine-readable storage medium 722 stores machine-executable instructions that can be executed by the processor 721; the processor 721 is used to execute the machine-executable instructions to implement the encoding method of the above-mentioned embodiments 1-17 of the present application.
[0274] For example, in one possible implementation, the processor 721 executes the machine executable instructions to implement:
[0275] Encoding the coefficient hyper-parameter features corresponding to the current image block to obtain a first bitstream corresponding to the current image block;
[0276] Determine a probability distribution parameter based on the coefficient hyperparameter feature, and encode the initial image feature corresponding to the current image block based on the probability distribution parameter to obtain a second bitstream corresponding to the current image block;
[0277] For each candidate feature domain enhancement parameter, based on the candidate feature domain enhancement parameter and the probability distribution parameter, the initial reconstructed feature is enhanced in the feature domain to obtain an enhanced reconstructed feature, a target reconstructed image block is determined based on the enhanced reconstructed feature, and a cost value corresponding to the candidate feature domain enhancement parameter is determined based on the target reconstructed image block;
[0278] Based on the cost value corresponding to each candidate feature domain enhancement parameter, a feature domain enhancement parameter corresponding to the current image block is selected from all candidate feature domain enhancement parameters, and the feature domain enhancement parameter is encoded to obtain a third code stream corresponding to the current image block.
[0279] Based on the same application concept as the above method, an embodiment of the present application provides an electronic device, including: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the decoding method or encoding method of the above embodiments 1-17 of the present application.
[0280] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented, such as the decoding method or encoding method in the above embodiments.
[0281] Based on the same application concept as the above method, an embodiment of the present application also provides a computer application, which, when executed by a processor, can implement the decoding method or encoding method disclosed in the above example of the present application.
[0282] Based on the same application concept as the above method, a decoding device is also proposed in an embodiment of the present application. The decoding device can be applied to a decoding end (also referred to as a video decoder). The decoding device may include: a decoding module, used to decode a first code stream corresponding to a current image block to obtain coefficient hyper-parameter features corresponding to the current image block; determine probability distribution parameters based on the coefficient hyper-parameter features, and decode the second code stream corresponding to the current image block based on the probability distribution parameters to obtain initial reconstruction features corresponding to the current image block; decode the third code stream corresponding to the current image block to obtain feature domain enhancement parameters corresponding to the current image block; a feature domain enhancement module, used to perform feature domain enhancement on the initial reconstruction features based on the feature domain enhancement parameters and the probability distribution parameters to obtain enhanced reconstruction features; a determination module, used to determine the target reconstructed image block corresponding to the current image block based on the enhanced reconstruction features.
[0283] Exemplarily, the feature domain enhancement parameter includes an important channel identifier, the initial reconstruction feature includes C feature channel maps, the probability distribution parameter includes C probability distribution channel maps, and the C probability distribution channel maps are related to the C feature channels. Figure 1 Correspondingly, the feature domain enhancement module is also used to select the feature channel map corresponding to the important channel identifier from the C feature channel maps as the important feature channel map, and select the remaining feature channel maps as unimportant feature channel maps; select the probability distribution channel map corresponding to the important feature channel map as the important probability distribution channel map, and select the probability distribution channel map corresponding to the unimportant feature channel map as the unimportant probability distribution channel map.
[0284] Exemplarily, the initial reconstruction features include C feature channel maps, the probability distribution parameters include C probability distribution channel maps, and the C probability distribution channel maps and the C feature channel maps are Figure 1 Correspondingly, the feature domain enhancement module is also used to determine, for each feature channel map, the number of consumed bits corresponding to the feature channel map based on the feature value in the feature channel map and the probability distribution value in the probability distribution channel map corresponding to the feature channel map; based on the number of consumed bits corresponding to each feature channel map, select important feature channel maps from the C feature channel maps, and select the remaining feature channel maps as unimportant feature channel maps; select the probability distribution channel map corresponding to the important feature channel map as the important probability distribution channel map, and select the probability distribution channel map corresponding to the unimportant feature channel map as the unimportant probability distribution channel map.
[0285] Exemplarily, the initial reconstruction features include important feature channel maps and unimportant feature channel maps, the probability distribution parameters include important probability distribution channel maps corresponding to the important feature channel maps and unimportant probability distribution channel maps corresponding to the unimportant feature channel maps, the feature domain enhancement module performs feature domain enhancement on the initial reconstruction features based on the feature domain enhancement parameters and the probability distribution parameters, and when obtaining the enhanced reconstruction features, is specifically used for: performing feature adaptive edge enhancement on the important feature channel map based on the feature domain enhancement parameters and the important probability distribution channel map to obtain a first reconstruction feature after feature adaptive edge enhancement; performing feature adaptive stretching on the unimportant feature channel map based on the feature domain enhancement parameters and the unimportant probability distribution channel map to obtain a second reconstruction feature after feature adaptive stretching; and generating an enhanced reconstruction feature based on the first reconstruction feature and the second reconstruction feature.
[0286] Exemplarily, the feature domain enhancement parameters include multiple edge enhancement segmentation strength values and multiple edge enhancement segmentation thresholds, the multiple edge enhancement segmentation thresholds constitute multiple edge enhancement threshold intervals, and the multiple edge enhancement threshold intervals correspond one-to-one to the multiple edge enhancement segmentation strength values; the feature domain enhancement module performs feature-adaptive edge enhancement on the important feature channel map based on the feature domain enhancement parameters and the important probability distribution channel map, and obtains the first reconstructed feature after feature-adaptive edge enhancement, which is specifically used for: if the important probability distribution channel map includes multiple probability distribution values, for each probability distribution value, determining the edge enhancement segmentation strength value corresponding to the probability distribution value based on the edge enhancement threshold interval corresponding to the probability distribution value; performing feature-adaptive edge enhancement on the important feature channel map based on the edge enhancement segmentation strength value corresponding to each probability distribution value, and obtaining the first reconstructed feature after feature-adaptive edge enhancement.
[0287] Exemplarily, the feature domain enhancement module performs feature adaptive edge enhancement on the important feature channel map based on the edge enhancement segmented strength value corresponding to each probability distribution value, and obtains the first reconstructed feature after feature adaptive edge enhancement, which is specifically used for: normalizing the important feature channel map to obtain a normalized feature map; generating a high-frequency detail image based on the important feature channel map and the normalized feature map; for each eigenvalue in the high-frequency detail image, performing edge enhancement on the eigenvalue based on the edge enhancement segmented strength value corresponding to the probability distribution value corresponding to the eigenvalue, to obtain an edge enhanced eigenvalue; determining an edge enhancement feature map based on the edge enhancement eigenvalue corresponding to each eigenvalue; and denormalizing the edge enhancement feature map to obtain the first reconstructed feature.
[0288] Exemplarily, the feature domain enhancement parameters include stretching parameter values, and the feature domain enhancement module performs feature adaptive stretching on the non-important feature channel map based on the feature domain enhancement parameters and the non-important probability distribution channel map to obtain the second reconstructed feature after feature adaptive stretching, which is specifically used for: if the non-important feature channel map includes multiple eigenvalues, and the non-important probability distribution channel map includes multiple probability distribution values, for each eigenvalue in the non-important feature channel map, based on the eigenvalue, the stretching parameter value and the probability distribution value corresponding to the eigenvalue, determining the stretched eigenvalue corresponding to the eigenvalue; and determining the second reconstructed feature based on the stretched eigenvalue corresponding to each eigenvalue in the non-important feature channel map.
[0289] Exemplarily, when the determination module determines the target reconstructed image block corresponding to the current image block based on the enhanced reconstruction feature, it is specifically used to: input the enhanced reconstruction feature to a synthetic transformation network to obtain a target reconstructed image block corresponding to the current image block; or, input the enhanced reconstruction feature to a synthetic transformation network to obtain an initial reconstructed image block corresponding to the current image block; perform image adaptive edge enhancement on the initial reconstructed image block based on the image domain enhancement parameters corresponding to the current image block and the probability distribution parameters to obtain the target reconstructed image block corresponding to the current image block; wherein the image domain enhancement parameters are obtained by decoding a third code stream corresponding to the current image block.
[0290] Exemplarily, the image domain enhancement parameters include multiple image enhancement segmentation intensity values and multiple image enhancement segmentation thresholds, the multiple image enhancement segmentation thresholds constitute multiple image enhancement threshold intervals, and the multiple image enhancement threshold intervals correspond one-to-one to the multiple image enhancement segmentation intensity values; the determination module performs image adaptive edge enhancement on the initial reconstructed image block based on the image domain enhancement parameters corresponding to the current image block and the probability distribution parameters to obtain the target reconstructed image block corresponding to the current image block, and is specifically used to: obtain a target probability distribution channel map based on the probability distribution parameters; if the target probability distribution channel map includes multiple probability distribution values, for each probability distribution value, determine the image enhancement segmentation intensity value corresponding to the probability distribution value based on the image enhancement threshold interval corresponding to the probability distribution value; perform image adaptive edge enhancement on the initial reconstructed image block based on the image enhancement segmentation intensity value corresponding to each probability distribution value to obtain the target reconstructed image block corresponding to the current image block.
[0291] Exemplarily, when the determination module obtains the target probability distribution channel map based on the probability distribution parameters, it is specifically used to: if the probability distribution parameters include important probability distribution channel maps and unimportant probability distribution channel maps, upsample the important probability distribution channel maps to obtain the target probability distribution channel map; wherein the size of the target probability distribution channel map is the same as the size of the initial reconstructed image block.
[0292] Exemplarily, the determination module performs image adaptive edge enhancement on the initial reconstructed image block based on the image enhancement segment strength value corresponding to each probability distribution value to obtain the target reconstructed image block corresponding to the current image block, and is specifically used to: generate a high-frequency detail image based on the initial reconstructed image block; for each eigenvalue in the high-frequency detail image, perform edge enhancement on the eigenvalue based on the image enhancement segment strength value corresponding to the probability distribution value corresponding to the eigenvalue to obtain an image enhancement eigenvalue; and determine the target reconstructed image block based on the image enhancement eigenvalue corresponding to each eigenvalue.
[0293] Exemplarily, the feature domain enhancement module performs feature domain enhancement on the initial reconstructed features based on the feature domain enhancement parameters and the probability distribution parameters, and when obtaining the enhanced reconstructed features, is specifically used for: performing feature domain enhancement on the initial reconstructed features corresponding to the brightness component of the current image block based on the feature domain enhancement parameters and the probability distribution parameters, to obtain the enhanced reconstruction features corresponding to the brightness component; the determination module performs image adaptive edge enhancement on the initial reconstructed image block based on the image domain enhancement parameters corresponding to the current image block and the probability distribution parameters, and when obtaining the target reconstructed image block corresponding to the current image block, is specifically used for: performing image adaptive edge enhancement on the initial reconstructed image block corresponding to the brightness component of the current image block based on the image domain enhancement parameters and the probability distribution parameters, to obtain the target reconstructed image block corresponding to the brightness component; performing image adaptive edge enhancement on the initial reconstructed image block corresponding to the chrominance component of the current image block based on the image domain enhancement parameters and the probability distribution parameters, to obtain the target reconstructed image block corresponding to the chrominance component.
[0294] Based on the same application concept as the above method, an encoding device is also proposed in an embodiment of the present application. The device is applied to an encoding end (also referred to as a video encoder), and the device may include: an encoding module, used to encode the coefficient hyperparameter features corresponding to the current image block to obtain a first code stream corresponding to the current image block; determine probability distribution parameters based on the coefficient hyperparameter features, and encode the initial image features corresponding to the current image block based on the probability distribution parameters to obtain a second code stream corresponding to the current image block; a feature domain enhancement module, used to perform feature domain enhancement on the initial reconstruction features based on the candidate feature domain enhancement parameters and the probability distribution parameters for each candidate feature domain enhancement parameter to obtain an enhanced reconstruction feature; a determination module, used to determine a target reconstructed image block based on the enhanced reconstruction feature, and determine a cost value corresponding to the candidate feature domain enhancement parameter based on the target reconstructed image block; select a feature domain enhancement parameter corresponding to the current image block from all candidate feature domain enhancement parameters based on the cost value corresponding to each candidate feature domain enhancement parameter; the encoding module is also used to encode the feature domain enhancement parameter to obtain a third code stream corresponding to the current image block.
[0295] Exemplarily, the initial reconstructed features include important feature channel maps and unimportant feature channel maps, and the probability distribution parameters include important probability distribution channel maps corresponding to the important feature channel maps and unimportant probability distribution channel maps corresponding to the unimportant feature channel maps. The feature domain enhancement module performs feature domain enhancement on the initial reconstructed features based on the candidate feature domain enhancement parameters and the probability distribution parameters, and when obtaining the enhanced reconstructed features, is specifically used for: performing feature adaptive edge enhancement on the important feature channel map based on the candidate feature domain enhancement parameters and the important probability distribution channel map to obtain a first reconstructed feature after feature adaptive edge enhancement; performing feature adaptive stretching on the unimportant feature channel map based on the candidate feature domain enhancement parameters and the unimportant probability distribution channel map to obtain a second reconstructed feature after feature adaptive stretching; and generating an enhanced reconstruction feature based on the first reconstructed feature and the second reconstructed feature.
[0296] Exemplarily, when the determination module determines the target reconstructed image block based on the enhanced reconstruction feature, it is specifically used to: input the enhanced reconstruction feature to the synthesis transformation network to obtain an initial reconstructed image block corresponding to the current image block; for each candidate image domain enhancement parameter, perform image adaptive edge enhancement on the initial reconstructed image block based on the candidate image domain enhancement parameter and the probability distribution parameter to obtain a target reconstructed image block corresponding to the current image block;
[0297] The encoding module is also used to determine the cost value corresponding to the candidate image domain enhancement parameter based on the target reconstructed image block; based on the cost value corresponding to each candidate image domain enhancement parameter, select the image domain enhancement parameter corresponding to the current image block from all the candidate image domain enhancement parameters, and encode the image domain enhancement parameter to obtain a third code stream corresponding to the current image block.
[0298] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. The present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. The embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The above is only an embodiment of the present application and is not intended to limit the present application.
[0299] For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A decoding method, It is characterized in that The method comprises: Decoding a first bitstream corresponding to a current image block to obtain coefficient hyperparameter features corresponding to the current image block; Determine a probability distribution parameter based on the coefficient hyperparameter feature, and decode the second bitstream corresponding to the current image block based on the probability distribution parameter to obtain an initial reconstruction feature corresponding to the current image block; Decoding a third bitstream corresponding to the current image block to obtain a feature domain enhancement parameter corresponding to the current image block; The initial reconstruction feature is enhanced in the feature domain based on the feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature, and a target reconstructed image block corresponding to the current image block is determined based on the enhanced reconstruction feature.
2. The method according to claim 1, It is characterized in that The feature domain enhancement parameters include important channel identifiers, the initial reconstruction features include C feature channel maps, the probability distribution parameters include C probability distribution channel maps, the C probability distribution channel maps correspond to the C feature channel maps one by one, and the method further includes: Selecting the feature channel map corresponding to the important channel identifier from the C feature channel maps as the important feature channel map, and selecting the remaining feature channel maps as unimportant feature channel maps; The probability distribution channel map corresponding to the important feature channel map is selected as the important probability distribution channel map, and the probability distribution channel map corresponding to the unimportant feature channel map is selected as the unimportant probability distribution channel map.
3. The method according to claim 1, It is characterized in that The initial reconstruction feature includes C feature channel maps, the probability distribution parameters include C probability distribution channel maps, the C probability distribution channel maps correspond to the C feature channel maps one by one, and the method further includes: For each feature channel map, determining the number of consumed bits corresponding to the feature channel map based on the feature value in the feature channel map and the probability distribution value in the probability distribution channel map corresponding to the feature channel map; Based on the number of consumed bits corresponding to each feature channel map, select an important feature channel map from the C feature channel maps, and select the remaining feature channel maps as unimportant feature channel maps; The probability distribution channel map corresponding to the important feature channel map is selected as the important probability distribution channel map, and the probability distribution channel map corresponding to the unimportant feature channel map is selected as the unimportant probability distribution channel map.
4. The method according to claim 2 or 3, It is characterized in that The initial reconstruction feature includes an important feature channel map and an unimportant feature channel map, the probability distribution parameter includes an important probability distribution channel map corresponding to the important feature channel map and an unimportant probability distribution channel map corresponding to the unimportant feature channel map, and the feature domain enhancement of the initial reconstruction feature based on the feature domain enhancement parameter and the probability distribution parameter to obtain the enhanced reconstruction feature includes: Performing feature-adaptive edge enhancement on the important feature channel map based on the feature domain enhancement parameter and the important probability distribution channel map to obtain a first reconstructed feature after feature-adaptive edge enhancement; Based on the feature domain enhancement parameter and the non-important probability distribution channel map, the non-important feature channel map is subjected to feature adaptive stretching to obtain a second reconstructed feature after feature adaptive stretching; An enhanced reconstruction feature is generated based on the first reconstruction feature and the second reconstruction feature.
5. The method according to claim 4, It is characterized in that The feature domain enhancement parameters include a plurality of edge enhancement segment strength values and a plurality of edge enhancement segment thresholds, the plurality of edge enhancement segment thresholds constitute a plurality of edge enhancement threshold intervals, and the plurality of edge enhancement threshold intervals correspond one-to-one to the plurality of edge enhancement segment strength values; The step of performing feature-adaptive edge enhancement on the important feature channel map based on the feature domain enhancement parameter and the important probability distribution channel map to obtain a first reconstructed feature after feature-adaptive edge enhancement includes: If the important probability distribution channel graph includes multiple probability distribution values, for each probability distribution value, determining an edge enhancement segment strength value corresponding to the probability distribution value based on an edge enhancement threshold interval corresponding to the probability distribution value; Based on the edge enhancement segment strength value corresponding to each probability distribution value, feature adaptive edge enhancement is performed on the important feature channel map to obtain a first reconstructed feature after feature adaptive edge enhancement.
6. The method according to claim 5, It is characterized in that The step of performing feature-adaptive edge enhancement on the important feature channel map based on the edge enhancement segment strength value corresponding to each probability distribution value to obtain a first reconstructed feature after feature-adaptive edge enhancement includes: Normalizing the important feature channel map to obtain a normalized feature map; Generating a high-frequency detail image based on the important feature channel map and the normalized feature map; For each eigenvalue in the high-frequency detail image, edge enhancement is performed on the eigenvalue based on the edge enhancement segmentation strength value corresponding to the probability distribution value corresponding to the eigenvalue to obtain an edge enhancement eigenvalue; Determine an edge enhancement feature map based on the edge enhancement feature value corresponding to each feature value; The edge enhancement feature map is denormalized to obtain the first reconstructed feature.
7. The method according to claim 4, It is characterized in that The feature domain enhancement parameter includes a stretching parameter value, and the feature adaptive stretching is performed on the non-important feature channel map based on the feature domain enhancement parameter and the non-important probability distribution channel map. The second reconstructed feature after feature adaptive stretching is obtained, including: If the non-significant feature channel map includes a plurality of eigenvalues, and the non-significant probability distribution channel map includes a plurality of probability distribution values, for each eigenvalue in the non-significant feature channel map, based on the eigenvalue, the stretching parameter value, and the probability distribution value corresponding to the eigenvalue, determining a stretched eigenvalue corresponding to the eigenvalue; The second reconstructed feature is determined based on the stretched eigenvalue corresponding to each eigenvalue in the non-significant feature channel map.
8. The method according to any one of claims 1 to 7, It is characterized in that The determining, based on the enhanced reconstruction feature, a target reconstructed image block corresponding to the current image block comprises: Inputting the enhanced reconstruction feature into a synthetic transformation network to obtain a target reconstructed image block corresponding to the current image block; Alternatively, the enhanced reconstruction feature is input into a synthetic transformation network to obtain an initial reconstructed image block corresponding to the current image block; image adaptive edge enhancement is performed on the initial reconstructed image block based on the image domain enhancement parameter corresponding to the current image block and the probability distribution parameter to obtain a target reconstructed image block corresponding to the current image block; The image domain enhancement parameter is obtained by decoding the third code stream corresponding to the current image block.
9. The method according to claim 8, It is characterized in that The image domain enhancement parameters include a plurality of image enhancement segmentation strength values and a plurality of image enhancement segmentation thresholds, wherein the plurality of image enhancement segmentation thresholds constitute a plurality of image enhancement threshold intervals, and the plurality of image enhancement threshold intervals correspond one-to-one to the plurality of image enhancement segmentation strength values; The step of performing image adaptive edge enhancement on the initial reconstructed image block based on the image domain enhancement parameter corresponding to the current image block and the probability distribution parameter to obtain a target reconstructed image block corresponding to the current image block includes: Acquire a target probability distribution channel map based on the probability distribution parameters; If the target probability distribution channel map includes multiple probability distribution values, for each probability distribution value, determining the image enhancement segmentation intensity value corresponding to the probability distribution value based on the image enhancement threshold interval corresponding to the probability distribution value; Image adaptive edge enhancement is performed on the initial reconstructed image block based on the image enhancement segment intensity value corresponding to each probability distribution value to obtain a target reconstructed image block corresponding to the current image block.
10. The method according to claim 9, It is characterized in that The obtaining of a target probability distribution channel map based on the probability distribution parameters includes: If the probability distribution parameters include an important probability distribution channel map and an unimportant probability distribution channel map, upsampling the important probability distribution channel map to obtain the target probability distribution channel map; The size of the target probability distribution channel map is the same as the size of the initial reconstructed image block.
11. The method according to claim 9, It is characterized in that The step of performing image adaptive edge enhancement on the initial reconstructed image block based on the image enhancement segment intensity value corresponding to each probability distribution value to obtain a target reconstructed image block corresponding to the current image block includes: generating a high-frequency detail image based on the initial reconstructed image block; For each eigenvalue in the high-frequency detail image, edge enhancement is performed on the eigenvalue based on the image enhancement segmentation strength value corresponding to the probability distribution value corresponding to the eigenvalue to obtain an image enhancement eigenvalue; The target reconstructed image block is determined based on the image enhancement eigenvalue corresponding to each eigenvalue.
12. The method according to claim 8, It is characterized in that The step of performing feature domain enhancement on the initial reconstruction feature based on the feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature includes: Performing feature domain enhancement on the initial reconstruction feature corresponding to the brightness component of the current image block based on the feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature corresponding to the brightness component; The step of performing image adaptive edge enhancement on the initial reconstructed image block based on the image domain enhancement parameter corresponding to the current image block and the probability distribution parameter to obtain a target reconstructed image block corresponding to the current image block includes: Performing image adaptive edge enhancement on an initial reconstructed image block corresponding to a brightness component of the current image block based on the image domain enhancement parameter and the probability distribution parameter to obtain a target reconstructed image block corresponding to the brightness component; Based on the image domain enhancement parameters and the probability distribution parameters, image adaptive edge enhancement is performed on the initial reconstructed image block corresponding to the chrominance component of the current image block to obtain a target reconstructed image block corresponding to the chrominance component.
13. A method of encoding, It is characterized in that The method comprises: Encoding the coefficient hyper-parameter features corresponding to the current image block to obtain a first bitstream corresponding to the current image block; Determine a probability distribution parameter based on the coefficient hyperparameter feature, and encode the initial image feature corresponding to the current image block based on the probability distribution parameter to obtain a second bitstream corresponding to the current image block; For each candidate feature domain enhancement parameter, based on the candidate feature domain enhancement parameter and the probability distribution parameter, the initial reconstructed feature is enhanced in the feature domain to obtain an enhanced reconstructed feature, a target reconstructed image block is determined based on the enhanced reconstructed feature, and a cost value corresponding to the candidate feature domain enhancement parameter is determined based on the target reconstructed image block; Based on the cost value corresponding to each candidate feature domain enhancement parameter, a feature domain enhancement parameter corresponding to the current image block is selected from all candidate feature domain enhancement parameters, and the feature domain enhancement parameter is encoded to obtain a third code stream corresponding to the current image block.
14. The method according to claim 13, It is characterized in that The initial reconstruction feature includes an important feature channel map and an unimportant feature channel map, and the probability distribution parameter includes an important probability distribution channel map corresponding to the important feature channel map and an unimportant probability distribution channel map corresponding to the unimportant feature channel map, and the feature domain enhancement of the initial reconstruction feature based on the candidate feature domain enhancement parameter and the probability distribution parameter to obtain the enhanced reconstruction feature includes: Based on the candidate feature domain enhancement parameter and the important probability distribution channel map, the important feature channel map is subjected to feature adaptive edge enhancement to obtain a first reconstructed feature after feature adaptive edge enhancement; Based on the candidate feature domain enhancement parameter and the non-important probability distribution channel map, the non-important feature channel map is subjected to feature adaptive stretching to obtain a second reconstructed feature after feature adaptive stretching; An enhanced reconstruction feature is generated based on the first reconstruction feature and the second reconstruction feature.
15. The method according to claim 13, It is characterized in that The determining of the target reconstructed image block based on the enhanced reconstruction feature comprises: inputting the enhanced reconstruction feature into a synthetic transformation network to obtain an initial reconstructed image block corresponding to the current image block; for each candidate image domain enhancement parameter, performing image adaptive edge enhancement on the initial reconstructed image block based on the candidate image domain enhancement parameter and the probability distribution parameter to obtain a target reconstructed image block corresponding to the current image block; The method further comprises: determining a cost value corresponding to the candidate image domain enhancement parameter based on the target reconstructed image block; An image domain enhancement parameter corresponding to the current image block is selected from all candidate image domain enhancement parameters based on a cost value corresponding to each candidate image domain enhancement parameter, and the image domain enhancement parameter is encoded to obtain a third code stream corresponding to the current image block.
16. A decoding device, It is characterized in that The device comprises: A decoding module, configured to decode a first bitstream corresponding to a current image block to obtain coefficient hyperparameter features corresponding to the current image block; determine probability distribution parameters based on the coefficient hyperparameter features, and decode a second bitstream corresponding to the current image block based on the probability distribution parameters to obtain initial reconstruction features corresponding to the current image block; and decode a third bitstream corresponding to the current image block to obtain feature domain enhancement parameters corresponding to the current image block; A feature domain enhancement module, used to perform feature domain enhancement on the initial reconstruction feature based on the feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature; A determination module is used to determine a target reconstructed image block corresponding to the current image block based on the enhanced reconstruction feature.
17. An encoding device, It is characterized in that The device comprises: An encoding module, configured to encode coefficient hyperparameter features corresponding to a current image block to obtain a first bitstream corresponding to the current image block; determine probability distribution parameters based on the coefficient hyperparameter features, and encode initial image features corresponding to the current image block based on the probability distribution parameters to obtain a second bitstream corresponding to the current image block; A feature domain enhancement module is used to perform feature domain enhancement on the initial reconstruction feature based on each candidate feature domain enhancement parameter and the probability distribution parameter to obtain an enhanced reconstruction feature; A determination module, configured to determine a target reconstructed image block based on the enhanced reconstruction feature, and determine a cost value corresponding to the candidate feature domain enhancement parameter based on the target reconstructed image block; and select a feature domain enhancement parameter corresponding to the current image block from all candidate feature domain enhancement parameters based on the cost value corresponding to each candidate feature domain enhancement parameter; The encoding module is further used to encode the feature domain enhancement parameter to obtain a third code stream corresponding to the current image block.
18. A decoding terminal device, It is characterized in that The decoding end device comprises: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; The processor is used to execute machine executable instructions to implement the method according to any one of claims 1 to 12.
19. A coding terminal device, It is characterized in that The encoding end device includes: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; The processor is used to execute machine executable instructions to implement the method described in any one of claims 13-15.
20. A machine-readable storage medium, It is characterized in that The machine-readable storage medium stores a plurality of computer instructions, and when the computer instructions are executed by the processor, the method described in any one of claims 1 to 12 is implemented; or, when the computer instructions are executed by the processor, the method described in any one of claims 13 to 15 is implemented.
Citation Information
Cited By
Decoding and coding method, device and equipment
CN119893120A
A decoding, encoding method, apparatus and device thereof
CN119893120B
