Image decoding and coding method and device, equipment and storage medium
By decoding and enhancing the image bitstream, the problem of poor image reconstruction quality in deep learning image coding technology is solved, and higher quality image reconstruction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2023-01-13
- Publication Date
- 2026-05-05
AI Technical Summary
Deep learning-based image coding techniques often result in poor image quality after compression and reconstruction, making it difficult to improve.
By decoding the image bitstream, the feature reconstruction values are determined, and feature enhancement and synthesis transformation are performed, including obtaining the feature standard deviation and standard deviation representation value, determining the feature mask according to the preset threshold, enhancing the feature reconstruction values, obtaining enhanced feature values, and finally synthesizing the reconstructed image patch.
It reduces the distortion of image features during the quantization process and improves the quality of the reconstructed image.
Smart Images

Figure CN121985140A_ABST
Abstract
Description
[0001] This invention patent application is a divisional application of Chinese invention patent application filed on January 13, 2023, with application number 202310055970.0 and titled "Image Decoding and Encoding Method, Apparatus, Device and Storage Medium". Technical Field
[0002] This invention relates to the field of image processing technology, and in particular to an image decoding and encoding method, apparatus, device, and storage medium. Background Technology
[0003] Today, deep learning and neural networks are making continuous breakthroughs in the field of video image compression. Deep learning-based image coding technology has significantly outperformed traditional coding standards in terms of coding performance. However, improving the image quality of images reconstructed after compression using deep learning-based image coding technology remains a major challenge.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide an image decoding and encoding method, apparatus, device, and storage medium, aiming to address the technical problem of improving the image quality of images reconstructed after compression using deep learning-based image encoding technology.
[0006] To achieve the above objectives, the present invention provides an image decoding method, the method comprising the following steps: Decode the image bitstream and determine the feature reconstruction value corresponding to the current image features obtained from the decoding; The reconstructed feature values are enhanced to obtain enhanced feature values; The enhanced feature values are then synthesized and transformed to obtain reconstructed image patches.
[0007] In one possible implementation of this application, the current image features are a three-dimensional feature matrix; The step of enhancing the reconstructed feature values to obtain enhanced feature values includes: Obtain the feature standard deviation and standard deviation representation value corresponding to each matrix element in the current image features; The feature mask corresponding to each matrix element in the current image feature is determined based on the feature standard deviation, the standard deviation representation value, and the preset threshold. Based on the feature mask, feature enhancement is performed on the reconstructed feature values to obtain enhanced feature values.
[0008] In one possible implementation of this application, determining the feature mask corresponding to each matrix element in the current image feature based on the feature standard deviation, the standard deviation representation value, and a preset threshold includes: If the feature standard deviation and standard deviation representation value corresponding to the matrix element meet the preset enhancement conditions, then the feature mask corresponding to the matrix element is set to the first type value. If the feature standard deviation and standard deviation representation value corresponding to the matrix element do not meet the preset enhancement conditions, then the feature mask corresponding to the matrix element is set to the second type value.
[0009] In one possible implementation of this application, before setting the feature mask corresponding to the matrix element to a first type value if the feature standard deviation and standard deviation representation value corresponding to the matrix element satisfy a preset enhancement condition, the method further includes: If the feature standard deviation corresponding to a matrix element is greater than a preset threshold, and the standard deviation representation value is a first type representation value, then it is determined that the feature standard deviation and the standard deviation representation value corresponding to the matrix element satisfy a preset enhancement condition. or, If the feature standard deviation corresponding to a matrix element is less than a preset threshold, and the standard deviation representation value is a second type representation value, then it is determined that the feature standard deviation and standard deviation representation value corresponding to the matrix element satisfy the preset enhancement condition.
[0010] In one possible implementation of this application, the step of enhancing the feature reconstruction value based on the feature mask to obtain enhanced feature values includes: Use the matrix elements whose corresponding feature masks are of the first type as the target matrix elements; The feature reconstruction values corresponding to the elements of the target matrix are enhanced to obtain enhanced feature values.
[0011] In one possible implementation of this application, enhancing the feature reconstruction values corresponding to the target matrix elements to obtain enhanced feature values includes: Obtain the feature reconstruction value, residual reconstruction value, and predicted feature value corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the residual reconstruction value, and a second enhancement value is determined based on a second scaling factor and the predicted feature value. The enhanced feature value is determined based on the reconstructed feature value, the first enhanced value, and the second enhanced value.
[0012] In one possible implementation of this application, before determining the first enhancement value based on the first scaling factor and the predicted feature value, and before determining the second enhancement value based on the second scaling factor and the residual reconstruction value, the method further includes: Obtain the feature channels corresponding to the elements of the target matrix; The first scaling factor and the second scaling factor are determined based on the feature channels, and different feature channels correspond to different first scaling factors and second scaling factors.
[0013] In one possible implementation of this application, enhancing the feature reconstruction values corresponding to the target matrix elements to obtain enhanced feature values includes: Obtain the feature reconstruction values and predicted feature values corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the predicted feature value. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
[0014] In one possible implementation of this application, enhancing the feature reconstruction values corresponding to the target matrix elements to obtain enhanced feature values includes: Obtain the feature reconstruction values and residual reconstruction values corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the reconstructed residual value. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
[0015] In one possible implementation of this application, enhancing the feature reconstruction values corresponding to the target matrix elements to obtain enhanced feature values includes: Obtain the feature reconstruction values and feature standard deviations corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the feature standard deviation. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
[0016] In one possible embodiment of this application, the feature reconstruction values include luminance reconstruction values and chrominance reconstruction values, and the enhanced feature values include luminance enhancement feature values and chrominance enhancement feature values; The step of enhancing the feature reconstruction values corresponding to the elements of the target matrix to obtain enhanced feature values includes: The chromaticity reconstruction values corresponding to the elements of the target matrix are enhanced to obtain chromaticity enhancement feature values; The brightness reconstruction values corresponding to the target matrix elements are enhanced to obtain brightness enhancement feature values.
[0017] In one possible implementation of this application, after enhancing the chroma reconstruction values corresponding to the target matrix elements to obtain chroma enhancement feature values, the method further includes: The first enhancement value is determined based on the reconstructed brightness value and the first scaling factor; The chromaticity enhancement feature value is further enhanced based on the first enhancement value.
[0018] In one possible implementation of this application, determining the first enhancement value based on the reconstructed brightness value and the first scaling factor further includes: Extract component indicator parameters from the image bitstream; If the component indication parameter is a chroma enhancement type parameter, then the first enhancement value is determined based on the luminance reconstruction value and the first scaling factor.
[0019] In one possible implementation of this application, the step of decoding the image bitstream and determining the feature reconstruction value corresponding to the current image features obtained by decoding includes: The image bitstream is decoded, and the residual reconstruction value corresponding to the current image features obtained from the decoding is determined. Based on the reconstructed feature values, prediction is performed to obtain the predicted feature values; The feature reconstruction value corresponding to the current image feature is determined based on the residual reconstruction value and the predicted feature value.
[0020] In one possible implementation of this application, after decoding the image bitstream and determining the residual reconstruction value corresponding to the current image features obtained from the decoding, the method further includes: Predictive feature values are obtained by making predictions based on the enhanced feature values of the reconstructed features; The feature reconstruction value corresponding to the current image feature is determined based on the residual reconstruction value and the predicted feature value.
[0021] In one possible implementation of this application, the enhanced feature value of the reconstructed feature is the same as or different from the enhanced feature value corresponding to the current image feature in terms of feature enhancement method.
[0022] In one possible implementation of this application, the enhanced feature value of the reconstructed feature is determined by a syntax flag bit to determine whether the feature enhancement method of the enhanced feature value corresponding to the current image feature is the same or different. The syntax flag bit is read from the image bitstream.
[0023] In one possible implementation of this application, the step of enhancing the reconstructed feature values to obtain enhanced feature values includes: Extract the syntax application interval parameters from the image bitstream and obtain the feature location information corresponding to the current image feature; The enhanced syntax parameters are determined based on the feature location information and the syntax application interval parameters. The feature reconstruction value is enhanced according to the enhanced syntax parameters to obtain enhanced feature values.
[0024] Furthermore, to achieve the above objectives, the present invention also proposes an image decoding device, which includes the following modules: The bitstream decoding module is used to decode the image bitstream and determine the feature reconstruction value corresponding to the current image features obtained by decoding; The feature enhancement module is used to enhance the feature reconstruction values to obtain enhanced feature values; The image reconstruction module is used to perform synthetic transformation on the enhanced feature values to obtain reconstructed image blocks.
[0025] Furthermore, to achieve the above objectives, the present invention also proposes an image encoding method, the image encoding method comprising: Feature extraction is performed on the image block to be encoded, and the extracted features are used as the current image features; Predict the predicted feature value based on the feature reconstruction value corresponding to the reconstructed feature; The coding residual coefficients corresponding to the current image features are determined based on the predicted feature values; The coding residual coefficients are written into the image bitstream corresponding to the image block to be encoded.
[0026] In one possible implementation of this application, after writing the coding residual coefficients into the image bitstream corresponding to the image block to be encoded, the method further includes: Image decoding is performed on the image bitstream corresponding to the image block to be encoded to obtain the reconstructed image block; The image coding efficiency is determined based on the reconstructed image block and the image block to be encoded.
[0027] Furthermore, to achieve the above objectives, the present invention also proposes an image encoding device, the image encoding device comprising: The feature extraction module is used to extract features from the image blocks to be encoded and to use the extracted features as the current image features. The feature prediction module is used to predict feature values based on the feature reconstruction values corresponding to the reconstructed features. The residual calculation module is used to determine the coding residual coefficients corresponding to the current image features based on the predicted feature values; The parameter writing module is used to write the encoding residual coefficients into the image bitstream corresponding to the image block to be encoded.
[0028] In addition, to achieve the above objectives, the present invention also proposes a decoding device, which includes: a processor, a memory, and a decoding program stored in the memory and executable on the processor. When the decoding program is executed by the processor, it implements the image decoding method described above.
[0029] Furthermore, to achieve the above objectives, the present invention also proposes an encoding device, which includes: a processor, a memory, and a decoding program and / or an encoding program stored in the memory and executable on the processor. When the decoding program is executed by the processor, it implements the image decoding method as described above, and when the encoding program is executed by the processor, it implements the image encoding method as described above.
[0030] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing an image decoding program and / or an image encoding program, wherein the image decoding program, when executed, implements the image decoding method as described above, and the image encoding program, when executed, implements the image encoding method as described above.
[0031] This invention decodes the image bitstream and determines the feature reconstruction value corresponding to the current image features obtained from the decoding; it then enhances the feature reconstruction value to obtain enhanced feature values; finally, it performs a synthetic transformation on the enhanced feature values to obtain reconstructed image blocks. Because feature enhancement is performed on the feature reconstruction value before image reconstruction, and then image reconstruction is performed based on the enhanced feature values, distortion of image features during quantization and other processes is reduced, thereby improving the image quality of the reconstructed image. Attached Figure Description
[0032] Figure 1 This is a schematic diagram of the structure of an electronic device in the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the first embodiment of the image decoding method of the present invention; Figure 3 This is a schematic diagram of a matrix structure according to an embodiment of the present invention; Figure 4 This is a schematic diagram of an image encoding and decoding process according to an embodiment of the present invention; Figure 5 This is a schematic diagram of an image encoding and decoding process according to an embodiment of the present invention; Figure 6 This is a flowchart illustrating the second embodiment of the image decoding method of the present invention; Figure 7 This is a flowchart illustrating the third embodiment of the image decoding method of the present invention; Figure 8 This is a flowchart illustrating the fourth embodiment of the image decoding method of the present invention. Figure 9 This is a schematic diagram of the feature reconstruction sequence according to an embodiment of the present invention; Figure 10 This is a flowchart illustrating the first embodiment of the image encoding method of the present invention; Figure 11 This is a flowchart illustrating the second embodiment of the image encoding method of the present invention. Figure 12 This is a structural block diagram of the first embodiment of the image decoding device of the present invention; Figure 13 This is a structural block diagram of the first embodiment of the image encoding device of the present invention.
[0033] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0034] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0035] Reference Figure 1 , Figure 1 This is a schematic diagram of the decoding device or the structure of the decoding device in the hardware operating environment involved in the embodiments of the present invention.
[0036] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0037] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0038] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and decoding and / or encoding programs.
[0039] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the decoding device or the decoding device. The electronic device calls the decoding program and / or decoding program stored in the memory 1005 through the processor 1001 and executes the image decoding method or image encoding method provided in the embodiments of the present invention.
[0040] This invention provides an image decoding method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating a first embodiment of an image decoding method according to the present invention.
[0041] In this embodiment, the image decoding method includes the following steps: Step S10: Decode the image bitstream and determine the feature reconstruction value corresponding to the current image feature obtained by decoding.
[0042] It should be noted that the execution subject of this embodiment can be a decoding device when encoding image data. The decoding device can be a personal computer, server or other electronic device. Of course, it can also be other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the image decoding method of the present invention is described using a decoding device as an example.
[0043] Since the encoding device typically decodes the encoded image stream after encoding is completed during the image encoding process, and determines whether the parameters used in the encoding need to be adjusted based on the image quality of the decoded image, the execution subject in this embodiment can also be the encoding device.
[0044] It should be noted that an image bitstream can be a bitstream generated by an encoding device after encoding image data that needs to be compressed. When a decoding device decodes an image bitstream, it extracts the image features of the encoded image data from the bitstream. The image features obtained during the decoding process are the current image features. The reconstructed feature value can be the image feature obtained after restoring the current image features during the decoding process.
[0045] In the specific processing, when encoding image data, the encoding device can divide the image data into one image block for processing. Of course, it can also divide the image data into multiple image blocks for processing. This embodiment does not limit this.
[0046] Technical terms involved in image encoding or decoding include: JPEG (Joint Photographic Experts Group), JPEG-AI (Joint Photographic Experts Group Artificial Intelligence), Entropy Encoding, Neural Network (NN), Convolutional Neural Network (CNN), feature, Rate-Distortion Optimized, etc., which will be explained here.
[0047] JPEG (Joint Photographic Experts Group) is a standard for compressing continuous-tone still images. Files with the extension .jpg or .jpeg are the most commonly used image file format. It primarily employs a joint coding method combining predictive coding (DPCM), discrete cosine transform (DCT), and entropy coding to remove redundant image and color data. It is a lossy compression format, capable of compressing images into a very small storage space, but this inevitably causes some damage to the image data. Especially when using excessively high compression ratios, the quality of the decompressed image will decrease. Therefore, if high-quality images are desired, excessively high compression ratios should be avoided.
[0048] JPEG AI aims to create a learning-based image coding standard that provides a single-stream, compact compressed domain representation, optimized for human visualization, significantly improving compression efficiency compared to commonly used image coding standards while maintaining the same subjective quality, and offering efficient performance for image processing and computer vision tasks. JPEG AI is geared towards a wide range of applications, such as cloud storage, visual surveillance, autonomous vehicles and devices, image acquisition, storage and management, real-time monitoring of visual data, and media distribution. The goal is to design an encoding solution that significantly improves the compression efficiency of commonly used coding standards while maintaining the same subjective quality, and provides efficient compressed domain processing for machine learning-based image processing and computer vision tasks. Other key requirements include hardware / software implementations for user-friendly encoding and decoding, support for 8-bit and 10-bit depths, efficient encoding of images using text and graphics, and progressive decoding.
[0049] Entropy coding is encoding that follows the entropy principle without losing any information during the encoding process. Information entropy is the average amount of information in a source (a measure of uncertainty). Common entropy coding methods include Shannon coding, Huffman coding, and arithmetic coding.
[0050] The neural network referred to in this application is an artificial neural network, not a biological neural network. A neural network is a computational model composed of a large number of interconnected nodes (or neurons). In an artificial neural network, neurons can represent different objects, such as features, letters, concepts, or meaningful abstract patterns. There are three types of processing units in a network: input units, output units, and hidden units. Input units receive signals and data from the external world; output units output the system's processing results; hidden units are located between input and output units and cannot be observed from outside the system. The connection weights between neurons reflect the connection strength between units; the representation and processing of information are reflected in the connection relationships between the network's processing units. Artificial neural networks are a non-programmed, brain-like information processing method. Essentially, they achieve parallel and distributed information processing capabilities through network transformations and dynamic behaviors, mimicking the information processing functions of the human brain's nervous system to varying degrees and levels. Currently, in the field of video processing, commonly used neural networks include convolutional neural networks (CNNs), recurrent neural networks (RNNs), and fully connected networks.
[0051] Convolutional Neural Networks (CNNs) are a type of feedforward neural network and one of the most representative network structures in deep learning. Their artificial neurons can respond to surrounding units within a certain coverage area, exhibiting excellent performance in large-scale image processing. Generally, the basic structure of a CNN consists of two layers: a feature extraction layer (also called a convolutional layer), where the input of each neuron is connected to the local receptive field of the previous layer, extracting local features. Once the local feature is extracted, its positional relationship with other features is determined. The second layer is a feature mapping layer (also called an activation layer). Each computational layer of the network consists of multiple feature maps, each a plane where all neurons have equal weights. Feature mapping structures can use functions such as the Sigmoid function, ReLU function, Leaky-ReLU function, PReLU function, and GDN function as activation functions for the convolutional network. Furthermore, since neurons on a single mapping plane share weights, the number of free parameters in the network is reduced. One advantage of CNNs over traditional image processing algorithms is that they avoid complex preprocessing steps (such as extracting artificial features) and can directly input the original image for end-to-end learning. One of the advantages of CNNs over traditional neural networks is that traditional neural networks use a fully connected approach, meaning that all neurons from the input layer to the hidden layer are connected. This results in a huge number of parameters, making network training time-consuming or even difficult. CNNs, on the other hand, avoid this difficulty by using methods such as local connectivity and weight sharing.
[0052] The feature involved in this application is a three-dimensional feature matrix of CxWxH (e.g., ...). Figure 3 As shown, Figure 3 (This is a schematic diagram of the matrix structure in this embodiment). C represents the number of channels, H represents the feature height, and W represents the feature width. The feature matrix can be either the input or the output of the neural network.
[0053] There are two main metrics for evaluating coding efficiency: bitrate and PSNR. A smaller bitrate results in a higher compression ratio; a higher PSNR indicates better image coding efficiency. The decision formula for mode selection is essentially a comprehensive evaluation of these two metrics. The cost of each mode is: J(mode) = D + λ R. Here, D represents Distortion, typically measured using the SSE metric, which is the sum of the mean squares of the differences between the reconstructed block and the source image; λ is the Lagrange multiplier; and R is the actual number of bits required to encode the image block in this mode, including the total number of bits needed for encoding mode information, motion information, residuals, etc. Using the RDO principle to compare and decide on encoding modes during mode selection usually ensures optimal coding performance.
[0054] In one possible implementation of this application, the image feature values may be large or even complex. To improve encoding efficiency, the encoding device may perform residual calculations on the image features before encoding the obtained residual data. Then, during image data decoding, a corresponding recovery process is required to ensure that feature reconstruction values close to those before encoding are obtained. In this case, step S10 of this embodiment may include: The image bitstream is decoded, and the residual reconstruction value corresponding to the current image features obtained from the decoding is determined. Based on the reconstructed feature values, prediction is performed to obtain the predicted feature values; The feature reconstruction value corresponding to the current image feature is determined based on the residual reconstruction value and the predicted feature value.
[0055] It should be noted that if the encoding device calculates the residual data before encoding, then decoding the image bitstream will only yield the residual reconstructed value corresponding to the current image features. The reconstructed features can be partial image features that have already undergone feature recovery. Predicting based on the reconstructed feature values can be achieved by using a mean prediction network based on the reconstructed feature values.
[0056] To facilitate understanding, we will now combine... Figure 4 To explain, Figure 4 This is a schematic diagram of the image encoding and decoding process in this embodiment. In the diagram, Bitstream#1 is the auxiliary bitstream, and Bitstream#2 is the image bitstream, as shown below. Figure 4 As shown, the image features y are obtained by analyzing the transformation network to extract features from the original image block (i.e., the image data that the encoding device needs to encode). At the same time, the auxiliary information z_hat is calculated by the hyperparameter encoding network, and the predicted feature value mu is calculated by the mean prediction network. Then, the encoding device will perform residual processing to obtain the original residual value r of the current feature. After residual processing and quantization (Q&AE), the obtained encoding residual coefficient r_coef is written into the image bitstream (Bitstream#2).
[0057] Subsequently, when processing the image bitstream (Bitstream#2), the decoding device extracts the coded residual coefficients r_coef from the image bitstream, then performs inverse quantization and residual recovery (AD&IQ) on the coded residual coefficients. This yields the residual reconstructed value r_hat corresponding to the current image feature. Next, a mean prediction network predicts the feature value mu based on the reconstructed feature value y_hat, obtained from the reconstructed feature value mu. Based on the predicted feature value and the residual reconstructed value, the current image feature's reconstructed value y_hat is determined. Then, feature enhancement is performed on the reconstructed value to obtain the enhanced feature value y_hat_en. Finally, a synthesis transform network synthesizes and encodes the enhanced feature value to obtain the reconstructed image block x_hat. The parameters used in the Q&AE and AD&IQ processing are obtained by processing the auxiliary information z_hat through a probabilistic hyperparameter decoding network.
[0058] Among them, the analysis transformation network, hyperparameter encoding network, probabilistic hyperparameter decoding network, and synthetic transformation network can all be neural networks built based on deep learning.
[0059] In practical applications, determining the feature reconstruction value corresponding to the current image feature based on the residual reconstruction value and the predicted feature value can be achieved by adding the residual reconstruction value and the predicted feature value, and using the sum as the feature reconstruction value corresponding to the current image feature. Furthermore, during prediction, the feature reconstruction values of reconstructed features that are close to the current image feature can be used for prediction.
[0060] In one possible implementation of this application, in order to further improve coding efficiency, during the process of encoding an image, after calculating the residual data, the encoding device may perform residual processing or quantization processing on the residual data, and then write the processed coding residual coefficients into the image bitstream. In this case, determining the residual reconstruction value corresponding to the current image feature obtained by decoding can be done by decoding the image bitstream, extracting the coding residual coefficients corresponding to the current image feature, performing inverse quantization and residual recovery on the coding residual coefficients, and obtaining the residual reconstruction value corresponding to the current image feature.
[0061] In one possible implementation of this application, when making predictions, the enhanced feature values of the reconstructed features can also be used. In this case, step S10 of this embodiment may include: The image bitstream is decoded, and the residual reconstruction value corresponding to the current image features obtained from the decoding is determined. Predictive feature values are obtained by making predictions based on the enhanced feature values of the reconstructed features; The feature reconstruction value corresponding to the current image feature is determined based on the residual reconstruction value and the predicted feature value.
[0062] It should be noted that in some cases, when the encoding end is encoding image data, it may use the enhanced feature values of the reconstructed features to predict the residual value to determine the predicted feature value corresponding to the currently encoded image feature. Based on the predicted feature value, the encoding residual coefficient of the currently encoded image feature is calculated. In the decoding process, the same method is also required. The mean prediction network is used to predict the predicted feature value based on the enhanced feature values of the reconstructed features. Then, the residual reconstruction value and the predicted feature value are added together to obtain the feature reconstruction value corresponding to the current image feature.
[0063] To facilitate understanding, we will now combine... Figure 5 To explain, Figure 5 This is a schematic diagram of the image encoding and decoding process in this embodiment, as shown below. Figure 5 As shown, the processing flow for encoding and decoding image data is the same as described above. Figure 4 The basic structure is similar, but the difference lies in the decoding process. After obtaining the feature reconstruction value of the current image feature, a first feature enhancement method is used to enhance the feature reconstruction value (i.e., feature enhancement 1 in the figure). The obtained first enhanced feature value y_hat_en1 is input into the synthesis transformation network for synthesis transformation processing to obtain the reconstructed image block x_hat. At the same time, a second feature enhancement method is also used to enhance the feature reconstruction value (i.e., feature enhancement 2 in the figure). The obtained second enhanced feature value y_hat_en2 is input into the mean prediction network. When processing other image features thereafter, the current image feature is used as the reconstructed feature, and the second enhanced feature value is used for prediction to calculate the predicted feature value.
[0064] It should be noted that the purpose of Feature Enhancement 2 is for... Figure 5 The generation of subsequent feature predictions is often done column by column (columns can be diagonal, not necessarily vertical), making it impossible to simultaneously complete the features of the entire image (or the entire image patch). However, when Feature Enhancement 1 is performed, the features of the entire image (or the entire image patch) have often been reconstructed, thus allowing for parallel execution of the features of the entire image (or the entire image patch).
[0065] In practical applications, the feature enhancement methods for the enhanced feature values of the reconstructed features and the enhanced feature values corresponding to the current image features can be the same or different. That is, the feature enhancement processes of the first feature enhancement method and the second feature enhancement method can be the same. In this case, y_hat_en1 equals y_hat_en2, and the decoding device only needs to decode one set of relevant syntax parameters from the image bitstream. Of course, depending on actual needs, the first feature enhancement method and the second feature enhancement method can also be set to different processes. In this case, the decoding device needs to decode two sets of syntax parameters from the image bitstream.
[0066] In specific applications, the administrators of the decoding or encoding devices can also set configuration parameters. By setting these configuration parameters, it is possible to skip the first feature enhancement method and / or the second feature enhancement method, that is, directly set y_hat_en1 and / or y_hat_en2 to y_hat. These configuration parameters can be set in the image bitstream. Of course, other methods can also be tried to set the configuration parameters. This embodiment does not limit this.
[0067] In one possible implementation of this application, the encoding device can pre-write syntax flag bits in the image bitstream to indicate whether the first feature enhancement method and the second feature enhancement method use exactly the same parameters. Then, the decoding device can determine whether the first feature enhancement method and the second feature enhancement method use exactly the same parameters based on the syntax flag bits read from the image bitstream. For example, the encoding device uses a 1-bit syntax flag bit, useSameParaFlag, to indicate whether the first feature enhancement method and the second feature enhancement method use exactly the same syntax parameters. If the decoding device reads useSameParaFlag=1, it means that the first feature enhancement method and the second feature enhancement method use exactly the same syntax parameters. If the decoding device reads useSameParaFlag=0, it means that the first feature enhancement method and the second feature enhancement method use completely different syntax parameters.
[0068] In one possible implementation of this application, the syntax parameters involved in the feature enhancement method can be as shown in the following table: Table 1. Semantic Table of Syntax Parameters
[0069] In one possible implementation of this application, in addition to the syntax parameters in Table 1, other parameters can be added, such as blockSizeList[idx] and modeList[idx]. The encoding length of blockSizeList[idx] can be 8 bits, and its semantics are: for a block size of NxN, if N is 1, it indicates that the value is based on each pixel. Specifically, if N is greater than 1, a representative value for the NxN block is obtained by taking the minimum, maximum, or average value, etc. Based on this representative value, the feature enhancement method of this invention is used to enhance the representative value to obtain a new representative value. Then, the enhanced value of the NxN block is set as this new representative value. The encoding length of modeList[idx] can be 3 bits, and its semantics are: values of 1 to 4 represent min, avg, max, and max pool used for upsampling and downsampling (for block sizes other than 1x1), respectively; a value of 5 indicates that a set of filters has 2 scales. The parameters in this case are as shown in Table 2. Table 2. Syntax Parameter Semantics Table
[0070] Step S20: Perform feature enhancement on the reconstructed feature values to obtain enhanced feature values.
[0071] It should be noted that when encoding image data, image features undergo quantization and other processing, which can cause some distortion. Feature enhancement can be performed on the reconstructed feature values first, and then image reconstruction can be performed based on the enhanced feature values, thereby improving the image quality of the reconstructed image.
[0072] Step S30: Perform a synthetic transformation on the enhanced feature values to obtain a reconstructed image patch.
[0073] It should be noted that the synthetic encoding of enhanced feature values to obtain reconstructed image patches can be achieved by using a pre-built synthetic transformation network to perform synthetic transformation processing on the enhanced feature values, thereby obtaining the reconstructed image patches. This synthetic transformation network can be a network built based on deep learning or a neural network.
[0074] Understandably, if the encoding device processes the image data into only one image block, the resulting reconstructed image block will be the complete reconstructed image data corresponding to the original image data. However, if the encoding device processes the image data into multiple image blocks, the resulting reconstructed image block will only be the reconstructed image data corresponding to a single image block within the original image data.
[0075] This embodiment decodes the image bitstream and determines the feature reconstruction value corresponding to the current image features obtained from the decoding; it then enhances the feature reconstruction value to obtain enhanced feature values; finally, it performs a synthetic transformation on the enhanced feature values to obtain reconstructed image blocks. Because feature enhancement is performed on the feature reconstruction value before image reconstruction, and then image reconstruction is performed based on the enhanced feature values, distortion of image features during quantization and other processes is reduced, thereby improving the image quality of the reconstructed image.
[0076] refer to Figure 6 , Figure 6 This is a flowchart illustrating a second embodiment of an image decoding method according to the present invention.
[0077] Based on the first embodiment described above, step S20 of the image decoding method in this embodiment includes: Step S201: Obtain the feature standard deviation and standard deviation representation value corresponding to each matrix element in the current image features.
[0078] It should be noted that the current image feature can be a three-dimensional feature matrix, whose three dimensions can be represented by c, i, and j, where c is the channel identifier, and i and j represent the feature height and feature width, respectively. The feature standard deviation corresponding to the matrix element can be the standard deviation of the feature corresponding to the matrix element and the feature mean. The standard deviation representation value is used to characterize whether the standard deviation corresponding to the matrix element is a large standard deviation.
[0079] The standard deviation can be divided into first-type and second-type values (for simplicity, we can use true and false to represent them, with true being the first-type value and false being the second-type value). If the standard deviation of a matrix element is a first-type value, it means that the standard deviation of the matrix element is a large standard deviation; if the standard deviation of a matrix element is a second-type value, it means that the standard deviation of the matrix element is not a large standard deviation.
[0080] Step S202: Determine the feature mask corresponding to each matrix element in the current image feature based on the feature standard deviation, the standard deviation representation value, and the preset threshold.
[0081] It should be noted that the feature mask can be a representation value used to identify whether feature enhancement is required for the feature reconstruction value corresponding to the matrix element. The feature mask can be divided into a first type value and a second type value (for simplicity, true and false can be used to represent them, with true being the first type value and false being the second type value). If the feature mask corresponding to the matrix element is a first type value, it means that feature enhancement is required for the feature reconstruction value corresponding to the matrix element; if the feature mask corresponding to the matrix element is a second type value, it means that feature enhancement is not required for the feature reconstruction value corresponding to the matrix element.
[0082] In practical use, preset enhancement conditions can be set in advance to determine whether the feature standard deviation and standard deviation representation value corresponding to the matrix element meet the preset enhancement conditions to set the feature mask of the matrix element. In this case, step S202 of this embodiment may include: If the feature standard deviation and standard deviation representation value corresponding to the matrix element meet the preset enhancement conditions, then the feature mask corresponding to the matrix element is set to the first type value. If the feature standard deviation and standard deviation representation value corresponding to the matrix element do not meet the preset enhancement conditions, then the feature mask corresponding to the matrix element is set to the second type value.
[0083] It is understandable that if the feature standard deviation and standard deviation representation value corresponding to the matrix element meet the preset enhancement conditions, it means that the feature reconstruction value corresponding to the matrix element needs to be enhanced. Therefore, the feature mask corresponding to the matrix element can be set to the first type value.
[0084] If the feature standard deviation and standard deviation representation value corresponding to the matrix element do not meet the preset enhancement conditions, it means that the feature reconstruction value corresponding to the matrix element does not need to be enhanced. Therefore, the feature mask corresponding to the matrix element can be set to the second type value.
[0085] In a specific implementation, feature enhancement can be performed on matrix elements with large standard deviations and corresponding feature standard deviations greater than a certain threshold, and feature enhancement can also be performed on matrix elements with non-large standard deviations and corresponding feature standard deviations less than a certain threshold. The preset threshold can be pre-set by the administrator of the encoding or decoding device. Therefore, before the step described in this embodiment of setting the feature mask corresponding to the matrix element to a first-type value if the feature standard deviation and standard deviation representation value corresponding to the matrix element meet the preset enhancement conditions, the following may also be included: If the feature standard deviation corresponding to a matrix element is greater than a preset threshold, and the standard deviation representation value is a first type representation value, then it is determined that the feature standard deviation and the standard deviation representation value corresponding to the matrix element satisfy a preset enhancement condition. or, If the feature standard deviation corresponding to a matrix element is less than a preset threshold, and the standard deviation representation value is a second type representation value, then it is determined that the feature standard deviation and standard deviation representation value corresponding to the matrix element satisfy the preset enhancement condition.
[0086] In practical use, when enhancing the features of the reconstructed features, at least one filter can be used, and the enhancement of each filter is performed in sequence according to the order of the filters (the execution order of the filters can be preset by the administrator of the encoding or decoding device).
[0087] Different filters can be distinguished by setting different indices (idx). When determining the feature mask, different filters can be set with different feature masks for the same matrix elements. For example, the feature mask for the filter with index idx can be:
[0088] Where mask[idx,c,i,j] is the feature mask set by the filter at index idx for the matrix element with coordinates (c,i,j), Threshold[idx] is the preset threshold corresponding to the filter at index idx, GreaterFlag[idx] is the standard deviation representation value set by the filter at index idx for the matrix element with coordinates (c,i,j), and σ[c,i,j] is the feature standard deviation corresponding to the matrix element with coordinates (c,i,j).
[0089] In the specific implementation, if mask[idx,c,i,j] is true (or 1 and 0 can be used to replace true and false, in which case mask[idx,c,i,j]=1), it means that the filter with index idx will perform feature enhancement on the matrix element with matrix coordinates (c,i,j). If there are multiple filters, feature enhancement may be performed multiple times for the same matrix element.
[0090] Step S203: Based on the feature mask, perform feature enhancement on the reconstructed feature values to obtain enhanced feature values.
[0091] It should be noted that, based on the feature mask, feature enhancement is performed on the reconstructed feature values to obtain enhanced feature values. This can be achieved by performing feature enhancement on the reconstructed feature values corresponding to the matrix elements in the current image features that need to be enhanced, thereby obtaining enhanced feature values.
[0092] This embodiment obtains the feature standard deviation and its representation value corresponding to each matrix element in the current image features; determines the feature mask corresponding to each matrix element in the current image features based on the feature standard deviation, its representation value, and a preset threshold; and enhances the reconstructed feature values based on the feature mask to obtain enhanced feature values. Since a corresponding feature mask is pre-set for each matrix element based on its feature standard deviation, its representation value, and a preset threshold, the matrix elements in the feature matrix corresponding to the current image features that require feature enhancement are marked. This allows for rapid identification of the matrix elements requiring feature enhancement during feature enhancement, thus accelerating processing efficiency.
[0093] refer to Figure 7 , Figure 7 This is a flowchart illustrating a third embodiment of an image decoding method according to the present invention.
[0094] Based on the second embodiment described above, step S203 of the image decoding method in this embodiment includes: Step S2031: Use the matrix elements whose corresponding feature masks are of the first type as the target matrix elements.
[0095] It should be noted that if the feature mask corresponding to a matrix element is a first-type value, it means that the feature reconstruction value corresponding to that matrix element needs to be enhanced. Therefore, the matrix elements in the three-dimensional matrix corresponding to the current image features can be filtered according to the feature mask, and the matrix elements whose corresponding feature mask is a first-type value are taken as the target matrix elements.
[0096] Step S2032: Enhance the feature reconstruction values corresponding to the elements of the target matrix to obtain enhanced feature values.
[0097] It should be noted that when enhancing the feature reconstruction values corresponding to the elements of the target matrix, different methods can be used to obtain enhanced feature values.
[0098] In one possible implementation of this application, when enhancing the feature reconstruction values corresponding to the target matrix elements, the enhancement can be performed by combining a preset scaling factor with the feature reconstruction values, residual reconstruction values, and predicted feature values corresponding to the target matrix elements. In this case, step S2032 of this embodiment may include: Obtain the feature reconstruction value, residual reconstruction value, and predicted feature value corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the residual reconstruction value, and a second enhancement value is determined based on a second scaling factor and the predicted feature value. The enhanced feature value is determined based on the reconstructed feature value, the first enhanced value, and the second enhanced value.
[0099] It should be noted that the first scaling factor and the second scaling factor can be preset scaling factors, and different filters can correspond to different first scaling factors and second scaling factors.
[0100] In practical applications, the enhanced feature value can be determined based on the first feature enhancement formula, the feature reconstruction value, the first enhancement value, and the second enhancement value.
[0101] The first feature enhancement formula is: y_hat_en[c,i,j] = y_hat[c,i,j]+ mean_hat [c,i,j] Scale2[idx] +residual_hat [c,i,j] Scale1[idx] In the formula, (c,i,j) are the matrix coordinates of the target matrix element, idx is the filter index, y_hat_en[c,i,j] are the enhanced feature values corresponding to the target matrix elements, y_hat[c,i,j] are the reconstructed feature values corresponding to the target matrix elements, and residual_hat[c,i,j] are the reconstructed feature values corresponding to the target matrix elements. Scale1[idx] is the first augmentation value, and mean_hat[c,i,j] Scale2[idx] is the second augmentation value, mean_hat[c,i,j] is the predicted feature value corresponding to the element of the target matrix, residual_hat[c,i,j] is the residual reconstruction value corresponding to the element of the target matrix, Scale1[idx] is the first scaling factor, and Scale2[idx] is the second scaling factor.
[0102] In one possible implementation of this application, for the same filter, different scaling factors can be set when the channels corresponding to the target matrix elements are different. In this case, before the steps of determining the first enhancement value based on the first scaling factor and the predicted feature value, and determining the second enhancement value based on the second scaling factor and the residual reconstruction value, the following may be included: Obtain the feature channels corresponding to the elements of the target matrix; The first scaling factor and the second scaling factor are determined based on the feature channels.
[0103] It should be noted that obtaining the feature channels corresponding to the target matrix elements can be achieved by obtaining the matrix coordinates (c, i, j) of the target matrix elements, extracting c, and determining the feature channels corresponding to the target matrix elements based on the value of c.
[0104] In practical applications, determining the first and second scaling factors based on the feature channels can be achieved by obtaining the factor channel mapping table corresponding to the currently used filter, and then looking up the corresponding first and second scaling factors based on the feature channels in the factor channel mapping table. The factor channel mapping table contains the mapping relationship between feature channels and scaling factors. Different feature channels in the factor channel mapping table can correspond to different first and second scaling factors. The factor channel mapping table can be pre-configured by the administrators of the encoding or decoding equipment.
[0105] Then, according to the second feature enhancement formula, the enhanced feature value can be determined based on the feature reconstruction value, the first enhancement value, and the second enhancement value. The second feature enhancement formula can be: y_hat_en[c,i,j] = y_hat[c,i,j]+ mean_hat [c,i,j] Scale2[c,idx] +residual_hat [c,i,j] Scale1[c,idx] In the formula, (c,i,j) are the matrix coordinates of the target matrix element, idx is the filter index, y_hat_en[c,i,j] are the enhanced feature values corresponding to the target matrix elements, y_hat[c,i,j] are the reconstructed feature values corresponding to the target matrix elements, and residual_hat[c,i,j] are the reconstructed feature values corresponding to the target matrix elements. Scale1[c,idx] represents the first augmentation value, and mean_hat[c,i,j] represents the mean value. Scale2[c,idx] is the second augmentation value, mean_hat[c,i,j] is the predicted feature value corresponding to the element of the target matrix, residual_hat[c,i,j] is the residual reconstruction value corresponding to the element of the target matrix, Scale1[c,idx] is the first scaling factor corresponding to the feature channel of the element of the target matrix, and Scale2[c,idx] is the second scaling factor corresponding to the feature channel of the element of the target matrix.
[0106] The administrators of the encoding or decoding equipment can also pre-set corresponding control switches for each channel. By turning off the corresponding control switch, feature enhancement for a certain channel can be turned off. Alternatively, feature enhancement for a certain channel can be turned off by modifying the scaling factor corresponding to that channel in the factor channel mapping table to 0.
[0107] In one possible implementation of this application, when enhancing the feature reconstruction values corresponding to the target matrix elements, the enhancement can be performed by combining a preset scaling factor with the feature reconstruction values and predicted feature values corresponding to the target matrix elements. In this case, step S2032 of this embodiment may include: Obtain the feature reconstruction values and predicted feature values corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the predicted feature value. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
[0108] It should be noted that the first scaling factor and the second scaling factor can be preset scaling factors, and different filters can correspond to different first scaling factors and second scaling factors. Similarly, for the same filter, different first scaling factors and second scaling factors can be set according to the different feature channels of the target matrix elements.
[0109] In practical applications, the enhanced feature value can be determined based on the first and second enhancement values using the third feature enhancement formula. The third feature enhancement formula is as follows: y_hat_en[c,i,j] = y_hat[c,i,j] Scale1[idx] + mean_hat[c,i,j] Scale2[idx] In the formula, (c,i,j) are the matrix coordinates of the target matrix elements, idx is the filter index, y_hat_en[c,i,j] is the enhancement feature value, and y_hat[c,i,j] is the enhancement feature value. Scale1[idx] is the first augmentation value, and mean_hat[c,i,j] Scale2[idx] is the second augmentation value, y_hat[c,i,j] is the feature reconstruction value corresponding to the element of the target matrix, mean_hat[c,i,j] is the predicted feature value corresponding to the element of the target matrix, Scale1[idx] is the first scaling factor, and Scale2[idx] is the second scaling factor.
[0110] In one possible implementation of this application, when enhancing the feature reconstruction values corresponding to the target matrix elements, the enhancement can be performed by combining a preset scaling factor with the feature reconstruction values and residual reconstruction values corresponding to the target matrix elements. In this case, step S2032 of this embodiment may include: Obtain the feature reconstruction values and residual reconstruction values corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the reconstructed residual value. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
[0111] It should be noted that the first scaling factor and the second scaling factor can be preset scaling factors, and different filters can correspond to different first scaling factors and second scaling factors. Similarly, for the same filter, different first scaling factors and second scaling factors can be set according to the different feature channels of the target matrix elements.
[0112] In practical applications, the enhanced feature value can be determined based on the first enhancement value and the second enhancement value using the fourth feature enhancement formula. The fourth feature enhancement formula is as follows: y_hat_en[c,i,j] = y_hat[c,i,j] Scale1[idx]+ residual_hat [c,i,j] Scale2[idx] In the formula, (c,i,j) are the matrix coordinates of the target matrix elements, idx is the filter index, y_hat_en[c,i,j] is the enhancement feature value, and y_hat[c,i,j] is the enhancement feature value. Scale1[idx] is the first enhancement value, and residual_hat[c,i,j] Scale2[idx] is the second augmentation value, y_hat[c,i,j] is the feature reconstruction value corresponding to the element of the target matrix, residual_hat[c,i,j] is the residual reconstruction value corresponding to the element of the target matrix, Scale1[idx] is the first scaling factor, and Scale2[idx] is the second scaling factor.
[0113] In one possible implementation of this application, when enhancing the feature reconstruction values corresponding to the target matrix elements, the enhancement can be performed by combining a preset scaling factor with the feature reconstruction values and feature standard deviations corresponding to the target matrix elements. In this case, step S2032 of this embodiment may include: Obtain the feature reconstruction values and feature standard deviations corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the feature standard deviation. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
[0114] It should be noted that the first scaling factor and the second scaling factor can be preset scaling factors, and different filters can correspond to different first scaling factors and second scaling factors. Similarly, for the same filter, different first scaling factors and second scaling factors can be set according to the different feature channels of the target matrix elements.
[0115] In practical applications, the enhanced feature value can be determined based on the first and second enhancement values using the fifth feature enhancement formula. The fifth feature enhancement formula is as follows: y_hat_en[c,i,j] = y_hat[c,i,j] Scale1[idx] +σ[c,i,j] Scale2[idx] In the formula, (c,i,j) are the matrix coordinates of the target matrix elements, idx is the filter index, y_hat_en[c,i,j] is the enhancement feature value, and y_hat[c,i,j] is the enhancement feature value. Scale1[idx] is the first enhancement value, σ[c,i,j] Scale2[idx] is the second augmentation value, y_hat[c,i,j] is the feature reconstruction value corresponding to the element of the target matrix, σ[c,i,j] is the feature standard deviation corresponding to the element of the target matrix, Scale1[idx] is the first scaling factor, and Scale2[idx] is the second scaling factor.
[0116] In one possible implementation of this application, the feature reconstruction values include reconstruction values corresponding to different components, such as luminance reconstruction values and chrominance reconstruction values. Correspondingly, the enhanced feature values may also include enhanced values of different components, such as luminance enhancement feature values and chrominance enhancement feature values. When enhancing the feature reconstruction values corresponding to the target matrix elements, the feature enhancement processes of different components can be relatively independent and do not affect each other. In this case, step S2032 described in this embodiment may include: The chromaticity reconstruction values corresponding to the elements of the target matrix are enhanced to obtain chromaticity enhancement feature values; The brightness reconstruction values corresponding to the target matrix elements are enhanced to obtain brightness enhancement feature values.
[0117] It should be noted that when performing feature enhancement, different parameters can be set for the enhancement of different components in the same filter, such as setting different scaling factors.
[0118] In one possible implementation of this application, the enhanced feature value of a certain component can be further enhanced using the feature reconstruction values of other components. For example, the chroma enhancement feature value can be further enhanced using the luminance reconstruction value. Therefore, after the step of enhancing the chroma reconstruction value corresponding to the target matrix element to obtain the chroma enhancement feature value described in this embodiment, the following may be included: The first enhancement value is determined based on the reconstructed brightness value and the first scaling factor; The chromaticity enhancement feature value is further enhanced based on the first enhancement value.
[0119] It should be noted that the first scaling factor can be a pre-set scaling factor, and different filters can correspond to different first scaling factors.
[0120] In practical applications, the chroma enhancement feature value can be further enhanced based on the sixth feature enhancement formula and the first enhancement value. The sixth feature enhancement formula can be: y_hat_chroma_en2[c,i,j]=y_hat_chroma_en[c,i,j]+Scale1[idx] y_hat_luma[c,i,j] In the formula, y_hat_chroma_en2[c,i,j] represents the chroma enhancement feature value after secondary enhancement, y_hat_chroma_en[c,i,j] represents the chroma enhancement feature value, and Scale1[idx] represents the chroma enhancement feature value. y_hat_luma[c,i,j] is the first enhancement value, Scale1[idx] is the first scaling factor, and y_hat_luma[c,i,j] is the brightness reconstruction value corresponding to the target matrix element.
[0121] Of course, in a practical implementation, the brightness enhancement feature value can also be enhanced a second time by using the chromaticity reconstruction value corresponding to the target matrix element.
[0122] In one possible implementation of this application, in order for the decoding device to determine whether secondary enhancement is needed, the step of determining the first enhancement value based on the reconstructed brightness value and the first scaling factor described in this embodiment may include: Extract component indicator parameters from the image bitstream; If the component indication parameter is a chroma enhancement type parameter, then the first enhancement value is determined based on the luminance reconstruction value and the first scaling factor.
[0123] It should be noted that the component indicator parameter can be used to indicate whether secondary enhancement is required, and which component enhancement feature values require secondary enhancement. For example, the component indicator parameter can take values from 0 to 3. If the component indicator parameter is 0, it means that no secondary enhancement is required; if the component indicator parameter is 1, it means that secondary enhancement of the chroma enhancement feature value is required; if the component indicator parameter is 2, it means that secondary enhancement of the luminance enhancement feature value is required; and if the component indicator parameter is 3, it means that secondary enhancement of both the luminance enhancement feature value and the chroma enhancement feature value is required.
[0124] It is understandable that if the component indicator parameter is a chroma enhancement type parameter, it means that secondary enhancement is required, and the component to be enhanced is a chroma enhancement feature value. In this case, the first enhancement value can be determined based on the luminance reconstruction value and the first scaling factor, and then the chroma enhancement feature value is enhanced secondaryly based on the first enhancement value.
[0125] In one possible implementation of this application, the filter can also use the same scaling factor to enhance the features of all matrix elements in the current image features. In this case, the feature reconstruction values corresponding to the target matrix elements can be enhanced according to the seventh feature enhancement formula, which is: y_hat_en[c,i,j] = y_hat[c,i,j] Scale1[idx] In the formula, (c,i,j) are the matrix coordinates of the target matrix element, idx is the filter index, y_hat[c,i,j] is the feature reconstruction value corresponding to the target matrix element, y_hat_en[c,i,j] is the enhanced feature value, and Scale1[idx] is the scaling factor corresponding to the filter with index idx.
[0126] In one possible implementation of this application, different scaling factors can be set to enhance the features of matrix elements in different channels of the current image features (of course, it is also allowed that some identical channels have the same scaling factor). In this case, the feature reconstruction value corresponding to the target matrix element can be enhanced according to the eighth feature enhancement formula, which is: y_hat_en[c,i,j] = y_hat[c,i,j] Scale1[c] In the formula, (c,i,j) are the matrix coordinates of the target matrix element, idx is the filter index, y_hat[c,i,j] is the feature reconstruction value corresponding to the target matrix element, y_hat_en[c,i,j] is the enhancement feature value, and Scale1[c] is the scaling factor corresponding to the c channel.
[0127] This embodiment uses matrix elements whose corresponding feature masks are of the first type as target matrix elements; the feature reconstruction values corresponding to the target matrix elements are enhanced to obtain enhanced feature values. Since some matrix elements requiring feature enhancement are first marked as target matrix elements based on the feature mask, and then the feature reconstruction values of the target matrix elements are enhanced, the number of matrix elements that need to be processed during the process is reduced, thus improving the execution efficiency of the image decoding method.
[0128] refer to Figure 8 , Figure 8 This is a flowchart illustrating the fourth embodiment of an image decoding method according to the present invention.
[0129] Based on the first embodiment described above, step S20 of the image decoding method in this embodiment includes: Step S201': Extract the syntax application interval parameters from the image bitstream and obtain the feature location information corresponding to the current image feature.
[0130] It should be noted that if the same enhancement method is used for all image features in the entire image block (i.e., the syntax parameters used in the enhancement process are exactly the same), the parameters used in the enhancement process (such as the first scaling factor and the second scaling factor) may only be optimal for some image features in the image block, but not for other subsequent image features, and may even have a negative effect. To avoid this phenomenon, the encoding device can set multiple sets of syntax parameters during encoding and use different syntax parameters to enhance image features at different locations in the image block.
[0131] In practical use, the syntax application range parameter can be a parameter used to indicate the application range of each set of syntax parameters. The feature location information corresponding to the current image feature can include the position of the current image feature in the image block, such as which row, which column, etc.
[0132] Step S202': Determine the enhanced syntax parameters based on the feature location information and the syntax application interval parameters.
[0133] It is necessary to explain the advantages and disadvantages. Determining the enhanced syntax parameters based on feature location information and syntax application range parameters can be achieved by determining the application range of the syntax corresponding to each syntax parameter based on the syntax application range parameters, comparing the feature location information with the application range corresponding to each syntax parameter, determining the application range in which the feature location information is located, and using the syntax parameters corresponding to the application range in which the feature location information is located as the enhanced syntax parameters.
[0134] In practical use, two sets of syntax parameters can be set: a first syntax parameter and a second syntax parameter. Then, a syntax application range parameter is set to distinguish which image features the first and second syntax parameters are used to enhance. The syntax application range parameter can limit the application scope of the syntax parameters in dimensions such as channel range, row, column, and diagonal column.
[0135] For example: Suppose there are two sets of syntax parameters, namely the first syntax parameter and the second syntax parameter, and the syntax application interval parameter appliedLineNum=K extracted from the bitstream, then for image features with feature location information in columns 1 to K (or rows or diagonal columns), the first syntax parameter is used for feature enhancement, and the second syntax parameter is used for feature enhancement from K to the last column.
[0136] Of course, in actual use, more than two sets of syntax parameters can be set. In this case, a syntax application range parameter can be set for each set of syntax parameters, and then the application range of each set of syntax parameters can be determined according to the syntax application range parameter.
[0137] For example: Suppose there are a total of N sets of syntax parameters, then there are also N syntax application interval parameters, which can be represented as applyLineNum(i) (i=1~N). applyLineNum(i) is the syntax application interval parameter corresponding to the i-th set of syntax parameters. Then, we can determine that the application range of the first set of syntax parameters is the image features of column 1 to applyLineNum(1) (or row or diagonal column), the application range of the second set of syntax parameters is the image features of column applyLineNum(1)+1 to column applyLineNum(1)+applyLineNum(2) (or row or diagonal column), the application range of the third set of syntax parameters is the image features of column applyLineNum(2)+1 to column applyLineNum(2)+applyLineNum(3) (or row or diagonal column), and so on.
[0138] The image features in a particular row or column are relatively easy to understand, but diagonal columns are more complex. To facilitate understanding, we will now combine... Figure 9 This explanation does not limit the scope of this solution. Figure 9 This is a schematic diagram illustrating the feature reconstruction sequence of this application. For example... Figure 9 As shown, the feature reconstruction is performed in a diagonal order from top left to bottom right. Figure 9 In the diagram, Row indicates the row number of the image feature, column indicates the column number of the image feature, dashed circles represent features that have already been reconstructed (Samples that are already processed), bold circles represent image features currently being reconstructed (Currentsample), and T represents the feature offset (Wave) for each reconstruction. Figure 9 This indicates that the image features in the 8th diagonal column are being reconstructed. At this point, the diagonal column of the current image feature can be determined based on its feature location information (i.e., which row and which column). Then, based on which diagonal column it is located in, the set of syntax parameters to use for feature enhancement can be determined.
[0139] Step S203': Perform feature enhancement on the feature reconstruction value according to the enhanced syntax parameters to obtain enhanced feature values.
[0140] It is understood that feature enhancement is performed on the feature reconstruction value according to the enhancement syntax parameters to obtain enhanced feature values. This can be achieved by using the feature enhancement method provided in any of the above-described image coding methods with the enhancement syntax parameters, which will not be elaborated here.
[0141] This embodiment extracts syntax application interval parameters from the image bitstream and obtains feature location information corresponding to the current image feature; determines enhancement syntax parameters based on the feature location information and the syntax application interval parameters; and enhances the reconstructed feature value based on the enhancement syntax parameters to obtain enhanced feature values. Since the specific enhancement syntax parameters used are determined based on the feature location information of the current image feature and the syntax application interval parameters extracted from the image bitstream during feature enhancement, different syntax parameters can be applied when enhancing image features at different locations, thereby maximizing the effectiveness of feature enhancement.
[0142] refer to Figure 10 , Figure 10 This is a flowchart illustrating a first embodiment of an image encoding method according to the present invention.
[0143] In this embodiment, the image encoding method includes the following steps: Step S910: Extract features from the image block to be encoded, and use the extracted features as the current image features.
[0144] It should be noted that the execution subject of this embodiment can be the encoding device, which can be a personal computer, server or other electronic device, or other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the image encoding method of this application is described using the encoding device as an example.
[0145] It should be noted that the image block to be encoded can be an image block obtained by dividing the image data to be encoded. The image data can be divided into only one image block or into multiple image blocks.
[0146] In practical applications, feature extraction of the image block to be encoded and the extracted features used as the current image features can be achieved by using an analytical transform network to extract features from the image block to be encoded and then using the extracted image features as the current image features.
[0147] Step S920: Make a prediction based on the feature reconstruction values corresponding to the reconstructed features to obtain the predicted feature values.
[0148] In practical applications, prediction is made based on the reconstructed feature values corresponding to the reconstructed features. This can be achieved by using a mean prediction network to predict features based on the reconstructed feature values corresponding to the reconstructed features. Furthermore, when using a mean prediction network, auxiliary information can be calculated via a hyperparameter coding network and input into the mean prediction network, allowing it to combine the reconstructed feature values and the auxiliary information for prediction.
[0149] Step S930: Determine the coding residual coefficients corresponding to the current image features based on the predicted feature values.
[0150] In practical applications, the predicted feature value can be subtracted from the feature value of the current image feature to obtain the original residual value. Then, residual processing and quantization processing are performed on the original residual value to obtain the encoded residual coefficient.
[0151] Step S940: Write the coding residual coefficients into the image bitstream corresponding to the image block to be encoded.
[0152] It should be noted that by writing the coding residual coefficients into the image bitstream corresponding to the image block to be encoded, when image decoding is required, the coding residual coefficients can be directly read from the image bitstream. Then, the coding residual coefficients are dequantized and residual recovery are performed to obtain the residual reconstruction value. Finally, by combining the predicted feature value of the mean prediction network and the residual reconstruction value, the feature reconstruction value corresponding to the image block to be encoded can be determined, so as to facilitate image reconstruction.
[0153] In practical use, the encoding device can also perform operations such as parameter calculation, parameter setting, syntax setting, and flag setting. For specific implementation methods, please refer to any of the above-described embodiments of the image encoding method.
[0154] This embodiment extracts features from the image block to be encoded and uses the extracted features as the current image features; it then predicts the predicted feature values based on the reconstructed feature values; it determines the coding residual coefficients corresponding to the current image features based on the predicted feature values; and it writes the coding residual coefficients into the image bitstream corresponding to the image block to be encoded. Because the coding residual coefficients of the current image features are calculated and written into the image bitstream during encoding, the encoding efficiency of the image data is reduced.
[0155] refer to Figure 11 , Figure 11 This is a flowchart illustrating a second embodiment of an image encoding method according to the present invention.
[0156] Based on the first embodiment of the image encoding method described above, this embodiment may further include the following after step S940: Step S950: Decode the image stream corresponding to the image block to be encoded to obtain the reconstructed image block.
[0157] It should be noted that after the encoding device completes the encoding of the image data, it also needs to verify the encoding efficiency to ensure that the encoding efficiency is high. At this time, the encoding device can perform image decoding on the image bitstream corresponding to the image block to be encoded to obtain the reconstructed image block.
[0158] Step S960: Determine the image coding efficiency based on the reconstructed image block and the image block to be encoded.
[0159] In practical applications, determining image coding efficiency based on reconstructed image blocks and image blocks to be encoded can be achieved by comparing the reconstructed image blocks and the image blocks to be encoded, calculating the corresponding bit rate and PSNR based on the comparison results, and thus determining the image coding efficiency.
[0160] In one possible implementation of this application, a preset efficiency threshold can be set in advance. After obtaining the image coding efficiency, the image coding efficiency is compared with the preset efficiency threshold. If the image coding efficiency is less than the preset efficiency threshold, it means that the image coding efficiency is low at this time. At this time, the parameters in the network or model used in the coding process can be adjusted to try to improve the image coding efficiency.
[0161] In practical use, when decoding the image bitstream corresponding to the image block to be encoded, the image decoding method provided in any embodiment of the image decoding method described above can be used, and this embodiment does not limit this. The encoding device can also perform operations such as parameter calculation, parameter setting, syntax setting, and flag setting. For specific implementation methods, please refer to the content of any embodiment of the image encoding method described above.
[0162] This embodiment obtains reconstructed image blocks by decoding the image stream corresponding to the image block to be encoded; the image encoding efficiency is then determined based on the reconstructed image blocks and the image block to be encoded. Since the image stream is decoded upon completion of encoding, and the reconstructed image blocks obtained from the decoding are compared with the encoded image blocks to determine the image encoding efficiency, the parameters of various networks used in the encoding process can be adjusted based on the image encoding efficiency, thereby improving the image encoding efficiency.
[0163] Furthermore, this embodiment of the invention also proposes a storage medium storing an image decoding program and / or an image encoding program. When the image decoding program is executed, it implements the image decoding method described above, and when the image encoding program is executed, it implements the image encoding method described above.
[0164] Reference Figure 12 , Figure 12 This is a structural block diagram of the first embodiment of the image decoding device of the present invention.
[0165] like Figure 12 As shown, the image decoding device proposed in this embodiment of the invention includes: The bitstream decoding module 10 is used to decode the image bitstream and determine the feature reconstruction value corresponding to the current image feature obtained by decoding; Feature enhancement module 20 is used to enhance the feature reconstruction values to obtain enhanced feature values; The image reconstruction module 30 is used to perform synthetic transformation on the enhanced feature values to obtain reconstructed image blocks.
[0166] This embodiment decodes the image bitstream and determines the feature reconstruction value corresponding to the current image features obtained from the decoding; it then enhances the feature reconstruction value to obtain enhanced feature values; finally, it performs a synthetic transformation on the enhanced feature values to obtain reconstructed image blocks. Because feature enhancement is performed on the feature reconstruction value before image reconstruction, and then image reconstruction is performed based on the enhanced feature values, distortion of image features during quantization and other processes is reduced, thereby improving the image quality of the reconstructed image.
[0167] In one possible implementation of this application, the current image features are a three-dimensional feature matrix; The feature enhancement module 20 is further configured to obtain the feature standard deviation and standard deviation representation value corresponding to each matrix element in the current image feature; determine the feature mask corresponding to each matrix element in the current image feature based on the feature standard deviation, the standard deviation representation value and a preset threshold; and perform feature enhancement on the feature reconstruction value based on the feature mask to obtain enhanced feature value.
[0168] In one possible implementation of this application, the feature enhancement module 20 is further configured to set the feature mask corresponding to the matrix element to a first type value if the feature standard deviation and standard deviation representation value corresponding to the matrix element meet the preset enhancement conditions; and to set the feature mask corresponding to the matrix element to a second type value if the feature standard deviation and standard deviation representation value corresponding to the matrix element do not meet the preset enhancement conditions.
[0169] In one possible implementation of this application, the feature enhancement module 20 is further configured to determine that the feature standard deviation and standard deviation representation value corresponding to the matrix element satisfy the preset enhancement condition if the feature standard deviation corresponding to the matrix element is greater than a preset threshold and the standard deviation representation value is a first type representation value; or, if the feature standard deviation corresponding to the matrix element is less than the preset threshold and the standard deviation representation value is a second type representation value, determine that the feature standard deviation and standard deviation representation value corresponding to the matrix element satisfy the preset enhancement condition.
[0170] In one possible implementation of this application, the feature enhancement module 20 is further configured to use the matrix element whose corresponding feature mask is a first type value as the target matrix element; and to enhance the feature reconstruction value corresponding to the target matrix element to obtain enhanced feature value.
[0171] In one possible implementation of this application, the feature enhancement module 20 is further configured to obtain the feature reconstruction value, residual reconstruction value and predicted feature value corresponding to the target matrix element; determine the first enhancement value according to the first scaling factor and the residual reconstruction value, and determine the second enhancement value according to the second scaling factor and the predicted feature value; and determine the enhanced feature value according to the feature reconstruction value, the first enhancement value and the second enhancement value.
[0172] In one possible implementation of this application, the feature enhancement module 20 is further configured to obtain the feature channels corresponding to the target matrix elements; and determine a first scaling factor and a second scaling factor based on the feature channels, wherein different feature channels correspond to different first scaling factors and second scaling factors.
[0173] In one possible implementation of this application, the feature enhancement module 20 is further configured to obtain the feature reconstruction value and predicted feature value corresponding to the target matrix element; determine a first enhancement value based on a first scaling factor and the feature reconstruction value; determine a second enhancement value based on a second scaling factor and the predicted feature value; and determine an enhanced feature value based on the first enhancement value and the second enhancement value.
[0174] In one possible implementation of this application, the feature enhancement module 20 is further configured to obtain the feature reconstruction value and residual reconstruction value corresponding to the target matrix element; determine a first enhancement value based on a first scaling factor and the feature reconstruction value; determine a second enhancement value based on a second scaling factor and the residual reconstruction value; and determine an enhanced feature value based on the first enhancement value and the second enhancement value.
[0175] In one possible implementation of this application, the feature enhancement module 20 is further configured to obtain the feature reconstruction value and feature standard deviation corresponding to the target matrix element; determine a first enhancement value based on a first scaling factor and the feature reconstruction value; determine a second enhancement value based on a second scaling factor and the feature standard deviation; and determine an enhanced feature value based on the first enhancement value and the second enhancement value.
[0176] In one possible embodiment of this application, the feature reconstruction values include luminance reconstruction values and chrominance reconstruction values, and the enhanced feature values include luminance enhancement feature values and chrominance enhancement feature values; The feature enhancement module 20 is further configured to enhance the chroma reconstruction values corresponding to the target matrix elements to obtain chroma enhancement feature values; and to enhance the luminance reconstruction values corresponding to the target matrix elements to obtain luminance enhancement feature values.
[0177] In one possible implementation of this application, the feature enhancement module 20 is further configured to determine a first enhancement value based on the luminance reconstruction value and the first scaling factor; and to perform secondary enhancement on the chroma enhancement feature value based on the first enhancement value.
[0178] In one possible implementation of this application, the feature enhancement module 20 is further configured to extract component indication parameters from the image bitstream; if the component indication parameters are chroma enhancement type parameters, then a first enhancement value is determined based on the luminance reconstruction value and the first scaling factor.
[0179] In one possible implementation of this application, the bitstream decoding module 10 is further configured to decode the image bitstream and determine the residual reconstruction value corresponding to the current image feature obtained by decoding; make a prediction based on the feature reconstruction value of the reconstructed feature to obtain a predicted feature value; and determine the feature reconstruction value corresponding to the current image feature based on the residual reconstruction value and the predicted feature value.
[0180] In one possible implementation of this application, the bitstream decoding module 10 is further configured to predict based on the enhanced feature value of the reconstructed feature to obtain a predicted feature value; and to determine the feature reconstruction value corresponding to the current image feature based on the residual reconstruction value and the predicted feature value.
[0181] In one possible implementation of this application, the enhanced feature value of the reconstructed feature is the same as or different from the enhanced feature value corresponding to the current image feature in terms of feature enhancement method.
[0182] In one possible implementation of this application, the feature enhancement method of the enhanced feature value of the reconstructed feature is the same as or different from that of the enhanced feature value corresponding to the current image feature, and the syntax flag is read from the image bitstream.
[0183] In one possible implementation of this application, the feature enhancement module 20 is further configured to extract syntax application interval parameters from the image bitstream and obtain feature location information corresponding to the current image feature; determine enhanced syntax parameters based on the feature location information and the syntax application interval parameters; and perform feature enhancement on the feature reconstruction value based on the enhanced syntax parameters to obtain enhanced feature values.
[0184] Reference Figure 13 , Figure 13 This is a structural block diagram of the first embodiment of the image encoding device of the present invention.
[0185] like Figure 13 As shown, the image encoding device proposed in this embodiment of the invention includes: Feature extraction module 110 is used to extract features from the image block to be encoded and to use the extracted features as the current image features; The feature prediction module 120 is used to predict feature values based on the feature reconstruction values corresponding to the reconstructed features; The residual calculation module 130 is used to determine the coding residual coefficients corresponding to the current image features based on the predicted feature values; The parameter writing module 140 is used to write the encoding residual coefficients into the image bitstream corresponding to the image block to be encoded.
[0186] This embodiment extracts features from the image block to be encoded and uses the extracted features as the current image features; it then predicts the predicted feature values based on the reconstructed feature values; it determines the coding residual coefficients corresponding to the current image features based on the predicted feature values; and it writes the coding residual coefficients into the image bitstream corresponding to the image block to be encoded. Because the coding residual coefficients of the current image features are calculated and written into the image bitstream during encoding, the encoding efficiency of the image data is reduced.
[0187] In one possible implementation of this application, the parameter writing module 140 is further configured to perform image decoding on the image bitstream corresponding to the image block to be encoded to obtain a reconstructed image block; and determine the image encoding efficiency based on the reconstructed image block and the image block to be encoded.
[0188] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0189] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0190] In addition, for technical details not described in detail in this embodiment, please refer to the image decoding or image decoding method provided in any embodiment of the present invention, which will not be repeated here.
[0191] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0192] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0193] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0194] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. An image decoding method, characterized in that, The image decoding method includes the following steps: Decode the image bitstream and determine the feature reconstruction value corresponding to the current image features obtained from the decoding; The reconstructed feature values are enhanced to obtain enhanced feature values; The enhanced feature values are synthesized and transformed using a synthetic transformation network to obtain reconstructed image patches.
2. The image decoding method as described in claim 1, characterized in that, The current image features are a three-dimensional feature matrix; The step of enhancing the reconstructed feature values to obtain enhanced feature values includes: Obtain the feature standard deviation and standard deviation representation value corresponding to each matrix element in the current image features; The feature mask corresponding to each matrix element in the current image feature is determined based on the feature standard deviation, the standard deviation representation value, and the preset threshold. Based on the feature mask, feature enhancement is performed on the reconstructed feature values to obtain enhanced feature values.
3. The image decoding method as described in claim 2, characterized in that, The step of determining the feature mask corresponding to each matrix element in the current image feature based on the feature standard deviation, the standard deviation representation value, and a preset threshold includes: If the feature standard deviation and standard deviation representation value corresponding to the matrix element meet the preset enhancement conditions, then the feature mask corresponding to the matrix element is set to the first type value. If the feature standard deviation and standard deviation representation value corresponding to the matrix element do not meet the preset enhancement conditions, then the feature mask corresponding to the matrix element is set to the second type value.
4. The image decoding method as described in claim 3, characterized in that, Before setting the feature mask corresponding to the matrix element to the first type value if the feature standard deviation and standard deviation representation value corresponding to the matrix element satisfy the preset enhancement condition, the method further includes: If the feature standard deviation corresponding to a matrix element is greater than a preset threshold, and the standard deviation representation value is a first type representation value, then it is determined that the feature standard deviation and the standard deviation representation value corresponding to the matrix element satisfy a preset enhancement condition. or, If the feature standard deviation corresponding to a matrix element is less than a preset threshold, and the standard deviation representation value is a second type representation value, then it is determined that the feature standard deviation and standard deviation representation value corresponding to the matrix element satisfy the preset enhancement condition.
5. The image decoding method as described in claim 2, characterized in that, The step of enhancing the reconstructed feature values based on the feature mask to obtain enhanced feature values includes: Use the matrix elements whose corresponding feature masks are of the first type as the target matrix elements; The feature reconstruction values corresponding to the elements of the target matrix are enhanced to obtain enhanced feature values.
6. The image decoding method as described in claim 5, characterized in that, The step of enhancing the feature reconstruction values corresponding to the elements of the target matrix to obtain enhanced feature values includes: Obtain the feature reconstruction value, residual reconstruction value, and predicted feature value corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the residual reconstruction value, and a second enhancement value is determined based on a second scaling factor and the predicted feature value. The enhanced feature value is determined based on the reconstructed feature value, the first enhanced value, and the second enhanced value.
7. The image decoding method as described in claim 6, characterized in that, Before determining the first enhancement value based on the first scaling factor and the predicted feature value, and determining the second enhancement value based on the second scaling factor and the residual reconstruction value, the method further includes: Obtain the feature channels corresponding to the elements of the target matrix; The first scaling factor and the second scaling factor are determined based on the feature channels, and different feature channels correspond to different first scaling factors and second scaling factors.
8. The image decoding method as described in claim 5, characterized in that, The step of enhancing the feature reconstruction values corresponding to the elements of the target matrix to obtain enhanced feature values includes: Obtain the feature reconstruction values and predicted feature values corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the predicted feature value. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
9. The image decoding method as described in claim 5, characterized in that, The step of enhancing the feature reconstruction values corresponding to the elements of the target matrix to obtain enhanced feature values includes: Obtain the feature reconstruction values and residual reconstruction values corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the reconstructed residual value. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
10. The image decoding method as described in claim 5, characterized in that, The step of enhancing the feature reconstruction values corresponding to the elements of the target matrix to obtain enhanced feature values includes: Obtain the feature reconstruction values and feature standard deviations corresponding to the elements of the target matrix; A first enhancement value is determined based on a first scaling factor and the reconstructed feature value, and a second enhancement value is determined based on a second scaling factor and the feature standard deviation. The enhancement feature value is determined based on the first enhancement value and the second enhancement value.
11. The image decoding method as described in claim 5, characterized in that, The reconstructed feature values include luminance reconstructed values and chrominance reconstructed values, and the enhanced feature values include luminance enhancement feature values and chrominance enhancement feature values; The step of enhancing the feature reconstruction values corresponding to the elements of the target matrix to obtain enhanced feature values includes: The chromaticity reconstruction values corresponding to the elements of the target matrix are enhanced to obtain chromaticity enhancement feature values; The brightness reconstruction values corresponding to the target matrix elements are enhanced to obtain brightness enhancement feature values.
12. The image decoding method as described in claim 11, characterized in that, After enhancing the chroma reconstruction values corresponding to the elements of the target matrix to obtain chroma enhancement feature values, the method further includes: The first enhancement value is determined based on the reconstructed brightness value and the first scaling factor; The chromaticity enhancement feature value is further enhanced based on the first enhancement value.
13. The image decoding method as described in claim 12, characterized in that, The step of determining the first enhancement value based on the reconstructed brightness value and the first scaling factor further includes: Extract component indicator parameters from the image bitstream; If the component indication parameter is a chroma enhancement type parameter, then the first enhancement value is determined based on the luminance reconstruction value and the first scaling factor.
14. The image decoding method according to any one of claims 1-13, characterized in that, Decoding the image bitstream and determining the feature reconstruction value corresponding to the current image features obtained through decoding includes: The image bitstream is decoded, and the residual reconstruction value corresponding to the current image features obtained from the decoding is determined. Based on the reconstructed feature values, prediction is performed to obtain the predicted feature values; The feature reconstruction value corresponding to the current image feature is determined based on the residual reconstruction value and the predicted feature value.
15. The image decoding method as described in claim 14, characterized in that, After decoding the image bitstream and determining the residual reconstruction value corresponding to the current image features obtained from the decoding, the method further includes: Predictive feature values are obtained by making predictions based on the enhanced feature values of the reconstructed features; The feature reconstruction value corresponding to the current image feature is determined based on the residual reconstruction value and the predicted feature value.
16. The image decoding method as described in claim 14, characterized in that, The enhanced feature value of the reconstructed feature may be enhanced in the same way or in a different way than the enhanced feature value corresponding to the current image feature.
17. The image decoding method as described in claim 16, characterized in that, The syntax flags determine whether the enhanced feature value of the reconstructed feature is the same as or different from the enhanced feature value corresponding to the current image feature, and the syntax flags are read from the image bitstream.
18. The image decoding method as described in claim 14, characterized in that, The step of enhancing the reconstructed feature values to obtain enhanced feature values includes: Extract the syntax application interval parameters from the image bitstream and obtain the feature location information corresponding to the current image feature; The enhanced syntax parameters are determined based on the feature location information and the syntax application interval parameters. The feature reconstruction value is enhanced according to the enhanced syntax parameters to obtain enhanced feature values.
19. An image decoding device, characterized in that, The image decoding device includes the following modules: The bitstream decoding module is used to decode the image bitstream and determine the feature reconstruction value corresponding to the current image features obtained by decoding; The feature enhancement module is used to enhance the feature reconstruction values to obtain enhanced feature values; The image reconstruction module is used to perform synthetic transformation on the enhanced feature values through a synthetic transformation network to obtain reconstructed image blocks.
20. An image encoding method, characterized in that, The image encoding method includes: Feature extraction is performed on the image block to be encoded, and the extracted features are used as the current image features; Predict the predicted feature value based on the feature reconstruction value corresponding to the reconstructed feature; The coding residual coefficients corresponding to the current image features are determined based on the predicted feature values; The coding residual coefficients are written into the image bitstream corresponding to the image block to be encoded.
21. The image encoding method as described in claim 20, characterized in that, After writing the coding residual coefficients into the image bitstream corresponding to the image block to be encoded, the method further includes: Image decoding is performed on the image bitstream corresponding to the image block to be encoded to obtain the reconstructed image block; The image coding efficiency is determined based on the reconstructed image block and the image block to be encoded.
22. An image encoding device, characterized in that, The image encoding device includes: The feature extraction module is used to extract features from the image blocks to be encoded and to use the extracted features as the current image features. The feature prediction module is used to predict feature values based on the feature reconstruction values corresponding to the reconstructed features. The residual calculation module is used to determine the coding residual coefficients corresponding to the current image features based on the predicted feature values; The parameter writing module is used to write the encoding residual coefficients into the image bitstream corresponding to the image block to be encoded.
23. A decoding device, characterized in that, The decoding device includes: a processor, a memory, and a decoding program stored in the memory and executable on the processor. When the decoding program is executed by the processor, it implements the image decoding method as described in any one of claims 1-18.
24. An encoding device, characterized in that, The encoding device includes: a processor, a memory, and a decoding program and / or an encoding program stored in the memory and executable on the processor. When the decoding program is executed by the processor, it implements the image decoding method as described in any one of claims 1-18, and when the encoding program is executed by the processor, it implements the image encoding method as described in any one of claims 19-20.
25. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an image decoding program and / or an image encoding program, wherein the image decoding program, when executed, implements the image decoding method as described in any one of claims 1-18, and the image encoding program, when executed, implements the image encoding method as described in any one of claims 19-20.