Image decoding method and apparatus
By using an independent base layer and enhancement layer hyper-prior decoding network to process the reconstructed features of the image encoder, the encoding performance and machine vision performance problems caused by fixed-position segmentation are solved, achieving more efficient image decoding and improved machine vision performance.
Patent Information
- Application Number
- CN202311583064.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-27
- Filing Date
- 2023-11-23
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-11-23
AI Technical Summary
In existing machine learning-based scalable image encoders, when latent features are split into base and enhancement layers at fixed positions, the base layer features may not be suitable for downstream tasks, affecting encoding performance and machine vision performance.
A base layer hyper-prior decoding network and an enhancement layer hyper-prior decoding network are used to process the hyper-prior features reconstructed from the base layer and enhancement layer, respectively. Entropy decoding is used to obtain the quantized latent features reconstructed from the base layer and enhancement layer, and finally the image is reconstructed.
It improves the encoding and machine vision performance of the machine learning-based scalable image encoder, and enhances the efficiency and accuracy of image decoding.
Smart Images

Figure CN119094765B_ABST
Abstract
Description
[0001] This application claims priority to Chinese Patent Application No. 2023106645409, filed on June 6, 2023, and Chinese Patent Application No. 2023114114882, filed on October 27, 2023, the contents of which are incorporated herein by reference. Technical Field
[0002] Some embodiments of this application relate to the field of image encoding and decoding technology. More specifically, they relate to an image decoding method and apparatus. Background Technology
[0003] Currently, image / video coding algorithms are generally optimized for the human visual system and suitable for human viewing applications. However, they are not optimized for other application scenarios, such as the now very common image processing and machine vision applications. For these applications, it is often necessary to fully decode the image to obtain a reconstructed image / video before it can be used as input. This process is complex and time-consuming, and the lossy image after decoding often negatively impacts the accuracy of machine vision tasks. Reducing the bitrate while maintaining the subjective quality of the image, and providing a representation suitable for direct use as machine vision input data, has become an urgent problem to be solved. Therefore, efficient video coding for machines (VCM) has become an important topic in academia and industry. VCM technology aims to connect the two independent research directions of image / video compression and feature compression to a certain extent, while jointly optimizing high-accuracy machine vision tasks and high-fidelity human visual reconstruction as much as possible. Based on this, the Moving Picture Experts Group (MPEG) established a group called VCM to study the need for VCM technology standardization. JPEG AI is a machine learning-based scalable image coding standard created by the Joint Photographic Experts Group (JPEG). Compared to traditional image coding, JPEG AI, designed for human vision, achieves a lower bitrate while maintaining the same subjective quality. Simultaneously, JPEG AI's model also addresses the corresponding requirements of Visual Cognitive Modeling (VCM).
[0004] Currently, in machine learning-based scalable image encoders, the input image is processed by an analysis and transformation network to obtain latent features. Then, the first predetermined number of channels of these latent features are designated as enhancement layer channels, and the remaining channels are designated as base layer channels. The base layer and enhancement layer channels undergo further redundancy elimination to obtain the bitstream. As mentioned above, in current machine learning-based scalable image encoders, latent features are divided into base layer latent features and enhancement layer latent features at fixed positions. However, directly cropping latent features according to position may lead to problems such as some channels in the base layer latent features being unsuitable for downstream tasks, thus affecting encoding performance and machine vision performance. Summary of the Invention
[0005] Exemplary embodiments of this application provide an image decoding method and apparatus for improving the encoding performance of a machine learning-based scalable image encoder and machine vision performance.
[0006] The technical solutions provided by some embodiments of this application are as follows:
[0007] In a first aspect, some embodiments of this application provide an image decoding method, including:
[0008] The encoded data of the target image is obtained, which includes: first encoded data, second encoded data, third encoded data and fourth encoded data. The first encoded data and the second encoded data are encoded data obtained by entropy encoding of the base layer super-prior features and the enhancement layer super-prior features of the target image, respectively. The third encoded data and the fourth encoded data are encoded data obtained by entropy encoding of the base layer quantized latent features and the enhancement layer quantized latent features of the target image, respectively.
[0009] Entropy decoding is performed on the first encoded data and the second encoded data respectively to obtain the base layer reconstruction super-prior features and the enhancement layer reconstruction super-prior features;
[0010] The base layer reconstructed prior features are processed by a base layer advanced prior decoding network to obtain the base layer reconstructed potential features;
[0011] Entropy decoding is performed on the third and fourth encoded data based on the base layer reconstruction potential features and the enhancement layer reconstruction potential features to obtain the base layer reconstruction quantization potential features and the enhancement layer reconstruction quantization potential features;
[0012] The reconstructed image of the target image is obtained based on the latent features of the base layer reconstruction quantization and the latent features of the enhancement layer reconstruction quantization.
[0013] Secondly, some embodiments of this application provide an image decoding apparatus, including:
[0014] Memory, configured to store computer programs;
[0015] The processor is configured to cause the image decoding device to implement the image decoding method described in the first aspect when a computer program is invoked.
[0016] Thirdly, some embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement the image encoding method or the image decoding method described in the first aspect.
[0017] Fourthly, some embodiments of this application provide a computer program product that, when run on a computer, enables the computer to implement the image encoding method or the image decoding method described in the first aspect.
[0018] As can be seen from the above technical solutions, after obtaining the encoded data of the target image, the image encoding method provided in this application first performs entropy decoding on the first encoded data and the second encoded data respectively to obtain the base layer reconstruction super-prior features and the enhancement layer reconstruction super-prior features. Then, the base layer reconstruction super-prior features are processed by the base layer super-prior decoding network to obtain the base layer reconstruction latent features. The enhancement layer reconstruction super-prior features are then processed by the enhancement layer super-prior decoding network to obtain the enhancement layer reconstruction latent features. Next, the third encoded data and the fourth encoded data are entropy decoded according to the base layer reconstruction latent features and the enhancement layer reconstruction latent features to obtain the base layer reconstruction quantization latent features and the enhancement layer reconstruction quantization latent features. Finally, the reconstructed image of the target image is obtained according to the base layer reconstruction quantization latent features and the enhancement layer reconstruction quantization latent features. Since the embodiments of this application process the reconstructed super-prior features of the basic layer and the reconstructed super-prior features of the enhancement layer through two independent super-prior decoding networks, namely the basic layer super-prior decoding network and the enhancement layer super-prior decoding network, the embodiments of this application can better decode the reconstructed super-prior features of the basic layer and the reconstructed super-prior features of the enhancement layer, thereby improving the performance of the scalable image decoder based on machine learning and the performance of machine vision. Attached Figure Description
[0019] To more clearly illustrate the implementation methods in some embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0020] Figure 1 The diagram shows a schematic representation of the structure of an image encoder in some embodiments of this application;
[0021] Figure 2 The diagram shows a schematic representation of the image decoder in some embodiments of this application;
[0022] Figure 3 The following is a flowchart illustrating the steps of an image encoding method in some embodiments of this application;
[0023] Figure 4 The following flowcharts illustrate the steps of an image encoding method in other embodiments of this application;
[0024] Figure 5 The following are schematic diagrams illustrating the structure of the analytical transform network in some embodiments of this application;
[0025] Figure 6 A schematic diagram of the channel attention network structure in some embodiments of this application is shown;
[0026] Figure 7 The diagram shows a schematic representation of the advanced prior coding network in some embodiments of this application;
[0027] Figure 8 The diagram shows a schematic representation of the advanced priori decoding network in some embodiments of this application;
[0028] Figure 9 A schematic diagram of the masked convolutional kernel of the context network in some embodiments of this application is shown;
[0029] Figure 10 The diagram shows a schematic representation of the enhancement layer context network in some embodiments of this application;
[0030] Figure 11 The diagram shows a structural schematic of the channel context module in some embodiments of this application;
[0031] Figure 12 The diagram shows a schematic representation of the entropy parameter module in some embodiments of this application.
[0032] Figure 13 The diagram shows a schematic representation of the structure of the base layer context network in some embodiments of this application;
[0033] Figure 14 The following is a flowchart illustrating the steps of an image decoding method in some embodiments of this application;
[0034] Figure 15 The following flowcharts illustrate the steps of an image decoding method in other embodiments of this application;
[0035] Figure 16 The following are schematic diagrams of the structure of the synthetic transformation network in some embodiments of this application;
[0036] Figure 17 The following are schematic diagrams illustrating the structure of the potential spatial transformation network in some embodiments of this application;
[0037] Figure 18 Schematic diagrams of the image decoder structure are shown in some other embodiments of this application;
[0038] Figure 19 The following are schematic diagrams illustrating the structure of the content adaptive filtering network in some embodiments of this application;
[0039] Figure 20 The following flowcharts illustrate the steps of an image decoding method in other embodiments of this application;
[0040] Figure 21 Schematic diagrams of the ICCI structure in other embodiments of this application are shown;
[0041] Figure 22 A schematic diagram of the structure of the residual block in some embodiments of this application is shown. Detailed Implementation
[0042] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below. In order to make the purpose and implementation of this application clearer, the exemplary embodiments of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0043] This application is not intended to limit the implementation of the invention. Unless otherwise stated, these terms should be understood in their ordinary and common sense.
[0044] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0045] The use of phrases such as "some implementations" or "some embodiments" in the specification indicates that the described implementations or embodiments may include specific features, structures, or characteristics, but not every embodiment may necessarily include that specific feature, structure, or characteristic. Furthermore, such phrases do not necessarily refer to the same implementation. Additionally, when describing a specific feature, structure, or characteristic in connection with an embodiment, it is considered that implementing that feature, structure, or characteristic in connection with other implementations (whether explicitly described herein or not) is within the knowledge of those skilled in the art.
[0046] The images in this embodiment can be independent images or video frames from a video. Since a video can be viewed as a sequence of video frames composed of multiple images, when encoding and decoding each video frame based on image encoding and image decoding methods, the video encoding and decoding can be performed based on image encoding and image decoding methods.
[0047] This application relates to the field of image encoding and decoding technology. The image codec used to execute the image encoding method and image decoding method provided in this application is described below.
[0048] Reference Figure 1 As shown, an image encoder for performing the image encoding methods provided in some embodiments of this application includes: an analysis transform network 101, a first quantization module 102, a mask generation network 103, a first channel selection module 104, a base layer super-prior coding network 105, a second quantization module 106, a first encoding module 107, an enhancement layer super-prior coding network 108, a third quantization module 109, a second encoding module 110, a second channel selection module 111, a first decoding module 112, a base layer super-prior decoding network 113, a base layer context network 114, a third encoding module 115, a second decoding module 116, an enhancement layer super-prior decoding network 117, an enhancement layer context network 118, and a fourth encoding module 119.
[0049] Figure 1 The image encoder shown performs image encoding as follows: Step 1: The analysis transform network 101 processes the target image (video frame) X to obtain the latent features Y of the target image X. Step 2: The first quantization module 102 quantizes the latent features Y to obtain quantized latent features y. Step 3: The quantized latent features y are input into the mask generation network 103, and the attention mask output by the mask generation network 103 is obtained. Step 4: The first channel selection module 104 performs channel selection on the latent features Y based on the channel attention mask to segment the latent features Y into basic layer latent features Y. base and the latent features Y of the enhancement layer enhance Step 5: The base layer super-prior coding network 105 pairs the base layer latent features Y.base Process the data to obtain the base layer super-prior features Z. base Step 6: The second quantization module 106 processes the base layer's advanced prior features Z. base Quantization processing is performed to obtain the base layer quantized prior features z. base Step 7: The first encoding module 107 quantizes the prior features z of the base layer. base Perform entropy encoding to obtain the first encoded data b1. Step 8: The enhancement layer super-prior encoding network 108 pairs the enhancement layer latent features Y. enhance Processing is performed to obtain the super-prior features Z of the enhancement layer. enhance Step 9: The third quantization module 109 performs a quantization of the enhancement layer's prior features Z. enhance Quantization processing is performed to obtain the quantized prior features z of the enhancement layer. enhance Step 10: The second encoding module 110 quantizes the advanced prior features z of the enhancement layer. enhance Entropy encoding is performed to obtain the second encoded data b2. Step 11: The second channel selection module 111 performs channel selection on the quantized latent feature y based on the channel attention mask to segment the quantized latent feature y into the base layer quantized latent feature y. base And enhancement layer quantize latent features y enhance Step 12: The first decoding module 112 decodes the first encoded data b1 to obtain the pre-prior features for basic layer reconstruction. Step 13: The base layer super-prior decoding network 113 reconstructs the super-prior features of the base layer. Processing is performed to obtain potential features for base layer reconstruction. Step 14: The base layer context network 114 reconstructs latent features based on the base layer. and the quantized latent features y of the base layer that have been encoded base Obtain the base layer context features Φ base Step 15: The third encoding module 115, based on the base layer context features Φ base Quantify the latent features y of the base layer base Entropy encoding is performed on the current element, ultimately completing the quantization of the latent features y in the base layer. base Entropy encoding of all elements is performed to obtain the third encoded data b3. Step 16: The second decoding module 116 decodes the second encoded data b2 to obtain the super-prior features reconstructed from the enhancement layer. Step 17: The enhancement layer's advanced prior decoding network 117 reconstructs the advanced prior features of the enhancement layer. Processing is performed to obtain potential features for enhancement layer reconstruction. Step 18: The reinforcement layer context network 118 reconstructs latent features based on the reinforcement layer. Quantize the latent features y of the enhancement layer that has already been encoded.enhance Obtain the contextual features Φ of the enhancement layer enhance Step 19: The fourth encoding module 119, based on the enhancement layer context features Φ enhance Quantify the latent features y of the enhancement layer enhance The current element is entropy encoded, and the latent feature y is finally quantized in the enhancement layer. enhance Entropy encoding of all elements is used to obtain the fourth encoded data b4. Step 20: The first encoded data b1, the second encoded data b2, the third encoded data b3, and the fourth encoded data b4 are used as the encoded data of the target image X and sent to the decoding end.
[0050] It should be noted that when the first encoding module 107 is a lossless encoding module and the first decoding module 112 is a lossless decoding module, due to the quantization of the base layer over-prior feature z... base The encoding and decoding process is lossless, and the base layer reconstructs the prior features. Quantization of the underlying layer's prior features z base Completely identical, therefore Figure 1 The encoder shown can omit the decoding module 112 and the above step 12, and directly use the base layer to quantize the super-prior features z. base Replace the base layer in subsequent steps to reconstruct the prior features Similarly, when the second encoding module 110 is a lossless encoding module and the second decoding module 116 is a lossless decoding module, the decoding module 115 and the above step 16 can be omitted, and the enhancement layer can be used directly to quantize the prior feature z. enhance Replace the base layer in subsequent steps to reconstruct the prior features
[0051] Reference Figure 2 As shown, an image decoder for performing the image decoding methods provided in some embodiments of this application includes: a first decoding module 201, a base layer super-prior decoding network 202, a base layer context network 203, a second decoding module 204, a third decoding module 205, an enhancement layer super-prior decoding network 206, an enhancement layer context network 207, a fourth decoding module 208, a stitching module 209, a synthesis transformation network 210, a latent space transformation network 211, and a machine vision task model 212.
[0052] Figure 2 The image decoder shown performs the following steps during image decoding: Step 1: The first decoding module 201 performs entropy decoding on the first encoded data b1 to obtain the advanced prior features of the base layer reconstruction. Step 2: The base layer super-prior decoding network 202 reconstructs the super-prior features of the base layer. Processing is performed to obtain potential features for base layer reconstruction. Step 3: The base layer context network 203 reconstructs latent features based on the base layer. Quantitative analysis of potential features from the reconstructed enhancement layer (Decoding result of the third encoded data b3, which has been decoded), obtain the base layer context feature Φ. base Step 4: The third decoding module 204 decodes the base layer context features Φ base Entropy decoding is performed on the current element of the third encoded data b3, and finally, entropy decoding of all elements of the third encoded data b3 is completed to obtain the latent features of the base layer reconstruction quantization. Step 5: The third decoding module 205 performs entropy decoding on the second encoded data b2 to obtain the super-prior features reconstructed from the enhancement layer. Step 6: Reconstruct the prior features of the enhancement layer using the 206-pair enhancement layer of the super-prior decoding network. Processing is performed to obtain potential features for enhancement layer reconstruction. Step 7: The reinforcement layer context network 207 reconstructs latent features based on the reinforcement layer. Quantitative analysis of potential features from the reconstructed enhancement layer (Decoding result of the fourth encoded data b4, which has been decoded), obtain the enhancement layer context feature Φ. enhance Step 8: The fourth decoding module 208 determines the enhancement layer context features Φ. enhance Entropy decoding is performed on the current element of the fourth encoded data b4, and finally, entropy decoding is completed for all elements of the fourth encoded data b4 to obtain the latent features of the enhancement layer reconstruction quantization. Step 9: Module 209 splices the base layer to reconstruct and quantify potential features. And enhancement layer reconstruction quantifies potential features Obtaining Reconstructed Quantitative Latent Features Step 10: Reconstruct and quantify latent features using synthetic transformation network 210. Processing is performed to obtain the reconstructed target image. Step 11: Reconstruct and quantify latent features of the base layer using the latent transformation network 211. Processing is performed to obtain machine vision features. Step 12: Transfer machine vision features Input the machine vision task model 212 to obtain the machine vision task processing result M output by the machine vision task model 212.
[0053] This application provides an image encoding method, referring to... Figure 3 As shown, the image encoding method includes the following steps S31 to S35:
[0054] S31. Obtain the latent features of the target image (Latent Represetation).
[0055] In some embodiments, the feature tensor of the latent features of the target image can be 192×H×W, where H and W are the length and width of the target image, respectively.
[0056] In some embodiments, the target image can be processed by an AnalysisTransformNet to obtain the latent features of the target image.
[0057] The target image in this application embodiment can be an independent image or a video frame in a video.
[0058] S32. Quantize the potential features based on preset quantization parameters to obtain quantized potential features.
[0059] In this embodiment, the value of the quantization step size (the preset quantization parameter) for latent features is not limited. Since a larger quantization step size results in a lower image bitrate and consequently poorer reconstruction quality, and vice versa, a smaller quantization step size results in a higher image bitrate and consequently better reconstruction quality, the quantization step size can be set in a way that balances bitrate and reconstruction quality requirements in practical applications.
[0060] S33. The quantized latent features are processed based on the channel attention mechanism to obtain the channel attention mask.
[0061] Channel attention mechanisms in computer vision focus on the relationships between channels of a feature. They can include compression networks and activation networks. Compression networks compress the global spatial information of features before learning features along the channel dimension to determine the importance of each channel. Activation networks assign different weights to each channel based on their importance and recalibrate the features according to these weights.
[0062] In some embodiments, the channel attention mask is a string or feature of length C, where C is the number of channels of the potential feature.
[0063] S34. Based on the channel attention mask, the latent features are divided into basic layer latent features and enhancement layer latent features.
[0064] In some embodiments, dividing the latent features into base layer latent features and enhancement layer latent features based on the channel attention mask includes: calculating the dot product of the channel attention mask and the latent features to obtain the base layer latent features, and calculating the difference between the latent features and the base layer latent features to obtain the enhancement layer latent features.
[0065] In some embodiments, the base layer latent features, enhancement layer latent features, and the feature tensors of the latent features are identical. The difference between base layer latent features and latent features is that the eigenvalues of channels classified as enhancement layer latent features in the base layer latent features are zero. Similarly, the difference between enhancement layer latent features and latent features is that the eigenvalues of channels classified as base layer latent features in the enhancement layer latent features are zero.
[0066] S35. Generate encoded data of the target image based on the latent features of the base layer and the latent features of the enhancement layer.
[0067] The image encoding method provided in this application first acquires the latent features of the target image when encoding the target image. Then, it quantizes the latent features based on preset quantization parameters to obtain quantized latent features. Next, it processes the quantized latent features based on a channel attention mechanism to obtain a channel attention mask. Finally, it divides the latent features into basic layer latent features and enhancement layer latent features according to the channel attention mask. Finally, it generates the encoded data of the target image based on the basic layer latent features and the enhancement layer latent features. Compared to the prior art, which divides latent features into basic layer latent features and enhancement layer latent features according to fixed positions, this application can acquire a channel attention mask based on a channel attention mechanism and then divide the latent features into basic layer latent features and enhancement layer latent features according to the channel attention mask. Therefore, this application can more reasonably divide latent features into basic layer latent features and enhancement layer latent features, thereby improving the encoding performance of the machine learning-based scalable image encoder and the machine vision performance.
[0068] As an extension and refinement of the above embodiments, this application also provides another image encoding method, referring to... Figure 4 As shown, the image encoding method includes the following steps:
[0069] S401. The target image is processed based on the analysis transform network to obtain the potential features of the target image.
[0070] Reference Figure 5 As shown, in some embodiments, the analysis transformation network includes: multiple downsampling convolutional layers 51 and multiple residual activation units 52 connected in series between adjacent downsampling convolutional layers 51. Figure 5 The analysis transform network includes four downsampled convolutional layers 51 and three residual activation units 52 connected in series between adjacent downsampled convolutional layers 51, as exemplified by this example. Each residual activation unit 52 includes a first convolutional layer 521, an activation function layer 522, a second convolutional layer 523, and a fusion layer 524. The first convolutional layer 521, the activation function layer 522, and the second convolutional layer 523 sequentially process the input feature I1 of the residual activation unit 52. The fusion layer 524 then adds and fuses the output feature of the second convolutional layer and the input feature I1 of the residual activation unit to obtain the output feature O1 of the residual activation unit 52.
[0071] In some embodiments, each downsampling convolutional layer 51 in the analysis transform network is a downsampling convolutional layer with a kernel size of 3×3, the first and second convolutional layers in each residual activation unit of the analysis transform network are convolutional layers with a kernel size of 3×3, and the activation function of the activation function layer in each residual activation unit of the analysis transform network is the Leaky ReLU activation function (a variant of the ReLU function that introduces a small slope in the negative range, solving the problem that the ReLU function outputs zero in the negative range).
[0072] Let the target image be represented as X, the latent features of the target image as Y, and the processing of features by the analysis transform network as g. a (), then we have:
[0073] Y = g a (X)
[0074] S402. The potential features are quantized based on preset quantization parameters to obtain quantized potential features.
[0075] Let the latent features of the target image be represented by Y, the quantized latent features by y, and the quantization process based on preset quantization parameters by Q(), then we have:
[0076] y = Q(Y)
[0077] S403. Perform adaptive pooling on the quantized latent features to obtain the first feature.
[0078] The difference between adaptive pooling and max pooling is that adaptive pooling automatically calculates the pooling layer size and stride based on the set output signal size and input signal size, while max pooling uses preset values for both. Adaptive pooling can accurately generate the first feature of a preset feature tensor.
[0079] In some embodiments, the feature tensor of the first feature is C×1×1. Wherein, C represents the latent feature and the number of channels for quantizing the latent feature.
[0080] S404. Perform convolution, normalization, and nonlinear activation processing on the first feature in sequence to obtain the second feature.
[0081] In some embodiments, the kernel size of the convolutional layer that performs convolution processing on the first feature is 1×1.
[0082] In some embodiments, the normalization layer that performs convolution processing on the first feature can be a batch normalization layer.
[0083] In some embodiments, the activation function that performs nonlinear activation processing on the first feature can be a Sigmoid activation function, a ReLU activation function, a Tanh activation function, etc.
[0084] S405. Perform convolution processing on the second feature to obtain the third and fourth features.
[0085] Wherein, the feature tensors of the third feature and the fourth feature are both C×1×1, where C is the number of channels of the potential feature.
[0086] In some embodiments, the kernel size of the convolutional layer that performs convolution processing on the second feature is 1×1.
[0087] It should be noted that the output of the convolutional layer that performs convolution processing on the second feature can be a feature with a tensor of 2C×1×1. The third feature and the fourth feature can be two features obtained by segmenting the feature output by the fourth convolutional layer from the channel dimension.
[0088] S406. Perform Gumbel sampling on the third feature and the fourth feature to obtain the channel attention mask.
[0089] Reference Figure 6As shown, in some embodiments, the channel attention network used to perform the above steps S403 to S406 includes: an adaptive pooling layer 61, a first convolutional layer 62, a batch normalization layer 63, a nonlinear activation function layer 64, a second convolutional layer 65, and a sampling module 66. The process of the channel attention network processing the quantized latent feature y to obtain the channel attention mask includes: first, the adaptive pooling layer 61 processes the quantized latent feature y to obtain a first feature F1; second, the first convolutional layer 62, the normalization layer 63, and the nonlinear activation function layer 64 sequentially process the first feature F1 to obtain a second feature F2; then, the second convolutional layer 65 processes the second feature F2 to obtain a third feature F3 and a fourth feature F4. Finally, the sampling module 66 performs Gumbel sampling on the third feature F3 and the fourth feature F4 to obtain the channel attention mask.
[0090] The quantized latent features are represented as y, and the processing of features by the adaptive pooling layer 61, the first convolutional layer 62, the normalization layer 63, the nonlinear activation function layer 64, and the second convolutional layer 65 is represented as f. c Given (), Gum Bell sampling denoted as Gum(), and channel attention mask denoted as Mask, then:
[0091] Mask = Gum(f c (y))
[0092] S407. Perform a dot product operation on the latent features and the channel attention mask to obtain the base layer latent features.
[0093] The channel attention mask is represented as Mask, and the dot product operation is represented as... The latent features of the base layer are represented as Y base Then we have:
[0094]
[0095] S408. Calculate the difference between the latent features and the latent features of the base layer to obtain the latent features of the enhancement layer.
[0096] The channel attention mask is represented as Mask, and the dot product operation is represented as... The latent features of the enhancement layer are represented as Y enhance Then we have:
[0097]
[0098] S409. Adjust the channel with a feature value of zero in the base layer potential feature to the first end of the base layer potential feature, and adjust the channel with a feature value of zero in the enhancement layer potential feature to the second end of the enhancement layer potential feature.
[0099] Wherein, the first end is the head end and the second end is the tail end; or, the first end is the tail end and the second end is the head end.
[0100] That is, by using the inverse masking operation, the channel indices with mask values of 0 and 1 are extracted, and by using the torch concatenation operation, the channels with all zeros in the base layer and enhancement layer are transformed to the beginning and end of the features respectively according to the extracted indices, so as to obtain continuous non-zero latent features of the base layer and continuous non-zero latent features of the enhancement layer, so as to reduce the code rate of subsequent entropy coding.
[0101] S410. The latent features of the base layer are processed by the base layer advanced prior coding network to obtain the base layer advanced prior features.
[0102] Reference Figure 7 As shown, in some embodiments, the base layer advanced prior coding network includes: a first convolutional layer 71, a second convolutional layer 72, a first downsampling layer 73, a third convolutional layer 74, and a second downsampling layer 75 connected in sequence. The base layer advanced prior coding network encodes the latent features Y of the base layer. base The processing to obtain the base layer prior features includes: sequentially passing the base layer latent features Y through a first convolutional layer 71, a second convolutional layer 72, a first downsampling layer 73, a third convolutional layer 74, and a second downsampling layer 75. base Processing is performed to obtain the base layer super-prior features Z. base .
[0103] In some embodiments, the first convolutional layer 71, the second convolutional layer 72, the first downsampling layer 73, the third convolutional layer 74, and the second downsampling layer 75 are all convolutional layers with a kernel size of 3×3.
[0104] The latent features of the base layer are represented as Y. base The base layer hyperprior features are represented as Z. base If the processing of features by the base layer hyperprior coding network is represented as Ha1(), then:
[0105] Z base =Ha1(Y base )
[0106] S411. Quantize and entropy encode the prior features of the base layer to obtain the first encoded data.
[0107] The base layer hyperprior features are represented as Z. base Quantization is represented by Q(), entropy encoding by E(), and the first encoded data by b1. Then:
[0108] b1=E(Q(Zbase ))
[0109] S412. The latent features of the enhancement layer are processed by the enhancement layer super-prior coding network to obtain the enhancement layer super-prior features.
[0110] In some embodiments, the network structure of the enhancement layer advanced prior coding network can be similar to... Figure 7 The basic layer hyperprior coding network shown has the same network structure, and will not be described in detail here to avoid redundancy. The enhancement layer hyperprior coding network encodes the latent features Y of the enhancement layer. enhance Processing to obtain the base layer hyperprior features Z enhance This includes: sequentially passing the latent feature Y of the enhancement layer through a first convolutional layer 71, a second convolutional layer 72, a first downsampling layer 73, a third convolutional layer 74, and a second downsampling layer 75. enhaace Processing is performed to obtain the base layer super-prior features Z. enhance .
[0111] The latent features of the base layer are represented as Y. enhance The base layer hyperprior features are represented as Z. enhance If the processing of features by the base layer hyperprior coding network is represented as Ha2(), then:
[0112] Z enhanca =Ha2(Y enhenca )
[0113] S413. Quantize and entropy encode the advanced prior features of the enhancement layer to obtain the second encoded data.
[0114] Related technologies generally use the same super-prior coding network to process latent features of the base layer and the enhancement layer. However, a single superanalysis network is often not suitable for generating independent base layer and enhancement layer super-prior features, and cannot achieve the best coding performance. The above embodiment uses two independent super-prior coding networks (a base layer super-prior coding network and an enhancement layer super-prior coding network) to generate base layer and enhancement layer super-prior features respectively. Therefore, the above embodiment can generate base layer and enhancement layer super-prior features better, thereby further improving coding performance.
[0115] S414. Based on the channel attention mask, the quantization latent features are divided into basic layer quantization latent features and enhancement layer quantization latent features.
[0116] That is, based on the channel attention mask obtained in step S406, the quantized latent features y obtained in step S402 are divided into basic layer quantized latent features y. base And enhancement layer quantize latent features y eahance .
[0117] In some embodiments, step S414 (dividing the quantization latent features into basic layer quantization latent features and enhancement layer quantization latent features according to the channel attention mask) includes: performing a dot product operation on the quantization latent features and the channel attention mask to obtain the basic layer quantization latent features; and calculating the difference between the quantization latent features and the basic layer quantization latent features to obtain the enhancement layer quantization latent features.
[0118] Let the quantized latent features be represented as y, and let the quantized latent features of the base layer be represented as y. base The latent features of the enhancement layer are represented as y. enhance The channel attention mask is represented as Mask, and the dot product operation is represented as... Then we have:
[0119]
[0120]
[0121] S415. Decode the first encoded data to obtain the advanced prior features for basic layer reconstruction.
[0122] In some embodiments, decoding the first encoded data includes: performing lossless decoding on the first encoded data.
[0123] Let the first encoded data be denoted as b1, the decoding operation as D(), and the reconstructed prior features of the base layer as... Then we have:
[0124]
[0125] S416. The base layer reconstruction super-prior features are processed by the base layer super-prior decoding network to obtain the base layer reconstruction potential features.
[0126] In some embodiments, refer to Figure 8 As shown, the base layer advanced prior decoding network includes: a convolutional layer 81, a first upsampling layer 82, a second upsampling layer 83, a third upsampling layer 84, and a fourth upsampling layer 85. The base layer advanced prior decoding network reconstructs advanced prior features from the base layer. Processing is performed to obtain potential features for base layer reconstruction. This includes: reconstructing the prior features of the base layer sequentially through convolutional layer 81, first upsampling layer 82, second upsampling layer 83, third upsampling layer 84, and fourth upsampling layer 85. Processing is performed to obtain potential features for base layer reconstruction.
[0127] In some embodiments, convolutional layer 81, first upsampling layer 82, second upsampling layer 83, third upsampling layer 84, and fourth upsampling layer 85 are all convolutional layers with a kernel size of 3×3.
[0128] The prior features of the basic layer reconstruction are represented as: The latent features of the base layer reconstruction are represented as follows: If the operation of the base layer hyperprior decoding network is represented as Hs1(), then:
[0129]
[0130] S417. Decode the second encoded data to obtain the super-prior features for the enhancement layer reconstruction.
[0131] In some embodiments, decoding the second encoded data includes: performing lossless decoding on the second encoded data.
[0132] Let the first encoded data be denoted as b2, the decoding operation as D(), and the reconstructed prior features of the base layer as... Then we have:
[0133]
[0134] S418. The super-prior features of the enhancement layer reconstruction are processed by the enhancement layer super-prior decoding network to obtain the potential features of the enhancement layer reconstruction.
[0135] In some embodiments, the network structure of the enhancement layer advanced prior decoding network can be similar to... Figure 8 The basic layer hyperprior decoding network shown has the same network structure, and will not be repeated here to avoid redundancy. The enhancement layer hyperprior decoding network reconstructs hyperprior features for the enhancement layer. The processing includes: reconstructing the prior features of the base layer by sequentially passing them through a convolutional layer 81, a first upsampling layer 82, a second upsampling layer 83, a third upsampling layer 84, and a fourth upsampling layer 85. Processing is performed to obtain potential features for base layer reconstruction.
[0136] The hyperprior features of the enhancement layer reconstruction are represented as: The latent features of the enhancement layer reconstruction are represented as follows If the operation of the enhancement layer hyperprior decoding network is represented as Hs2(), then:
[0137]
[0138] S419. Based on the reconstructed latent features of the base layer and the reconstructed latent features of the enhancement layer, entropy encoding is performed on the quantized latent features of the enhancement layer and the quantized latent features of the base layer to obtain third encoded data and fourth encoded data.
[0139] In some embodiments, step S419 (performing entropy encoding on the quantized latent features of the enhancement layer and the quantized latent features of the base layer and the base layer based on the reconstructed latent features of the base layer and the reconstructed latent features of the enhancement layer to obtain third encoded data and fourth encoded data) includes the following steps a to d:
[0140] Step a: Obtain the context features of the enhancement layer by reconstructing the latent features of the enhancement layer and quantizing the latent features of the enhancement layer that have been encoded.
[0141] In some embodiments, obtaining enhancement layer context features based on the latent features reconstructed by the enhancement layer and the quantized latent features of the enhancement layer that have been encoded includes: inputting the latent features reconstructed by the enhancement layer and the quantized latent features of the enhancement layer that have been encoded into a spatial context network based on autoregressive convolution to obtain enhancement layer context features.
[0142] The essence of a spatial context network based on autoregressive convolution is a masked convolutional layer. For example, refer to... Figure 9 As shown, Figure 9 This is a schematic diagram of the masked convolutional kernel used in the context network based on autoregressive convolution provided in this application embodiment. Figure 9 As shown, this spatial context network based on autoregressive convolution uses the previously encoded elements up to 901 in the latent space to predict the context features corresponding to the current encoding position, and uses these context features to predict the probability distribution of the current encoding position in subsequent calculations. Here, the previously encoded elements are... Figure 9 The element at the encoding position shown in the dashed box.
[0143] In some embodiments, the calculation formula for the spatial context network based on autoregressive convolution is:
[0144] g cm (x)=(M⊙W)x+b
[0145] Where x is the input feature of the spatial context network based on autoregressive convolution, M and W are the k×k mask and convolution weights, respectively, ⊙ is the Hadamard operator, and b is the bias term.
[0146] Step b: Entropy encoding is performed on the next element of the quantized latent feature of the enhancement layer based on the contextual features of the enhancement layer.
[0147] When entropy encoding is performed on the quantized latent features of the enhancement layer, each element of the quantized latent feature is entropy encoded one by one in element-wise order. When entropy encoding is performed on the first element of the quantized latent feature, there are no elements of the quantized latent feature that have already been encoded. Therefore, the input to the enhancement layer context network only includes the reconstructed latent features of the enhancement layer. When entropy encoding is performed on subsequent elements of the quantized latent features of the enhancement layer, the encoded elements of the quantized latent features of the enhancement layer can be input into the enhancement layer context network.
[0148] Repeat steps a and b above to complete the encoding of all elements of the quantized potential features of the enhancement layer, and the fourth encoded data can be obtained.
[0149] Step c: Obtain the context features of the base layer based on the reconstructed latent features of the base layer and the quantized latent features of the base layer that have been encoded.
[0150] In some embodiments, obtaining base layer context features based on the reconstructed latent features of the base layer and the encoded quantized latent features of the base layer includes: inputting the reconstructed latent features of the base layer and the encoded quantized latent features of the base layer into a spatial context network based on autoregressive convolution to obtain base layer context features.
[0151] Step d: Entropy encoding is performed on the next element of the quantized potential feature of the base layer based on the context features of the base layer.
[0152] Similarly, when entropy encoding the quantized latent features of the base layer, each element of the quantized latent feature is entropy encoded one by one in element-wise order. When entropy encoding is performed on the first element of the quantized latent feature, there are no elements of the quantized latent feature that have already been encoded. Therefore, the input to the base layer context network only includes the reconstructed latent features of the base layer. When entropy encoding is performed on subsequent elements of the base layer quantized latent features, the encoded elements of the base layer quantized latent features can be input into the base layer context network.
[0153] Repeat steps c and d above to complete the encoding of all elements of the underlying quantization features in the base layer, and the third encoded data can be obtained.
[0154] In other embodiments, step S419 (performing entropy encoding on the quantized latent features of the enhancement layer and the quantized latent features of the base layer and the base layer based on the reconstructed latent features of the base layer and the reconstructed latent features of the enhancement layer to obtain third encoded data and fourth encoded data) includes the following steps ① to ④:
[0155] Step 1: Obtain the context features of the enhancement layer through the enhancement layer context network, the encoded enhancement layer quantized latent features, and the enhancement layer reconstructed latent features.
[0156] Reference Figure 10 As shown, in some embodiments, the enhancement layer context network includes: a channel context module 11, a spatial context module 12, a splicing module 13, and an entropy parameter module 14. The enhancement layer context network quantizes the latent features y according to the enhancement layer. enhance and enhancement layer reconstruction of potential features Obtain the contextual features Φ of the enhancement layer enhance The process includes the following steps ①a to ①d:
[0157] Step ①a: Reconstruct latent features of the enhancement layer using the channel context module 11. Channel context features are extracted to obtain the enhancement layer channel context features.
[0158] The channel context module includes multiple convolutional layers and activation function layers connected in series between adjacent convolutional layers.
[0159] Reference Figure 11 As shown, in some embodiments, the channel context module 11 includes: a first convolutional layer 1101, a first activation function layer 1102, a second convolutional layer 1103, a second activation function layer 1104, and a third convolutional layer 1105. The channel context module 11 is used to reconstruct latent features of the enhancement layer by sequentially passing the first convolutional layer 1101, the first activation function layer 1102, the second convolutional layer 1103, the second activation function layer 1104, and the third convolutional layer 1105. Processing is performed to obtain enhancement layer channel context features.
[0160] In some embodiments, the first convolutional layer 1101 and the second convolutional layer 1103 are convolutional layers with a kernel size of 3×3; the third convolutional layer 1105 is a convolutional layer with a kernel size of 5×5; and the activation functions of the first activation function layer 1102 and the second activation function layer 1104 are Gaussian Error Linear Unit (GELU) activation functions.
[0161] Step ①b: Spatial context module 12 quantizes the latent features y of the already encoded enhancement layer. enhance Spatial context feature extraction is performed to obtain the spatial context features of the enhancement layer.
[0162] In some embodiments, the spatial context module 12 can be a spatial context network based on autoregressive convolution.
[0163] A schematic diagram of the masked convolution kernel used in autoregressive convolution-based spatial context networks can be seen as follows: Figure 9 As shown, no further details will be provided here.
[0164] Step ①c: The stitching module 13 reconstructs the latent features of the enhancement layer. Enhancement layer channel context features and enhancement layer spatial context features Perform splicing to obtain the first splicing feature.
[0165] In some embodiments, the stitching module 13 can reconstruct latent features of the enhancement layer from the channel dimension. Channel context features and enhancement layer spatial context features Perform splicing to obtain the first splicing feature.
[0166] Step ①d, Entropy parameter module 14 for the first splicing feature Processing is performed to obtain the enhancement layer context features Φ enhance .
[0167] The entropy parameter module includes multiple concatenated convolutional layers.
[0168] Reference Figure 12 As shown, in some embodiments, the entropy parameter module 14 includes a first convolutional layer 1401, a second convolutional layer 1402, and a third convolutional layer 1403. The entropy parameter module 14 is used to sequentially pass the first convolutional layer 1401, the second convolutional layer 1402, and the third convolutional layer 1403 to the first concatenated feature. Processing is performed to obtain the enhancement layer context features Φ enhance .
[0169] Step ②: Based on the enhancement layer context feature Φ enhance Quantify the latent features y of the enhancement layer enhancr Entropy encoding is performed on the next element.
[0170] Repeat steps ① and ② above to complete the quantization of the latent features y in the enhancement layer. ennance The fourth encoded data b4 can be obtained by entropy encoding all the elements.
[0171] Step 3: Quantify the latent features y through the base layer context network and the enhancement layer. enhance Potential features of basic layer reconstruction and the base layer quantized latent features y that have been encoded base Obtain the context features of the base layer.
[0172] Reference Figure 13 As shown, in some embodiments, the base layer context network includes: a first splicing module 131, a channel context module 132, a spatial context module 133, a second splicing module 134, and an entropy parameter module 135. The enhancement layer context network quantizes the latent features y according to the enhancement layer. enhance Potential features of basic layer reconstruction and the quantized latent features y of the base layer that have been encoded base The steps for obtaining the base layer context features include the following steps ③a to ③e:
[0173] Step ③a: The first splicing module 131 quantifies the latent features y of the enhancement layer. enhance and base layer reconstruction of potential features Perform splicing to obtain the second splicing feature.
[0174] In some embodiments, the first splicing module 131 can quantize the latent features y of the encoded enhancement layer from the channel dimension. enhance and base layer reconstruction of potential features Perform splicing to obtain the second splicing feature.
[0175] Step ③b, Channel Context Module 132 on the second splicing feature Channel context features are extracted to obtain the base layer channel context features.
[0176] The structure of the channel context module 132 can be compared with... Figure 11 The channel context modules shown have the same structure, the difference being the number of channels in channel context module 132. Figure 11 The number of channels in the channel context modules shown varies, and to avoid redundancy, they will not be described in detail here.
[0177] Step ③c: Spatial context module 133 quantizes the latent features y of the base layer that has been encoded. base Spatial context feature extraction is performed to obtain the base layer spatial context features.
[0178] In some embodiments, the spatial context module 133 may be a spatial context network based on autoregressive convolution.
[0179] A schematic diagram of the masked convolution kernel used in autoregressive convolution-based spatial context networks can be seen as follows: Figure 9As shown, no further details will be provided here.
[0180] Step ③d, the second splicing module 134 reconstructs the potential features of the base layer. Base layer channel context features and base layer spatial context features Perform splicing to obtain the third splicing feature.
[0181] In some embodiments, the second stitching module 134 can reconstruct latent features from the base layer from the channel dimension. Base layer channel context features and base layer spatial context features Perform splicing to obtain the third splicing feature.
[0182] Step ③e, Entropy parameter module 135 for the third splicing feature Processing is performed to obtain the base layer context features Φ base .
[0183] The structure of entropy parameter module 135 can be compared with... Figure 12 The entropy parameter module shown has the same structure, the difference being the number of channels in entropy parameter module 125. Figure 12 The number of channels in the entropy parameter modules shown is different, and to avoid redundancy, it will not be explained in detail here.
[0184] Step 4: Based on the basic layer context feature Φ base Quantifying the latent features Φ of the base layer base Entropy encoding is performed on the next element.
[0185] Repeat steps ③ and ④ above to complete the quantization of the latent features y in the base layer. base The third encoded data b3 can be obtained by encoding all the elements.
[0186] S420. Generate the encoded data of the target image based on the first encoded data, the second encoded data, the third encoded data, and the fourth encoded data.
[0187] That is, the first encoded data b1, the second encoded data b2, the third encoded data b3, and the fourth encoded data b4 obtained in the previous step are used as the encoded data of the target image, or in other words, the encoded data of the target image includes the first encoded data b1, the second encoded data b2, the third encoded data b3, and the fourth encoded data b4.
[0188] This application also provides an image decoding method, referring to... Figure 14 As shown, the image decoding method includes the following steps S141 to S146:
[0189] S141. Obtain the encoded data of the target image.
[0190] The encoded data of the target image includes: first encoded data, second encoded data, third encoded data, and fourth encoded data. The first encoded data and the second encoded data are encoded data obtained by entropy encoding of the base layer advanced prior features and the enhancement layer advanced prior features of the target image, respectively. The third encoded data and the fourth encoded data are encoded data obtained by entropy encoding of the base layer quantized latent features and the enhancement layer quantized latent features of the target image, respectively.
[0191] The method for encoding the target image's encoded data to obtain the first encoded data, the second encoded data, the third encoded data, and the fourth encoded data can refer to the image encoding method provided in any of the above embodiments. To avoid redundancy, it will not be described in detail here.
[0192] S142. Perform entropy decoding on the first encoded data and the second encoded data respectively to obtain the super-prior features of the base layer reconstruction and the super-prior features of the enhancement layer reconstruction.
[0193] S143. The base layer reconstruction super-prior features are processed by the base layer super-prior decoding network to obtain the base layer reconstruction potential features.
[0194] S144. The super-prior features of the enhancement layer reconstruction are processed by the enhancement layer super-prior decoding network to obtain the potential features of the enhancement layer reconstruction.
[0195] In particular, the network structures of the base layer hyper-prior decoding network and the enhancement layer hyper-prior decoding network in steps S413 and S414 can both be compared with those of the above-mentioned network structures. Figure 8 The network structure of the basic layer hyperprior decoding network shown is the same, and will not be described in detail here to avoid redundancy.
[0196] S145. Perform entropy decoding on the third encoded data and the fourth encoded data based on the base layer reconstruction potential features and the enhancement layer reconstruction potential features to obtain the base layer reconstruction quantization potential features and the enhancement layer reconstruction quantization potential features.
[0197] S146. Obtain the reconstructed image of the target image based on the latent features of the base layer reconstruction quantization and the latent features of the enhancement layer reconstruction quantization.
[0198] The image decoding method provided in this application embodiment can reconstruct the image encoded by the image encoding method provided in the above embodiment. Therefore, the image decoding method provided in this application embodiment can improve the encoding performance of the machine learning-based scalable image encoder and the machine vision performance while ensuring normal image decoding.
[0199] As an extension and refinement of the above embodiments, this application provides another image decoding method, referring to... Figure 15 As shown, the image decoding method includes the following steps:
[0200] S1501. Obtain the encoded data of the target image.
[0201] The encoded data of the target image includes: first encoded data, second encoded data, third encoded data, and fourth encoded data. The first encoded data and the second encoded data are encoded data obtained by entropy encoding of the base layer advanced prior features and the enhancement layer advanced prior features of the target image, respectively. The third encoded data and the fourth encoded data are encoded data obtained by entropy encoding of the base layer quantized latent features and the enhancement layer quantized latent features of the target image, respectively.
[0202] That is, the encoded data of the target image includes the first encoded data b1, the second encoded data b2, the third encoded data b3, and the fourth encoded data b4 obtained by the image encoding method provided in any of the above embodiments.
[0203] S1502. Perform entropy decoding on the first encoded data to obtain the super-prior features for basic layer reconstruction.
[0204] S1503. The base layer reconstruction super-prior features are processed by the base layer super-prior decoding network to obtain the base layer reconstruction potential features.
[0205] S1504. Decode the second encoded data to obtain the super-prior features for the enhancement layer reconstruction.
[0206] S1505. The super-prior features of the enhancement layer reconstruction are processed by the enhancement layer super-prior decoding network to obtain the potential features of the enhancement layer reconstruction.
[0207] S1506. Perform entropy decoding on the third encoded data and the fourth encoded data based on the base layer reconstruction potential features and the enhancement layer reconstruction potential features to obtain the base layer reconstruction quantization potential features and the enhancement layer reconstruction quantization potential features.
[0208] In some embodiments, step S1506 (performing entropy decoding on the third encoded data and the fourth encoded data based on the base layer reconstruction latent features and the enhancement layer reconstruction latent features to obtain the base layer reconstruction quantization latent features and the enhancement layer reconstruction quantization latent features) includes the following steps 1) to 4):
[0209] Step 1) Obtain the context features of the enhancement layer based on the latent features reconstructed from the enhancement layer.
[0210] Step 2) Perform entropy decoding on the next element of the fourth encoded data based on the context features of the enhancement layer.
[0211] Repeat steps 1) and 2) above to complete the decoding of all elements of the fourth encoded data to obtain the latent features of the enhancement layer reconstruction quantization.
[0212] Step 3) Obtain the context features of the base layer by reconstructing the latent features of the base layer.
[0213] Step 4) Perform entropy decoding on the next element of the third encoded data based on the context features of the base layer.
[0214] Repeat steps 3) and 4) above to complete the decoding of all elements of the third encoded data to obtain the underlying reconstructed quantization potential features of the base layer.
[0215] In some embodiments, step S1506 (performing entropy decoding on the third encoded data and the fourth encoded data based on the base layer reconstruction latent features and the enhancement layer reconstruction latent features to obtain the base layer reconstruction quantization latent features and the enhancement layer reconstruction quantization latent features) includes the following steps one to four:
[0216] Step 1: Obtain the enhancement layer context features through the enhancement layer context network, the reconstructed enhancement layer reconstruction quantization latent features (decoding results of the fourth encoded data that has been decoded), and the enhancement layer reconstruction latent features.
[0217] Since the fourth encoded data is encoded data obtained by encoding the quantized latent features of the enhancement layer, the decoding result of the fourth encoded data that has been decoded is the reconstructed quantized latent features of the enhancement layer that have been reconstructed.
[0218] The network structure of the enhancement layer context network can be referenced. Figure 10As shown, the implementation of the enhancement layer context network to obtain enhancement layer context features based on the enhancement layer reconstruction quantization latent features after the enhancement layer reconstruction is completed can refer to steps ①a to ①d in the above embodiment. The only difference is that steps ①a to ①d use the enhancement layer quantization latent features that have been encoded, while this embodiment uses the enhancement layer reconstruction quantization latent features that have been reconstructed.
[0219] Step 2: Perform entropy decoding on the next element of the fourth encoded data based on the context features of the enhancement layer.
[0220] Repeat steps one and two above to complete the decoding of all elements of the fourth encoded data, and the latent features of the enhancement layer reconstruction quantization can be obtained.
[0221] Step 3: Obtain the base layer context features by using the base layer context network, the enhancement layer reconstruction quantization latent features, the base layer reconstruction latent features, and the base layer reconstruction quantization latent features that have been reconstructed (the decoding result of the third encoded data that has been decoded).
[0222] Since the latent features of the enhancement layer reconstruction quantization have been obtained through the above steps one and two, the latent features of the enhancement layer reconstruction quantization can be used to further obtain the context features of the base layer.
[0223] The network structure of the base layer context network can be referenced. Figure 13 As shown, the implementation method of the base layer context network to obtain base layer context features based on the enhancement layer reconstruction quantization latent features, the base layer reconstruction latent features, and the base layer reconstruction quantization latent features that have been reconstructed can refer to steps ③a to ③d in the above embodiment. The only difference is that steps ③a to ③d use the base layer quantization latent features that have been encoded, while this embodiment uses the base layer reconstruction quantization latent features that have been reconstructed.
[0224] Step 4: Perform entropy decoding on the next element of the third encoded data based on the context features of the base layer.
[0225] Since the third encoded data is encoded data obtained by encoding the quantization latent features of the base layer, the decoding result of the fourth encoded data, which has already been decoded, is the reconstructed quantization latent feature of the base layer. Repeating steps three and four above, and decoding all elements of the third encoded data, will yield the reconstructed quantization latent feature of the base layer.
[0226] S1507. The reconstruction quantization potential features of the base layer and the reconstruction quantization potential features of the enhancement layer are spliced together to obtain the reconstruction quantization potential features.
[0227] In some embodiments, splicing the base layer reconstruction quantization latent features and the enhancement layer reconstruction quantization latent features includes: adding the feature values at corresponding positions of the base layer reconstruction quantization latent features and the enhancement layer reconstruction quantization latent features.
[0228] The latent features of the base layer reconstruction quantization are represented as follows: The latent features of the enhancement layer reconstruction quantization are represented as follows Reconstructing the quantified latent features is represented as The concatenation operation is represented by +, then:
[0229]
[0230] S1508. Input the reconstructed quantized latent features into the synthetic transformation network, and obtain the reconstructed image of the target image output by the synthetic transformation network.
[0231] In some embodiments, refer to Figure 16 As shown, the synthetic transformation network includes: multiple upsampling convolutional layers 161 and multiple residual activation units 162 connected in series between adjacent upsampling convolutional layers. Figure 16 The synthetic transform network is illustrated by an example comprising four upsampled convolutional layers 161 and three residual activation units 162 connected in series between adjacent upsampled convolutional layers 161. Each residual activation unit 162 includes a first convolutional layer 1621, an activation function layer 1622, a second convolutional layer 1623, and a fusion layer 1624. The residual activation unit 162 processes its input feature I2 sequentially through the first convolutional layer 1621, the activation function layer 1622, and the second convolutional layer 1623, and then fuses the output feature of the second convolutional layer 1623 with the input feature I2 of the residual activation unit through the fusion layer 1624 to obtain the output feature O2 of the residual activation unit 162.
[0232] In some embodiments, each upsampling convolutional layer 161 in the synthetic transform network is an upsampling convolutional layer with a kernel size of 3×3, the first convolutional layer 1621 and the second convolutional layer 1623 in each residual activation unit of the synthetic transform network are convolutional layers with a kernel size of 3×3, and the activation function of the activation function layer 1622 in each residual activation unit 162 of the synthetic transform network is the LeakyReLU activation function.
[0233] The reconstructed quantized latent features are represented as: The reconstructed image is represented as The feature processing of the synthetic transformation network is represented by g. s (), then we have:
[0234]
[0235] S1509. Based on the Latent Space Transform (LST) network, the quantized latent features of the base layer are reconstructed and processed to obtain machine vision features.
[0236] The latent features of the base layer reconstruction quantization are represented as follows: Machine vision features are represented as If the feature processing by the synthetic transformation network is represented as T(), then:
[0237]
[0238] Reference Figure 17 As shown, in some embodiments, the latent spatial transformation network includes: a first residual block 171, a first upsampled residual block 172, a second residual block 173, a second upsampled residual block 174, a third residual block 175, a third upsampled residual block 176, a fourth residual block 177, an upsampled convolutional layer 178, and an activation function layer 179. The upsampling factors of the first upsampled residual block 172, the second upsampled residual block 174, the third upsampled residual block 176, and the upsampled convolutional layer 178 are r1, r2, r3, and r4, respectively.
[0239] Reference Figure 17 As shown, in some embodiments, the residual blocks (first residual block 171, second residual block 173, third residual block 175, and fourth residual block 177) in the latent spatial transformation network include: a first convolutional layer 1701, a first LeakyLeLU activation function layer 1702, a second convolutional layer 1703, a second LeakyLeLU activation function layer 1704, and a fusion module 1705. The feature processing steps of the residual blocks include: firstly, processing the input feature I3 of the residual block sequentially through the first convolutional layer 1701, the first LeakyLeLU activation function layer 1702, the second convolutional layer 1703, and the second LeakyLeLU activation function layer 1704; and then, adding and fusing the output feature of the second LeakyLeLU activation function layer 1704 and the input feature I3 of the residual block through the fusion module 1705 to obtain the output feature O3 of the residual block.
[0240] Reference Figure 17As shown, in some embodiments, the upsampled residual blocks (first upsampled residual block 172, second upsampled residual block 174, and third upsampled residual block 176) in the latent spatial transformation network include: an upsampled convolutional layer 1706, a LeakyLeLU activation function layer 1707, a third convolutional layer 1708, an inverse generalized divisive normalization (IGDN) layer 1709, a fourth convolutional layer 1710, and a fusion module 1711. The feature processing steps of the upsampled residual block include: first, the input feature I4 of the upsampled residual block is processed by the upsampled convolutional layer 1706, the LeakyLeLU activation function layer 1707, the third convolutional layer 1708, and the IGDN layer 1709; then, the input feature I4 of the upsampled residual block is processed by the fourth convolutional layer 1710; and finally, the output of the IGDN layer 1709 and the output of the fourth convolutional layer 1710 are added and fused by the fusion module 1711 to obtain the output feature O4 of the upsampled residual block.
[0241] S1510. Input the machine vision features into the machine vision task model to obtain the machine vision task processing result output by the machine vision task model.
[0242] The machine vision task model in this application embodiment can be an image / video super-resolution network or a target (specific object such as a face) detection network based on machine learning models such as Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), and Long Short-Term Memory (LSTM).
[0243] The processing of features by the machine vision task model is represented as V(), and the machine vision features are represented as... If the result of the machine vision task is represented as M, then:
[0244]
[0245] In some embodiments, the machine vision task model can be a model structure from layer 13 onwards of the YOLOv3 (You Only Look Once) model, and the machine vision task processing result is the average accuracy of object detection. That is, step S112 above includes: inputting the machine vision features into layer 13 of the YOLOv3 model to obtain the average accuracy of object detection output by the YOLOv3 model.
[0246] Reference Figure 18 As shown, in Figure 2 Based on the image decoder shown, some embodiments of this application further include a content-adaptive filtering network 213. The content-adaptive filtering network 213 is used to process the reconstructed image. Enhancement is performed to obtain an enhanced image.
[0247] Reference Figure 19 As shown, in some embodiments, the content adaptive filtering network 213 includes: a first upsampling module 1901, a second upsampling module 1902, a first feature extraction module 1903, a second feature extraction module 1904, a third feature extraction module 1905, a stitching module 1906, a content adaptive inter-channel correlation information filter (ICCI) 1907, a first processing module 1908, a second processing module 1909, and a third processing module 1910, a first fusion module 1911, a second fusion module 1912, and a third fusion module 1913, a first reconstruction module 1914, a second reconstruction module 1915, and a third reconstruction module 1916. The content adaptive filtering network 213 reconstructs the image. The enhancement process includes: Step 1, representing the initial first chromaticity component of the reconstructed image using the first upsampling module 1901 and the second upsampling module 1902 respectively. The initial second chromaticity component is represented as Perform upsampling to obtain the initial luminance component. The first chromaticity component of the upsampled sample with the same spatial size is represented as The upsampled second chromaticity component is represented as Step 2: Extract the initial luminance component using the first feature extraction module 1903, the second feature extraction module 1904, and the third feature extraction module 1905 respectively. The first upsampled chromaticity component is represented as And the upsampled second chromaticity component is represented as Feature extraction is performed to obtain brightness features. First chromaticity feature Second chromaticity feature Step 3: Use the splicing module 1906 to analyze the brightness characteristics. First chromaticity feature Second chromaticity feature Perform stitching to obtain initial image features F YUV Step 4: Analyze the initial image features F using ICCI1907. YUV Process the data to obtain the enhanced feature F.enha Step 5: The enhanced feature F is processed by the first processing module 1908, the second processing module 1909, and the third processing module 1910 respectively. enha Processing is performed to obtain brightness enhancement features. First chromaticity enhancement feature and second chromaticity enhancement features Step 6: Fuse brightness features using the first fusion module 1911. and brightness enhancement features Obtain enhanced brightness features Step 7: Fuse the first chromaticity feature through the second fusion module 1912. and first chromaticity enhancement features Obtain enhanced first chromaticity features Step 8: Fuse the second chromaticity feature through the third fusion module 1913. Second chromaticity enhancement features Obtaining enhanced second chromaticity features Step 9: Enhance the brightness features using the first reconstruction module 1914, the second reconstruction module 1915, and the third reconstruction module 1916 respectively. Enhanced first brightness feature And enhance the second brightness feature Processing is performed to obtain the enhanced luminance component. Enhancement of the first chromaticity component is represented as And the enhancement of the second chromaticity component is represented as Step 10: Combine and enhance the luminance components Enhancement of the first chromaticity component is represented as And the enhancement of the second chromaticity component is represented as Obtain enhanced images
[0248] Reference Figure 20 As shown, based on any of the above image decoding methods, the image decoding method provided in this application embodiment further includes reconstructing the target image through a content adaptive filtering network 213. Perform the following steps:
[0249] S201. Obtain the initial luminance component, the initial first chromaticity component, and the initial second chromaticity component based on the reconstructed image.
[0250] That is, to acquire the reconstructed image. The Y, U, and V components.
[0251] S202. Generate an upsampled first chromaticity component and an upsampled second chromaticity component based on the initial first chromaticity component and the initial second chromaticity component, respectively.
[0252] The spatial dimensions of the upsampled first chromaticity component and the upsampled second chromaticity component are the same as the spatial dimensions of the initial luminance component.
[0253] That is, the initial first chromaticity component and the initial second chromaticity component are upsampled to chromaticity components with the same spatial size as the initial luminance component.
[0254] In some embodiments, bicubic interpolation can be performed on the initial first chromaticity component and the initial second chromaticity component respectively to obtain the upsampled first chromaticity component and the upsampled second chromaticity component respectively.
[0255] The initial first chromaticity component is represented as... The initial second chromaticity component is represented as: The upsampled first chromaticity component is represented as: The upsampled second chromaticity component is represented as: The bicubic interpolation operation is denoted as BI(), and the above step S202 can be expressed as the following formula:
[0256]
[0257]
[0258] S203. Perform feature extraction on the initial luminance component, the upsampled first chromaticity component, and the upsampled second chromaticity component respectively to obtain luminance features, first chromaticity features, and second chromaticity features.
[0259] In some embodiments, step S203 (performing feature extraction on the initial luminance component, the upsampled first chrominance component, and the upsampled second chrominance component respectively to obtain luminance features, first chrominance features, and second chrominance features) includes:
[0260] A forward wavelet transform (WT) is performed on the initial luminance component, the upsampled first chrominance component, and the upsampled second chrominance component respectively to obtain the luminance feature, the first chrominance feature, and the second chrominance feature.
[0261] The initial luminance component is represented as The upsampled first chromaticity component is represented as: The upsampled second chromaticity component is represented as: The forward wavelet transform is represented by DWT(), and the brightness feature is represented by... The first chromaticity feature is represented as The second chromaticity feature is represented as The above S203 can then be expressed as the following formula:
[0262]
[0263]
[0264]
[0265] S204. Obtain the initial image features of the reconstructed image based on the brightness feature, the first chromaticity feature, and the second chromaticity feature.
[0266] In some embodiments, obtaining initial image features of the reconstructed image based on the luminance feature, the first chrominance feature, and the second chrominance feature includes: stitching the luminance feature, the first chrominance feature, and the second chrominance feature from the channel dimension to obtain the initial image features of the reconstructed image.
[0267] The brightness feature is represented as The first chromaticity feature is represented as The second chromaticity feature is represented as The concatenation operation along the channel dimension is represented by Concatenatio(), and the initial image features of the reconstructed image are represented by F. YUV Then, step S204 above can be expressed as the following formula:
[0268]
[0269] S205. The initial image features are extracted using the Content Adaptive Inter-Channel Related Information Filter (ICCI) to obtain enhanced features.
[0270] Reference Figure 21 As shown, in some embodiments, the content-adaptive inter-channel related information filter includes: a convolutional layer 2101, a batch normalization layer 2102, an activation function layer 2103, and a residual block sequence 2104 composed of multiple residual blocks. The feature processing flow of the content-adaptive inter-channel related information filter includes: processing the initial image features sequentially through the convolutional layer 2101, the batch normalization layer 2102, the activation function layer 2103, and the residual block sequence 2104, and scaling the output features of the residual block sequence 2104 by a factor of γ.
[0271] In some embodiments, the convolutional layer 2101 is a convolutional layer with a kernel size of 3×3.
[0272] In some embodiments, the activation function of the activation function layer 2103 is the ReLU activation function.
[0273] In some embodiments, the residual block sequence 2104 consists of eight 1D residual blocks.
[0274] Reference Figure 22 As shown, in some embodiments, the residual blocks in the residual block sequence 2104 include: a first convolutional layer 2201, a first batch normalization layer 2202, a ReLU activation function layer 2203, a second convolutional layer 2204, a second batch normalization layer 2205, and a fusion unit 2206. The residual blocks are used to process the input feature I5 of the residual blocks sequentially through the first convolutional layer 2201, the first batch normalization layer 2202, the ReLU activation function layer 2203, the second convolutional layer 2204, and the second batch normalization layer 2205, and to perform γ-processing on the output feature of the second batch normalization layer 2205. n The scaling is multiplied by a factor of 1, and the scaling features and the input features I5 of the residual block are added and fused by the fusion unit 2206 to obtain the output features O5 of the residual block.
[0275] In some embodiments, step S205 (performing feature enhancement processing on the luminance feature, the first chromaticity feature, and the second chromaticity feature based on the enhanced features to obtain enhanced luminance features, enhanced first chromaticity features, and enhanced second chromaticity features) includes:
[0276] Step 2051: Perform convolution processing on the initial image features to obtain the first feature.
[0277] In some embodiments, the initial image features can be convolved using a convolutional layer with a kernel size of 3×3 to obtain the first feature.
[0278] The initial image features of the reconstructed image are represented as F. YUV Convolution processing is represented as Conv 3×3 (), where the first feature is represented by F1, then step 2051 above can be expressed as the following formula:
[0279] F1 = Conv 3×3 (F YUV )
[0280] Step 2052: Perform batch normalization on the first feature to obtain the second feature.
[0281] In some embodiments, the first feature can be batch-normalized using a batch normalization layer to obtain the second feature.
[0282] Let the first feature be represented by F1, the batch normalization process by BN(), and the second feature by F2. Then, step 2052 above can be expressed as the following formula:
[0283] F2 = BN(F1)
[0284] Step 2053: Perform linear activation processing on the second feature to obtain the third feature.
[0285] In some embodiments, performing linear activation processing on the second feature to obtain the third feature includes: performing linear activation processing on the second feature through a ReLU activation function layer to obtain the third feature.
[0286] If the second feature is represented by F2, the linear activation process by ReLU(), and the third feature by F3, then step 2053 above can be expressed as the following formula:
[0287] F3 = ReLU(F2)
[0288] Step 2054: Process the third feature using a residual network to obtain the enhanced feature.
[0289] The residual network includes multiple concatenated residual blocks. Each residual block is used to sequentially perform a first convolution operation, a normalization operation, a linear activation operation, a second convolution operation, and a scaling operation on the input features of the residual block to obtain the residual features of the residual block. The input features of the residual block and the residual features of the residual block are added and fused to obtain the output features of the residual block.
[0290] In some embodiments, the residual network comprises eight cascaded residual blocks. The structure of the residual blocks can be referred to... Figure 22 The structure of the residual block shown will not be described in detail here to avoid redundancy.
[0291] The third feature is denoted as F3, the residual network processing is denoted as ReseN(), and the enhancement feature is denoted as F. enha Then, step 2054 above can be expressed as the following formula:
[0292] F enha =ReseN(F3)
[0293] S206. Based on the enhanced features, feature enhancement processing is performed on the brightness feature, the first chromaticity feature, and the second chromaticity feature respectively to obtain enhanced brightness features, enhanced first chromaticity features, and enhanced second chromaticity features.
[0294] Step 2061: Perform convolution processing on the enhancement features to obtain brightness enhancement features.
[0295] In some embodiments, the enhancement features can be convolved using a 3×3 kernel to obtain the brightness enhancement features.
[0296] The enhancement feature is represented as F. enha Convolution processing is represented as Conv 3×3 (), the brightness enhancement feature is represented as Then step 2061 above can be expressed as the following formula:
[0297]
[0298] Step 2062: Add and fuse the brightness enhancement feature and the brightness feature to obtain the enhanced brightness feature.
[0299] The brightness enhancement feature is represented as Additive blending is represented as +, and enhanced brightness features are represented as Then step 2062 above can be expressed as the following formula:
[0300]
[0301] Step 2063: Process the enhanced features using the first residual block sequence to obtain the first residual features.
[0302] The first residual block sequence includes multiple concatenated residual blocks. The residual blocks are used to sequentially perform a first convolution operation, a normalization operation, a linear activation operation, a second convolution operation, and a scaling operation on the input features of the residual blocks to obtain the residual features of the residual blocks. The input features of the residual blocks and the residual features of the residual blocks are added and fused to obtain the output features of the residual blocks.
[0303] In some embodiments, the first residual block sequence comprises five concatenated residual blocks. The structure of the residual blocks can be referred to... Figure 22 The structure of the residual block shown will not be described in detail here to avoid redundancy.
[0304] The enhancement feature is represented as F. enha The processing of the first residual block sequence is represented as RBS. U (), the first residual characteristic is represented by Res U Then, step 2063 above can be expressed as the following formula:
[0305] Res U =RBS U (F en a )
[0306] Step 2064: Perform convolution processing on the first residual feature to obtain the first chroma enhancement feature.
[0307] The first residual characteristic is represented by Res U Convolution processing is represented as Conv 3×3 (), the first chromaticity enhancement feature is represented as Then step 2064 above can be expressed as the following formula:
[0308]
[0309] Step 2065: Add and fuse the first chromaticity feature and the first chromaticity enhancement feature to obtain the enhanced first chromaticity feature.
[0310] The first chromaticity enhancement feature is represented as: Addition and fusion are represented as +, and enhancement of the first chromaticity feature is represented as Then step 2065 above can be expressed as the following formula:
[0311]
[0312] Step 2066: Process the enhanced features using the second residual block sequence to obtain the second residual features.
[0313] The second residual block sequence includes multiple concatenated residual blocks. The residual blocks are used to sequentially perform a first convolution operation, a normalization operation, a linear activation operation, a second convolution operation, and a scaling operation on the input features of the residual blocks to obtain the residual features of the residual blocks. The input features of the residual blocks and the residual features of the residual blocks are added and fused to obtain the output features of the residual blocks.
[0314] In some embodiments, the second residual block sequence comprises five concatenated residual blocks. The structure of the residual blocks can be referred to... Figure 22 The structure of the residual block shown will not be described in detail here to avoid redundancy.
[0315] The enhancement feature is represented as F. enha The processing of the second residual block sequence is represented as RBS. V (), the second residual characteristic is represented by Res V Then, step 2066 above can be expressed as the following formula:
[0316] Res V =RBS V (F en a )
[0317] Step 2067: Perform convolution processing on the second residual feature to obtain the second chroma enhancement feature.
[0318] The second residual characteristic is represented by Res V Convolution processing is represented as Conv 3×3 (), the second chromaticity enhancement feature is represented as Then step 2067 above can be expressed as the following formula:
[0319]
[0320] Step 2068: Add and fuse the second chromaticity feature and the second chromaticity enhancement feature to obtain the enhanced second chromaticity feature.
[0321] The second chromaticity feature is represented as The second chromaticity enhancement feature is represented as: Addition and fusion are represented as +, and enhancement of the second chromaticity feature is represented as Then step 2068 above can be expressed as the following formula:
[0322]
[0323] S207. Obtain the enhanced image of the reconstructed image based on the enhanced brightness feature, the enhanced first chromaticity feature, and the enhanced second chromaticity feature.
[0324] In some embodiments, the image encoding method or image decoding method provided in this application further includes: training each network model in the image encoder and image decoder based on a sample data set.
[0325] The sample data set includes multiple sample data groups, each of which includes a sample image and the corresponding machine vision task processing result. The process of training each network model in the image encoder and image decoder based on the sample data set may include: first, inputting the sample image into the image encoder for encoding to obtain the encoded image data; then, decoding the encoded data through the image decoder to obtain the reconstructed image and the machine vision task processing result output by the machine vision task model; then, calculating a first loss value based on the reconstructed image and the sample image; calculating a second loss value based on the machine vision task processing result corresponding to the sample image and the machine vision task processing result output by the machine vision task model; and finally, adjusting the parameters of the network models in the image encoder and / or image decoder based on the first loss value and the second loss value until the image encoder and image decoder converge.
[0326] In some embodiments, this application provides an image encoding apparatus, which includes:
[0327] Memory, configured to store computer programs;
[0328] The processor is configured to cause the image encoding apparatus to implement the image encoding method described in any of the above embodiments when a computer program is invoked.
[0329] In some embodiments, this application provides an image decoding apparatus, which includes:
[0330] Memory, configured to store computer programs;
[0331] The processor is configured to cause the image decoding device to implement the image decoding method described in any of the above embodiments when a computer program is invoked.
[0332] In some embodiments, this application provides a computer-readable storage medium storing a computer program that, when executed by a computing device, causes the computing device to implement the image encoding method or the image decoding method described in any of the above embodiments.
[0333] In some embodiments, this application provides a computer program product that, when run on a computer, enables the computer to implement the image encoding method or the image decoding method described in any of the above embodiments.
[0334] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0335] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. An image decoding method, characterized in that, include: The encoded data of the target image is obtained, which includes: first encoded data, second encoded data, third encoded data and fourth encoded data. The first encoded data and the second encoded data are encoded data obtained by entropy encoding of the base layer super-prior features and the enhancement layer super-prior features of the target image, respectively. The third encoded data and the fourth encoded data are encoded data obtained by entropy encoding of the base layer quantized latent features and the enhancement layer quantized latent features of the target image, respectively. Entropy decoding is performed on the first encoded data and the second encoded data respectively to obtain the base layer reconstruction super-prior features and the enhancement layer reconstruction super-prior features; The base layer reconstructed prior features are processed by a base layer super-prior decoding network to obtain the base layer reconstructed potential features; The enhanced layer reconstructed prior features are processed by the enhanced layer advanced prior decoding network to obtain the enhanced layer reconstructed potential features; Entropy decoding is performed on the third and fourth encoded data based on the base layer reconstruction potential features and the enhancement layer reconstruction potential features to obtain the base layer reconstruction quantization potential features and the enhancement layer reconstruction quantization potential features; Based on the latent features of the base layer reconstruction quantization and the latent features of the enhancement layer reconstruction quantization, the reconstructed image of the target image is obtained; The step of performing entropy decoding on the third and fourth encoded data based on the latent features reconstructed from the base layer and the latent features reconstructed from the enhancement layer to obtain the latent features reconstructed from the base layer and the latent features reconstructed from the enhancement layer includes: Based on the potential features of the enhancement layer reconstruction and the quantized potential features of the completed enhancement layer reconstruction, the context features of the enhancement layer are obtained. Entropy decoding is performed on the next element of the fourth encoded data based on the context features of the enhancement layer. Based on the enhancement layer quantization potential features, the base layer reconstruction potential features, and the base layer reconstruction quantization potential features that have been reconstructed, obtain the base layer context features; Entropy decoding is performed on the next element of the third encoded data based on the context features of the base layer.
2. The method according to claim 1, characterized in that, The step of obtaining enhancement layer context features based on the latent features of the enhancement layer reconstruction and the quantized latent features of the completed enhancement layer reconstruction includes: Based on the channel context module, channel context features are extracted from the potential features of the enhancement layer reconstruction to obtain the channel context features of the enhancement layer. Based on the spatial context module, spatial context features are extracted from the reconstructed enhancement layer quantization potential features to obtain the spatial context features of the enhancement layer; The first spliced feature is obtained by splicing the latent features of the enhancement layer reconstruction, the channel context features of the enhancement layer, and the spatial context features of the enhancement layer. The first spliced feature is processed based on the entropy parameter module to obtain the contextual features of the enhancement layer.
3. The method according to claim 1, characterized in that, The step of obtaining the base layer context features based on the enhancement layer quantization potential features, the base layer reconstruction potential features, and the base layer reconstruction quantization potential features that have been reconstructed includes: The latent features of the enhancement layer reconstruction quantization and the latent features of the base layer reconstruction are spliced together to obtain a second spliced feature; Based on the channel context module, channel context features are extracted from the second splicing feature to obtain the basic layer channel context features; Based on the spatial context module, spatial context features are extracted from the quantified potential features of the reconstructed base layer to obtain the spatial context features of the base layer. The base layer reconstruction potential features, the base layer channel context features, and the base layer spatial context features are spliced together to obtain a third spliced feature; The third concatenation feature is processed based on the entropy parameter module to obtain the base layer context feature.
4. The method according to claim 1, characterized in that, The step of obtaining the reconstructed image of the target image based on the reconstructed quantized latent features of the base layer and the reconstructed quantized latent features of the enhancement layer includes: By splicing the reconstructed quantization latent features of the base layer and the reconstructed quantization latent features of the enhancement layer, the reconstructed quantization latent features are obtained. The reconstructed quantized latent features are input into the synthetic transform network, and the reconstructed image of the target image is obtained from the output of the synthetic transform network.
5. The method according to claim 1, characterized in that, After acquiring the reconstructed image of the target image, the method further includes: The initial luminance component, the initial first chrominance component, and the initial second chrominance component are obtained from the reconstructed image. An upsampled first chromaticity component and an upsampled second chromaticity component are generated based on the initial first chromaticity component and the initial second chromaticity component, respectively; the spatial dimensions of the upsampled first chromaticity component and the upsampled second chromaticity component are the same as the spatial dimensions of the initial luminance component; Feature extraction is performed on the initial luminance component, the upsampled first chrominance component, and the upsampled second chrominance component respectively to obtain luminance features, first chrominance features, and second chrominance features; Based on the brightness feature, the first chromaticity feature, and the second chromaticity feature, the initial image features of the reconstructed image are obtained; Enhanced features are obtained by extracting features from the initial image using a content-adaptive inter-channel related information filter. Based on the enhanced features, feature enhancement processing is performed on the brightness feature, the first chromaticity feature, and the second chromaticity feature respectively to obtain enhanced brightness features, enhanced first chromaticity features, and enhanced second chromaticity features; An enhanced image of the reconstructed image is obtained based on the enhanced luminance feature, the enhanced first chromaticity feature, and the enhanced second chromaticity feature.
6. The method according to claim 5, characterized in that, The step of extracting enhanced features from the initial image features using a content-adaptive inter-channel related information filter includes: The initial image features are convolved to obtain the first feature; The first feature is batch normalized to obtain the second feature; Perform linear activation on the second feature to obtain the third feature; The third feature is processed by a residual network to obtain the enhanced feature. The residual network includes multiple concatenated residual blocks. The residual blocks are used to sequentially perform a first convolution, normalization, linear activation, second convolution, and scaling on the input features of the residual blocks to obtain the residual features of the residual blocks. The input features of the residual blocks and the residual features of the residual blocks are added and fused to obtain the output features of the residual blocks.
7. The method according to claim 5, characterized in that, The feature enhancement processing performed on the luminance feature, the first chromaticity feature, and the second chromaticity feature based on the enhanced features to obtain enhanced luminance features, enhanced first chromaticity features, and enhanced second chromaticity features includes: The enhancement features are convolved to obtain brightness enhancement features; The brightness enhancement feature and the brightness feature are added together and fused to obtain the enhanced brightness feature.
8. The method according to claim 5, characterized in that, The feature enhancement processing performed on the luminance feature, the first chromaticity feature, and the second chromaticity feature based on the enhanced features to obtain enhanced luminance features, enhanced first chromaticity features, and enhanced second chromaticity features includes: The enhanced features are processed by a first residual block sequence to obtain a first residual feature. The first residual block sequence includes multiple concatenated residual blocks. The residual blocks are used to sequentially perform a first convolution, normalization, linear activation, second convolution, and scaling on the input features of the residual blocks to obtain the residual features of the residual blocks. The input features of the residual blocks and the residual features of the residual blocks are added and fused to obtain the output features of the residual blocks. The first residual feature is convolved to obtain the first chroma enhancement feature; The first chromaticity feature and the first chromaticity enhancement feature are added and fused to obtain the enhanced first chromaticity feature.
9. The method according to claim 5, characterized in that, The feature enhancement processing performed on the luminance feature, the first chromaticity feature, and the second chromaticity feature based on the enhanced features to obtain enhanced luminance features, enhanced first chromaticity features, and enhanced second chromaticity features includes: The enhanced features are processed by a second residual block sequence to obtain second residual features. The second residual block sequence includes multiple concatenated residual blocks. The residual blocks are used to sequentially perform a first convolution, normalization, linear activation, second convolution, and scaling on the input features of the residual blocks to obtain the residual features of the residual blocks. The input features of the residual blocks and the residual features of the residual blocks are added and fused to obtain the output features of the residual blocks. The second residual feature is convolved to obtain the second chroma enhancement feature; The second chromaticity feature and the second chromaticity enhancement feature are added and fused together to obtain the enhanced second chromaticity feature.
10. The method according to claim 1, characterized in that, The method further includes: The latent features of the base layer are reconstructed and processed based on the latent spatial transformation network to obtain machine vision features; The machine vision features are input into the machine vision task model to obtain the machine vision task processing results output by the machine vision task model.
11. An image decoding device, characterized in that, include: Memory, configured to store computer programs; The processor is configured to cause the image decoding apparatus to implement the image decoding method according to any one of claims 1-10 when a computer program is invoked.
Citation Information
Patent Citations
Scalable coding of video and associated features
US20230065862A1
