Feature map coding method and apparatus
By using a learning-based nonlinear mapping model in artificial intelligence image compression to learn probability distribution parameters, the problem of reducing the number of probability distributions to save memory is solved, and better data compression and decoding performance is achieved.
Patent Information
- Application Number
- PCT/CN2024/081584
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-18
- Filing Date
- 2024-03-14
- Publication Date
- 2024-09-26
AI Technical Summary
In the entropy coding process of artificial intelligence image compression, how to reduce the number of probability distributions stored in the probability distribution set and save memory while ensuring compression performance.
By learning the parameters of each probability distribution in the probability distribution set through a learning-based nonlinear mapping model, better probability distribution parameters can be determined compared to the fixed function method of determining probability distribution parameters, and are determined based on the number of target probability distributions. Adaptable models to improve flexibility in data compression and decoding performance.
It achieves the effect of reducing the number of probability distributions while ensuring data compression and decoding performance, saving memory, and improving the flexibility of the number of probability distributions.
Smart Images

Figure CN2024081584_26092024_PF_FP
Abstract
Description
Feature map encoding method and device
[0001] This application claims priority to Chinese Patent Application No. 202310317663.5, filed with the State Intellectual Property Office of China on March 22, 2023, entitled “Feature Map Encoding Method and Apparatus.” This application also claims priority to Chinese Patent Application No. 202310424823.6, filed with the State Intellectual Property Office of China on April 18, 2023, entitled “Feature Map Encoding Method and Apparatus,” the entire contents of which are incorporated herein by reference. Technical Field
[0002] The embodiments of the present application relate to the field of audio, video or image compression technology based on artificial intelligence (AI), and in particular to a feature map encoding method and device. Background Art
[0003] In the entropy coding process for artificial intelligence (AI) image compression, an entropy estimation model is typically used to estimate the probabilities of the element symbols in the feature map (hereinafter referred to as the feature element symbols). Entropy coding is then performed based on the estimated probabilities of each feature element. When the entropy estimation model is based on a Gaussian distribution model, the output of the entropy estimation model is the mean and variance of the Gaussian distribution expressed as floating-point numbers.
[0004] However, entropy encoding / decoding engines encode / decode each feature element symbol based on a set of probability distributions (e.g., a probability table). Due to the limited storage space of the entropy encoding engine, the probability distribution parameters corresponding to the feature element symbols need to be discretized and stored. Reducing the number of probability distributions stored in the probability distribution set and conserving memory while maintaining compression performance is a pressing issue.
[0005] Summary of the Invention
[0006] The present application provides a feature map encoding method and device, which can reduce the number of probability distribution storages while ensuring data compression performance, thereby saving memory.
[0007] In the first aspect, the present application provides a feature map encoding method, which includes: obtaining a feature map through an analysis and transformation module, the feature map including multiple feature elements; obtaining a probability distribution index value corresponding to each feature element in the multiple feature elements through a probability estimation module, the probability distribution index value is used to indicate the probability distribution in the probability distribution set; wherein each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is calculated based on a learned nonlinear mapping model for the probability distribution index value corresponding to the probability distribution parameter. Furthermore, through an entropy coding module, each feature element is entropy coded according to the probability distribution indicated by the probability distribution index value to obtain a code stream corresponding to the feature map.
[0008] In one possible implementation, the feature map encoding method provided by the present application includes: obtaining a feature map, the feature map including multiple feature elements; obtaining a probability distribution index value corresponding to each feature element in the multiple feature elements, the probability distribution index value being used to indicate a probability distribution in a probability distribution set; wherein each probability distribution in the probability distribution set corresponds to a probability distribution parameter, the probability distribution parameter being calculated based on a learned nonlinear mapping model for the probability distribution index value corresponding to the probability distribution parameter. Furthermore, entropy encoding is performed on each feature element according to the probability distribution indicated by the probability distribution index value to obtain a bitstream corresponding to the feature map.
[0009] Based on the method provided in the first aspect, the present application learns the probability distribution parameters corresponding to each probability distribution in the probability distribution set by a nonlinear mapping model based on learning. Compared with the method of determining the probability distribution parameters corresponding to the probability distribution by a fixed function, the present application can determine better probability distribution parameters in the feature map encoding process, thereby ensuring data compression performance. Moreover, since the nonlinear mapping model based on learning determines the probability distribution parameters corresponding to each probability distribution based on the probability distribution index value, it can be understood that the present application can determine a nonlinear mapping model based on learning that is more suitable for the target probability distribution number according to the target probability distribution number in the probability distribution set, thereby obtaining probability distribution parameters that are more suitable for the target probability distribution number, while ensuring data compression performance, it can also improve the flexibility of the target probability distribution number; compared with the method of determining the probability distribution parameters corresponding to the probability distribution in the probability distribution set by a fixed function, a smaller number of target probability distributions can be set to achieve the same data compression performance. Exemplarily, when the probability distribution is in the form of a probability table, a smaller number of probability tables can be set to achieve the same data compression performance through the method provided by the present application.
[0010] In one possible implementation, the learning-based nonlinear mapping model is included in a codec network; the codec network also includes a probability estimation module, an entropy encoding module and an entropy decoding module; wherein: the output of the probability estimation module is connected to the input of the learning-based nonlinear mapping model; the output of the learning-based nonlinear mapping model is connected to the input of the entropy encoding module and the entropy decoding module.
[0011] In one possible implementation, the probability estimation module is used to determine the training probability distribution index value of each training feature element in the training feature map; and output the training probability distribution index value of each training feature element to the learning-based nonlinear mapping model; the learning-based nonlinear mapping model is used to determine the training probability distribution parameters corresponding to each training feature element based on the training probability distribution index value of each training feature element; and output the training probability distribution parameters of each training feature element to the entropy decoding module and the entropy encoding module.
[0012] In one possible implementation, a training image is obtained; the training image is input into a codec network to obtain a training reconstructed image; and the codec network is adjusted based on the training image and the training reconstructed image. This possible implementation optimizes the codec network by optimizing the difference between the training image and the reconstructed image, thereby ensuring the data compression and reconstruction performance of the codec network and optimizing the learning-based nonlinear mapping model within the codec network.
[0013] In one possible implementation, the codec network further includes an analysis and transformation module and a synthesis and transformation module. In this case, the training image is input into the analysis and transformation module to obtain a training feature map and training side information; the training side information is input into the probability estimation module to obtain a training probability distribution index value for each training feature element in the training feature map; the training probability distribution index value of each training feature element is input into a learning-based nonlinear mapping model to obtain a training probability distribution parameter corresponding to each training feature element; the training probability distribution of each training feature element is determined based on the training probability distribution parameter of each training feature element; the entropy coding module entropy codes the training side information and entropy codes each training feature element based on the training probability distribution of each training feature element to obtain a training bitstream corresponding to the training image; the entropy decoding module entropy decodes the training bitstream to obtain a training decoded feature map; and the synthesis and transformation module reconstructs the image based on the training decoded feature map to obtain a training reconstructed image.
[0014] In one possible implementation, the training feature graph includes M training feature elements, where M is a positive integer greater than 1; the aforementioned probability estimation module includes an entropy estimation module and a quantization processing module; further, the training side information is input into the entropy estimation module, and entropy estimation is performed on each of the M training feature elements to obtain M outputs corresponding to the M training feature elements; the outputs are used to determine the training probability distribution index value; the quantization processing module processes the M outputs based on the target probability distribution number N to obtain M training probability distribution index values; the M training probability distribution index values are distributed between N consecutive numbers. By implementing this possible implementation method, the training probability distribution index value corresponding to each training feature element can be determined according to the preset target probability number, thereby facilitating the acquisition of probability distribution parameters that are more suitable for the target probability distribution number.
[0015] In a possible implementation, the learning-based nonlinear mapping model is designed based on a factor entropy model, or is designed based on a variation of the factor entropy model.
[0016] In a possible implementation, each probability distribution in the probability distribution set includes probabilities of multiple different feature element values under probability distribution parameters corresponding to the probability distribution.
[0017] In one possible implementation, the probability distribution set includes N probability distributions, where N is a target number of probability distributions, and N is determined based on memory requirements. With this possible implementation, the target number of probability distributions in the probability distribution set can be determined based on the actual memory requirements of the entropy coding module, thereby facilitating data compression performance while also meeting the memory requirements of the entropy coding module.
[0018] In one possible implementation, the feature map is a feature map of any channel among multiple channels; wherein: the feature maps of the multiple channels correspond to the same probability distribution set; or, the probability distribution set corresponding to the first channel and the probability distribution set corresponding to the second channel are different, and the first channel and the second channel are any two channels among the multiple channels; or, the multiple channels are divided into multiple groups of channels, the channels in the same group of channels correspond to the same probability distribution set, the probability distribution set corresponding to the first group of channels and the probability distribution set corresponding to the second group of channels are different, and the first group of channels and the second group of channels are any two groups of channels among the multiple groups of channels.
[0019] In a second aspect, the present application provides a feature map decoding method, the method comprising: obtaining a code stream, the code stream including the encoding results of multiple feature elements of the feature map; based on the code stream, obtaining a probability distribution index value of each feature element in the multiple feature elements through a probability estimation module; the probability distribution index value is used to indicate a probability distribution in a probability distribution set; wherein each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is obtained by calculating the probability distribution index value of the probability distribution corresponding to the probability distribution parameter based on a learned nonlinear mapping model; further, according to the probability distribution indicated by the probability distribution index value, the code stream is entropy decoded through an entropy decoding module to obtain a feature map.
[0020] In one possible embodiment, the present application provides a feature map decoding method, the method comprising: obtaining a code stream, the code stream including encoding results of multiple feature elements of a feature map; obtaining a probability distribution index value for each feature element in the multiple feature elements based on the code stream; the probability distribution index value is used to indicate a probability distribution in a probability distribution set; wherein each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is obtained by calculating a probability distribution index value of a probability distribution corresponding to the probability distribution parameter based on a learned nonlinear mapping model; further, entropy decoding the code stream according to the probability distribution indicated by the probability distribution index value to obtain a feature map.
[0021] Based on the method of the second aspect, the present application learns the probability distribution parameters corresponding to the probability distribution in the probability distribution set through a nonlinear mapping model based on learning. Compared with the method of determining the probability distribution parameters corresponding to the probability distribution in the probability distribution set through a fixed function, the present application can determine a better probability distribution parameter in the feature map encoding process, thereby ensuring data decoding performance. Moreover, since the nonlinear mapping model based on learning determines the probability distribution parameters corresponding to each probability distribution based on the probability distribution index value, it can be understood that the present application can determine a nonlinear mapping model based on learning that is more suitable for the target probability distribution number according to the target probability distribution number in the probability distribution set, thereby obtaining a probability distribution parameter that is more suitable for the target probability distribution number. While ensuring data decoding performance, it can also improve the flexibility of the target probability distribution number; compared with the method of determining the probability distribution parameters corresponding to the probability distribution in the probability distribution set with a fixed function, a smaller number of target probability distributions can be set to achieve the same data decoding performance.
[0022] In one possible implementation, the learning-based nonlinear mapping model is included in a codec network; the codec network also includes a probability estimation module, an entropy coding module and an entropy decoding module; wherein: the output of the probability estimation module is connected to the input of the learning-based nonlinear mapping model; the output of the learning-based nonlinear mapping model is connected to the input of the entropy coding module and the input of the entropy decoding module.
[0023] In one possible implementation, the probability estimation module is used to determine the training probability distribution index value of each training feature element in the training feature map; and output the training probability distribution index value of each training feature element to the learning-based nonlinear mapping model; the learning-based nonlinear mapping model is used to determine the training probability distribution parameters corresponding to each training feature element based on the training probability distribution index value of each training feature element; and output the training probability distribution parameters of each training feature element to the entropy decoding module and the entropy encoding module.
[0024] In one possible implementation, a training image is obtained; the training image is input into a codec network to obtain a training reconstructed image; and the codec network is adjusted based on the training image and the training reconstructed image. By implementing this possible implementation, the codec network is optimized and adjusted based on the difference between the training image and the reconstructed image, thereby ensuring the data compression and reconstruction performance of the codec network and optimizing the learning-based nonlinear mapping model in the codec network.
[0025] In one possible implementation, the codec network further includes an analysis and transformation module and a synthesis and transformation module. In this case, the training image is input into the analysis and transformation module to obtain a training feature map and training side information; the training side information is input into the probability estimation module to obtain a training probability distribution index value for each training feature element in the training feature map; the training probability distribution index value of each training feature element is input into a learning-based nonlinear mapping model to obtain a training probability distribution parameter corresponding to each training feature element; the training probability distribution of each training feature element is determined based on the training probability distribution parameter of each training feature element; the entropy coding module entropy codes the training side information and entropy codes each training feature element based on the training probability distribution of each training feature element to obtain a training bitstream corresponding to the training image; the entropy decoding module entropy decodes the training bitstream to obtain a training decoded feature map; and the synthesis and transformation module reconstructs the image based on the training decoded feature map to obtain a training reconstructed image.
[0026] In one possible implementation, the training feature graph includes M training feature elements, where M is a positive integer greater than 1; the aforementioned probability estimation module includes an entropy estimation module and a quantization processing module; further, the training side information is input into the entropy estimation module, and entropy estimation is performed on each of the M training feature elements to obtain M outputs corresponding to the M training feature elements; the output is used to determine a training probability distribution index value; through the quantization processing module, based on the target probability distribution number N, the M outputs are processed to obtain M training probability distribution index values; the M training probability distribution index values are distributed between N consecutive numbers.
[0027] In a possible implementation, the learning-based nonlinear mapping model is designed based on a factor entropy model, or is designed based on a variation of the factor entropy model.
[0028] In a possible implementation, each probability distribution in the probability distribution set includes probabilities corresponding to a plurality of different characteristic element values under a probability distribution parameter corresponding to the probability distribution.
[0029] In one possible implementation, the probability distribution set includes N probability distributions, where N is a target number of probability distributions, and N is determined based on memory requirements. With this possible implementation, the target number of probability distributions in the probability distribution set can be determined based on the actual memory requirements of the entropy decoding module, thereby facilitating data compression performance while also meeting the memory requirements of the entropy decoding module.
[0030] In one possible implementation, the feature map is a feature map of any channel among multiple channels; wherein: the feature maps of the multiple channels correspond to the same probability distribution set; or, the probability distribution set corresponding to the first channel and the probability distribution set corresponding to the second channel are different, and the first channel and the second channel are any two channels among the multiple channels; or, the multiple channels are divided into multiple groups of channels, the channels in the same group of channels correspond to the same probability distribution set, the probability distribution set corresponding to the first group of channels and the probability distribution set corresponding to the second group of channels are different, and the first group of channels and the second group of channels are any two groups of channels among the multiple groups of channels.
[0031] In a third aspect, the present application provides a codec network, which includes an analysis and transformation module, a probability estimation module, a nonlinear mapping model based on learning, an entropy coding module, an entropy decoding module and a synthesis transformation module; wherein: the analysis and transformation module is used to obtain a training feature map and training side information based on a training image; the probability estimation module is used to obtain a training probability distribution index value of each training feature element in the training feature map based on the training side information; the nonlinear mapping model based on learning is used to obtain a training probability distribution parameter corresponding to each training feature element based on the training probability distribution index value of each training feature element; the entropy coding module is used to determine the training probability distribution parameter of each training feature element according to the training probability distribution parameter of each training feature element. The invention discloses a method for performing entropy coding on the training side information, entropy coding on each training feature element based on the training probability distribution of each training feature element, and obtaining a training bit stream corresponding to the training image; the training bit stream includes the coding result of the training side information and the coding result of each training feature element; an entropy decoding module is used to entropy decode the training bit stream to obtain a training decoding feature map; a synthetic transformation module is used to reconstruct an image based on the training decoding feature map to obtain a training reconstructed image; an analysis transformation module, a probability estimation module, a learning-based nonlinear mapping model, an entropy coding module, an entropy decoding module and a synthetic transformation module are also used to adjust module parameters based on the training image and the training reconstructed image.
[0032] Based on the system provided in the third aspect, the present application learns the probability distribution parameters corresponding to the probability distribution in the probability distribution set by a nonlinear mapping model based on learning. Compared with the method of determining the probability distribution parameters corresponding to the probability distribution in the probability distribution set by a fixed function, the present application can determine better probability distribution parameters in the feature map encoding process, thereby ensuring data compression and reconstruction performance. Moreover, since the nonlinear mapping model based on learning determines the probability distribution parameters corresponding to each probability distribution based on the probability distribution index value, it can be understood that the present application can determine a nonlinear mapping model based on learning that is more suitable for the target probability distribution number according to the target probability distribution number in the probability distribution set, thereby obtaining probability distribution parameters that are more suitable for the target probability distribution number. While ensuring data compression performance, it can also improve the flexibility of the target probability distribution number; compared with the method of determining the probability distribution parameters corresponding to the probability distribution in the probability distribution set with a fixed function, a smaller number of target probability distributions can be set to achieve the same data compression and reconstruction performance.
[0033] In one possible implementation, the training feature graph includes M training feature elements, where M is a positive integer greater than 1; the probability estimation module includes an entropy estimation module and a quantization processing module; the entropy estimation module is used to perform entropy estimation on each of the M training feature elements to obtain M outputs; the outputs are used to determine the training probability distribution index value; the quantization processing module is used to process the M outputs based on the target probability distribution number N to obtain M training probability distribution index values, and the M training probability distribution index values are distributed between N consecutive numbers.
[0034] In one possible implementation, the output of the analysis transformation module is connected to the input of the probability estimation module; the output of the probability estimation module is connected to the input of the learning-based nonlinear mapping model; the input of the entropy coding module is connected to the output of the analysis transformation module and the output of the learning-based nonlinear mapping model; the input of the entropy decoding module is connected to the output of the entropy coding module and the output of the learning-based nonlinear mapping model; and the input of the synthesis transformation module is connected to the output of the entropy decoding module.
[0035] In a fourth aspect, the present application provides a feature map encoding device, which includes an analysis and transformation module for obtaining a feature map, which includes multiple feature elements; a probability estimation module for obtaining a probability distribution index value corresponding to each feature element in the multiple feature elements, and the probability distribution index value is used to indicate a probability distribution from a probability distribution set; each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is calculated based on a learned nonlinear mapping model for the probability distribution index value corresponding to the probability distribution parameter; an entropy coding module for entropy coding each feature element according to the probability distribution indicated by the probability distribution index value corresponding to each feature element to obtain a code stream corresponding to the feature map.
[0036] In combination with the fourth aspect, the feature map encoding device also includes a unit or module for implementing any one of the implementation methods of the aforementioned first aspect.
[0037] In a fifth aspect, the present application provides a feature map decoding device, which includes an entropy decoding module for obtaining a code stream, which includes the encoding results of multiple feature elements of the feature map; a probability estimation module for obtaining a probability distribution index value of each feature element in the multiple feature elements based on the code stream; the probability distribution index value is used to indicate a probability distribution from a probability distribution set; each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is calculated based on a learned nonlinear mapping model for the probability distribution index value corresponding to the probability distribution parameter; the entropy decoding module is also used to entropy decode the code stream according to the probability distribution corresponding to the probability distribution index value corresponding to each feature element to obtain a feature map.
[0038] In combination with the fifth aspect, the feature map decoding device also includes a unit or module for implementing any one of the implementation methods of the aforementioned second aspect.
[0039] In a sixth aspect, the present application provides an encoding method, which includes: obtaining a first variance of a characteristic element in a feature map; obtaining a boundary point corresponding to a first variance quantization interval; quantizing the first variance according to the first variance quantization interval to obtain a second variance; wherein the boundary point corresponding to the first variance quantization interval is different from the second variance; further, entropy encoding the characteristic element in the feature map according to the second variance to obtain a code stream.
[0040] Based on the method provided in the sixth aspect, the boundary point of the first variance quantization interval is different from the second variance, which is beneficial to reducing the difference between the variance before quantization (for example, the first variance in this application) and the variance after quantization (that is, the second variance in this application). When entropy encoding is performed on the characteristic element according to the variance after quantization, it is beneficial to improve data compression performance.
[0041] In one possible implementation, the upper boundary point corresponding to the first variance quantization interval is determined based on the index value, maximum variance and minimum variance corresponding to the second variance; wherein the index value is used to indicate the probability distribution corresponding to the second variance from the probability distribution set stored in the storage space.
[0042] In a possible implementation, the index value corresponding to the second variance, the maximum variance, the minimum variance, and the first variance quantization interval satisfy the following formula:
[0043] Among them, b idx is the upper boundary point of the first variance quantization interval, σ max is the maximum variance, σ min is the minimum variance, idx is the index value corresponding to the second variance, L is the number of probability distributions in the probability distribution set (or understood as the number of quantized variances), and Δδ is a non-zero constant greater than -1 and less than 1.
[0044] In one possible implementation, an upper boundary point corresponding to a first variance quantization interval is obtained through a nonlinear mapping model based on learning. The nonlinear mapping model based on learning is designed based on a factor entropy model, or is designed based on a variation of the factor entropy model. By implementing this possible implementation, obtaining the variance quantization interval through a nonlinear mapping model based on learning is advantageous in obtaining a variance quantization interval (or a boundary point of the variance quantization interval) that is more suitable for the feature elements in the feature map.
[0045] In one possible implementation, the boundary points corresponding to the first variance quantization interval are encoded into the bitstream. By implementing this possible implementation, the encoding side, by encoding the boundary points corresponding to the variance quantization interval into the bitstream, facilitates consistency between the variance quantization intervals obtained by the decoding side and the variance quantization intervals obtained by the encoding side. This also facilitates increased flexibility for the decoding side in obtaining the boundary points corresponding to the variance quantization intervals when the boundary points corresponding to the variance quantization intervals vary depending on the feature map.
[0046] In a seventh aspect, the present application provides a decoding method, the method comprising: obtaining a code stream, the code stream including the encoding result of the characteristic element in the feature map; based on the code stream, obtaining a first variance of the characteristic element in the feature map; obtaining a boundary point corresponding to the first variance quantization interval; further, quantizing the first variance according to the first variance quantization interval to obtain a second variance; wherein the boundary point corresponding to the first variance quantization interval is different from the second variance; performing entropy decoding on the code stream according to the second variance to obtain the characteristic element in the feature map.
[0047] Based on the method provided in the seventh aspect, the boundary point of the first variance quantization interval is different from the second variance, which is beneficial to reducing the difference between the variance before quantization (for example, the first variance in this application) and the variance after quantization (that is, the second variance in this application). When entropy decoding is performed on the code stream according to the variance after quantization, it is beneficial to improve data decompression performance.
[0048] In one possible implementation, the upper boundary point corresponding to the first variance quantization interval is determined based on the index value, maximum variance and minimum variance corresponding to the second variance; wherein the index value is used to indicate the probability distribution corresponding to the second variance from the probability distribution set stored in the storage space.
[0049] In a possible implementation, the index value corresponding to the second variance, the maximum variance, the minimum variance, and the boundary points of the first variance quantization interval satisfy the following formula:
[0050] Among them, b idx is the upper boundary point of the first variance quantization interval, σ max is the maximum variance, σ min is the minimum variance, idx is the index value corresponding to the second variance, L is the number of probability distributions in the probability distribution set, and Δδ is a non-zero constant greater than -1 and less than 1.
[0051] In a possible implementation, an upper boundary point corresponding to the first variance quantization interval is obtained through a learning-based nonlinear mapping model.
[0052] In a possible implementation, the bitstream further includes boundary points corresponding to the first variance quantization interval; further, the bitstream is decoded to obtain the boundary points corresponding to the first variance quantization interval.
[0053] In an eighth aspect, the present application provides an encoding device, the encoding device comprising:
[0054] An entropy estimation module is used to obtain the first variance of the feature elements in the feature map;
[0055] A second quantization processing module is configured to obtain a boundary point corresponding to the first variance quantization interval; and quantize the first variance according to the first variance quantization interval to obtain a second variance; wherein the boundary point corresponding to the first variance quantization interval is different from the second variance;
[0056] The entropy coding module is used to perform entropy coding on the feature elements in the feature map according to the second variance to obtain a code stream.
[0057] In combination with the eighth aspect, the encoding device also includes a unit or module for implementing any one of the implementation methods of the aforementioned sixth aspect.
[0058] In a ninth aspect, the present application provides a decoding device, the decoding device comprising:
[0059] An entropy decoding module is used to obtain a code stream, which includes the encoding results of the feature elements in the feature map;
[0060] An entropy estimation module, configured to obtain a first variance of a feature element in the feature map based on a bitstream;
[0061] A second quantization processing module is configured to obtain a boundary point corresponding to the first variance quantization interval; and quantize the first variance according to the first variance quantization interval to obtain a second variance; wherein the boundary point corresponding to the first variance quantization interval is different from the second variance;
[0062] The entropy decoding module is used to perform entropy decoding on the code stream according to the second variance to obtain feature elements in the feature map.
[0063] In combination with the ninth aspect, the decoding device also includes a unit or module for implementing any one of the implementation methods of the aforementioned seventh aspect.
[0064] In a tenth aspect, the present application provides an encoder comprising a processing circuit for judging the method according to the first aspect and any one of the first aspects, or for judging the method according to the sixth aspect and any one of the sixth aspects.
[0065] In an eleventh aspect, the present application provides a decoder comprising a processing circuit for judging the method according to the second aspect and any one of the second aspects, or for judging the method according to the seventh aspect and any one of the seventh aspects.
[0066] In the twelfth aspect, the present application provides a computer program product, comprising program code, which, when executed on a computer or processor, is used to execute the method described in the first aspect and any one of the first aspects, or execute the method described in the second aspect and any one of the second aspects, or execute the method described in the sixth aspect and any one of the sixth aspects, or execute the method described in the seventh aspect and any one of the seventh aspects.
[0067] In the thirteenth aspect, the present application provides an encoder comprising: one or more processors; a non-transitory computer-readable storage medium coupled to the processor and storing a program executed by the processor, wherein when the program is executed by the processor, the encoder determines the method described in the first aspect and any one of the first aspects, or determines the method described in the sixth aspect and any one of the sixth aspects.
[0068] In the fourteenth aspect, the present application provides a decoder comprising: one or more processors; a non-transitory computer-readable storage medium coupled to the processor and storing a program executed by the processor, wherein when the program is executed by the processor, the decoder determines the method described in the second aspect and any one of the second aspects, or the decoder determines the method according to the seventh aspect and any one of the seventh aspects.
[0069] In the fifteenth aspect, the present application provides a non-transitory computer-readable storage medium, including program code, which, when executed by a computer device, is used to judge the above-mentioned first aspect and any one of the first aspects, or to judge the above-mentioned second aspect and the method described in any one of the second aspects, or to judge the above-mentioned sixth aspect and any one of the sixth aspects, or to judge the above-mentioned seventh aspect and any one of the methods described in the seventh aspect.
[0070] In a sixteenth aspect, the present invention relates to an encoding device having the function of implementing the behavior in the first aspect or any of the method embodiments of the first aspect, or having the function of implementing the behavior in the sixth aspect or any of the method embodiments of the sixth aspect. The functions can be implemented by hardware, or can be implemented by hardware determining corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0071] In a seventeenth aspect, the present invention relates to a decoding device having the function of implementing the behavior in the second aspect or any of the method embodiments of the second aspect, or having the function of implementing the behavior in the seventh aspect or any of the method embodiments of the seventh aspect. The functions can be implemented by hardware, or can be implemented by hardware determining corresponding software. The hardware or software includes one or more modules corresponding to the above functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] FIG1 is a schematic diagram of a data decoding system architecture provided by an embodiment of the present application;
[0073] FIG2a is a schematic diagram of an output result of a probability estimation module 103 provided in an embodiment of the present application;
[0074] FIG2 b is a schematic diagram of a probability estimation result provided in an embodiment of the present application;
[0075] FIG2c is a schematic diagram of a workflow of a streaming media system provided in an embodiment of the present application;
[0076] FIG2 d is a schematic diagram of an exemplary streaming media system architecture provided by the present application;
[0077] FIG3 is a schematic diagram of a flow chart of a feature map encoding method provided in an embodiment of the present application;
[0078] FIG4 is a schematic flow chart of a feature map decoding method provided in an embodiment of the present application;
[0079] FIG5a is a schematic diagram of input and output results of a probability estimation module 103 provided in an embodiment of the present application;
[0080] FIG5 b is a schematic diagram of the structure of a probability estimation network provided by an embodiment of the present application;
[0081] FIG6a is a schematic diagram of a coding and decoding network provided in an embodiment of the present application;
[0082] FIG6 b is a schematic diagram of a coding and decoding network provided in an embodiment of the present application;
[0083] FIG7 is a schematic diagram of a flow chart of a codec network model training process provided in an embodiment of the present application;
[0084] FIG8 is a schematic diagram of a process of inputting a training image into an encoding network to obtain a training reconstructed image according to an embodiment of the present application;
[0085] FIG9 is a schematic structural diagram of a feature map encoding device provided in an embodiment of the present application;
[0086] FIG10 is a schematic structural diagram of a feature map decoding device provided in an embodiment of the present application;
[0087] FIG11 is a schematic structural diagram of a computer device provided in an embodiment of the present application;
[0088] FIG12 is a schematic diagram of a flow chart of an encoding method provided in an embodiment of the present application;
[0089] FIG13 is a flowchart of a decoding method provided by the present application;
[0090] FIG14a is a schematic diagram of the structure of a training codec network provided in an embodiment of the present application;
[0091] FIG14b is a schematic diagram of the structure of a coding and decoding network provided in an embodiment of the present application;
[0092] FIG15 is a schematic diagram of a variance quantization interval provided in an embodiment of the present application. DETAILED DESCRIPTION
[0093] The technical solutions in the embodiments of the present application are clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0094] It should be noted that the terms "first" and "second" in the description and drawings of this application are used to distinguish different objects, or to distinguish different treatments of the same object, rather than to describe a specific order of objects. In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. It should be noted that in the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design method described in the embodiments of this application as "exemplarily" or "for example" should not be construed as being superior or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete way. In the embodiments of this application, "A and / or B" means both A and B, or A or B. “A, and / or B, and / or C” means any one of A, B, and C, or any two of A, B, and C, or A, B, and C. The technical solution in this application is described below with reference to the accompanying drawings.
[0095] The feature graph decoding method and feature graph encoding method provided in the embodiments of the present application can be applied in the field of data coding (including the field of audio coding, the field of video coding, and the field of image coding). Specifically, the feature graph decoding method and feature graph encoding method can be applied in album management, human-computer interaction, audio compression or transmission, video compression or transmission, image compression or transmission, and data compression or transmission. It should be noted that, for ease of understanding, the embodiments of the present application are only schematically illustrated by applying the feature graph encoding method and the feature graph decoding method to the field of image coding, and cannot be regarded as a limitation of the method provided in the present application.
[0096] Specifically, taking the application of the feature map encoding method and the feature map decoding method to an end-to-end image feature map encoding and decoding system as an example, in the end-to-end image feature map encoding and decoding system, it includes two parts: image encoding and image decoding. Image encoding is performed at the source end, and generally includes processing (for example, compressing) the original video image to reduce the amount of data required to represent the video image (thereby more efficiently storing and / or transmitting). Image decoding is performed at the destination end, and generally includes inverse processing relative to the encoder to reconstruct the image. In the end-to-end image feature map encoding and decoding system, through the feature map decoding and feature map encoding methods provided by the present application, the number of probability distributions can be preset according to the memory requirements of the entropy coding module, and a nonlinear mapping model (that is, the learning-based nonlinear mapping model mentioned in the present application) can be learned based on the preset probability distribution number. Furthermore, a set of probability distribution sets that can guarantee data encoding and decoding performance is obtained through the learning-based nonlinear mapping model, thereby achieving the effect of reducing the number of probability distributions in the probability distribution set while ensuring data encoding and decoding performance.
[0097] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.
[0098] 1. Entropy Coding
[0099] Entropy coding is a process that uses the entropy principle to avoid losing any information during the encoding process. Entropy coding applies an entropy coding algorithm or scheme to quantized coefficients and other syntax elements, resulting in coded data that can be output as a coded bitstream, etc., so that a decoder or other device can receive and use parameters for decoding. The coded bitstream can be transmitted to a decoder or stored in a memory for later transmission or retrieval by the decoder. Entropy coding algorithms or schemes include, but are not limited to, variable length coding (VLC), context adaptive VLC (CALVC), arithmetic coding, binarization, context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or other entropy coding methods or techniques.
[0100] 2. Neural Networks
[0101] A neural network can be composed of neural units, which can be represented by x s The output of the operation unit can be shown in formula (1).
[0102] Where, s = 1, 2, ... n, n is a natural number greater than 1, W s is x s The weight of the neural unit, b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolutional layer. The activation function can be a sigmoid function. A neural network is a network formed by connecting many of the above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field. The local receptive field can be an area composed of several neural units.
[0103] 3. Deep neural network (DNN)
[0104] A DNN, also known as a multi-layer neural network, can be understood as a neural network with multiple hidden layers. Based on the location of the different layers, the neural network within a DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. Each layer is fully connected, meaning that any neuron in layer i is connected to any neuron in layer i+1.
[0105] Although DNN looks complicated, the work of each layer is actually not complicated. Simply put, it is the following linear relationship expression: y = α (Wx + b), where x is the input vector, y is the output vector, b is the offset vector, W is the weight matrix (also called coefficient), and α () is the activation function. Each layer simply performs such a simple operation on the input vector x to obtain the output vector y. Since DNN has many layers, the number of coefficients W and offset vectors b is also relatively large. The definitions of these parameters in DNN are as follows: Take the coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscripts correspond to the third layer index 2 of the output and the second layer index 4 of the input.
[0106] In summary, the coefficient from the kth neuron in the L-1th layer to the jth neuron in the Lth layer is defined as
[0107] It's important to note that the input layer has no W parameter. In deep neural networks, more hidden layers allow the network to better capture complex real-world situations. Theoretically, a model with more parameters has higher complexity and greater "capacity," meaning it can handle more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrices for all layers of a trained deep neural network (a weight matrix formed by the vectors W across many layers).
[0108] 4. Convolutional neural network (CNN)
[0109] A CNN is a deep neural network with a convolutional architecture. A convolutional neural network consists of a feature extractor consisting of convolutional layers and subsampling layers. This feature extractor can be viewed as a filter, and the convolution process can be thought of as convolving an input image or convolutional feature map with a trainable filter. A convolutional layer is the layer of neurons in a convolutional neural network that performs convolution on the input signal. Within a convolutional layer, a neuron can only connect to a subset of neurons in adjacent layers. A convolutional layer typically contains several feature planes, each composed of a rectangular array of neurons; the number of feature planes is often referred to as the number of channels. Neurons in the same feature plane share weights, which are referred to as the convolution kernel. Shared weights can be understood as ensuring that the method for extracting image information is independent of position. The underlying principle is that the statistical information of one part of the image is the same as that of another. This means that image information learned in one part can also be applied to other parts. Therefore, the same learned image information is available at all positions in the image. In the same convolutional layer, multiple convolution kernels can be used to extract different image information. Generally speaking, the more convolution kernels there are, the richer the image information reflected by the convolution operation.
[0110] Convolution kernels can be initialized as matrices of random size, and during the training process of the convolutional neural network, the convolution kernels can be learned to obtain reasonable weights. In addition, the direct benefit of shared weights is that they reduce the number of connections between the layers of the convolutional neural network, while also reducing the risk of overfitting.
[0111] 5. Recurrent neural networks (RNN)
[0112] In the real world, many elements are ordered and interconnected. In order to enable machines to have the ability to remember like humans and make inferences based on the context, RNN came into being.
[0113] RNNs are designed to process sequential data. This means that the current output of a sequence is dependent on previous outputs. This means that the RNN's output depends on both the current input and historical memory. Specifically, the network memorizes previous information and applies it to the calculation of the current output. This means that nodes within a hidden layer are no longer disconnected but connected, and the input to a hidden layer includes not only the output of the input layer but also the output of the previous hidden layer. In theory, RNNs can process sequences of any length. Training RNNs is similar to training traditional CNNs or DNNs. The error backpropagation algorithm is also used, with one difference: if the RNN is unrolled, its parameters (such as W) are shared, unlike the traditional neural network mentioned above. Furthermore, when using the gradient descent algorithm, the output at each step depends not only on the network state at the current step but also on the state of the network at several previous steps. This learning algorithm is called backpropagation through time (BPTT).
[0114] 6. Loss Function
[0115] During the training of a deep neural network, because we want the output of the deep neural network to be as close as possible to the desired predicted value, we can compare the current network's predicted value with the desired target value and then update the weight vector of each layer of the neural network based on the difference between the two. (Of course, before the first update, there is usually an initialization process, which pre-configures the parameters for each layer in the deep neural network.) For example, if the network's predicted value is too high, the weight vector is adjusted to make it predict a lower value. This adjustment is continued until the deep neural network can predict the desired target value or a value very close to the desired target value. Therefore, it is necessary to predefine "how to compare the difference between the predicted value and the target value." This is the loss function (or objective function), which is an important equation used to measure the difference between the predicted value and the target value. For example, the loss function output value (loss) indicates a greater difference, so training a deep neural network becomes a process of minimizing this loss.
[0116] 7. Backpropagation algorithm
[0117] Convolutional neural networks can use the back propagation (BP) algorithm to correct the size of the initial model parameters during training, reducing the model's reconstruction error loss. Specifically, forward propagation of the input signal to the output generates error loss. This error loss information is then backpropagated to update the parameters in the initial model, thereby converging the error loss. The BP algorithm is a backward propagation movement driven by error loss, aiming to obtain optimal model parameters, such as the weight matrix.
[0118] 8. Generative Adversarial Networks
[0119] Generative adversarial networks (GANs) are a type of deep learning model. They consist of at least two modules: a generative model and a discriminative model. These two modules learn from each other through interaction to produce better outputs. Both the generative and discriminative models can be neural networks, specifically deep neural networks or convolutional neural networks. The basic principle of a GAN is as follows: For example, consider a GAN that generates images. Suppose there are two networks, G (Generator) and D (Discriminator). G is the image generator network, which receives random noise z and generates an image from it, denoted as G(z). D is the discriminator network, which determines whether an image is "real." Its input parameter is x, representing an image. Its output, D(x), represents the probability that x is real. A value of 1 indicates a 100% probability of authenticity, while a value of 0 indicates a high probability of non-authenticity. During the training of this generative adversarial network, the goal of the generative network G is to generate realistic images as much as possible to deceive the discriminative network D, while the goal of the discriminative network D is to distinguish the images generated by G from real images as much as possible. This creates a dynamic "game" between G and D, which is the "game" in "generative adversarial network." Ultimately, under ideal conditions, G can generate images G(z) that are sufficiently realistic, while D has difficulty determining whether the images generated by G are real, i.e., D(G(z)) = 0.5. This results in an excellent generative model G that can be used to generate images.
[0120] 9. Pixel Value
[0121] The pixel value of an image can be a Red-Green-Blue (RGB) color value, and the pixel value can be a long integer representing a color. For example, the pixel value is 256*Red + 100*Green + 76*Blue, where Blue represents the blue component, Green represents the green component, and Red represents the red component. In each color component, the smaller the value, the lower the brightness, and the larger the value, the higher the brightness. For a grayscale image, the pixel value can be a grayscale value.
[0122] 10. Factor Entropy Model
[0123] The factor entropy model is a realization method of a classical non-linear mapping model. Inputting the vector x into the factor entropy model, the cumulative distribution c corresponding to the vector x can be obtained, and the cumulative distribution c is shown in formula (2).
[0124] Where, when 1 ≤ k < K, f k (x) = g k (H (k) x + b (k) );when k = K, f K (x) = sigmoid(H (K) x + b (K) );H (k) is a matrix; b (k) is a vector; g k () is a non-linear operation, usually expressed as g k (x) = x + a (k) ⊙tanh(x), where a (k) is a vector and ⊙ represents element-wise multiplication. To ensure the monotonic increase of the cumulative distribution, the elements of the relaxation matrix H (k) can be limited to be non-negative, and the elements in a (k) are not less than -1.
[0125] The following introduces the system architecture provided by the embodiments of the present application. Please refer to Figure 1. Figure 1 is a data decoding system architecture provided by the embodiments of the present application. In this data decoding system architecture, it includes a data acquisition module 101, an analysis transformation module 102, a probability estimation module 103, an entropy encoding module 104, an entropy decoding module 105, and a synthesis transformation module 106. Among them:
[0126] The data acquisition module 101 is configured to acquire original images. The data acquisition module 101 may include or may be any type of image capture device for capturing real-world images, etc., and / or any type of image generation device, such as a computer graphics processor for generating computer-animated images or any type of device for acquiring and / or providing real-world images, computer-generated images (e.g., screen content, virtual reality (VR) images, and / or any combination thereof (e.g., augmented reality (AR) images). The data acquisition module 101 may also be any type of memory or storage for storing the above-mentioned images.
[0127] The analysis and transformation module 102 is configured to receive the original image from the data acquisition module 101, preprocess the original image, and further extract a feature map from the preprocessed image using a feature extraction network. The feature map includes multiple feature elements. Specifically, the preprocessing of the original image includes, but is not limited to, cropping, color format conversion (e.g., from RGB to YCbCr), color adjustment, denoising, or normalization. The feature extraction network can be one or a variation of the aforementioned neural network, DNN, CNN, or RNN. The specific form of the feature extraction network is not specifically limited herein. The analysis and transformation module 102 is optionally further configured to round the feature map (i.e., the feature map to be encoded) using, for example, scalar quantization or vector quantization. It should be noted that rounding the feature map (i.e., the feature map to be encoded) means rounding (or quantizing) the value of each feature element in the feature map (i.e., the feature map to be encoded); the feature map includes multiple feature elements, and the value of the feature map is composed of the element values of each feature element. Optionally, the analysis and transformation module 102 also includes a side information extraction network, that is, in addition to outputting the feature map output by the feature extraction network, the analysis and transformation module 102 also outputs the side information extracted from the feature map by the side information extraction network. The side information extraction network can be one or a variation of the aforementioned neural network, DNN, CNN or RNN, and the specific form of the feature extraction network is not specifically limited here. In one possible implementation, the analysis and transformation module 102 can also be called a feature extraction module or an encoding network.
[0128] The probability estimation module 103 is used to estimate the probability distribution (or probability estimation result) of each feature element in the multiple feature elements of the feature map (i.e., the feature map to be encoded); or it can be understood as being used to fit the probability distribution function of each feature element to obtain the parameters of the probability distribution function of each feature element (referred to as probability distribution parameters in this application). In an optional embodiment, the probability estimation module 103 receives the side information of the feature map (for example, the side information extracted by the side information extraction network from the analysis and transformation module 102), and outputs the probability distribution index value of each feature element in the feature map, where the probability distribution index value of each feature element corresponds to the probability distribution parameter of the feature element. For example, the feature map includes m feature elements, where m is a positive integer, as shown in Figure 2a, and the probability estimation module 103 outputs the probability distribution index value of each feature element in the m feature elements. Among them, the probability distribution parameter corresponding to the probability distribution index value of feature element j among the m feature elements is: σ j (the probability variance of feature element j) and 0 (the probability mean of feature element j), according to the probability distribution parameter (σ i and 0) can determine the probability distribution of feature element j as shown in Figure 2b. The horizontal axis of Figure 2b represents the possible values of feature element j (or the possible element values of the feature element, or the feature element values), and the vertical axis represents the probability of each possible value (or the possible element value of the feature element, or the feature element value). For example, point P indicates that the probability p of the element value of feature element j being [a-0.5, a+0.5) is [a-0.5, a+0.5]. In one possible implementation, the probability estimation module 103 can also be called an entropy estimation module.
[0129] It should be noted that the form of probability distribution storage mentioned in this application is related to the algorithm used by the entropy coding module, and this application does not limit the specific form of the probability distribution storage. In one possible implementation, when the algorithm used by the entropy coding module is an arithmetic coding algorithm, the probability distribution is a probability table, including the probabilities of multiple different feature element values; in another possible implementation, the probability distribution may also include the coding state of each feature element in the feature map. In the following text, for ease of understanding, the probability distribution is only schematically illustrated using the probability table as an example, and it cannot be regarded as a specific limitation of this application. The full text is as follows. The number of probability distributions mentioned in this application is the number of probability distributions included in the probability distribution set. For example, when the form of probability distribution storage is a probability table, the number of probability distributions refers to the number of probability tables included in the probability table set.
[0130] The entropy coding module 104 is configured to determine the probability distribution of each feature element based on the feature map from the analysis and transformation module 102 and the probability distribution index value of each feature element from the probability estimation module 103; and to perform entropy coding on each feature element in the feature map based on the probability distribution of each feature element to generate a coded bitstream (also referred to herein as a bitstream). In one possible embodiment, the entropy coding module 104 may be referred to as an entropy coding engine or a data coding module.
[0131] The entropy decoding module 105 is configured to receive the encoded bitstream from the entropy encoding module 104 and further perform entropy decoding based on the encoded bitstream and the probability distribution index value of each feature element from the probability estimation module 103 to obtain a feature map (or the value of the feature map). In one possible embodiment, the entropy decoding module 105 may be an entropy decoding engine or a data decoding module.
[0132] The synthesis transformation module 106 is used to reconstruct the post-processed feature map using an image reconstruction network to obtain a reconstructed image, and to post-process the reconstructed image. Post-processing operations include, but are not limited to, color format conversion (e.g., from YCbCr to RGB), color adjustment, cropping, or resampling. The image reconstruction network can be one or a variation of the aforementioned neural network, DNN, CNN, or RNN. The specific form of the image reconstruction network is not specifically limited herein. In one possible implementation, the analysis transformation module 102 can also be referred to as a data reconstruction module or a reconstruction network. It should be noted that the data decoding system architecture can be a functional module of a device; the data decoding system architecture can also be an end-to-end data decoding system, that is, the data decoding system architecture includes two devices: a source device (also known as an encoding device) and a destination device (also known as a decoding device), wherein the source device can include: a data acquisition module 101, an analysis and transformation module 102, a probability estimation module 103 and an entropy coding module 104; the destination device can include: a probability estimation module 103, an entropy decoding module 105 and a synthesis transformation module 106. Method 1 for the source device to provide the encoded code stream to the destination device: the source device may send the encoded code stream to the destination device through a communication interface, and the communication interface may be a direct communication link between the source device and the destination device, such as a direct wired or wireless connection, or through any type of network, such as a wired network, a wireless network, or any combination thereof, any type of private network and public network, or any combination thereof; Method 2 for the source device to provide the encoded code stream to the destination device: the source device may store the encoded code stream in a storage device, and the destination device may obtain the encoded code stream from the storage device.
[0133] In one possible implementation, the data decoding system architecture may further include a display module 107, which is used to display the reconstructed image from the synthesis transformation module 106 to display the image to a user or viewer. The display module 107 may be or include any type of player or display for displaying the reconstructed audio or image, such as an integrated or external display screen or display. For example, the display screen may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS) display, a digital light processor (DLP), or any other type of display screen. It is understood that when the data decoding system architecture includes the display module 107, the display module 107 may be included in the destination device or in a device that has a communication connection with the destination device.
[0134] For ease of understanding, the following is an exemplary introduction to the application scenarios applicable to the embodiment of the present application. Please refer to Figure 2c, which is a schematic diagram of a streaming media system workflow applicable to the embodiment of the present application.
[0135] The streaming media system includes a content creation module that generates the required content data, such as video or audio. The streaming media system also includes a video encoding module that encodes the generated content through an encoder. The streaming media system also includes a video stream transmission module that transmits the encoded video in the form of a code stream. Optionally, the format of the video stream can be converted into a code stream format of a commonly used transmission protocol for open Internet video service (over the top TV, OTT) devices, for example, the protocol includes but is not limited to real-time streaming protocol (real time streaming protocol, RTSP), hypertext transfer protocol (hyper text transfer protocol, HTTP), HTTP Live streaming protocol (HTTP Live streaming protocol, HLS), MPEG HTTP dynamic adaptive streaming (MPEG Dynamic Adaptive Streaming over HTTP, MPEG-DASH), real-time transport protocol (Real-time Transport protocol, RTP), real-time messaging protocol (Real Time Messaging Protocol, RTMP) or any combination thereof. Optionally, the video stream can be stored, and the original format of the video stream and / or the converted multiple code stream formats are stored for easy use. Furthermore, the streaming system also includes a video stream encapsulation module for encapsulating the video stream to generate an encapsulated video stream. The encapsulated video stream can be referred to as a video streaming package. Exemplarily, the video streaming package can be generated based on a transcoded video stream or a stored video stream. Furthermore, the streaming system also includes a content distribution network (CDN) for distributing the video streaming package to multiple OTT devices, such as mobile phones, computers, tablets, and home projectors.
[0136] It should be noted that the video encoding, video streaming transmission, video stream transcoding, video stream storage, video streaming package generation, and content distribution network can all be implemented on a cloud platform (or understood as a cloud server). In one possible implementation, the video encoding module may include the integration of the analysis and transformation module 102, the probability estimation module 103, and the entropy coding module 104 in Figure 1; the video stream transcoding module may include the integration of the probability estimation module 103, the entropy decoding module 105, and the synthesis and transformation module 106 in Figure 1; and the OTT device may include the display module 107 in Figure 1.
[0137] An exemplary streaming media system architecture of the present application is described below in conjunction with FIG2 d . The streaming media system architecture includes: a client device, a content distribution network, and a cloud server.
[0138] The user on the client device sends a play or playback request to the cloud platform (ie, the cloud server). Optionally, the content of the request sent may be the title of the movie or television program to be played.
[0139] The cloud platform makes a decision and responds to the client, sending the client the address of the requested content on the CDN. Optionally, the content sent to the client can be a URL (uniform resource locator). Specifically, the playback application service in the cloud platform checks user authorization and permissions, and then considers individual client characteristics and current network conditions to determine which specific files are required to process the playback request. It should be noted that the CDN regularly reports its operational status, learned routes, and available content (files) to the cache control service in the cloud platform.
[0140] The client then requests the CDN to play the content based on the address, and the CDN provides the content to the client, ultimately completing the client's request.
[0141] The following is a detailed description of the feature map decoding method and feature map encoding method provided by the present application in conjunction with the accompanying drawings. It should be noted that the feature map encoding method can be mainly performed by the analysis and transformation module 102, the probability estimation module 103 and the entropy coding module 104 in Figure 1, and the feature map decoding method can be mainly performed by the probability estimation module 103 and the entropy decoding module 105 in Figure 1. hereinafter, the execution flow diagram of the encoding side shown in Figure 3 and the execution flow diagram of the decoding side shown in Figure 4 can be regarded as a flow diagram of a set of feature map encoding and decoding methods.
[0142] Coding side: Please refer to FIG3, which is a flow chart of a feature map coding method provided in an embodiment of the present application. The flow of the feature map coding method includes S301 to S303.
[0143] S301. Obtain a feature map through an analysis and transformation module, where the feature map includes multiple feature elements.
[0144] The original data is input into the analysis and transformation module for feature extraction to obtain the feature map y corresponding to the original data. The feature element in the feature map y is represented as y[i]. Usually, the element value of y[i] is a floating point number. Further, the feature map y is quantized, that is, the element value of the feature element y[i] is rounded to an integer element value to obtain a quantized feature map. The feature map The characteristic elements in are expressed as Can be understood as characteristic elements One-to-one correspondence with the characteristic element y[i], the characteristic element In a specific example, the specific description of the feature map is obtained by quantizing the feature element y[i].
[0145] S302: Obtain a probability distribution index value corresponding to each feature element in the multiple feature elements through a probability estimation module.
[0146] Based on the feature graph y obtained in S301, the side information corresponding to the feature graph y is obtained through the analysis and transformation module. Further, the side information corresponding to the feature graph y is input into the probability estimation module to obtain the probability distribution index value corresponding to the feature element y[i]; since the feature element It corresponds one to one with the characteristic element y[i], so it can also be understood as the characteristic element Corresponding probability distribution index value. Wherein, the probability distribution index value is used to indicate the probability distribution from the probability distribution set, and each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is calculated based on the learned nonlinear mapping model to obtain the probability distribution index value of the probability distribution corresponding to the probability distribution parameter. Each probability distribution in the probability distribution set includes the probability of the feature element taking different element values under the probability distribution parameter corresponding to the probability distribution. In a specific example, please refer to the analysis and transformation module 102 shown in Figure 1 above to obtain a specific description of the side information corresponding to the feature graph, and the specific description of the probability distribution index value corresponding to each feature element in the feature graph obtained in the probability estimation module 103 above.
[0147] In one possibility, the probability distribution set includes a target number N of probability distributions, where the target number N is determined based on memory requirements (i.e., the memory requirements of the entropy coding module). That is, before obtaining the probability distribution set, the target number of probability distributions is first determined based on the memory requirements, and then the probability distribution set is obtained based on the target number of probability distributions.
[0148] In one possible embodiment, the aforementioned feature map is a feature map of any channel among the multiple channels of the original image. The feature maps of the multiple channels correspond to the same probability distribution set. Alternatively, the probability distribution sets corresponding to any two channels (e.g., the first channel and the second channel) among the multiple channels are different, that is, each channel among the multiple channels corresponds to a probability distribution set. Alternatively, the multiple channels are divided into multiple groups of channels, and the channels belonging to the same group of channels correspond to the same probability distribution set, and the probability distribution sets corresponding to any two groups of channels (e.g., the first group of channels and the second group of channels) among the multiple groups of channels are different; for example, the feature maps of 256 channels are divided into four groups, channel group 1 corresponds to channels 1 to 64, channel group 2 corresponds to channels 65 to 128, channel group 3 corresponds to channels 129 to 192, and channel group 4 corresponds to channels 193 to 256. In this case, channel group 1 to channel group 4 each correspond to a probability distribution set, and the probability distribution set corresponding to each channel group is not the same probability distribution set.
[0149] It should be noted that the probability distribution parameter corresponding to the probability distribution in this application can be one or more. When there are multiple probability distribution parameters corresponding to a probability distribution, any one of the multiple probability distribution parameters is obtained by calculating the probability distribution index value of the probability distribution corresponding to the probability distribution parameter based on the learned nonlinear mapping model. It can be understood that the probability distribution parameter corresponding to the probability distribution is obtained by calculating the probability distribution index value of the probability distribution corresponding to the probability distribution parameter based on the learned nonlinear mapping model. For example, the probability distribution set includes 30 probability distributions, and probability distribution a is any one of the 30 probability distributions; wherein the probability distribution index value corresponding to probability distribution a is a, and the probability distribution parameter corresponding to the probability distribution a is the probability mean μ a and probability variance σ a ; When any probability distribution parameter corresponding to the probability distribution a (such as the probability variance σ a ) is obtained by performing nonlinear mapping on the probability distribution index value a based on the learned nonlinear mapping model, then it is considered that the probability distribution parameter corresponding to the probability distribution a is obtained by performing nonlinear mapping on a based on the learned nonlinear mapping model.
[0150] To facilitate understanding, the following is an exemplary explanation of the output of the probability estimation module after probabilistically estimating the feature element y[i].
[0151] Case 1: After the probability estimation module performs probability estimation on the feature element y[i], it outputs the probability distribution index value of the feature element y[i]. It can be understood that the probability distribution parameters of the feature element y[i] are the same as the probability distribution parameters of the probability distribution indicated by the probability distribution index value.
[0152] Example 1: When the probability distribution is a probability table, the probability estimation module estimates the probability of the feature element y[i] and outputs the probability table index value j of the feature element y[i]. The probability distribution parameters corresponding to the probability table j indicated by the probability table index value j are: 0 (the probability mean corresponding to the probability table j) and σ j (Probability variance corresponding to probability table j). According to the probability mean (ie 0) and probability variance (ie σ i ) is shown in FIG2b . The probability table j can be understood as a discretized representation of the probability distribution shown in FIG2b . The probability table j can be shown in Table 1 , including the probabilities of the values of the characteristic elements in the range of -128 to 128.
[0153] Table 1
[0154] In this case, it can be understood that the probability estimation module determines the probability distribution parameters of the feature element y[i] to be 0 (probability mean) and σ j (Probability variance), it can be directly determined that the characteristic element y[i] is quantized into the characteristic element according to the probability table j shown in Table 1 The probability corresponding to the value of the next element.
[0155] Case 2: After the probability estimation module performs probability estimation on the feature element y[i], it outputs the first probability distribution parameter and probability distribution index value of the feature element y[i]. It can be understood that the probability distribution parameters of the feature element y[i] are partially identical to the probability distribution parameters of the probability distribution indicated by the probability distribution index value. Based on the probability distribution index value, the probability distribution parameters of the identical part between the feature element y[i] and the probability distribution indicated by the probability distribution index value can be determined.
[0156] Example 2: When the probability distribution is a probability table, after the probability estimation module performs probability estimation on the feature element y[i], it outputs the first probability distribution parameter (i.e., probability mean) of the feature element y[i] as 1 and the probability table index value j. The probability distribution parameters corresponding to the probability table j indicated by the probability table index value j are: 0 (probability mean corresponding to probability table j) and σ j (Probability variance corresponding to probability table j), where σ j It is calculated based on the nonlinear mapping model of learning according to the probability table index value j. The probability table j is shown in Table 1 above, including the probability of each value of the feature element in the range of -128 to 128. In this case, it can be understood that the probability estimation module determines that the probability mean of the feature element y[i] is 1 (that is, the probability distribution parameter is different from the probability table) and the probability variance is σ j(ie, the same probability distribution parameters as the probability table); further according to the probability table j shown in Table 1, the characteristic element The first probability distribution parameter of (i.e., the probability mean is 1) is calculated, and the characteristic element y[i] is quantized into the characteristic element The probability corresponding to the value of the next element.
[0157] It should be noted that the present application only uses the probability distribution index value to indicate the probability distribution as an example, and should not be regarded as a specific limitation of the present application. In some possible implementations, the probability distribution parameter interval can also be used as the probability distribution index; for example, the probability distribution set includes N probability distributions, and the probability distribution parameter corresponding to each probability distribution is the probability variance. The N probability distributions are sorted in order from small to large according to the probability variance: σ0, σ1, ..., σ N-1 In this case, the probability distribution index value of each probability distribution can be obtained according to the interval corresponding to the probability variance; for example, the probability estimation module outputs the probability variance of feature element 1 and feature element 2; if the probability variance of feature element 1 is in the interval [0, σ0], then feature element 1 corresponds to the probability distribution with a probability variance of σ0 in the probability distribution set; if the probability variance of feature element 2 is in the interval (σ0, σ1], then feature element 2 corresponds to the probability distribution with a probability variance of σ1 in the probability distribution set.
[0158] S303 . Perform entropy coding on each feature element according to the probability distribution indicated by the probability distribution index value corresponding to each feature element through the entropy coding module to obtain a code stream corresponding to the feature map.
[0159] That is, the feature element y[i] corresponds to the probability distribution index value j indicated by probability distribution j; further, through the entropy coding module, according to the feature map Characteristic elements in The probability distribution j of the characteristic element Perform entropy coding to obtain the feature map y (or understand it as the feature map In a specific example, the entropy coding module 104 shown in FIG1 generates a specific description of the encoding code stream.
[0160] For ease of understanding, the following provides an exemplary explanation of determining the probability distribution of each feature element by combining two output situations after the probability estimation module in S302 performs probability estimation on the feature element y[i].
[0161] Following Example 1 in S302, after the probability estimation module estimates the probability of the feature element y[i], it outputs the probability table index value j of the feature element y[i]. The probability distribution parameters of the feature element y[i] are the same as the probability distribution parameters of the probability table j, which can be shown in Table 1. In this case, the element value of the feature element y[i] in the feature map y is -127.322, and the feature map y is quantized to the quantized feature map In this feature map Characteristic elements after quantization The element value is -127; further, the probability P2 when the characteristic element value shown in Table 1 is -127 can be determined as the quantized characteristic element Furthermore, based on P2 (i.e., the characteristic element The probability of the element value 7) for this feature element Perform entropy coding to obtain characteristic elements The encoding result.
[0162] Following Example 2 in S302, after the probability estimation module estimates the probability of the feature element y[i], it outputs the probability mean of the feature element y[i] as 1 and the probability table index value j. The probability distribution parameters of the feature element y[i] are partially the same as the probability distribution parameters of the probability table j, which is shown in Table 1. In this case, the element value of the feature element y[i] in the feature map y is -127.322, and the feature map y is quantized to the quantized feature map In this feature map Characteristic elements after quantization The element value of is -127; further, according to the difference (i.e. -1) between the probability mean value (i.e. 0) corresponding to the probability table j and the probability mean value (i.e. 1) of the characteristic element y[i], it is determined that the value of the characteristic element shown in Table 1 is -128 (i.e. the quantized characteristic element The probability P1 corresponding to the sum of the element value -127 and the difference (ie -1) is determined as the quantized feature element The probability of the element value -127. Further, based on P1 (i.e., the characteristic element The probability of the element value) for this feature element Perform entropy coding to obtain characteristic elements The encoding result.
[0163] In one possible implementation, after the analysis and transformation module obtains the side information of the feature graph y based on the feature graph y, the side information is sent to the entropy coding module, so that the entropy coding performs entropy coding on the side information of the feature graph y, and writes the entropy coding result of the side information into the code stream. The side information of the feature graph y can also be sent to the decoding end for subsequent data decoding. The side information can be understood as a feature graph obtained by further feature extraction of the feature graph y, and the number of feature elements contained in the side information is less than the number of feature elements in the feature graph y. In one possible implementation, the side information of the feature graph can be obtained through a side information extraction network; the side information extraction network can use RNN, CNN, a deformation of RNN, a deformation of CNN or other deep neural networks (or deformation of other deep neural networks), which is not specifically limited in this application.
[0164] Decoding side: Please refer to FIG4 , which is a flow chart of a feature map decoding method provided by an embodiment of the present application. The flow of the feature map decoding method includes S401 to S403 .
[0165] S401: Obtain a code stream, where the code stream includes encoding results of multiple feature elements of a feature map.
[0166] The encoding side directly sends the code stream obtained in S303 to the decoding side; or the encoding side stores the code stream obtained in S303 in a storage device (a storage device that has communication connections with both the encoding side and the decoding side), and the decoding side obtains the code stream from the storage device. The code stream includes the aforementioned feature map The encoding result of multiple feature elements of The characteristic elements in are expressed as
[0167] S402: Based on the code stream, obtain a probability distribution index value corresponding to each feature element in the multiple feature elements through a probability estimation module.
[0168] In addition to the encoding results of the multiple feature elements, the code stream also includes the encoding results of the side information corresponding to the feature map y; the feature map The feature map y is obtained by quantizing it. Further, the entropy decoding module performs entropy decoding on the code stream to obtain side information; and inputs the side information into the probability estimation module to obtain the feature map Characteristic elements Corresponding probability distribution index value. For the description of the probability distribution index value, probability distribution set and probability distribution, please refer to the description of the probability distribution index value, probability distribution set and probability distribution in S302 above, which will not be repeated here.
[0169] In one possible implementation, after the analysis and transformation module obtains the side information of the feature graph y based on the feature graph y, the side information is sent to the entropy coding module. Furthermore, as shown in FIG5a, the entropy coding module uses the side information as the input of the probability estimation module 103 in FIG1, and the output of the probability estimation module 103 is the probability distribution index value of each feature element. The probability estimation module 103 can be a probability estimation network, which can use RNN, CNN, a deformation of RNN, a deformation of CNN, or other deep neural networks (or deformations of other deep neural networks). Please refer to FIG5b, which is a structural diagram of a probability estimation network. In FIG5b, the probability estimation network is a convolutional network, which includes 5 network layers: 3 convolutional layers and 2 nonlinear activation layers. The probability estimation module 103 can also be implemented using a traditional non-network probability estimation method. Probability estimation methods include but are not limited to statistical methods such as maximum likelihood estimation, maximum a posteriori estimation, and maximum likelihood estimation.
[0170] To facilitate understanding, the following is an exemplary explanation of the output of the probability estimation module after probabilistically estimating the feature element y[i] based on the side information.
[0171] Case 1: The probability estimation module estimates the feature elements based on the side information After probability estimation, the feature element is output The probability distribution index value of . It can be understood that in case 1, the characteristic element The probability distribution parameters of are the same as the probability distribution parameters of the probability distribution indicated by the probability distribution index value.
[0172] Example 3: When the probability distribution is a probability table, the probability estimation module estimates the feature elements based on the side information. After probability estimation, the feature element is output The probability table index value j indicates the probability table j, and the probability distribution parameters corresponding to the probability table j indicated by the probability table index value j are: 0 (the probability mean corresponding to the probability table j) and σ j (Probability variance corresponding to probability table j), the probability table j is shown in Table 1 above, including the probability of each value of the feature element in the range of -128 to 128. In this case, it can be understood that the probability mean of the feature element y[i] is 0 and the probability variance is σ j , according to the probability table j shown in Table 1, and the characteristic elements The probability corresponding to the element value is directly determined by the characteristic element The element value of .
[0173] Case 2: The probability estimation module estimates the feature elements based on the side information After probability estimation, the feature element is output The first probability distribution parameter and probability distribution index value of . It can be understood that in case 2, the characteristic element The probability distribution parameters of the probability distribution index value are partially the same as the probability distribution parameters of the probability distribution indicated by the probability distribution index value. The characteristic element can be determined based on the probability distribution index value. The probability distribution parameters for the same part as the probability distribution indicated by the probability distribution index value.
[0174] Example 4: When the probability distribution is a probability table, the probability estimation module estimates the characteristic element After the probability estimation is performed, the first probability distribution parameter (i.e., probability mean) of the feature element y[i] is output as 1 and the probability table index value j. The probability distribution parameters corresponding to the probability table j indicated by the probability table index value j are: 0 (probability mean corresponding to probability table j) and σ j (Probability variance corresponding to probability table j), where σ j It is calculated based on the nonlinear mapping model of learning according to the probability table index value j. The probability table j is shown in Table 1 above, including the probability of each value of the feature element in the range of -128 to 128. In this case, it can be understood that the feature element The first probability distribution parameter (i.e. probability mean) is 1 and the probability variance is σ j ; Further, according to the probability table j and characteristic elements shown in Table 1 The first probability distribution parameter (i.e. the probability mean is 1) and the characteristic element The probability corresponding to the element value is calculated to get the characteristic element The element value of .
[0175] S403: Perform entropy decoding on the bitstream based on the probability distribution indicated by the probability distribution index value, and perform entropy decoding on the bitstream through an entropy decoding module to obtain a feature map.
[0176] It can be understood that for each characteristic element The probability distribution index value indicates the probability distribution, and the code stream is entropy decoded to obtain the characteristic elements The element value of each characteristic element is combined to obtain the characteristic map
[0177] Following Example 3 of Case 1 in S402, the probability estimation module estimates the feature elements based on the side information. After probability estimation, the feature element is output The probability table index value j, the feature element The probability distribution parameters of are the same as those of the probability table j, which can be shown in Table 1. In this case, the feature element The probability corresponding to the entropy coding result is P2. According to the probability table i shown in Table 1, the probability P2 corresponds to the element value -127, and the feature element The element value of is determined to be -127. Further, the element values of each characteristic element are combined to obtain the characteristic map
[0178] Following Example 4 of Case 2 in S402, the probability estimation module estimates the feature elements based on the side information. After the probability estimation, the first probability distribution parameter (i.e., probability mean) of the feature element y[i] is output as 1 and the probability table index value j. The probability distribution parameters of the feature element y[i] are partially the same as the probability distribution parameters of the probability table j (i.e., the probability variance is σ j ), the probability table j is shown in Table 1. In this case, the characteristic element The probability corresponding to the entropy coding result is P1. According to the probability table j shown in Table 1, the probability P1 corresponds to the element value -128. Based on the element value -128 and 1 (characteristic element The difference between the probability mean of probability table j and 0 (ie 1) determines the characteristic element The element value of is -127 (i.e. the sum of the element value -128 and the difference 1). Further, the element values of each characteristic element are combined to obtain the characteristic graph
[0179] The present application learns the probability distribution parameters corresponding to the probability distribution in the probability distribution set through a learning-based nonlinear mapping model. Compared with the method of determining the probability distribution parameters corresponding to the probability distribution in the probability distribution set through a fixed function, the present application can determine better probability distribution parameters in the feature map encoding process, thereby ensuring the performance of data encoding and decoding. Moreover, since the learning-based nonlinear mapping model determines the probability distribution parameters corresponding to each probability distribution based on the probability distribution index value, it can be understood that the present application can determine a learning-based nonlinear mapping model that is more suitable for the target probability distribution number based on the target probability distribution number in the probability distribution set, thereby obtaining probability distribution parameters that are more suitable for the target probability distribution number. While ensuring data encoding and decoding, it can also improve the flexibility of the target probability distribution number; compared with the method of determining the probability distribution parameters corresponding to the probability distribution in the probability distribution set through a fixed function, a smaller number of target probability distributions can be set to achieve the same data encoding and decoding performance.
[0180] In the feature graph encoding method described in FIG3 and / or the feature graph decoding method described in FIG4, the learning-based nonlinear mapping model is included in a codec network, which includes the following modules as shown in FIG6a: an analysis and transformation module, a probability estimation module, a learning-based nonlinear mapping model, an entropy coding module, an entropy decoding module, and a synthesis and transformation module. In FIG6a, the connection relationship between the modules can be described as follows: the output of the analysis and transformation module is connected to the input of the probability estimation module; the output of the probability estimation module is connected to the input of the learning-based nonlinear mapping model; the input of the entropy coding module is connected to the output of the analysis and transformation module and the output of the learning-based nonlinear mapping model; the input of the entropy decoding module is connected to the output of the entropy coding module and the output of the learning-based nonlinear mapping model; and the input of the synthesis and transformation module is connected to the output of the entropy decoding module. It should be noted that the connection between the output of module A and the input of module B mentioned in this application can be understood as a direct connection, that is, the output of module A is the input of module B; the connection between the output of module A and the input of module B mentioned in this application can also be an indirect connection, that is, there can be other modules connected between module A and module B, and the output of module A is forwarded by other modules (or sent after being processed by other modules) to module B. This application does not specifically limit this.
[0181] The following is a detailed description of the model training process for the codec network shown in Figure 6a, which involves the training process of the modules involved in Figure 3 or Figure 4 (for example, the learning-based nonlinear mapping model) and the process of obtaining the probability distribution set. Referring to Figure 7, the model training process of the codec network includes S701 to S703. Among them:
[0182] S701: Acquire a training image.
[0183] The training images can be obtained from a database that has a communication connection with the codec network shown in Figure 6a, or the training images can be obtained through a data acquisition module that has a communication connection with the codec network shown in Figure 6a (see the description of the data acquisition module 101 in Figure 1 above). This application does not specifically limit this.
[0184] S702: Input the training image into the codec network to obtain a training reconstructed image.
[0185] The following describes in detail the flow chart of inputting the training image into the encoding network to obtain the training reconstructed image in S702 in conjunction with the encoding network shown in FIG6 a , which can be specifically shown in FIG8 , wherein:
[0186] S801: Input the training image into the analysis and transformation module to obtain the training feature map and training edge information.
[0187] The analysis and transformation module in Figure 6a includes a feature extraction network and a side information extraction network. Specifically, after the analysis and transformation module obtains a training image, it first preprocesses the training image; then, the feature extraction network extracts a training feature map from the preprocessed image. The training feature map includes multiple training feature elements; further, the side information extraction network extracts training side information from the training feature map. The specific implementation instructions for S801 obtaining the training feature map and training side information based on the training image can be found in the description of the analysis and transformation module 102 obtaining the feature map and side information based on the original image in Figure 1, and will not be repeated here.
[0188] S802: Input the training side information into a probability estimation module to obtain a training probability distribution index value of each training feature element.
[0189] The training side information is input into the probability estimation module to obtain the output of each training feature element, and then the training probability distribution index value of each training feature element is determined according to the output of each training feature element.
[0190] In one possible embodiment, the training feature graph includes M training feature elements, where M is a positive integer greater than 1. The probability estimation module includes an entropy estimation module and a quantization processing module as shown in Figure 6b. In this case, after the probability estimation module obtains the training side information, it inputs the training side information into the entropy estimation module to obtain M outputs corresponding to the M training feature elements; the outputs are used to determine the training index values; further, the quantization processing module processes the M outputs based on the target probability distribution number N to obtain M training probability distribution index values; the M training probability distribution index values are distributed between N consecutive numbers. The target probability distribution number N is determined based on the memory requirements of the entropy coding module or the memory requirements of the entropy decoding module.
[0191] In a specific example, after the training side information is input into the entropy estimation module shown in FIG6b, the first output of the training feature element (i.e., the training probability mean) and the second output θ (used to determine the training probability distribution index value) are obtained. Further, the quantization processing module quantizes and intercepts the second output θ according to formula (3) to obtain the training probability distribution index value of the training feature element.
[0192] Wherein, N is the target probability distribution number of the probability distribution set determined according to the memory requirement of the entropy coding module or the memory requirement of the entropy decoding module, N is a positive integer, and the probability distribution index values in the probability distribution set are N consecutive integers in the interval [0, N-1]. is one of the N consecutive integers.
[0193] S803: Input the training probability distribution index value of each training feature element into the learning-based nonlinear mapping model to obtain the training probability distribution parameters corresponding to each training feature element.
[0194] Exemplarily, after inputting the training side information into the probability estimation module, the training probability mean and training probability distribution index value of training feature element i are obtained. Furthermore, the training probability distribution index value of training feature element i is input into the learning-based nonlinear mapping model to obtain the training probability variance corresponding to training feature element i.
[0195] In a possible implementation, the learning-based nonlinear mapping model mentioned in the present application is designed based on a factor entropy model, or is designed based on a variation of the factor entropy model.
[0196] S804: The entropy coding module determines the training probability distribution of each training feature element according to the training probability distribution parameters of each training feature element.
[0197] Exemplarily, the training distribution parameters for training feature element i include the training probability mean output by the probability estimation module and the training probability variance output by the learned nonlinear mapping model. Furthermore, a probability distribution function for training feature element i is determined based on the training probability mean and the training probability variance. Based on this probability distribution function, the probability of training feature element i at different feature element values can be determined. Training feature element i is quantized in the training feature graph, and the probabilities corresponding to the element values of the quantized training feature element i are calculated based on the probability distribution function of training feature element i.
[0198] S805 : The entropy coding module performs entropy coding on the training side information, and performs entropy coding on each training feature element based on the training probability distribution of each training feature element to obtain a training code stream corresponding to the training image.
[0199] The training side information of the training feature graph is entropy encoded to obtain an entropy encoding result of the training side information. Furthermore, each training feature element is entropy encoded based on its training probability distribution to obtain an entropy encoding result for each training feature element. Furthermore, the entropy encoding results of the training side information and the entropy encoding results of each training feature element are written into a training bitstream, and the training bitstream is sent to the entropy decoding module.
[0200] Following the example of S804, the entropy coding module adopts an arithmetic coding algorithm to perform entropy coding on the quantized training feature element i based on the probability corresponding to the element value of the quantized training feature element i to obtain the coding result of the quantized training feature element i.
[0201] S806: The entropy decoding module performs entropy decoding on the training bit stream to obtain a training decoding feature map.
[0202] The entropy decoding module performs entropy decoding on the training bitstream to obtain the training side information and the encoding results of each training feature element in the training feature map. In this case, as in the implementation shown in S802 above, the training side information is first input into the probability estimation module to obtain the training probability distribution index value of each training feature element; and as in the implementation shown in S803 above, the training probability distribution parameter of each training feature element is determined based on the training probability distribution index value of each training feature element. Furthermore, based on the encoding results of each training feature element and the probability distribution parameters, the element value of each training feature element is determined to obtain the training decoding feature map.
[0203] S807 , the synthesis transformation module performs image reconstruction based on the training decoding feature map to obtain a training reconstructed image.
[0204] The synthetic transformation module is an implementation shown as the synthetic transformation module 106 in Figure 1, which post-processes the training decoding feature map output by the entropy decoding module, and uses an image reconstruction network to reconstruct the post-processed training decoding feature map to obtain a training reconstructed image.
[0205] S703: Adjust the encoding and decoding network based on the training image and the training reconstructed image.
[0206] It can be understood that the analysis and transformation module, probability estimation module, learning-based nonlinear mapping model, entropy coding module, entropy decoding module and synthetic coding module in the coding network adjust the module parameters of each module according to the gap between the training reconstructed image and the training image, so that the adjusted coding and decoding network can minimize the gap between the training reconstructed image and the training image, thereby ensuring data coding and decoding performance. In one possible embodiment, the code rate corresponding to the code stream in S702 (i.e., the average code length required to encode a unit pixel in the image compression task) can also be determined based on the code stream in S702, and then the code rate corresponding to the code stream is adjusted based on the gap between the training reconstructed image and the training image and the code rate corresponding to the code stream, so that the adjusted code network can minimize the gap between the training reconstructed image and the training image, thereby ensuring data coding and decoding performance and improving the code rate.
[0207] In one possible embodiment, by using the codec network training method shown in FIG7 , after training the codec network shown in FIG6a using multiple training images, a codec network that can guarantee data encoding and decoding performance can be obtained. Furthermore, through the learning-based nonlinear mapping model in the codec network, N consecutive integers with probability distribution index values in the interval [0, N-1] in the probability distribution set are calculated to obtain N (or N groups) of probability distribution parameters; further, N probability distributions in the probability distribution set are determined based on the N (or N groups) of probability distribution parameters, and each probability distribution corresponds to one (or one group) of probability distribution parameters. Each probability distribution includes the probabilities of multiple different feature element values under the probability distribution parameters corresponding to the probability distribution.
[0208] In one possible implementation, by using the codec network training method shown in FIG7 , the codec network shown in FIG6a is trained using multiple training images to obtain a codec network that can guarantee data encoding and decoding performance. The analysis and transformation module, probability estimation module, and entropy coding module in the codec network are then deployed on an encoding end device, which is used to execute the data encoding method shown in FIG3 . The probability estimation module, entropy decoding module, and synthesis transformation module in the codec network are deployed on a decoding end device, which is used to execute the data decoding method shown in FIG4 . The encoding end device and the decoding end device store a probability distribution set determined by a learning-based nonlinear mapping model.
[0209] Please refer to Figure 9, which is a schematic diagram of the structure of a feature map encoding device provided by this application. The feature map encoding device can be an integration of the analysis and transformation module, probability estimation module, and entropy coding module of Figure 1, Figure 6a, or Figure 6b. The device includes:
[0210] An analysis and transformation module 901 is used to obtain a feature map, which includes multiple feature elements;
[0211] Probability estimation module 902, configured to obtain a probability distribution index value corresponding to each feature element in a plurality of feature elements, the probability distribution index value being used to indicate a probability distribution from a probability distribution set; each probability distribution in the probability distribution set has a corresponding probability distribution parameter, the probability distribution parameter being calculated based on a learned nonlinear mapping model from the probability distribution index value corresponding to the probability distribution parameter;
[0212] The entropy coding module 903 is configured to perform entropy coding on each feature element according to the probability distribution indicated by the probability distribution index value corresponding to each feature element, to obtain a code stream corresponding to the feature map.
[0213] In one possible implementation, each probability distribution in the probability distribution set includes probabilities corresponding to a plurality of different feature element values under a probability distribution parameter corresponding to the probability distribution.
[0214] In a possible implementation, the probability distribution set includes N probability distributions, where N is the target number of probability distributions and is determined based on memory requirements.
[0215] In one possible implementation, the learning-based nonlinear mapping model is included in a codec network; the codec network also includes a probability estimation module 902, an entropy coding module 903 and an entropy decoding module; wherein: the output of the probability estimation module is connected to the input of the learning-based nonlinear mapping model; the output of the learning-based nonlinear mapping model is connected to the input of the entropy decoding module and the entropy coding module.
[0216] In one possible implementation, the probability estimation module 902 is used to determine the training probability distribution index value of each training feature element in the training feature map; and output the training probability distribution index value of each training feature element to the learning-based nonlinear mapping model; the learning-based nonlinear mapping model is used to determine the training probability distribution parameters corresponding to each training feature element according to the training probability distribution index value of each training feature element; and output the training probability distribution parameters of each training feature element to the entropy decoding module and the entropy encoding module 903.
[0217] In one possible implementation, a training image is obtained; the training image is input into a codec network to obtain a training reconstructed image; and the codec network is adjusted based on the training image and the training reconstructed image.
[0218] In one possible implementation, the codec network further includes an analysis transformation module and a synthesis transformation module; the training image is input into the analysis transformation module 901 to obtain a training feature map and training side information; the training side information is input into the probability estimation module 902 to obtain a training probability distribution index value of each training feature element in the training feature map; the training probability distribution index value of each training feature element is input into a learning-based nonlinear mapping model to obtain a training probability distribution parameter corresponding to each training feature element; the training probability distribution of each training feature element is determined based on the training probability distribution parameter of each training feature element; the entropy coding module 903 entropy codes the training side information and entropy codes each training feature element based on the training probability distribution of each training feature element to obtain a training code stream corresponding to the training image; the training code stream includes the coding result of the training side information and the coding result of each training feature element; the entropy decoding module entropy decodes the training code stream to obtain a training decoded feature map; the synthesis transformation module reconstructs the image based on the training decoded feature map to obtain a training reconstructed image.
[0219] In one possible implementation, in one possible implementation manner, the training feature graph includes M training feature elements, where M is a positive integer greater than 1; the aforementioned probability estimation module 902 includes an entropy estimation module and a quantization processing module; further, the training side information is input into the entropy estimation module, and entropy estimation is performed on each of the M training feature elements to obtain M outputs corresponding to the M training feature elements; the output is used to determine the training probability distribution index value; through the quantization processing module, based on the target probability distribution number N, the M outputs are processed to obtain M training probability distribution index values; the M training probability distribution index values are distributed between N consecutive numbers.
[0220] In a possible implementation, the learning-based nonlinear mapping model is designed based on a factor entropy model, or is designed based on a deformation of the factor entropy model.
[0221] In one possible implementation, the feature map is a feature map of any channel among multiple channels; wherein: the feature maps of multiple channels correspond to the same probability distribution set; or, the probability distribution set corresponding to the first channel and the probability distribution set corresponding to the second channel are different, and the first channel and the second channel are any two channels among the multiple channels; or, the multiple channels are divided into multiple groups of channels, the channels in the same group of channels correspond to the same probability distribution set, the probability distribution set corresponding to the first group of channels and the probability distribution set corresponding to the second group of channels are different, and the first group of channels and the second group of channels are any two groups of channels among the multiple groups of channels.
[0222] Please refer to Figure 10, which is a schematic diagram of the structure of a feature map decoding device provided by this application. The feature map encoding device can be an integration of the probability estimation module, entropy encoding module, and synthesis transformation module of Figure 1, Figure 6a, or Figure 6b. The device includes:
[0223] An entropy decoding module 1002 is configured to obtain a bitstream, the bitstream including encoding results of multiple feature elements of a feature map;
[0224] A probability estimation module 1001 is configured to obtain a probability distribution index value for each feature element in a plurality of feature elements through a probability estimation module; the probability distribution index value is used to indicate a probability distribution from a probability distribution set; each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is calculated based on a learned nonlinear mapping model and the probability distribution index value corresponding to the probability distribution parameter;
[0225] The entropy decoding module 1002 is configured to perform entropy decoding on the bitstream according to the probability distribution indicated by the probability distribution index value corresponding to each feature element to obtain a feature map.
[0226] In one possible implementation, each probability distribution in the probability distribution set includes probabilities corresponding to a plurality of different feature element values under a probability distribution parameter corresponding to the probability distribution.
[0227] In a possible implementation, the probability distribution set includes N probability distributions, where N is the target number of probability distributions and is determined based on memory requirements.
[0228] In one possible implementation, the learning-based nonlinear mapping model corresponds to a codec network; the codec network also includes a probability estimation module 1001, an entropy coding module, and an entropy decoding module 1002; the output of the probability estimation module 1001 is connected to the input of the learning-based nonlinear mapping model; the output of the learning-based nonlinear mapping model is connected to the input of the entropy decoding module 1002 and the entropy coding module.
[0229] In one possible implementation, the probability estimation module 1001 is used to determine the training probability distribution index value of each training feature element in the training feature map; and output the training probability distribution index value of each training feature element to the learning-based nonlinear mapping model; the learning-based nonlinear mapping model is used to determine the training probability distribution parameters corresponding to each training feature element according to the training probability distribution index value of each training feature element; and output the training probability distribution parameters of each training feature element to the entropy decoding module 1002 and the entropy encoding module.
[0230] In one possible implementation, a training image is obtained; the training image is input into a codec network to obtain a training reconstructed image; and the codec network is adjusted based on the training image and the training reconstructed image.
[0231] In one possible implementation, the codec network further includes an analysis and transformation module and a synthesis and transformation module 1003, which inputs the training image into the analysis and transformation module to obtain a training feature map and training side information; inputs the training side information into the probability estimation module 1001 to obtain a training probability distribution index value of each training feature element in the training feature map; inputs the training probability distribution index value of each training feature element into a learning-based nonlinear mapping model to obtain a training probability distribution parameter corresponding to each training feature element; determines the training probability distribution of each training feature element based on the training probability distribution parameter of each training feature element; the entropy coding module entropy codes the training side information and entropy codes each training feature element based on the training probability distribution of each training feature element to obtain a training bitstream corresponding to the training image; the training bitstream includes the coding result of the training side information and the coding result of each training feature element; the entropy decoding module 1002 entropy decodes the training bitstream to obtain a training decoded feature map; and the synthesis and transformation module 1003 reconstructs the image based on the training decoded feature map to obtain a training reconstructed image.
[0232] In one possible implementation, the training feature graph includes M training feature elements, where M is a positive integer greater than 1; the aforementioned probability estimation module 1001 includes an entropy estimation module and a quantization processing module; further, the training side information is input into the entropy estimation module, and entropy estimation is performed on each of the M training feature elements to obtain M outputs corresponding to the M training feature elements; the output is used to determine the training probability distribution index value; through the quantization processing module, based on the target probability distribution number N, the M outputs are processed to obtain M training probability distribution index values; the M training probability distribution index values are distributed between N consecutive numbers.
[0233] In a possible implementation, the learning-based nonlinear mapping model is designed based on a factor entropy model, or is designed based on a deformation of the factor entropy model.
[0234] In one possible implementation, the feature map is a feature map of any channel among multiple channels; wherein: the feature maps of multiple channels correspond to the same probability distribution set; or, the probability distribution set corresponding to the first channel and the probability distribution set corresponding to the second channel are different, and the first channel and the second channel are any two channels among the multiple channels; or, the multiple channels are divided into multiple groups of channels, the channels in the same group of channels correspond to the same probability distribution set, the probability distribution set corresponding to the first group of channels and the probability distribution set corresponding to the second group of channels are different, and the first group of channels and the second group of channels are any two groups of channels among the multiple groups of channels.
[0235] Figure 11 is a schematic diagram of the hardware structure of a feature graph encoding device or feature graph decoding device provided in an embodiment of the present application. The device shown in Figure 11 (which may be a computer device 1100) includes a memory 1101, a processor 1102, a communication interface 1103, and a bus 1104. Among them, the memory 1101, the processor 1102, and the communication interface 1103 are connected to each other via the bus 1104.
[0236] The memory 1101 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1101 may store a program. When the program stored in the memory 1101 is executed by the processor 1102, the feature map encoding method or each step of the encoding method provided in the embodiment of the present application is executed, or the feature map decoding method or each step of the decoding method provided in the embodiment of the present application is executed.
[0237] The processor 1102 can adopt a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the functions required to be performed by the units in the feature map encoding device (or encoding device) or the feature map decoding device (or decoding device) of the embodiment of the present application, or execute the various steps of the feature map encoding method of the embodiment of the method of the present application, or execute the various steps of the feature map decoding method provided in the embodiment of the present application.
[0238] The processor 1102 may also be an integrated circuit chip with signal processing capabilities. During implementation, each step of the feature map encoding method or each step of the feature map decoding method of the present application may be completed by hardware integrated logic circuits or software instructions in the processor 1102. The above-mentioned processor 1102 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or the like. The storage medium is located in the memory 1101, and the processor 1102 reads the information in the memory 1101, and combines its hardware to complete the functions required to be performed by the units included in the feature map encoding device (or encoding device) or the feature map decoding device (or decoding device) of the embodiment of the present application, or executes the feature map encoding method or feature map decoding method of the method embodiment of the present application.
[0239] The communication interface 1103 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the computer device 1100 and other devices or a communication network.
[0240] The bus 1104 may include a path for transmitting information between various components of the computer device 1100 (eg, the memory 1101 , the processor 1102 , and the communication interface 1103 ).
[0241] It should be understood that the feature map encoding apparatus in FIG9 is equivalent to the processor 1102 in the computer device 1100. Alternatively, the probability estimation module 1001, the entropy decoding module 1002, and the synthesis conversion module 1003 in the feature map decoding apparatus in FIG10 are equivalent to the processor 1102 in the computer device 1100.
[0242] It should be noted that the functions of the various functional units in the computer device 1100 described in the embodiments of the present application can be found in the description of the relevant steps in the above method embodiments, and will not be repeated here.
[0243] The present application also provides a coding and decoding method that is conducive to improving data compression / decompression performance. In this method, the data compression performance is improved by reducing the difference between the variance before quantization (for example, the first variance in this application) and the variance after quantization (that is, the second variance in this application) corresponding to the characteristic element. The encoding method and decoding method provided by this application are described in detail below with reference to the accompanying drawings. It should be noted that the execution flow diagram of the encoding side shown in Figure 12 below and the execution flow diagram of the decoding side shown in Figure 13 can be regarded as a flow diagram of a set of encoding and decoding methods.
[0244] Coding side: Please refer to FIG12, which is a schematic diagram of a flow chart of a coding method provided in an embodiment of the present application. The flow of the coding method includes S1201 to S1204.
[0245] S1201. Obtain the first variance of the feature elements in the feature graph.
[0246] The raw data is input to the analysis and transformation module for feature extraction, and a feature graph y corresponding to the raw data is obtained. The feature elements in the feature graph y are represented as y[i]. Usually, the element value of y[i] is a floating point number. Further, the parameters of the probability distribution function of the feature element y[i] (i.e., the mean and first variance of the feature element y[i]) are obtained through the entropy estimation module (or the probability estimation module 103 in Figure 1).
[0247] In one possible implementation, the first quantization processing module quantizes the element value of the feature element y[i] according to the mean value of the feature element y[i] to obtain the quantized feature element y[i]. For example, the element value of the feature element y[i] is a, the mean value of the feature element y[i] is μ, and the first variance σ1 is obtained; in this case, the element value of the quantized feature element y[i] is an integer value of (a-μ).
[0248] S1202: Obtain boundary points corresponding to the first variance quantization interval.
[0249] Among them, the first variance quantization interval is the variance quantization interval corresponding to a probability distribution in the probability distribution set, the probability distribution set includes L probability distributions, each probability distribution corresponds to a variance quantization interval, and each variance quantization interval corresponds to an upper boundary point and a lower boundary point; L is the target probability distribution number determined by memory requirements, and L is a positive integer greater than 0.
[0250] For example, the probability distribution in the probability distribution set is shown in Table 2. The index value of the probability distribution is used to indicate the probability distribution from the probability distribution set; the parameters corresponding to the probability distribution are used to indicate the mean and variance of the probability distribution; the variance quantization interval corresponding to the probability distribution is used to quantize the variance of the feature element output by the entropy estimation module (e.g., the first variance mentioned in this application); when the first variance belongs to a certain variance quantization interval (e.g., the first variance quantization interval mentioned in this application), the first variance will be quantized to the variance of the probability distribution corresponding to the variance quantization interval (e.g., the second variance mentioned in this application).
[0251] Table 2
[0252] It can be understood that the two variance quantization intervals corresponding to two adjacent probability distributions (i.e., the index values of the two probability distributions are continuous) are also continuous, wherein the upper boundary point of the variance quantization interval corresponding to the probability distribution with a smaller index value is the lower boundary point of the variance quantization interval corresponding to the probability distribution with a larger index value. For example, the upper boundary point of the variance quantization interval corresponding to the probability distribution with an index value of 0 in Table 2 is also the lower boundary point of the variance quantization interval corresponding to the probability distribution with an index value of 1, both of which are σ1+0.5. In other words, determining the upper boundary point of the variance quantization interval corresponding to each probability distribution in the probability distribution set can be understood as obtaining the variance quantization interval corresponding to each probability distribution in the probability distribution set.
[0253] In a possible implementation, the upper boundary point of the variance quantization interval corresponding to each probability distribution in the probability distribution set may be obtained from the storage space. In other words, the boundary point corresponding to the first variance quantization interval may be obtained from the storage space.
[0254] In one possible implementation, the upper boundary point of the variance quantization interval corresponding to the probability distribution can be determined based on the index value corresponding to the probability distribution in the probability distribution set, and the maximum and minimum variance values corresponding to the probability distribution. It should be noted that the maximum and minimum variance values are preset values that can be adjusted based on the specific application scenario, and the specific values of the maximum and minimum variance values are not specifically limited herein.
[0255] For example, the first variance belongs to a first variance quantization interval, and the variance of the probability distribution corresponding to the first variance quantization interval is the second variance. In this case, the upper boundary point corresponding to the first variance quantization interval is determined based on the index value corresponding to the second variance, the maximum variance value corresponding to the second variance, and the minimum variance value corresponding to the second variance. The index value corresponding to the second variance, the maximum variance value, the minimum variance value, and the boundary point of the first variance quantization interval satisfy the following formula (4).
[0256] Among them, b idx is the upper boundary point of the first variance quantization interval, σ max is the maximum variance, σ min is the minimum variance, idx is the index value corresponding to the second variance, L is the number of probability distributions in the probability distribution set (which can also be understood as the number of quantized variances in the probability distribution set), and Δδ is a non-zero constant greater than -1 and less than 1.
[0257] In one possible implementation, the upper boundary point of the variance quantization interval corresponding to each probability distribution in the probability distribution set may be obtained based on a learning-based nonlinear mapping model. In other words, the upper boundary point corresponding to the first variance quantization interval may be obtained using the learning-based nonlinear mapping model.
[0258] Specifically, the learning-based nonlinear mapping model is contained in a training codec network (as shown in FIG14a). The training codec network, as shown in FIG14a, includes an analysis change module, an entropy estimation module, a first quantization processing module, a learning-based nonlinear mapping module, a second quantization processing module, an index value to variance (index to sigma) mapping model, an entropy calculation module, and a synthetic transformation module. The output of the entropy estimation module is connected to the input of the learning-based nonlinear mapping model; the output of the learning-based nonlinear mapping model is connected to the input of the second quantization processing module; the output of the second quantization processing module is connected to the input of the index value to variance mapping model; and the output of the index value to variance mapping model is connected to the input of the entropy calculation module. The training process of the training codec network shown in FIG14a includes S1 to S10, wherein:
[0259] S1. Obtain training images.
[0260] The specific implementation process of S1 can be found in the description of the specific implementation process of S701 above, which will not be repeated here.
[0261] S2. Input the training image into the analysis and transformation module to obtain the training feature map and training edge information.
[0262] The specific implementation process of S2 can be found in the description of the specific implementation process of S801 above, and will not be repeated here.
[0263] S3. Input the training side information into the entropy estimation module to obtain the training mean and the first training variance of each training feature element in the training feature graph.
[0264] The training side information is input into the entropy estimation module to obtain the training probability distribution parameters of each training feature element, that is, the training mean and the first training variance of each training feature element.
[0265] Exemplarily, the training feature graph includes M training feature elements, where M is a positive integer greater than 1. In this case, the training side information is input into the entropy estimation module to obtain training means and first training variances corresponding to the M training feature elements.
[0266] S4. The first quantization processing module quantizes each training feature element in the training feature map based on the training mean of each training feature element to obtain a quantized training feature map (including each quantized training feature element).
[0267] The process of the first quantization processing module quantizing each training feature element according to the training mean can refer to the process of quantizing the element value of the feature element y[i] according to the mean of the feature element y[i] in the aforementioned S1201, which will not be repeated here.
[0268] S5. Determine an output parameter corresponding to each training feature element based on the first training variance using the learning-based nonlinear mapping model. The output parameter is used to determine a training probability distribution index value of each quantized training feature element.
[0269] Among them, the learning-based nonlinear mapping model is designed based on the factor entropy model, or is designed based on a deformation of the factor entropy model.
[0270] Exemplarily, the quantized training feature map includes M quantized training feature elements, and the first training variance corresponding to the M quantized training feature elements is input into a learning-based nonlinear mapping model to obtain M output parameters, and the M output parameters correspond one-to-one to the M quantized training feature elements.
[0271] S6. The second quantization processing module determines the training probability distribution index value corresponding to each quantized training feature element according to the output parameters.
[0272] The second quantization processing module determines the training probability distribution index value corresponding to each quantized training feature element according to the output parameters of each quantized training feature element.
[0273] Exemplarily, the second quantization processing module quantizes the M outputs based on the number L of target probability distributions in the probability distribution set to obtain M training probability distribution index values, which correspond one-to-one to the M quantized training feature elements, and the M training probability distribution index values are distributed between the L consecutive numbers (for example, index values 0 to L-1 in Table 2).
[0274] S7. The index value to variance mapping model determines a second training variance of each quantized training feature element according to the training probability distribution index value.
[0275] Among them, the training probability distribution index value i and the second training variance Satisfies the following formula (5)
[0276] Among them, σ max is the maximum variance, σ min is the minimum variance, i is the index value corresponding to the second training variance, i∈[0,L), L is the number of probability distributions in the probability distribution set (it can also be understood as the number of quantized variances in the probability distribution set).
[0277] S8. The entropy calculation module calculates the corresponding bit rate of the training image according to the quantized feature map and the second training variance.
[0278] The entropy calculation module calculates the bit rate corresponding to the training image based on the quantized feature map and the second training variance of each quantized training feature element in the quantized feature map; the bit rate is the average coding length required for encoding unit pixels in the image compression task.
[0279] S9. The synthesis transformation module reconstructs the image based on the quantized training feature map to obtain a training reconstructed image.
[0280] S10: Adjust the codec network based on the training image, the training reconstructed image and the bit rate.
[0281] According to the expected value of the difference between the training image and the training reconstructed image, and the expected value of the bit rate, the parameters of at least one module (or model) in the codec network are adjusted.
[0282] After the training of the training codec network of FIG14a is completed (i.e., after the difference between the training image and the training reconstructed image meets the expected value and the bit rate also meets the expected value of the bit stream), the probability distributions corresponding to the L second training variances are stored, and the variance quantization interval corresponding to each probability distribution is determined. In other words, it can be understood that the boundary points of the variance quantization intervals corresponding to the L probability distributions are obtained based on the learning-based nonlinear mapping model in FIG14a.
[0283] S1203 , quantize the first variance according to the first variance quantization interval to obtain a second variance; wherein variances belonging to the first variance quantization interval are all quantized into the second variance, and the boundary point corresponding to the first variance quantization interval is different from the second variance.
[0284] When the first variance of a feature element in the feature map (i.e., the variance of the feature element output by the entropy estimation module) belongs to the first variance quantization interval, the second quantization processing module determines the variance of the feature element in the feature map as the second variance corresponding to the first variance quantization interval. It can also be understood that the probability distribution corresponding to the first variance quantization interval (i.e., the probability distribution parameters include the probability distribution of the second variance) is determined as the probability distribution of the feature element in the feature map.
[0285] S1204 , performing entropy coding on the feature elements in the feature map according to the second variance to obtain a code stream.
[0286] After quantizing the first variance of a feature element in the feature map into a second variance, the entropy coding module performs entropy coding on the feature element according to the probability distribution corresponding to the second variance in the probability distribution set to obtain a bit stream.
[0287] In a possible implementation, the variance quantization intervals corresponding to each image may be different. For example, when encoding image 1 using each probability distribution in probability distribution set 1, the boundary points of each variance quantization interval corresponding to image 1 are, from small to large, as follows: a0 to a L , that is, the variance quantization intervals corresponding to image 1 include: (a0, a1], (a1, a2], ..., (a L-1 , a L ]; When encoding image 2 through each probability distribution in probability distribution set 1, the boundary points of each variance quantization interval corresponding to image 2 are from small to large: b0~b L , that is, the variance quantization intervals corresponding to image 1 include: (b0, b1], (b1, b2], ..., (b L-1 , b L ]. In this case, when entropy encoding is performed on the characteristic elements in the feature map according to the second variance, the boundary points corresponding to the first variance quantization interval may also be encoded into the bitstream. It should be noted that the boundary points corresponding to the first variance quantization interval may be directly encoded (including but not limited to entropy encoding), and the encoding result may be written into the bitstream; or the deformation of the boundary points corresponding to the first variance quantization interval may be encoded (including but not limited to entropy encoding), and the encoding result may be written into the bitstream. This application does not make specific limitations.
[0288] Decoding side: Please refer to FIG13, which is a flowchart of a decoding method provided by an embodiment of the present application. The decoding method includes S1301 to S1305.
[0289] S1301. Obtain a code stream, where the code stream includes encoding results of feature elements in a feature map.
[0290] The encoding side sends the code stream obtained in the above S1204 to the decoding side; alternatively, the encoding side stores the code stream obtained in the above S1204 in a storage device (a storage device that has a communication connection with both the encoding side and the decoding side), and the decoding side obtains the code stream from the storage device.
[0291] S1302: Based on the code stream, obtain a first variance of a feature element in a feature map.
[0292] In addition to the encoding results of the multiple feature elements, the bitstream also includes the encoding results of the side information corresponding to the feature map. Furthermore, the entropy decoding module performs entropy decoding on the bitstream to obtain the side information; and inputs the side information into the entropy estimation module to obtain the first variance corresponding to the feature elements in the feature map.
[0293] S1303: Obtain a boundary point corresponding to the first variance quantization interval.
[0294] The specific implementation process of S1303 can refer to the description of the specific implementation process of S1202 mentioned above.
[0295] Alternatively, when the boundary points corresponding to the first variance quantization interval are encoded into the bitstream in the aforementioned S1204, the bitstream may be decoded (including but not limited to entropy decoding) to obtain the boundary points corresponding to the first variance quantization interval.
[0296] S1304 , quantize the first variance according to the first variance quantization interval to obtain a second variance; wherein variances belonging to the first variance quantization interval are all quantized into the second variance, and the boundary point corresponding to the first variance quantization interval is different from the second variance.
[0297] The specific implementation process of S1304 can be found in the description of the specific implementation process of S1203 above, which will not be repeated here.
[0298] S1305: Perform entropy decoding on the code stream according to the second variance to obtain feature elements in the feature map.
[0299] After quantizing the first variance of a feature element in the feature map into a second variance, the entropy decoding module performs entropy decoding on the feature element according to the probability distribution corresponding to the second variance in the probability distribution set to obtain the feature element in the feature map.
[0300] In a specific scenario, the encoding method described in FIG. 12 and / or the decoding method described in FIG. 13 correspond to a codec network, which includes the following modules as shown in FIG. 14 b: an analysis and transformation module, an entropy estimation module, a first quantization processing module, a second quantization processing module, an entropy encoding module, an entropy decoding module, and a synthesis and transformation module.
[0301] The change analysis module is used to obtain the feature map and edge information of the image;
[0302] An entropy estimation module is used to determine the probability distribution parameters (including mean and first variance) of the feature elements in the feature graph based on the side information;
[0303] A first quantization processing module is used to quantize the element values of the characteristic elements in the characteristic map according to the mean value to obtain a quantized characteristic map (including the quantized characteristic elements);
[0304] A second quantization processing module, configured to quantize the first variance according to the first variance quantization interval to obtain a second variance;
[0305] An entropy coding module, configured to perform entropy coding on the quantized feature elements according to the second variance to obtain a bit stream;
[0306] An entropy decoding module, configured to perform entropy decoding on the code stream according to the second variance to obtain the quantized feature map (including the quantized feature elements);
[0307] The synthesis transformation module is used to reconstruct the image according to the quantized feature map to obtain a reconstructed image.
[0308] In summary, when entropy encoding the characteristic elements of the feature map or entropy decoding the bitstream corresponding to the feature map, the boundary point of the first variance quantization interval used is different from the second variance, compared with the upper boundary point of the first variance quantization interval and the second variance, it is beneficial to reduce the difference between the variance before quantization (for example, the first variance in this application) and the variance after quantization (that is, the second variance in this application). For example, in A shown in Figure 15, the upper boundary point of the first variance quantization interval is the same as the second variance, and the upper boundary point of the first variance quantization interval in B shown in Figure 15 is different from the second variance; in this case, the difference between the second variance in B shown in Figure 15 and the various variances belonging to the first variance quantization interval (for example, the first variance of a certain characteristic element) is less than the difference between the second variance in A shown in Figure 15 and the various variances belonging to the first variance quantization interval (for example, the first variance of a certain characteristic element), thereby improving the accuracy of the probability distribution used in encoding or decoding, thereby improving the performance of data compression or decompression.
[0309] The present application also provides a coding device, which includes an entropy estimation module, a second quantization processing module, and an entropy coding module. For a more detailed description of each module, please refer to the relevant description in the method embodiment of Figure 12 above, or refer to the relevant description in Figure 14a, or refer to the relevant description in Figure 14b, and will not be repeated here. It should be understood that the coding device is equivalent to the processor 1102 in the computer device 1100 in Figure 11. Alternatively, the entropy estimation module, the second quantization processing module, and the entropy coding module are equivalent to the processor 1102 in the computer device 1100.
[0310] The present application also provides a decoding device, which includes an entropy estimation module, a second quantization processing module, and an entropy decoding module. For a more detailed description of each module, please refer to the relevant description in the method embodiment of Figure 13 above, or refer to the relevant description in Figure 14a, or refer to the relevant description in Figure 14b, and will not be repeated here. It should be understood that the decoding device is equivalent to the processor 1102 in the computer device 1100 in Figure 11. Alternatively, the entropy estimation module, the second quantization processing module, and the entropy coding module are equivalent to the processor 1102 in the computer device 1100.
[0311] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it can implement part or all of the steps of any one of the above method embodiments, and implement the functions of any one of the functional modules described in Figure 11 above.
[0312] The present application also provides a computer program product that, when executed on a computer or processor, causes the computer or processor to perform one or more steps of any of the aforementioned methods. If the various components of the aforementioned devices are implemented as software functional units and sold or used as independent products, they may be stored in the aforementioned computer-readable storage medium.
[0313] In the above embodiments, the descriptions of each embodiment have different emphases. For parts not described in detail in one embodiment, please refer to the relevant descriptions of other embodiments. It should be understood that in the various embodiments of the present application, the order of the sequence numbers of the above processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0314] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and judged by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which corresponds to tangible media, such as data storage media, or communication media including any media that facilitates the transfer of computer programs from one place to another (e.g., according to a communication protocol). In this manner, computer-readable media can generally correspond to (1) non-transitory tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the technology described in this application. A computer program product can include computer-readable media.
[0315] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but are actually directed to non-transitory tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), and Blu-ray disc, where disks typically reproduce data magnetically, while discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0316] Instructions may be determined by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor," as used herein, may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Furthermore, the techniques may be fully implemented in one or more circuits or logic elements.
[0317] The techniques of this application can be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or a set of ICs (e.g., a chipset). The various components, modules, or units described herein are intended to emphasize functional aspects of the apparatus used to determine the disclosed techniques, but they do not necessarily require implementation by different hardware units. In fact, as described above, the various units can be combined in a codec hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).
[0318] The above description is merely an exemplary embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A feature map encoding method, characterized in that: The method comprises: Acquire a feature map by analyzing the transformation module, wherein the feature map includes a plurality of feature elements; Obtaining, by a probability estimation module, a probability distribution index value corresponding to each of the plurality of feature elements, wherein the probability distribution index value is used to indicate a probability distribution in a probability distribution set, wherein each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is obtained by calculating the probability distribution index value corresponding to the probability distribution parameter based on a learned nonlinear mapping model; Through the entropy coding module, entropy coding is performed on each feature element according to the probability distribution indicated by the probability distribution index value to obtain a code stream corresponding to the feature map.
2. The method according to claim 1, characterized in that: The learning-based nonlinear mapping model is included in a codec network; the codec network also includes the probability estimation module, the entropy encoding module and the entropy decoding module; wherein: The output of the probability estimation module is connected to the input of the learning-based nonlinear mapping model; The output of the learning-based nonlinear mapping model is connected to the input of the entropy decoding module and the entropy encoding module.
3. The method according to claim 2, characterized in that: The probability estimation module is used to determine the training probability distribution index value of each training feature element in the training feature map; and output the training probability distribution index value of each training feature element to the learning-based nonlinear mapping model; The learning-based nonlinear mapping model is used to determine the training probability distribution parameters corresponding to each training feature element according to the training probability distribution index value of each training feature element; and output the training probability distribution parameters of each training feature element to the entropy decoding module and the entropy encoding module.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: Get training images; Inputting the training image into the codec network to obtain a training reconstructed image; The codec network is adjusted based on the training image and the training reconstructed image.
5. The method according to claim 4, characterized in that: The codec network further includes the analysis transformation module and the synthesis transformation module. The step of inputting the training image into the codec network to obtain the training reconstructed image includes: Inputting the training image into the analysis and transformation module to obtain the training feature map and training edge information; Inputting the training side information into the probability estimation module to obtain a training probability distribution index value for each training feature element in the training feature graph; Inputting the training probability distribution index value of each training feature element into the learning-based nonlinear mapping model to obtain the training probability distribution parameter corresponding to each training feature element; Determining the training probability distribution of each training feature element according to the training probability distribution parameter of each training feature element; The entropy coding module performs entropy coding on the training side information, and performs entropy coding on each training feature element based on the training probability distribution of each training feature element, to obtain a training bitstream corresponding to the training image; the training bitstream includes the coding result of the training side information and the coding result of each training feature element; The entropy decoding module performs entropy decoding on the training bit stream to obtain a training decoding feature map; The synthesis transformation module performs image reconstruction based on the training decoding feature map to obtain a training reconstructed image.
6. The method according to claim 5, characterized in that: The training feature graph includes M training feature elements, where M is a positive integer greater than 1; the probability estimation module includes an entropy estimation module and a quantization processing module; The step of inputting the training side information into the probability estimation module to obtain a training probability distribution index value of each training feature element in the training feature graph includes: Inputting the training side information into the entropy estimation module to perform entropy estimation on each of the M training feature elements to obtain M outputs; The output is used to determine the training probability distribution index value; The quantization processing module processes the M outputs based on the target probability distribution number N to obtain M training probability distribution index values; the M training probability distribution index values are distributed between N consecutive numbers.
7. The method according to any one of claims 1 to 6, characterized in that: The learning-based nonlinear mapping model is designed based on a factor entropy model, or is designed based on a deformation of a factor entropy model.
8. The method according to any one of claims 1 to 7, characterized in that: Each probability distribution in the probability distribution set includes probabilities corresponding to a plurality of different characteristic element values under corresponding probability distribution parameters.
9. The method according to any one of claims 1 to 8, characterized in that: The probability distribution set includes N probability distributions, where N is the target number of probability distributions and is determined based on memory requirements.
10. The method according to any one of claims 1 to 9, characterized in that: The feature map is a feature map of any channel among multiple channels; wherein: The feature graphs of the multiple channels correspond to the same probability distribution set; Alternatively, the probability distribution set corresponding to the first channel is different from the probability distribution set corresponding to the second channel, and the first channel and the second channel are any two channels of the multiple channels; Alternatively, the multiple channels are divided into multiple groups of channels, the channels in the same group of channels correspond to the same probability distribution set, the probability distribution set corresponding to the first group of channels is different from the probability distribution set corresponding to the second group of channels, and the first group of channels and the second group of channels are any two groups of channels in the multiple groups of channels.
11. A feature map decoding method, characterized in that: The method comprises: Acquire a code stream, where the code stream includes encoding results of multiple feature elements of the feature graph; Based on the bitstream, a probability distribution index value of each feature element in the multiple feature elements is obtained by a probability estimation module; the probability distribution index value is used to indicate a probability distribution in a probability distribution set, each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is calculated based on a learned nonlinear mapping model to obtain a probability distribution index value corresponding to the probability distribution parameter; According to the probability distribution indicated by the probability distribution index value, the bit stream is entropy decoded by an entropy decoding module to obtain the feature map.
12. The method according to claim 11, characterized in that: The learning-based nonlinear mapping model is included in a codec network; the codec network also includes the probability estimation module, the entropy encoding module and the entropy decoding module; wherein: The output of the probability estimation module is connected to the input of the learning-based nonlinear mapping model; The output of the learning-based nonlinear mapping model is connected to the input of the entropy decoding module and the entropy encoding module.
13. The method according to claim 12, characterized in that: The probability estimation module is used to determine the training probability distribution index value of each training feature element in the training feature map; and output the training probability distribution index value of each training feature element to the learning-based nonlinear mapping model; The learning-based nonlinear mapping model is used to determine the training probability distribution parameters corresponding to each training feature element according to the training probability distribution index value of each training feature element; and output the training probability distribution parameters of each training feature element to the entropy decoding module and the entropy encoding module.
14. The method according to claim 12 or 13, characterized in that: The method further comprises: Get training images; Inputting the training image into the codec network to obtain a training reconstructed image; The codec network is adjusted based on the training image and the training reconstructed image.
15. The method according to claim 14, characterized in that: The codec network further includes the analysis transformation module and the synthesis transformation module. The step of inputting the training image into the codec network to obtain the training reconstructed image includes: Inputting the training image into the analysis and transformation module to obtain the training feature map and training edge information; Inputting the training side information into the probability estimation module to obtain a training probability distribution index value for each training feature element in the training feature graph; The training probability distribution index value of each training feature element is input into the learning-based nonlinear mapping model to obtain each Training probability distribution parameters corresponding to training feature elements; Determining the training probability distribution of each training feature element according to the training probability distribution parameter of each training feature element; The entropy coding module performs entropy coding on the training side information, and performs entropy coding on each training feature element based on the training probability distribution of each training feature element, to obtain a training bitstream corresponding to the training image; the training bitstream includes the coding result of the training side information and the coding result of each training feature element; The entropy decoding module performs entropy decoding on the training bit stream to obtain a training decoding feature map; The synthesis transformation module performs image reconstruction based on the training decoding feature map to obtain a training reconstructed image.
16. The method according to claim 15, characterized in that: The training feature graph includes M training feature elements, where M is a positive integer greater than 1; the probability estimation module includes an entropy estimation module and a quantization processing module; The step of inputting the training side information into the probability estimation module to obtain a training probability distribution index value of each training feature element in the training feature graph includes: Input the training side information into the entropy estimation module to perform entropy estimation on each of the M training feature elements to obtain M outputs; the outputs are used to determine the training probability distribution index value; The quantization processing module processes the M outputs based on the target probability distribution number N to obtain M training probability distribution index values, where the M training probability distribution index values are distributed between N consecutive numbers.
17. The method according to any one of claims 10 to 16, characterized in that: The learning-based nonlinear mapping model is designed based on a factor entropy model, or is designed based on a deformation of a factor entropy model.
18. The method according to any one of claims 10 to 17, characterized in that: Each probability distribution in the probability distribution set includes probabilities corresponding to a plurality of different characteristic element values under a probability distribution parameter corresponding to the probability distribution.
19. The method according to any one of claims 10 to 18, characterized in that: The probability distribution set includes N probability distributions, where N is the target number of probability distributions and is determined based on memory requirements.
20. The method according to any one of claims 10 to 19, characterized in that: The feature map is a feature map of any channel among multiple channels; wherein: The feature graphs of the multiple channels correspond to the same probability distribution set; Alternatively, the probability distribution set corresponding to the first channel is different from the probability distribution set corresponding to the second channel, and the first channel and the second channel are any two channels of the multiple channels; Alternatively, the multiple channels are divided into multiple groups of channels, the channels in the same group of channels correspond to the same probability distribution set, the probability distribution set corresponding to the first group of channels is different from the probability distribution set corresponding to the second group of channels, and the first group of channels and the second group of channels are any two groups of channels in the multiple groups of channels.
21. A coding and decoding network, characterized in that: The coding and decoding network includes an analysis and transformation module, a probability estimation module, a learning-based nonlinear mapping model, an entropy coding module, an entropy decoding module and a synthesis and transformation module; wherein: The analysis and transformation module is used to obtain a training feature map and training edge information based on a training image; The probability estimation module is used to obtain a training probability distribution index value of each training feature element in the training feature graph based on the training side information; The learning-based nonlinear mapping model is used to obtain the training probability distribution parameter corresponding to each training feature element based on the training probability distribution index value of each training feature element; The entropy coding module is used to determine the training probability distribution of each training feature element according to the training probability distribution parameter of each training feature element; and perform entropy coding on the training side information, and perform entropy coding on each training feature element based on the training probability distribution of each training feature element to obtain a training bitstream corresponding to the training image; the training bitstream includes the coding result of the training side information and the coding result of each training feature element; The entropy decoding module is used to perform entropy decoding on the training bit stream to obtain a training decoding feature map; The synthesis transformation module is used to perform image reconstruction based on the training decoding feature map to obtain a training reconstructed image; The analysis transformation module, the probability estimation module, the learning-based nonlinear mapping model, the entropy coding module, the entropy decoding module and the synthesis transformation module are also used to adjust module parameters based on the training image and the training reconstructed image.
22. The system according to claim 21, characterized in that: The training feature graph includes M training feature elements, where M is a positive integer greater than 1; the probability estimation module includes an entropy estimation module and a quantization processing module; The entropy estimation module is used to perform entropy estimation on each of the M training feature elements to obtain M outputs; the outputs are used to determine the training probability distribution index value; The quantization processing module is used to process the M outputs based on the target probability distribution number N to obtain M training probability distribution index values, and the M training probability distribution index values are distributed between N consecutive numbers.
23. A feature map encoding device, characterized in that: The device comprises: An analysis and transformation module, used to obtain a feature map, wherein the feature map includes a plurality of feature elements; A probability estimation module, used to obtain a probability distribution index value corresponding to each of the multiple feature elements, wherein the probability distribution index value is used to indicate a probability distribution from a probability distribution set; each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is calculated based on a learned nonlinear mapping model to obtain a probability distribution index value corresponding to the probability distribution parameter; An entropy coding module is used to perform entropy coding on each feature element according to the probability distribution indicated by the probability distribution index value corresponding to each feature element, so as to obtain a code stream corresponding to the feature map.
24. The device according to claim 23, characterized in that The apparatus further comprises a module for executing the method of any one of claims 2-10.
25. A feature map decoding device, characterized in that: The device comprises: An entropy decoding module, used to obtain a bit stream, wherein the bit stream includes encoding results of multiple feature elements of the feature map; A probability estimation module, used for obtaining a probability distribution index value of each feature element in a plurality of feature elements based on the bitstream; the probability distribution index value is used for indicating a probability distribution from a probability distribution set; each probability distribution in the probability distribution set corresponds to a probability distribution parameter, and the probability distribution parameter is obtained by calculating the probability distribution index value corresponding to the probability distribution parameter based on a learned nonlinear mapping model; The entropy decoding module is further used to perform entropy decoding on the code stream according to the probability distribution indicated by the probability distribution index value corresponding to each feature element to obtain the feature map.
26. The device according to claim 25, characterized in that The apparatus further comprises a module for executing the method of any one of claims 12-20.
27. A coding method, characterized in that The method comprises: Get the first variance of the feature element in the feature map; Obtaining a boundary point corresponding to a first variance quantization interval; quantizing the first variance according to the first variance quantization interval to obtain a second variance; wherein the boundary point corresponding to the first variance quantization interval is different from the second variance; Entropy encoding is performed on the feature elements in the feature map according to the second variance to obtain a code stream.
28. The method according to claim 27, characterized in that: The obtaining of the boundary point corresponding to the first variance quantization interval includes: The upper boundary point corresponding to the first variance quantization interval is determined according to the index value, maximum variance and minimum variance corresponding to the second variance; wherein the index value is used to indicate the probability distribution corresponding to the second variance from the probability distribution set stored in the storage space.
29. The method according to claim 28, characterized in that: The index value corresponding to the second variance, the maximum variance, the minimum variance, and the boundary point of the first variance quantization interval satisfy the following formula: Among them, b idx is the upper boundary point of the first variance quantization interval, σ max is the maximum variance, σ min is the minimum variance, idx is the index value corresponding to the second variance, L is the number of probability distributions in the probability distribution set, Δδ is a non-zero constant greater than -1 and less than 1 quantity.
30. The method according to claim 27, characterized in that: The obtaining of the boundary point corresponding to the first variance quantization interval includes: An upper boundary point corresponding to the first variance quantization interval is obtained through a learning-based nonlinear mapping model.
31. The method according to any one of claims 27 to 30, characterized in that: The method further comprises: The boundary point corresponding to the first variance quantization interval is encoded into the bit stream.
32. A decoding method, characterized in that: The method comprises: Acquire a code stream, wherein the code stream includes encoding results of feature elements in the feature graph; Based on the code stream, obtaining a first variance of a feature element in the feature map; Obtaining a boundary point corresponding to a first variance quantization interval; quantizing the first variance according to the first variance quantization interval to obtain a second variance; wherein the boundary point corresponding to the first variance quantization interval is different from the second variance; The code stream is entropy decoded according to the second variance to obtain feature elements in the feature map.
33. The method according to claim 32, characterized in that: The obtaining of the boundary point corresponding to the first variance quantization interval includes: The upper boundary point corresponding to the first variance quantization interval is determined according to the index value, maximum variance and minimum variance corresponding to the second variance; wherein the index value is used to indicate the probability distribution corresponding to the second variance from the probability distribution set stored in the storage space.
34. The method according to claim 33, characterized in that The index value corresponding to the second variance, the maximum variance, the minimum variance, and the boundary point of the first variance quantization interval satisfy the following formula: Among them, b idx is the upper boundary point of the first variance quantization interval, σ max is the maximum variance, σ min is the minimum variance, idx is the index value corresponding to the second variance, L is the number of probability distributions in the probability distribution set, and Δδ is a non-zero constant greater than -1 and less than 1.
35. The method according to claim 32, characterized in that: The obtaining of the boundary point corresponding to the first variance quantization interval includes: An upper boundary point corresponding to the first variance quantization interval is obtained through a learning-based nonlinear mapping model.
36. The method according to claim 32, characterized in that: The bitstream further includes a boundary point corresponding to the first variance quantization interval, and obtaining the boundary point corresponding to the first variance quantization interval includes: Decode the code stream to obtain a boundary point corresponding to the first variance quantization interval.
37. A coding device, characterized in that: The device comprises: An entropy estimation module, used to obtain the first variance of the feature elements in the feature map; A second quantization processing module is used to obtain a boundary point corresponding to a first variance quantization interval; and quantize the first variance according to the first variance quantization interval to obtain a second variance; wherein the variances belonging to the first variance quantization interval are all quantized into the second variance, and the boundary point corresponding to the first variance quantization interval is different from the second variance; An entropy coding module is used to perform entropy coding on the feature elements in the feature map according to the second variance to obtain a code stream.
38. The device according to claim 37, characterized in that The apparatus further comprises a module for executing the method of any one of claims 28-31.
39. A decoding device, characterized in that: The device comprises: An entropy decoding module, used to obtain a bit stream, wherein the bit stream includes the encoding results of the feature elements in the feature map; An entropy estimation module, configured to obtain a first variance of a feature element in the feature map based on the bit stream; The second quantization processing module is used to obtain the boundary point corresponding to the first variance quantization interval; and quantize the first variance quantization interval according to the first variance quantization interval. The first variance is obtained to obtain a second variance; wherein the variances belonging to the first variance quantization interval are all quantized into the second variance, and the boundary point corresponding to the first variance quantization interval is different from the second variance; The entropy decoding module is used to perform entropy decoding on the code stream according to the second variance to obtain feature elements in the feature map.
40. The device according to claim 39, characterized in that The apparatus further comprises a module for executing the method of any one of claims 33-36.
41. An encoder, characterized in that Comprising a processing circuit for executing the method described in any one of claims 1 to 10, or for executing the method described in any one of claims 27 to 31.
42. A decoder, characterized in that Comprising a processing circuit for executing the method described in any one of claims 11-20, or for executing the method described in any one of claims 32-36.
43. A computer program product, characterized in that Comprising program code, when the program code is executed on a computer or a processor, it is used to execute the method described in any one of claims 1 to 10, or, to execute the method described in any one of claims 11 to 20, or to execute the method described in any one of claims 27 to 31, or to execute the method described in any one of claims 32 to 36.
44. An encoder, characterized in that include: one or more processors; A non-transitory computer-readable storage medium, coupled to the processor and storing a program executed by the processor, wherein the program, when executed by the processor, causes the encoder to perform the method according to any one of claims 1-10, or is used to perform the method according to any one of claims 27-31.
45. A decoder, characterized in that include: one or more processors; A non-transitory computer-readable storage medium, coupled to the processor and storing a program executed by the processor, wherein the program, when executed by the processor, causes the decoder to perform the method according to any one of claims 11-20, or is used to perform the method according to any one of claims 32-36.
46. A non-transitory computer-readable storage medium, characterized in that The method comprises a program code, and when the program code is executed by a computer device or a processor, the method described in any one of claims 1 to 10 is implemented, or the method described in any one of claims 11 to 20 is implemented, or the method described in any one of claims 27 to 31 is implemented, or the method described in any one of claims 32 to 36 is implemented.
Citation Information
Patent Citations
Image encoding method and device, and image decoding method and device
CN111988629A
Feature graph coding and decoding method and device
CN115834888A
Context adaptation entropy encoding method, context adaptation entropy decoding method, context adaptation entropy encoding apparatus, context adaptation entropy decoding apparatus and program thereof
JP2012134757A
Entropy coding in image and video compression using machine learning
US10652581B1
Entropy encoding and decoding method and device
WO2023020320A1
Cited By
Image encoding and decoding method based on content generation, electronic equipment and storage medium
CN119155452A
Video compression method based on deep learning
CN120455721A
