Neural network media compression using quantized entropy coding distribution parameters
By optimizing the definition of entropy coding and decoding variables and the parameters of the probability distribution function, the problem of low quantification efficiency of entropy coding and decoding variables in neural network video/image compression technology is solved, achieving more efficient entropy coding and decoding and memory usage, ensuring low-efficiency entropy coding and decoding. Performance when expressing precision.
Patent Information
- Application Number
- CN202380019255.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-07-22
- Filing Date
- 2023-01-12
- Publication Date
- 2024-09-10
AI Technical Summary
Existing neural network video/image compression technology suffers from efficiency loss when quantizing entropy encoding and decoding variables, especially in common use cases, which exhibits the worst quantization effect and cannot be recovered through retraining, and general tools fail to effectively optimize entropy. Specific properties of encoding and decoding variables.
By optimizing the definition of entropy encoding and decoding variables, using probability distribution function parameters to determine the code vector, ensuring that important information is retained when representing low-precision integers, and achieving efficient entropy encoding and decoding through arithmetic encoding and decoding technology, providing specific solutions for Gaussian distribution .
It improves the efficiency and memory usage of entropy encoding and decoding, reduces the degradation of compression performance, and ensures performance when neural network weights and activation functions are represented with low precision.
Smart Images

Figure CN118633290A_ABST
Abstract
Description
[0001] This application claims the benefit of U.S. Provisional Application No. 63 / 267,857 filed on February 11, 2022 and U.S. Patent Application No. 17 / 814,426 filed on July 22, 2022, the entire contents of which are hereby incorporated by reference. Technical Field
[0002] The present disclosure relates to media encoding and decoding, including encoding and decoding of image and video data. Background Art
[0003] Digital media capabilities may be incorporated into a wide range of devices including: digital televisions, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite wireless telephones, so-called "smartphones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding technologies such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Codec (AVC), ITU-T H.265 / High Efficiency Video Codec (HEVC), ITU-T H.266 / Versatile Video Codec (VVC), and extensions of such standards, as well as proprietary video codecs / formats such as AOMedia Video 1 (AV1) developed by the Alliance for Open Media. By implementing such video coding and decoding technology, video devices can more efficiently send, receive, encode, decode and / or store digital video information. Summary of the invention
[0004] In summary, this disclosure describes techniques for media compression, including techniques for video and / or image encoding and decoding. Neural network-based media (e.g., image and / or video) compression methods can compete with current standards and provide several additional advantages. Neural-based encoding and decoding methods are typically designed and tested using high-precision floating-point arithmetic. However, as the technology moves toward actual deployment, neural network weights and activation functions are often quantized and represented using low-precision integers to improve speed and power consumption.
[0005] The present disclosure addresses problems that arise when quantizing neural network variables associated with entropy codecs. Neural network variables are important for the design of neural-based video / image compression schemes because these variables define the compression efficiency. Furthermore, general tools for optimizing quantization in neural networks do not take into account the very specific properties of entropy codec variables. Testing has shown that the worst-case quantization effects may happen exactly for some of the most common use cases, and the losses caused by the worst-case quantization effects cannot be recovered by retraining the neural network.
[0006] This disclosure describes techniques for optimizing the definition of trained entropy codec variables so that the information most important for efficient entropy codec is best preserved when represented by low-precision integers. Tests also show how the techniques described herein can be used to minimize the amount of memory required for entropy codecs. This disclosure describes a general approach for entropy codec design, as well as specific solutions and implementations for commonly used Gaussian distributions. The techniques of this disclosure can generally be applied to any neural-based compression technique, but the examples described below focus on techniques for images and video.
[0007] In one example, a method includes: determining probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are based on a distribution of the data stream optimized for quantization; determining a code vector based on the probability distribution function parameters; and entropy encoding and decoding the data element using the code vector. The function can be determined empirically (e.g., logarithmically) or by using an algorithm that estimates codec redundancy or a solution of an ordinary differential equation.
[0008] In another example, a device includes: a memory; and one or more processors in communication with the memory, the one or more processors being configured to: determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are based on a distribution of the data stream optimized for quantization; determine a code vector based on the probability distribution function parameters; and entropy encode and decode the data element using the code vector. The function may be determined empirically (e.g., logarithmically) or by using an algorithm that evaluates codec redundancy or a solution of an ordinary differential equation.
[0009] In another example, a computer-readable storage medium is encoded with instructions that, when executed, cause a programmable processor to: determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are based on a distribution of the data stream optimized for quantization; determine a code vector based on the probability distribution function parameters; and entropy encode and decode the data element using the code vector. The function can be determined empirically (e.g., logarithmically) or by using an algorithm that estimates codec redundancy or a solution of an ordinary differential equation.
[0010] The details of one or more examples are set forth in the accompanying drawings and the description below.Other features, objects, and advantages will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a block diagram illustrating an example media encoding and decoding system that may perform the techniques of this disclosure.
[0012] Figure 2 The difference between conventional media codec and neural-based media codec is shown.
[0013] Figure 3 An example of a Gaussian continuous probability distribution function is shown.
[0014] Figure 4 is a block diagram illustrating an example neural-based image codec.
[0015] Figure 5 An example implementation of neural-based entropy encoding and decoding is shown.
[0016] Figure 6 An example implementation of neural-based entropy coding with quantized probability distribution function parameters is shown.
[0017] Figure 7 Example measures of redundancy of quantized probability distribution function parameters for different code vectors are shown.
[0018] Figure 8 An example of non-uniform distribution of code vectors is shown.
[0019] Fig. 9 An example of distribution according to the Gaussian standard deviation of the bit rate is shown.
[0020] Fig.10 Example entropies of quantized random variables are shown.
[0021] Fig.11 Example average relative redundancy from uniform quantization using a Gaussian standard deviation is shown.
[0022] Fig.12 Example entropies of quantized random variables on a logarithmic scale are shown.
[0023] Fig.13 Another example entropy of a quantized random variable on a logarithmic scale is shown.
[0024] Fig.14 A block diagram of another example neural-based codec is shown.
[0025] Fig.15 An example of average relative redundancy using uniform quantization of probability distribution function parameters is shown.
[0026] Fig.16 Example code for converting quantized probability distribution function parameters into code vectors is shown.
[0027] Fig.17 An example of relative redundancy using uniform quantization of probability distribution function parameters is shown.
[0028] Fig.18 Another example code for converting quantized probability distribution function parameters into a code vector is shown.
[0029] Fig.19 Example relative redundancies according to one example of the present disclosure are shown.
[0030] Fig. 20 An example of probability distribution function parameter partitioning is shown.
[0031] Fig.21 A block diagram of another example neural-based codec is shown.
[0032] Fig. 22 Example conversion functions for probability distribution function parameters are shown.
[0033] Fig.23 An example output of a conversion function of the present disclosure is shown.
[0034] Fig.24 Example relative redundancy measures based on different numbers of code vectors using example conversion functions of the present disclosure are shown.
[0035] Fig.25 Example relative redundancy measures based on different numbers of code vectors using another example conversion function of the present disclosure are shown.
[0036] Fig.26 Example relative redundancy measures based on different numbers of code vectors using another example conversion function of the present disclosure are shown.
[0037] Fig. 27 The derivatives of example transfer functions of the present disclosure are shown.
[0038] Fig.28 The relative errors of example transfer functions of the present disclosure are shown.
[0039] Fig.29 Example relative redundancy measures based on different numbers of code vectors using another example conversion function of the present disclosure are shown.
[0040] Fig.30 is a flow chart illustrating an example method of the present disclosure. DETAILED DESCRIPTION
[0041] The present disclosure describes techniques for encoding and decoding media data (e.g., images or videos) using neural network-based media codec techniques. Specifically, the present disclosure describes techniques for entropy coding and decoding media data using optimized probability distribution function (PDF) parameterizations. Specifically, the present disclosure describes techniques for quantized neural network-based media codecs using optimized PDF parameterizations. Example techniques of the present disclosure include definitions and implementations of quantized modified PDF parameters that are non-uniform (e.g., logarithmic) functions of PDF parameters (e.g., typically standard deviations or any parameters commonly used to define statistical distributions) used to train neural networks. By using the PDF parameters of the present disclosure, entropy coding and decoding of media data using neural-based codec techniques can be performed with greater efficiency, using less memory, and with less degradation in performance of the neural-based codec techniques when neural network weights, activations, and outputs are represented by low-precision integers.
[0042] Figure 1 1 is a block diagram illustrating an example media encoding and decoding system 100 that can perform the techniques of the present disclosure. In the context of the present disclosure, media can include any digital file to be compressed, including video data and / or images. In general, the example techniques of the present disclosure generally involve encoding and decoding (encoding and / or decoding) video data and / or image data. Although the media encoding and decoding will be described with reference to Figure 1 , but the techniques of the present application are equally applicable to encoding and decoding any type of data file using neural-based compression techniques.
[0043] like Figure 1As shown, in this example, system 100 includes source device 102, which provides encoded media data to be decoded and displayed by destination device 116. Specifically, source device 102 provides media data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may include any of a wide range of devices, including desktop computers, notebook computers (i.e., laptop computers), mobile devices, tablet computers, set-top boxes, telephone handsets (e.g., smart phones), televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, broadcast receiver devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication, and thus may be referred to as wireless communication devices.
[0044] exist Figure 1 In the example of , source device 102 includes media source 104, memory 106, media encoder 200, and output interface 108. Destination device 116 includes input interface 122, media decoder 300, memory 120, and display device 118. According to the present disclosure, the media encoder 200 of source device 102 and the media decoder 300 of destination device 116 can be configured to apply techniques for entropy encoding and decoding of neural-based media compression systems. Therefore, source device 102 represents an example of a media encoding device, and destination device 116 represents an example of a media decoding device. In other examples, the source device and the destination device may include other components or arrangements. For example, source device 102 may receive media data from an external media source (e.g., an external camera). Similarly, destination device 116 may interface with an external display device instead of including an integrated display device.
[0045] Figure 1The system 100 shown is only an example. In general, any digital media encoding and / or decoding device can perform the technology for entropy encoding and decoding of a neural-based media compression system. The source device 102 and the destination device 116 are only examples of such codec devices, wherein the source device 102 generates encoded and decoded media data for transmission to the destination device 116. The present disclosure refers to a "codec" device as a device that performs the encoding and decoding (encoding and / or decoding) of data. Therefore, the media encoder 200 and the media decoder 300 represent examples of codec devices, specifically, media encoders and media decoders, respectively. In some examples, the source device 102 and the destination device 116 can operate in a substantially symmetrical manner, so that each of the source device 102 and the destination device 116 includes a media encoding and decoding component. Therefore, the system 100 can support one-way or two-way media transmission between the source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting or video telephony.
[0046] Typically, media source 104 represents a source of media data (i.e., original, uncoded media data), and provides a series of sequential pictures (also referred to as "frames") of media data to media encoder 200, which encodes the data of the pictures. Media source 104 of source device 102 may include a video capture device (e.g., a video camera, a video archive containing previously captured original video, and / or a video feed interface) to receive video from a video content provider. As another alternative, media source 104 may generate computer graphics-based data as source media, or a combination of real-time media, archived media, and computer-generated media. In each case, media encoder 200 encodes captured, pre-captured, or computer-generated media data. Media encoder 200 may rearrange images from the order in which they are received (sometimes referred to as "display order") to a codec order for encoding and decoding. Media encoder 200 may generate a bitstream comprising encoded media data. Source device 102 may then output the encoded media data onto computer-readable medium 110 via output interface 108 for receipt and / or retrieval by, for example, input interface 122 of destination device 116 .
[0047] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memories. In some examples, the memories 106, 120 can store original media data, such as original media from the media source 104, and original, decoded media data from the media decoder 300. Additionally or alternatively, the memories 106, 120 can store software instructions executable by, for example, the media encoder 200 and the media decoder 300, respectively. Although the memories 106 and 120 are shown separately from the media encoder 200 and the media decoder 300 in this example, it should be understood that the media encoder 200 and the media decoder 300 can also include internal memory to achieve functionally similar or equivalent purposes. In addition, the memories 106, 120 can store encoded media data, such as encoded media data output from the media encoder 200 and input to the media decoder 300. In some examples, portions of memory 106, 120 may be allocated as one or more buffers, eg, to store raw, decoded, and / or encoded media data.
[0048] The computer-readable medium 110 may represent any type of medium or device capable of transmitting the encoded media data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium for enabling the source device 102 to send the encoded media data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate a transmission signal including the encoded media data according to a communication standard (e.g., a wireless communication protocol), and the input interface 122 may demodulate the received transmission signal. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include a router, a switch, a base station, or any other device that facilitates communication from the source device 102 to the destination device 116.
[0049] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded media data.
[0050] In some examples, source device 102 may output the encoded media data to file server 114 or another intermediate storage device that may store the encoded media data generated by source device 102. Destination device 116 may access the stored media data from file server 114 via streaming or downloading.
[0051] The file server 114 may be any type of server device capable of storing encoded media data and sending the encoded media data to the destination device 116. The file server 114 may represent a network server (e.g., for a website), a server configured to provide a file transfer protocol service (e.g., File Transfer Protocol (FTP) or File Transfer over Unidirectional Transport Protocol (FLUTE)), a content delivery network (CDN) device, a hypertext transfer protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or enhanced MBMS (eMBMS) server, and / or a network attached storage (NAS) device. The file server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Real-time Streaming (HLS), Real-time Streaming Protocol (RTSP), HTTP Dynamic Streaming, and the like.
[0052] The destination device 116 may access the encoded media data from the file server 114 through any standard data connection including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both suitable for accessing the encoded media data stored on the file server 114. The input interface 122 may be configured to operate according to any one or more of the various protocols discussed above for retrieving or receiving media data from the file server 114 or other such protocols for retrieving media data.
[0053] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired network components (e.g., Ethernet cards), wireless communication components that operate according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data (e.g., encoded media data) according to a cellular communication standard (e.g., 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, etc.). In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to transmit data (e.g., encoded media data) according to other wireless standards (e.g., IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee 5G, etc.). TM ), Bluetooth TM Standards, etc.) to transmit data (e.g., encoded media data). In some examples, source device 102 and / or destination device 116 may include respective system-on-chip (SoC) devices. For example, source device 102 may include an SoC device to perform functions attributed to media encoder 200 and / or output interface 108, and destination device 116 may include an SoC device to perform functions attributed to media decoder 300 and / or input interface 122.
[0054] The techniques of the present disclosure may be applied to media encoding and decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming media transmission, such as Dynamic Adaptive Streaming over HTTP (DASH), digital media encoded onto data storage media, decoding of digital media stored on data storage media, or other applications.
[0055] The input interface 122 of the destination device 116 receives the coded media bitstream from the computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The coded media bitstream may include signaling information defined by the media encoder 200, which is also used by the media decoder 300. The display device 118 displays the decoded pictures of the decoded media data to the user. The display device 118 may represent any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0056] Although not in Figure 1, but in some examples, the media encoder 200 and the media decoder 300 may be integrated with an audio encoder and / or an audio decoder, respectively, and may include appropriate MUX-DEMUX units or other hardware and / or software for processing multiplexed streams including both audio and media in a common data stream.
[0057] The media encoder 200 and the media decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic units, software, hardware, firmware, or any combination thereof. When these techniques are partially implemented in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the techniques of the present disclosure. Each of the media encoder 200 and the media decoder 300 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device. A device including the media encoder 200 and / or the media decoder 300 may include an integrated circuit, a microprocessor, and / or a wireless communication device, such as a cellular phone.
[0058] Neural network-based image and video (e.g., media) compression methods can compete with current standards and offer several additional advantages. In some examples, neural-based codec methods are often designed and tested using high-precision floating-point arithmetic. However, the use of high-precision floating-point operations can affect deployment due to long processing times and high power consumption. As the technology moves toward actual deployment, neural network weights and activation functions are often quantized and represented with low-precision integers to improve speed and power consumption.
[0059] That is, for practical deployment, neural network variables (e.g., weights and activation functions) can be quantized. However, quantization of neural network variables can be problematic.
[0060] This disclosure describes example techniques that can address issues that arise when quantizing neural network variables associated with entropy coding. Neural network variables associated with entropy coding are important for the design of neural-based video / image compression schemes because these variables define the compression efficiency. Furthermore, the very specific properties of the entropy coding variables do not allow for general tools for optimizing neural network quantization. Testing has shown that, in fact, the worst quantization effects may happen to occur exactly for some of the most common use cases, and the losses caused by the worst quantization effects cannot be recovered by retraining the neural network.
[0061] This disclosure describes techniques that further optimize the definition of entropy codec variables to best preserve the information most important for effective entropy codecs. Tests also show how to use the techniques described herein to minimize the amount of memory required for entropy codecs. This disclosure describes a general approach for entropy codec design, as well as specific solutions and implementations for commonly used Gaussian distributions.
[0062] As will be explained in more detail below, the media encoder 200 and the media decoder 300 can be configured to: determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are based on a distribution of the data stream optimized for quantization; determine a code vector based on the probability distribution function parameters; and entropy encode and decode the data element using the code vector. The function can be determined empirically (e.g., logarithmically) or by using an algorithm that estimates codec redundancy or a solution of an ordinary differential equation.
[0063] Entropy coding is a fundamental part of media compression systems. The entropy coding and decoding process is responsible for optimizing the conversion between media information and the compressed data bitstream, aiming to obtain the most compact representation possible. Unlike other elements of media compression, entropy coding and decoding is a lossless process, i.e., it fully preserves the information.
[0064] A variety of techniques have been developed to achieve efficient entropy coding and decoding in image and video compression standards. Recently, it has been shown that new compression methods based on deep learning and neural networks are approaching the performance of traditional methods while offering several other practical advantages.
[0065] Since traditional codecs and neural-based codecs use drastically different forms of compression, traditional codecs and neural-based codecs use entropy coding in drastically different ways. Figure 2 A summary of the main differences is shown, from which it can be seen that even though both approaches use the same codec method, such as arithmetic codec, all other aspects are different. This means that it is beneficial to develop new techniques to optimize the performance of neural-based codecs.
[0066] like Figure 2As shown, the design phase of both conventional codec technology and neural-based codec technology includes a data organization process 201 and a statistical data modeling process 202. For conventional media codec technology, such as H.265, the data organization process 201 includes the definition of codec elements (e.g., syntax elements and codec modes). For neural-based codec processes, the data organization process 201 includes the training and development of image / video (e.g., media) autoencoder networks. For the statistical data modeling process 202, conventional codec technology includes context-defined codecs, for example, for entropy codec processes, such as context-adaptive binary arithmetic codecs. For neural-based codec processes, the statistical data modeling process 202 includes the development and training of hyper-prior neural networks.
[0067] Both conventional coding and decoding techniques and neural-based coding and decoding techniques include an implementation phase, which includes a probability determination process 204 and a conversion of information to bits process 206. Both the probability determination process 204 and the conversion of information to bits process 206 are based on the data to be coded. For conventional coding, the probability determination process 204 (e.g., a bit rate allocation process) includes adaptive context probability estimation. For neural-based coding, the probability determination process 204 includes determination of probability distribution parameters, which will be described in more detail below. Both conventional coding and decoding techniques and neural-based coding and decoding techniques use arithmetic and / or entropy codecs (e.g., arithmetic or entropy encoders or decoders) to convert information into bits process 206. The arithmetic codec can be a Huffman, range, or asymmetric digital system (ANS) codec.
[0068] The data stream management stage is the management of the compressed data 208. In some example conventional codec systems, the compressed data is in the form of a single bit stream. Some example neural-based coding systems use multiple streams for concurrent coding and decoding.
[0069] The main entropy coding and decoding principle, derived from basic information theory principles, is: the optimal number of bits N allocated for encoding and decoding a data symbol is b for:
[0070]
[0071] in, is the estimated probability of the value of the symbol to be encoded, where the encoder and decoder (e.g., media encoder 200 and media decoder 300) share This optimal number of average bits is a small number, but it can actually be implemented efficiently in practice using arithmetic coding.
[0072] Symbol probabilities can vary widely and frequently, depending on the specific part of the media content. Therefore, one of the most important tasks in traditional media compression is to efficiently estimate those data symbol probabilities and how to accurately update the data symbol probabilities when they change during the encoding and decoding process. Since this probability estimation is done sequentially, it is difficult to parallelize entropy encoding and decoding on traditional video codec methods.
[0073] The compression methods proposed for neural-based codecs are designed to work under the following assumption: the data to be compressed is assumed to have a probability density function (PDF) of some kind, and only the parameters defining this function can vary. For example, the PDF can be chosen so that all variables have independent zero-mean Gaussian distributions, each with a different standard deviation σ. This may not just be an empirical assumption, as the network "learns" to make it true. The PDF is often, but not always, Gaussian, such as Figure 3 as shown in the example. Figure 3 An example of a Gaussian continuous PDF 302 of quantized values and corresponding probabilities (p0, p1, ..., p8) commonly used in neural-based codecs is shown. Multiple values corresponding to rare underflow and overflow conditions are often suboptimally encoded and decoded using methods that do not require probability estimation.
[0074] Typically, the standard deviation parameter σ is a scaling factor of the "template" distribution. For example, a Gaussian or Laplace with zero mean and unit variance is a template, and there is a scaling parameter to "stretch" or "shrink" the template. The standard deviation is often used because it is convenient, but it can be any factor. The present disclosure defines the following techniques, which change from parameters or scaling factors that are convenient for human use (e.g., traditionally used by statisticians) to parameters or scaling factors that are optimized for entropy encoding and decoding using low-precision parameter representations.
[0075] In some examples, a separate neural network (e.g., separate from the neural network that performs media compression) is trained to determine the parameters of the distribution. The details of this training are described below. Prior to entropy encoding and decoding, these variables are discretized using a fixed quantization scheme, and the probabilities of the discrete values (in Figure 3 In the example of , p0, p1, ..., p8) are derived from the assumed distribution and are subsequently used to determine the number of sign bits according to formula (1).
[0076] Unlike conventional coding methods that typically require estimating the probabilities of all possible values for each data symbol, neural-based methods can rely only on parameters of the PDF (e.g., standard deviation σ), which are computed in parallel using neural networks, making parallel entropy coding easier to implement without compression losses. Since the entropy coding is defined by the values of these PDF parameters, compression performance is severely degraded when the PDF parameters are represented with low integer precision. The present disclosure describes new techniques for minimizing those compression losses.
[0077] An important class of methods proposed for neural-based image and video compression employs a variational autoencoder architecture, where latent variables are quantized and entropy encoded using a fixed learned distribution. In some examples, this architecture has been extended by adding a smaller neural network called a super-prior, which uses variables generated from the autoencoder to define a probability distribution for entropy encoding these autoencoder variables. The super-prior network also uses quantization and entropy encoding, but has predefined (e.g., learned) PDF parameters. Figure 4 Figure 1 is a diagram of a neural image codec using a variational autoencoder and a hyperprior network for entropy encoding and decoding.
[0078] Figure 4 The process shown, in which the neural network for image analysis and synthesis implements a variational autoencoder, and the entropy encoding and decoding of its variables are defined by a hyper-prior decoder network (used at both the transmitter and the receiver). Because encoder and decoder (e.g., media encoder 200 and media decoder 300) have been used to refer to the autoencoder portion, in the neural network literature, the systems traditionally referred to by these names are usually referred to as transmitter and receiver, respectively.
[0079] exist Figure 4 , the media encoder 200 may include an image analysis neural network 402, a super a priori encoder neural network 404, a quantization process 406, an entropy encoding process 408, a quantization process 416, and an entropy encoding process 418. The media encoder 200 may also include an entropy decoding process 412, a super a priori decoder neural network 424, an entropy decoding process 422, and an image synthesis neural network 426 (which may be similar to the reconstruction loop in the hybrid video codec). Although not shown, the media decoder 300 may include a structure similar to the entropy decoding process 412, the super a priori decoder neural network 424, the entropy decoding process 422, and the image synthesis neural network 426.
[0080] The image analysis neural network 402 is a neural network configured to encode and / or compress the input image 400. The compressed data stream created by the image analysis neural network 402 is then processed by the super a priori encoder neural network 404. The output of the super a priori encoder neural network 404 is then quantized by a quantization process 406 and entropy encoded by an entropy encoding process 408 to create a bitstream 1 410. The super a priori encoder neural network 404 is part of a process configured to determine parameters (e.g., standard deviation) of the PDF for the data stream created by the image analysis neural network 402. The parameters of the PDF can then be used to entropy encode the data stream from the image analysis neural network 402.
[0081] The entropy encoding process 408 itself uses PDF parameters learned from multiple images to be encoded (e.g., learned parameters 414). The entropy decoding process 412 uses the same PDF parameters to entropy decode the bitstream 1 410. The entropy decoded bitstream is then processed by the super-prior decoder neural network 424 to generate PDF parameters for the specific image being decoded (e.g., input image 400).
[0082] The PDF parameters generated by the super-a priori decoder neural network 424 are then used by the entropy encoding process 418 to encode the data stream produced by the image analysis neural network 402 after quantization by the quantization process 416. The entropy encoding process 418 creates a bitstream 2 420. The bitstream 2 420 is then entropy decoded by the entropy decoding process 422 using the same PDF parameters from the super-a priori decoder neural network 424. After entropy decoding, the decoded data is processed by the image synthesis neural network 426 to produce an output image 428.
[0083] Figure 5 A more detailed diagram of the encoding and decoding process for a single data element represented by x is provided. Specifically, Figure 5 An implementation of entropy coding using arithmetic coding is shown, where x is the data to be encoded and a PDF parameter vector σ known to the transmitter and receiver (e.g., media encoder 200 and media decoder 3) contains the parameters defining the PDF of x. More specifically, the vector σ is the standard deviation (e.g., of a normal Gaussian distribution), and more generally, it is a parameter determined by a hyper-prior network for determining the PDF for entropy coding.
[0084] In the context of the present disclosure, a data element (x) may include an input to a neural network (e.g., Figure 4 The image synthesis neural network 426 input), the output of the neural network (e.g., Figure 4The output of the image analysis neural network 402), syntax elements, or other encoded data of the coded media bitstream. Some example types of data that can be encoded in a neural-based image / video codec to generate a data element x (or more generally, a data element that will be entropy encoded and decoded using the techniques of the present disclosure) may include RGB or YUV pixel values in an image or video frame, pixel value residuals in motion-compensated video (pixel values minus predictions from motion), motion vectors for block-based motion compensation, and / or dense optical flow data for warp-based motion compensation. In other examples, the data element x may include data representing weights, activation functions, or other data used by neural-based media compression techniques.
[0085] During the training phase, the data is not encoded, but the bit rate calculation process 500 uses the data element x and the PDF parameter σ to estimate the number of bits N used by the arithmetic coding process. b The vector σ represents the parameters defining the PDF of the data element x, which are known by the transmitter and the receiver (e.g., the media encoder 200 and the media decoder 300). The PDF parameters σ may be calculated by the super-prior decoder network, or may be read from a learned predefined parameter table. As an example, the code vector calculation process 502 may calculate the code vector c(σ) for a particular data element x according to its corresponding PDF parameters σ.
[0086] Quantization process (Q x->q ) 504 quantizes the data element x to create a quantized data element q. The arithmetic encoder 506 then arithmetically encodes and decodes the quantized data element q using the code vector c(σ) to create a bitstream B. The arithmetic decoder 508 recovers the quantized data element q by performing arithmetic decoding using the same code vector c(σ). Dequantization process 510 performs dequantization of the quantized data element q to recover the decoded data element The decoded data elements can then be decoded using neural-based decoding techniques. Decoding is performed to reconstruct the original media (eg, picture or video).
[0087] Note that the techniques of the present disclosure are applicable to all compression methods involving neural networks that generate probability distribution parameters for entropy encoding and decoding, and also to entropy encoding and decoding parameter tables stored as low-precision integers. Although the following sections often use examples where σ represents the standard deviation of a Gaussian PDF, the general techniques of the present disclosure are applicable to all cases where the PDF is defined by the parameter σ.
[0088] The PDF can be defined by more than one parameter, but not all parameters are directly usable for entropy coding. For example, the PDF can be defined by a standard deviation σ and a mean μ, but only the standard deviation determines the entropy coding properties. Since having only one parameter is the most common in practice, it is the assumption used in the next section, and the techniques described below can be easily generalized.
[0089] like Figure 5 As shown, a block called code vector calculation process 502 defines how to use the PDF to create a code vector c(σ), which is information used by the arithmetic coding and decoding process to create the bit stream B. For example, the code vector can be a vector having the same value as that obtained by quantization (in Figure 3 The code vector c(σ) is a vector of cumulative distribution functions (CDFs) corresponding to the probability mass functions (PMFs) defined for the symbols after p0, p1, ..., p8 in . In another example, if a technique called binarization is used, the code vector c(σ) contains the binary decision probabilities for encoding and decoding the same data. In practice, the CDF and the probabilities are scaled so that the elements of the vector c are represented as integers.
[0090] Figure 5 The system shown in shows how entropy encoding and decoding was used when neural-based codecs were first designed, trained, and tested using very precise floating-point arithmetic and powerful processors. However, in actual implementations, neural network values are often represented with low-precision integers to enable faster computation and less power consumption. This is shown in Figure 6 The modified system of FIG. 1 is shown in which an additional quantization block is added to indicate that the parameter σ is converted to a low-precision version. For example represented as a single 8-bit integer (byte).
[0091] Figure 6 Shows Figure 5 A practical implementation of the system in which the PDF parameters σ are quantized and expressed as low-precision integers , and the vectors required for arithmetic decoding are precomputed and stored in an array with C elements. Figure 5 Similar to the example of , the data is not encoded during the training phase, but the bit rate calculation process 600 uses the data element x and the PDF parameter σ to estimate the number of bits N used by the arithmetic coding process b .exist Figure 6 In the example, the quantization process 602 quantizes the PDF parameter σ to create a quantized PDF parameter The code array process 603 then extracts the quantized PDF parameters Generating code vector That is, the quantized PDF parameters For determining one of the available C elements (eg, code vector) may be determined by the code array process 603 .
[0092] Quantization process (Q x->q ) 604 quantizes the data element x to create a quantized data element q. The arithmetic encoder 606 then uses the code vector The quantized data elements q are arithmetically encoded and decoded to create a bit stream B. The arithmetic decoder 608 decodes the quantized data elements q by using the same code vector Arithmetic decoding is performed to recover the quantized data element q. Dequantization process 610 performs dequantization of the quantized data element q to recover the decoded data element The decoded data elements can then be decoded using neural-based decoding techniques. Decoding is performed to reconstruct the original media (eg, picture or video).
[0093] Note Figure 6 In , the quantization of x is different from the quantization of the PDF parameter σ. Floating point parameters can be suitable for complex neural networks, but are not feasible for widespread use in small devices such as mobile devices. The power consumption in such mobile devices may be too high for practical implementation. Therefore, the PDF parameter σ is quantized to integers to achieve lower power consumption and more practical applications. In one example, the PDF parameter is a 1-byte integer (e.g., 256 possible values). This quantization results in higher power efficiency.
[0094] Another motivation for the actual modification lies in the fact that the code vector is recomputed for each value of x is usually computationally expensive. For example, if x has a Gaussian distribution with standard deviation σ (e.g., the typical case), then the PMF of the quantized values is defined as:
[0095]
[0096] The error function (erf) is:
[0097]
[0098] The entropy (H) of this PMF (in bits) is:
[0099]
[0100] Note that in addition to computing the probabilities, additional tasks may be performed to create the vector c with the correct integer cumulative sums or binary probabilities, increasing the computational cost. In a practical implementation, this can be done by specifying the parameters Precompute the code vector for different quantization values of And store these vectors in an array (e.g., in memory) to avoid these calculations. Figure 6 As shown, the transmitter and the receiver (eg, the media encoder 200 and the media decoder 300) have the same code vector array, which is based on the parameters selected and used for arithmetic coding and decoding.
[0101] For example, given the following definition:
[0102]
[0103] in (floor function) is the largest integer less than or equal to σ, then x can be calculated using the pre-computed code vector Perform entropy encoding and decoding.
[0104] The loss due to having a finite number of code vectors can be measured using a code redundancy function, which is the average number of extra bits required to encode x using a code vector c(r) instead of the optimal code vector c(σ).
[0105] The code redundancy function is defined by the Kullback–Leibler divergence metric as follows:
[0106]
[0107] Entropy codecs are usually not designed to minimize average redundancy, because media codecs operate over a wide range of bitrates. Typically, the average value is not known a priori. Instead, entropy codecs are designed by limiting the relative redundancy, as follows:
[0108]
[0109] Designing entropy coding methods that strictly limit the relative redundancy ensures that all averages are also limited. In other words, using this approach, the average compression loss may not be minimal, but it ensures that the average compression loss is small while the relative loss is always small.
[0110] Figure 7 An example of those redundancy measures for a Gaussian distribution when the code vector is calculated using the following formula is shown:
[0111]
[0112] Figure 7An example of an absolute measure (curve 700, right Y axis) and a relative measure (curve 702, left Y axis) of redundancy associated with using a quantized PDF parameter and an integer number of code vectors is shown. The loss is codec efficiency. Essentially more bits are used than necessary. Quantizing the sigma value results in uncertainty about the actual value of the floating point sigma.
[0113] We can assume that the values with PDF parameter σ are entropy encoded and decoded using code vectors c(1.5), c(2.5), and c(3.5) in the intervals [1,2), [2,3), and [3,4), respectively. We can observe that the redundancy is zero when σ = r and positive otherwise. Note that in Figure 7 In the example, the maximum redundancy in the interval [1,2) is greater than the maximum redundancy in other intervals.
[0114] Tests have shown that the maximum redundancy in an interval depends on the width of the interval and the values in the interval. This means that using a non-uniform distribution of code vectors can achieve better results.
[0115] Figure 8 An example of a non-uniform distribution of code vectors c(σ) is shown, which is designed to obtain the same maximum relative redundancy in all intervals. If the values with PDF parameter σ are entropy encoded and decoded using code vectors c(1.24), c(1.93) and c(3.14) in the intervals [1,1.52), [1.52,2.41) and [2.41,4) respectively, then we can obtain Figure 8 Relative redundancy plot in . It can be observed that for these values, the maximum relative redundancy is the same in the three intervals.
[0116] Note that the above reference Figure 8 The described techniques are related to the code vector assignment, not to the quantization of the PDF parameter σ. For example, if σ is directly quantized to integer values, then Figure 8 The score interval thresholds shown in .
[0117] Given the definition, we need to use the same code vector c(r * (σ a ,σ b )) The range of σ values for entropy coding and decoding is [σ a ,σ b ), the media codec (e.g., media encoder 200 and media decoder 300) can minimize the maximum relative redundancy within the interval if the following formula is used:
[0118] r * (σ a ,σ b )={r:L(σ a|r)=L(σ b |r)}. (9)
[0119] By using the above design criteria for code vectors, it is possible to Figure 8 The interval [σ a ,σ b ) has a parabolic shape, when σ = r * (σ a ,σ b ). Under these conditions, and assuming that σ is conditionally uniformly distributed in the interval, the average redundancy can be well approximated by:
[0120]
[0121] The average value is Figure 8 In the example shown as dashed line 800. Figure 8 It is shown that when several intervals have the same maximum redundancy according to formula (9), these intervals also have approximately the same average redundancy.
[0122] Identification Figure 6 One problem with the illustrated implementation is the fact that the codec designer can choose a PDF type and the parameters for its definition. However, it is the actual application of the design that defines the relative frequencies of the parameter values, since the relative frequencies of these parameter values are defined by the network training. For example, Fig. 9 A graph 900 showing the relative frequency of Gaussian standard deviation values from a neural-based image codec is shown. Fig. 9 As shown, for low bit rates (most commonly used in practice), the σ values peak at the minimum allowed value, σ = 0.1, and are almost all less than σ = 10. On the other hand, for larger bit rates, larger σ values are more common. This disclosure assumes that, in order to cover a wide range of reproduction qualities, the standard deviation is within the range [0.1, 1,000].
[0123] The PDF parameters σ define the bit rates used by the codec, which are measured using the entropy function defined in equation (4). Fig.10 A graph 1000 is shown which illustrates how the entropy of the quantized values varies with the parameter σ over a range of standard deviations that are expected to be supported. More specifically, Fig.10 The entropy (in bits) of a quantized random variable with a Gaussian distribution is shown as a function of the standard deviation σ.
[0124] If a media encoder (e.g., media encoder 200 or media decoder 300) is configured to quantize σ in the range of [0.1, 1,000] to 256 values (fitting into a single byte), and equation (9) is used to quantize σ given by Create a code vector for each of the 256 intervals defined, and the media codec will obtain Fig.11 The average relative redundancy is shown in . Fig.11 A graph 1100 illustrating the average relative redundancy (compression loss) caused by uniform quantization using Gaussian standard deviation σ and C=256 code vectors is shown.
[0125] for Fig.10 and Fig.11 The following issues can be observed:
[0126] 1. The entropy function has very high derivatives at small values of σ (the most commonly used range), complicating learning convergence during training.
[0127] 2. Because entropy is highly nonlinear near the origin, it is difficult to reproduce using a quantized neural network.
[0128] 3. When When the precision is low, it is impossible to separate the important differences for small σ values, which leads to Fig.11 A very high relative redundancy is shown near the central origin.
[0129] 4. The range of σ corresponds to the value required in practice, but if Fig. 9 As shown, most of this range is rarely used. In the example shown, the small range of σ values is the most used and is where the quantization problem is most severe.
[0130] In short, using the standard deviation as the value for defining the entropy codec works well for high precision floating point implementations, but may not be beneficial for quantized neural networks used in practical implementations.
[0131] Similar problems arise for other types of probability distributions whenever a codec designer chooses certain PDF parameters, because the PDF parameters have familiar and intuitive meanings. High-precision neural networks can "learn" how to use these parameters optimally through extensive training, but quantized networks may not. Using non-uniform quantization (e.g., Figure 8 ) may not be able to solve these problems directly, because in practical implementations, the allocation of code vectors is done using quantized parameters carried out.
[0132] The actual question posed above is how the PDF parameter σ shapes the entropy function and how it is converted to a low-precision integer representation (in Figure 6 Q σThe source of these problems can be difficult to identify by directly analyzing how equation (4) defines the entropy of the quantized values, since it is an infinite sum of terms without a clear intuitive interpretation. More insight can be gained by considering simpler approximations. For a Gaussian distribution and large values of σ, the entropy can be approximated by the following formula:
[0133]
[0134] For smaller values of σ, the entropy can be approximated by the following formula:
[0135]
[0136] Fig.12 It is shown that when a logarithmic scale is used for the parameter σ, Fig.10 Entropy graph 1200 of σ and the approximation defined above. In both cases, fast asymptotic convergence can be observed, as well as very good matches over a suitable range of σ and in the intermediate range where the two approximations are almost the same.
[0137] from Fig.12 , it is easier to recognize that the logarithm of σ provides a more direct relationship with entropy and may therefore be a better parameter for defining the PDF. One remaining aspect to consider is that, Fig. 9 As shown, small values of σ are expected to be the most common, and such small values of σ correspond to very small entropy.
[0138] like Fig.13 As shown, using a logarithmic scale for entropy and standard deviation shows that how the entropy function changes at low values of σ can also be useful to consider. Since the media encoder 200 or the media decoder 300 may encounter a large number of values with very low entropy, even very small absolute errors may produce large relative redundancy and large compression losses. Fig.13 A graph 1300 illustrating entropy and its approximation from equations (11) and (12) plotted on a logarithmic scale is shown.
[0139] Although quantization errors are unavoidable, the techniques of the present disclosure are based on the fact that compression losses can be reduced by replacing the variables to be quantized, taking into account how the quantization errors affect the relative redundancy.
[0140] An example technique is Fig.14 As shown, a new variable named v is defined to parameterize the PDF. In general, the PDF parameter v can be determined using a nonlinear function (e.g., a logarithmic function) of the PDF parameter σ. The transfer function between σ and v is defined as:
[0141] σ=T v→σ (v). (13)
[0142] Fig.14 shows the Figure 6 modifications to the actual codec to enable new design variables optimized for entropy coding and decoding, as well as tables for more efficient code vector allocation. As Fig.14 shown, this function allows the codec designer to continue using the PDF parameter σ during training and assumes that the function is differentiable almost everywhere to maintain automatic gradient backpropagation.
[0143] For simplicity of presentation, the following convention is adopted:
[0144]
[0145] Equation (14) specifies that the range of σ is from a minimum value (σ min ) to a maximum value (σ max ). The range of the new parameter v is from 0 to 1. The transfer function T v→σ when v = 0 is equal to σ min . The transfer function T v→σ when v = 1 is equal to σ max . Quantization of the new parameter v (e.g., Q v→n (v)) produces integers from 0 to N - 1. Additionally, it is defined that if v0 < v1, then T v→σ (v0) < T v→σ (v1).
[0146] In Fig.14 , the data is not encoded during the training phase. Since the encoding and decoding phase is configured to use the new PDF parameter, the training phase includes a conversion (T v→σ ) process 1400 to convert the PDF parameter v back to the PDF parameter σ (e.g., the standard deviation of the PDF). The bit rate calculation process 1401 uses the data element x and the PDF parameter σ to estimate the number of bits N b used by the arithmetic coding and decoding process.
[0147] In Fig.14 's example, the quantization process (Q v→n ) 1402 quantizes the PDF parameter v to create a quantized PDF parameter n. The code selection process 1412 then converts the quantized PDF parameter n to a code vector index i. The code vector index i can be an input to the code array process 1414. That is, the code vector index i can be an index of a lookup table of code vectors. The code array process 1414 then determines the code vector c(r * i ) based on the code vector index i. The code vector c(r * i ) is used for arithmetic coding and decoding of the data element x.
[0148] Quantization process (Q x->q ) 1404 quantizes the data element x to create a quantized data element q. The arithmetic encoder 1406 then uses the code vector c(r * i ) performs arithmetic encoding and decoding on the quantized data element q to create a bit stream B. The arithmetic decoder 1408 ... * i ) performs arithmetic decoding to recover the quantized data element q. Dequantization process 1410 performs dequantization of the quantized data element q to recover the decoded data element The decoded data elements can then be decoded using neural-based decoding techniques. Decoding is performed to reconstruct the original media (eg, picture or video).
[0149] Generally, in one example of the present disclosure, the media encoder 200 and the media decoder 300 may be configured to determine a probability distribution function parameter (e.g., v) for a data element (x) of a data stream encoded by a neural-based media compression technique. The probability distribution function parameter (v) may be determined based on a logarithmic function (e.g., a natural logarithm (ln)) of a standard deviation (σ) of the probability distribution function of the data stream. The media encoder 200 and the media decoder 300 may also be configured to determine a code vector (c(r)) based on the probability distribution function parameter (v). * i )), and the code vector (c(r * i )) to perform arithmetic encoding and decoding on the data element (x).
[0150] like Fig.14 As shown, in one example, the media encoder 200 and the media decoder 300 may be configured to quantize the probability distribution function parameter v before determining the code vector. In one example, to determine the code vector, the media encoder 200 and the media decoder 300 may be configured to determine the code vector index i based on the probability distribution function parameter v, and determine the code vector from the code vector table based on the code vector index. More information about the code vector table will be described below.
[0151] From the encoder side, the media encoder 200 can be configured to generate data elements x using a neural-based compression technique, and can quantize the data elements to create quantized data elements. In this example, arithmetically encoding and decoding the data elements using the code vectors includes arithmetically encoding the quantized data elements using the code vectors. In addition, in this example, for example, Figure 4As shown, the media encoder 200 may be configured to process an image or video picture using an image analysis neural network to generate a data element.
[0152] From the decoder side, the media decoder 300 can decode the encoded data elements using the code vectors to create quantized data elements. The media decoder 300 can also dequantize the quantized data elements to create reconstructed data elements. The media decoder 300 can then process the reconstructed data elements using an image synthesis neural network to reconstruct an image or video picture.
[0153] The next aspect to consider is that the performance of entropy coding and decoding is measured by the relative redundancy measure defined in equations (7) and (10). An example of a practical application of this approach is presented below.
[0154] Logarithmic transformation
[0155] Most commonly, neural-based codecs are configured to use the assumption that The operation is performed, that is, the variable to be encoded has a zero-mean Gaussian (or normal) distribution. Although some example hyper-prior networks use some learned PDF, recent work has shown that there is improvement when the learned PDF is replaced with a Gaussian PDF and learned parameters.
[0156] Using this fact, and in Fig.12 and Fig.13 The logarithm of the observed standard deviation provides a more precise parameterization of the PDF, and the variable transfer function can be defined as:
[0157] σ=Y v→σ =exp(v ln(σ max )+(1-v)ln(σ min )), (15)
[0158] And its inverse is:
[0159]
[0160] The function ln() is the natural logarithm. When N=256 is used to quantize this new parameter v, and the corresponding C=256 code vector is optimized according to formula (9), we obtain Fig.15 The average relative redundancy is shown. Fig.15 A graph 1500 is shown illustrating the average relative redundancy (compression loss) caused by using uniform quantization with a PDF parameter v of N=256 and C=256 code vectors. Fig.15 It is shown that the PDF parameter v is a more suitable parameter for defining the Gaussian PDF, since the relative redundancy is always below 1%.
[0161] The conversion formulas (15) and (16) shown above use only exponential and logarithmic functions, which are continuous and have derivatives that are easy to calculate during design and training.
[0162] Table for selecting code vectors
[0163] Another aspect to consider is that since the code vectors are constantly accessed during entropy encoding and decoding, in order to maintain high data throughput, it is better to store the code vectors in more expensive fast memory. Therefore, reducing the number of code vectors can save memory requirements and costs.
[0164] After the PDF parameter v is quantized, use Fig.16 The code selection tables 1600 shown in FIG. 1 can achieve savings in memory requirements and cost. These are simple tables with N elements to achieve non-uniform distribution of code vectors, with Figure 8 The example of is similar to , but instead of defining the transformation based on the PDF parameters σ using floating point values, these tables are directly applied to integer values n, which are obtained after quantization of the PDF parameters v.
[0165] The advantage is that this process is an integer-to-integer conversion, which can be done very efficiently with a simple table lookup implementation. Fig.16 An example of such a table 1600 is shown, which defines the number of code vectors that should be used for entropy encoding and decoding for each of the 256 possible values of n. Fig.16 In the example of , the total table memory is 256 bytes. The media encoder 200 and the media decoder 300 can use Fig.16 Table 1600 in FIG. 1 is used to convert PDF parameter v (quantized by value n and N=256) into code vector index i. Table 16 is designed to better ensure that the maximum redundancy is less than 1%, such as Fig.17 As shown, the number of code vectors can be reduced from 256 to 43. Fig.17 A graph 1700 is shown showing relative redundancy as a function of standard deviation.
[0166] Another way to limit memory usage is to reduce the range of standard deviation values. For example, the following PDF parameters can be used to implement a neural-based approach:
[0167]
[0168] It corresponds to the following conversion formula:
[0169] The multiplication by 32 can be achieved by shifting.
[0170] Fig.18A code vector selection table 1800 designed for the above transformation is shown, which reduces the number of code vectors to 25.
[0171] Fig.14 The modified entropy coding scheme and the PDF parameter transformation of formula (16) effectively reduce the degradation caused by the quantization of PDF parameters. In fact, the above technique can be used to Fig.11 The unacceptable redundancy values shown in Fig.15 Useful redundancy values are shown in .
[0172] However, it can also be observed Fig.15 The redundancy value in is large for smaller values of σ (the most common and important values of σ) and is not necessarily small for less important larger values of σ.
[0173] If it is desired to use a number C of code vectors equal to the number N of quantization intervals, then we obtain Fig.19 Redundancy curve 1900 is shown. Fig.19 The relative redundancy caused by quantization of the PDF parameter v defined by equation (16) is shown, dividing the interval [0, 1] into N intervals of equal size (uniform quantization) and using C = N code vectors. Fig.19 The redundancy curves 1900 in happen to be almost parallel (to be explained in more detail below), which also means that smaller values of σ have the worst-case relative redundancy and become rapidly higher when C=N decreases.
[0174] The above code vector selection method can alleviate this problem, but may have the following limitations:
[0175] 1) Since the relative redundancy for small values of σ corresponds to the worst case, the number N of quantization intervals is relatively large.
[0176] 2) Memory reduction can be achieved by making the number of code vectors C smaller than N, which can be solved using adding a table lookup stage as described above.
[0177] 3) The optimal table and code vector depend on both N and C, and can be recalculated when these parameters change.
[0178] The variable conversion problem defined by equation (16) results from the fact that the parameters were chosen for simplicity and convenience and provide simplicity and convenience. The present disclosure shows that using the theory presented above, conversion functions can be defined that provide even better control over relative redundancy.
[0179] The present disclosure defines another PDF parameter u to represent a new parameter that defines the entropy encoding and decoding PDF. Typically, the PDF parameter u is a parameterization of a distribution (e.g., a distribution of code vectors) that has been optimized for quantization. Or more generally, the parameter u is optimized to provide a lower relative redundancy (e.g., loss) compared to other parameters. To simplify notation, the present disclosure uses the following two functions to define the parameter conversion process:
[0180] σ=T u→σ (u) = T λ→σ (T u→λ (u)), (19)
[0181] in,
[0182] T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), (20)
[0183] This is similar to the above transformation (15).
[0184] Assume that formulas (19) and (20) satisfy the following conventions:
[0185]
[0186] Formula (21) specifies that: σ ranges from the minimum value (σ min ) to the maximum value (σ max ). The new parameter u ranges from 0 to 1. The transition function T when λ is 0 λ→σ Equal to σ min The conversion function T when the λ value is 1 λ→σ Equal to σ max The conversion function T when u value is 0 u→λ Equal to 0. The conversion function T when u value is 1 u→λ is equal to 1. The quantization of the new parameter u (e.g., Q u→n (u)) generates integers in the range from 0 to N-1.
[0187] Figure 8 The example in shows that one can design an interval [σ a ,σ b ] and obtain the same maximum relative redundancy in all subintervals using the code vector optimization of formula (9). As mentioned above, this approach may not be practical when the parameter σ is quantized, but the technology of the present disclosure utilizes the fact that non-uniform partitioning can be used when the parameter u is quantized.
[0188] Fig. 20 It shows that the PDF parameter interval [σmin ,σ max ] is a graphical representation 2000 of the process of obtaining the same maximum relative redundancy in N intervals. This can be done using the following algorithm.
[0189] Algorithm 1
[0190] 1. Given N and [σ min ,σ max ], select the initial maximum redundancy ∈; to initialize t0 = σ min
[0191] 2. For n = 1, 2, ..., N:
[0192] a. Find Make
[0193] b. Find t n Make
[0194] 3. If t N ≈σ max Stop
[0195] 4. If t N <σ max , then increase ∈, otherwise decrease ∈, and use a one-dimensional search method (such as binary search).
[0196] 5. Go to step 2.
[0197] like Fig. 20 As shown in the lower part, the sequence You can provide T for the function u→σ (u) provides N values, and intermediate values can be calculated by interpolating these values. Since the N quantization intervals are selected to have the same maximum relative redundancy, the media encoder 200 and the media decoder 300 can be configured to use the same number of code vectors, that is, C=N, so that no code selection table is required, and it can be achieved Fig.21 A simplified codec implementation is shown in .
[0198] exist Fig.21 In the training phase, the data is not encoded. Because the encoding and decoding phase is configured to use the new PDF parameters u, the training phase includes the transformation (T u→σ ) process 2100 is used to convert the PDF parameter u back to the PDF parameter σ (eg, the standard deviation of the PDF). The bit rate calculation process 2101 uses the data element x and the PDF parameter σ to estimate the number of bits N used by the arithmetic coding process b .
[0199] exist Fig.21In the example, the quantization process (Q u→n ) 2102 quantizes the PDF parameter u to create a quantized PDF parameter n. The code array process 2112 then converts the quantized PDF parameter n into a code array c (r * n )(also called code vector c(r * n )).and Fig.14 The technology is different. Fig.21 The technique does not use a lookup table to determine the code vector. The code vector c(r * n ) is used to perform arithmetic encoding and decoding on the data element x.
[0200] Quantization process (Q x->q ) 2104 quantizes the data element x to create a quantized data element q. The arithmetic encoder 2106 then uses the code vector c(r * n ) performs arithmetic encoding and decoding on the quantized data element q to create a bit stream B. The arithmetic decoder 2108 ... * n ) performs arithmetic decoding to recover the quantized data element q. Dequantization process 2110 Perform dequantization of the quantized data element q to recover the decoded data element The decoded data elements can then be decoded using neural-based decoding techniques. Decoding is performed to reconstruct the original media (eg, picture or video).
[0201] Generally, in one example of the present disclosure, the media encoder 200 and the media decoder 300 may be configured to determine probability distribution function parameters (e.g., u) for data elements (x) of a data stream encoded by a neural-based media compression technique. The probability distribution function parameters (u) may be based on a distribution optimized for quantization. The distribution function parameters (u) may be defined according to an algorithm for measuring codec redundancy or determined by solving ordinary differential equations. The media encoder 200 and the media decoder 300 may also be configured to determine a code vector (c(r)) based on the probability distribution function parameters (u). * n )), and the code vector (c(r * n )) to perform arithmetic encoding and decoding on the data element (x).
[0202] like Fig.21As shown, in one example, the media encoder 200 and the media decoder 300 may be configured to quantize the probability distribution function parameter u before determining the code vector. In one example, in order to determine the code vector, the media encoder 200 and the media decoder 300 may be configured to determine the code vector (c(r)) based on the quantized probability distribution function parameter u(n) * n )).
[0203] From the encoder side, the media encoder 200 can be configured to generate data elements x using a neural-based compression technique, and can quantize the data elements to create quantized data elements. In this example, arithmetically encoding and decoding the data elements using the code vectors includes arithmetically encoding the quantized data elements using the code vectors. In addition, in this example, for example, Figure 4 As shown, the media encoder 200 may be configured to process an image or video picture using an image analysis neural network to generate a data element.
[0204] From the decoder side, the media decoder 300 can decode the encoded data elements using the code vectors to create quantized data elements. The media decoder 300 can also dequantize the quantized data elements to create reconstructed data elements. The media decoder 300 can then process the reconstructed data elements using an image synthesis neural network to reconstruct an image or video picture.
[0205] One possible caveat to the above technique is that the conversion function T u→σ (u) depends theoretically on the number of quantization intervals N, and significant differences mean that the hyper-prior neural network needs to be trained specifically for this value.
[0206] However, the function T calculated for different values of N u→σ (u) produces the same graph 2200, such as Fig. 22 In fact, Fig.23 As shown, the function calculated for several values of N is much better than the function for very large N. The difference between them is very small. Fig. 22 The conversion function T that produces a constant maximum relative redundancy is shown u→σ (u) and T u→λ (u). Fig.23 FIG. 2300 shows Fig. 22 The function T calculated using the above algorithm I and different values of the algorithm parameter N u→λ The difference in the value of (u).
[0207] This means that a single transformation function T u→σ(u) works for all practical values of N, which in turn means that there is no need to define the value of N when training a hyper-prior neural network.
[0208] It can be seen that the function T for N→∞ can be calculated by considering the following situation u→σ Asymptotic value of (u): In the limit, the curvature of the relative redundancy defined by the parameter u should be a constant value, that is:
[0209]
[0210] where k is a constant. This can be Fig. 22 The lower part of is intuitively seen, where in the limit all redundancy curves are meant to have the same shape.
[0211] It can be seen that for any infinite probability sequence defined by parameter σ We have:
[0212]
[0213] For example, in the case where the distribution of the quantized normal variable corresponds to formula (2), if we define:
[0214]
[0215] It can be seen that formula (23) corresponds to:
[0216]
[0217] And formula (23) corresponds to the ordinary differential equation (ODE):
[0218]
[0219] Or equivalently,
[0220]
[0221] These differential equations can be solved using simple methods (such as Runge-Kutta) to produce a set of discrete points that can be used with interpolation methods such as cubic splines to accurately compute the transformation function T u→σ (u).
[0222] The solution matrix from Algorithm I and ODE is represented as a cubic spline with boundary derivatives defined using equations (26) or (27) to measure the relative redundancy when the interval [0,1] is evenly divided into N = C intervals (different from the value of N used in Algorithm I). The results are shown in Fig.24 In Figure 2400, it can be observed that the resulting average redundancy is indeed practically constant. Fig.24 It shows that due to the use of PDF parameters u and Fig. 22 The relative redundancy caused by the conversion function, dividing the interval [0,1] into N intervals of equal size (uniform quantization) and using C=N code vectors.
[0223] also, Fig.24 It is also shown in Figure 2 that the average redundancy value quadruples when the interval size doubles, which is additional evidence that over a wide range of scales, Fig. 20 The redundancy curve of is almost quadratic, governed by the curvature defined by equation (25).
[0224] As another example, if the design of the neural network and entropy encoding and decoding assumes a Laplace distribution (rather than a normal (Gaussian) distribution) with a PDF as follows:
[0225]
[0226] Then formula (24) can be replaced as follows:
[0227]
[0228] And use formula (25-27) to design the corresponding optimal conversion function.
[0229] As mentioned above, it is assumed that the codec designer wants to have the same maximum relative redundancy to always obtain the same overall average. The transfer function T can be summarized as u→σ (u) is calculated to create a non-uniform distribution of relative redundancy.
[0230] This can be done by replacing the constant ∈ in Algorithm I with a function ∈(σ) that defines how the redundancy should vary with the PDF parameter σ. Similarly, the constant k in differential equations (26) and (27) can be replaced by the function k(σ). Fig.25 and Fig.26 Examples of results obtained using these modifications are shown, where two types of functions shape the redundancy tolerance.
[0231] Fig.25 A first set of examples 2500 of average relative redundancy resulting from uniform quantization of the PDF parameter u using varying tolerances for redundancy are shown. Fig.26 A second set of examples 2600 of average relative redundancy resulting from uniform quantization of the PDF parameter u using varying tolerances for redundancy are shown.
[0232] Fig.21 The simplified codec only needs to calculate the parameter transformation function T during the training of the neural network. u→σ(u), whose computational complexity may not be important at this point. However, since gradients are often beneficial for neural network optimization, it is better to use an approximation that is continuous and has a continuous first-order derivative.
[0233] Many mathematical methods are defined for function approximation, which can be used to approximate T u→σ (u), for example:
[0234] 1. Polynomial
[0235] 2. Rational polynomials
[0236] 3. Piecewise polynomial
[0237] 4. Spline
[0238] One aspect to consider when choosing an approximation is the fact that the function T u→σ (u) is within the limit defined by the differential equation, so the approximation error should be measured by calculating the relative difference between the derivative of the approximation and the exact value defined by formula (26) or (27).
[0239] For example, in Fig. 22 , showing that λ≈u 2 , which has a derivative of 2u. However, the required derivative of λ is Fig. 27 2700, and we can see that for small values of u, the relative differences can be very large. Fig. 27 Shows Fig. 22 The derivative and reciprocal of the transfer function of .
[0240] As another example, the following cubic polynomial approximation:
[0241] λ(u)≈0.1425u+0.2343u 2 +0.6232u 3 ,(30)
[0242] Minimize the maximum relative error on the derivative, which is Fig.28 shown. Fig.28 An example graph 2800 shows the relative error of the PDF transfer function approximation using the third-degree polynomial formula (30). Using this polynomial for parameter transformation results in Fig.29 The average redundancy shown in Figure 2900. Fig.29 The relative redundancy caused by quantization of the PDF parameter u is shown by dividing the interval [0, 1] into N intervals of equal size (uniform quantization) and using C = N code vectors and the approximation of formula (30). It can be observed that Fig.28 The correspondence between the peaks in Fig.29 The corresponding peak in .
[0243] It can also be observed that Fig.28 relatively large relative derivative errors in Fig.29 result in similar deviations of the maximum redundancy in
[0244] but they are less than the changes caused by halving N and C, which means that a function as simple as the polynomial in formula (30) can actually be used for practical applications.
[0245]
[0246] The techniques of the present disclosure can be implemented and tested using arithmetic coding and decoding, and can be integrated into a neural-based codec running on a mobile device. In one example, the arithmetic coding and decoding techniques can be implemented using 32-bit operations, and the probability values can be scaled to 16 bits.
[0247] Table 1 below shows some experimental results for confirming the performance of the techniques of the present disclosure. The hyperprior data was obtained using floating-point operations, so only the quantization of the entropy coding parameters affects the results.
[0248] As shown in the results of the first row of Table 1, when parameterizing the Gaussian PDF using the quantized PDF parameter σ, approximately 0.5 MB of memory is required to store 256 code vectors, and the redundancy obtained is Fig.11 as desired, close to 1000%. Better results are possible, but more memory is required for the code vectors.
[0249] The following rows in Table 1 show that better results can be obtained when σ is replaced by the quantized PDF parameter v (e.g., the parameter obtained using the logarithmic function of σ, as defined in formula (16)). Using N = C = 256 actually eliminates the redundancy, but the amount of memory for the code vectors is relatively high.
[0250] The results show that using smaller N = C values helps reduce the amount of memory required, but the relative redundancy increases unevenly. On the other hand, using the above table lookup technique, resulting in C < N = 256 (e.g., fewer than 256 code vectors), uses approximately half the amount of memory with a more consistent relative redundancy.
[0251] The last 3 rows of Table I show that using Fig. 22 the PDF parameter u and the transfer function also reduce the memory requirements and provide the most consistent results, but do not require table lookup.
[0252] Table 1: Experimental results obtained by implementing the techniques described herein, applied to the data used to compress the Kodak dataset with 24 images.
[0253]
[0254]
[0255] As shown in the figure above, for image and video codecs using neural networks, choosing the entropy codec parameters that are most intuitive and convenient for the designer can work when using high-precision floating point implementations, but can lead to severe degradation when the weights and activations of the neural network are quantized. In fact, analysis of the commonly used Gaussian distribution shows that the most severe degradation in compression efficiency (highest relative redundancy) happens to occur in the most common case obtained during compression.
[0256] The technique proposed in this disclosure solves this problem by redefining the parameters used for entropy coding and decoding, retaining the training process with a single variable change, but modifying the quantization to balance the increase in redundancy caused by quantization. In addition, it is shown that using the new parameterization, the amount of memory used for entropy coding and decoding can be reduced using a simple table lookup for code vector selection or other types of parameter conversion functions without the need for table lookups.
[0257] Fig.30 is a flow chart illustrating an example method of the present disclosure. Fig.30 The techniques may be performed by one or more components of the media encoder 200 and / or the media decoder 300, including Fig.14 The components shown in the example. Fig.30 In an example of , the media encoder 200 and / or the media decoder 300 may be configured to: determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are based on a distribution of the data stream optimized for quantization (3000); determine a code vector based on the probability distribution function parameters (3002); and entropy encode and decode the data element using the code vector (3004). The function may be determined empirically (e.g., logarithmically) or by using an algorithm that evaluates codec redundancy or a solution of an ordinary differential equation.
[0258] Other aspects of the disclosure are described below.
[0259] Aspect 1A—A method for encoding and decoding media data, the method comprising:
[0260] Determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are logarithmic functions of standard deviations of the probability distribution function of the data stream; determine code vectors based on the probability distribution function parameters; and use the code vectors to entropy encode and decode the data elements.
[0261] Aspect 2A-The method according to aspect 1A further includes: quantizing the probability distribution function parameters before determining the code vector.
[0262] Aspect 3A - A method according to any aspect of Aspect 1A to Aspect 2A, wherein the probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = T u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), wherein the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
[0263] Aspect 4A-The method according to any aspect of Aspect 1A-Aspect 3A also includes: using the neural-based compression technology to generate the data elements; and quantizing the data elements to create quantized data elements, wherein entropy encoding and decoding the data elements using the code vectors includes: entropy encoding the quantized data elements using the code vectors.
[0264] Aspect 5A—The method of aspect 4A, wherein using the neural-based compression technique to generate the data element comprises: using an image analysis neural network to process an image or video picture to generate the data element.
[0265] Aspect 6A-A method according to any aspect of Aspect 1A-Aspect 3A, wherein entropy encoding and decoding the data element using the code vector includes: entropy decoding the encoded data element using the code vector to create a quantized data element, and the method also includes: dequantizing the quantized data element to create a reconstructed data element.
[0266] Aspect 7A-The method according to Aspect 6A further comprises: using an image synthesis neural network to process the reconstructed data elements to reconstruct an image or video picture.
[0267] Aspect 8A - A device configured to encode and decode media data, the device comprising: a memory; and one or more processors in communication with the memory, the one or more processors being configured to: determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are logarithmic functions of standard deviations of the probability distribution function of the data stream; determine a code vector based on the probability distribution function parameters; and perform entropy encoding and decoding on the data elements using the code vector.
[0268] Aspect 9A - The apparatus according to Aspect 8A, wherein the one or more processors are further configured to: quantize the probability distribution function parameters before determining the code vector.
[0269] Aspect 10A - The apparatus according to any aspect of Aspect 8A to Aspect 9A, wherein the probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = T u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), where the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
[0270] Aspect 11A-A device according to any aspect of Aspect 8A-Aspect 10A, wherein the one or more processors are further configured to: generate the data elements using the neural-based compression technology; and quantize the data elements to create quantized data elements, wherein entropy encoding and decoding the data elements using the code vectors includes: entropy encoding the quantized data elements using the code vectors.
[0271] Aspect 12A - An apparatus according to Aspect 11A, wherein, in order to generate the data element using the neural-based compression technique, the one or more processors are further configured to: use an image analysis neural network to process an image or video picture to generate the data element.
[0272] Aspect 13A - The apparatus according to Aspect 12A, further comprising: a camera configured to capture the image or video picture.
[0273] Aspect 14A - An apparatus according to any aspect of Aspect 8A to Aspect 10A, wherein entropy encoding and decoding the data elements using the code vector includes: entropy decoding the encoded data elements using the code vector to create quantized data elements, and wherein the one or more processors are also configured to: dequantize the quantized data elements to create reconstructed data elements.
[0274] Aspect 15A - The apparatus according to Aspect 14A, wherein the one or more processors are further configured to: use an image synthesis neural network to process the reconstructed data elements to reconstruct an image or video picture.
[0275] Aspect 16A-The apparatus according to Aspect 15A further comprises: a display configured to display the image or video picture.
[0276] Aspect 17A - A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors to: determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are logarithmic functions of standard deviations of the probability distribution function of the data stream; determine a code vector based on the probability distribution function parameters; and perform entropy encoding and decoding on the data element using the code vector.
[0277] Aspect 18A-The non-transitory computer-readable storage medium of claim 17, wherein the probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = T u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), wherein the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
[0278] Aspect 1B - A method for encoding and decoding media data, the method comprising: determining probability distribution function parameters of data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are parameters of the distribution of the data stream optimized for quantization; determining a code vector based on the probability distribution function parameters; and using the code vector to entropy encode and decode the data element.
[0279] Aspect 2B-The method according to aspect 1B also includes: quantizing the probability distribution function parameters before determining the code vector.
[0280] Aspect 3B-The method according to aspect 1B, wherein the probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = T u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), wherein the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
[0281] Aspect 4B-The method according to aspect 1B, wherein the probability distribution function parameter is a function of the standard deviation of the probability distribution function of the data stream.
[0282] Aspect 5B—The method according to Aspect 1B further comprises: generating the data element using the neural-based compression technique; and
[0283] The data elements are quantized to create quantized data elements, wherein entropy encoding and decoding the data elements using the code vectors includes entropy encoding the quantized data elements using the code vectors.
[0284] Aspect 6B—A method according to Aspect 5B, wherein generating the data element using the neural-based compression technique includes: processing an image or video picture using an image analysis neural network to generate the data element.
[0285] Aspect 7B-The method according to Aspect 6B also includes: using a camera to capture the image or video picture.
[0286] Aspect 8B-A method according to Aspect 1B, wherein entropy encoding and decoding the data element using the code vector includes: entropy decoding the encoded data element using the code vector to create a quantized data element, and the method also includes: dequantizing the quantized data element to create a reconstructed data element.
[0287] Aspect 9B—The method according to aspect 8B further comprises:
[0288] The reconstructed data elements are processed using an image synthesis neural network to reconstruct an image or video picture.
[0289] Aspect 10B-The method according to aspect 9B also includes: displaying the image or the video picture.
[0290] Aspect 11B - A device configured to encode and decode media data, the device comprising: a memory; and one or more processors communicating with the memory, the one or more processors being configured to: determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are parameters of a distribution of the data stream optimized for quantization; determine a code vector based on the probability distribution function parameters; and use the code vector to entropy encode and decode the data element.
[0291] Aspect 12B - The apparatus according to aspect 11B, wherein the one or more processors are further configured to: quantize the probability distribution function parameters before determining the code vector.
[0292] Aspect 13B-The apparatus according to aspect 11B, wherein the probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = Y u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), wherein the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
[0293] Aspect 14B-The apparatus of aspect 11B, wherein the probability distribution function parameter is a function of a standard deviation of the probability distribution function of the data stream.
[0294] Aspect 15B - An apparatus according to Aspect 11B, wherein the one or more processors are further configured to: generate the data elements using the neural-based compression technique; and quantize the data elements to create quantized data elements, wherein entropy encoding and decoding the data elements using the code vectors includes: entropy encoding the quantized data elements using the code vectors.
[0295] Aspect 16B-An apparatus according to Aspect 15B, wherein, in order to generate the data element using the neural-based compression technique, the one or more processors are further configured to: use an image analysis neural network to process an image or video picture to generate the data element.
[0296] Aspect 17B-The apparatus according to Aspect 16B further comprises: a camera configured to capture the image or video picture.
[0297] Aspect 18B - An apparatus according to Aspect 11B, wherein entropy encoding and decoding the data elements using the code vectors includes: entropy decoding the encoded data elements using the code vectors to create quantized data elements, and wherein the one or more processors are further configured to: dequantize the quantized data elements to create reconstructed data elements.
[0298] Aspect 19B - An apparatus according to Aspect 18B, wherein the one or more processors are further configured to: use an image synthesis neural network to process the reconstructed data elements to reconstruct an image or video picture.
[0299] Aspect 20B-The apparatus according to aspect 19B further comprises: a display configured to display the image or video picture.
[0300] Aspect 1C - A method for encoding and decoding media data, the method comprising: determining probability distribution function parameters of data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are parameters of the distribution of the data stream optimized for quantization; determining a code vector based on the probability distribution function parameters; and using the code vector to entropy encode and decode the data elements.
[0301] Aspect 2C-The method according to aspect 1C also includes: quantizing the probability distribution function parameters before determining the code vector.
[0302] Aspect 3C - A method according to any aspect of Aspect 1C to Aspect 2C, wherein the probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = Y u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min)), wherein the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
[0303] Aspect 4C - A method according to any aspect of Aspect 1C to Aspect 2C, wherein the probability distribution function parameter is a function of the standard deviation of the probability distribution function of the data stream.
[0304] Aspect 5C - The method according to any of Aspects 1C to 4C, further comprising: generating the data element using the neural-based compression technique; and
[0305] The data elements are quantized to create quantized data elements, wherein entropy encoding and decoding the data elements using the code vectors includes entropy encoding the quantized data elements using the code vectors.
[0306] Aspect 6C—A method according to Aspect 5C, wherein using the neural-based compression technique to generate the data element includes: using an image analysis neural network to process an image or video picture to generate the data element.
[0307] Aspect 7C-The method according to Aspect 6C also includes: using a camera to capture the image or video picture.
[0308] Aspect 8C - A method according to any aspect of Aspect 1C to Aspect 4C, wherein entropy encoding and decoding the data element using the code vector includes: entropy decoding the encoded data element using the code vector to create a quantized data element, and the method also includes: dequantizing the quantized data element to create a reconstructed data element.
[0309] Aspect 9C—The method according to Aspect 8C, further comprising:
[0310] The reconstructed data elements are processed using an image synthesis neural network to reconstruct an image or video picture.
[0311] Aspect 10C-The method according to aspect 9C also includes: displaying the image or the video picture.
[0312] Aspect 11C - A device configured to encode and decode media data, the device comprising: a memory; and one or more processors communicating with the memory, the one or more processors being configured to: determine probability distribution function parameters for data elements of a data stream encoded and decoded by a neural-based media compression technique, wherein the probability distribution function parameters are parameters of a distribution of the data stream optimized for quantization; determine a code vector based on the probability distribution function parameters; and use the code vector to entropy encode and decode the data element.
[0313] Aspect 12C - The apparatus of aspect 11C, wherein the one or more processors are further configured to: quantize the probability distribution function parameters prior to determining the code vector.
[0314] Aspect 13C - The apparatus according to any aspect of Aspect 11C to Aspect 12C, wherein the probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = T u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), wherein the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
[0315] Aspect 14C - The apparatus according to any of Aspects 11C to 12C, wherein the probability distribution function parameter is a function of a standard deviation of the probability distribution function of the data stream.
[0316] Aspect 15C - An apparatus according to any aspect of Aspect 11C to Aspect 14C, wherein the one or more processors are further configured to: generate the data elements using the neural-based compression technology; and quantize the data elements to create quantized data elements, wherein entropy encoding and decoding the data elements using the code vectors includes: entropy encoding the quantized data elements using the code vectors.
[0317] Aspect 16C - An apparatus according to Aspect 15C, wherein, in order to generate the data element using the neural-based compression technique, the one or more processors are further configured to: process the image or video picture using an image analysis neural network to generate the data element.
[0318] Aspect 17C - The apparatus according to Aspect 16C further comprises: a camera configured to capture the image or video picture.
[0319] Aspect 18C - An apparatus according to any aspect of Aspect 11C to Aspect 14C, wherein entropy encoding and decoding the data element using the code vector includes: entropy decoding the encoded data element using the code vector to create a quantized data element, and wherein the one or more processors are also configured to: dequantize the quantized data element to create a reconstructed data element.
[0320] Aspect 19C - An apparatus according to Aspect 18C, wherein the one or more processors are further configured to: use an image synthesis neural network to process the reconstructed data elements to reconstruct an image or video picture.
[0321] Aspect 20C - The apparatus according to Aspect 19C further comprises: a display configured to display the image or video picture.
[0322] It should be appreciated that, depending on the example, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or omitted altogether (e.g., not all described actions or events are necessary for implementation of the techniques). Additionally, in some examples, actions or events may be performed concurrently (e.g., through multithreading, interrupt handling, or multiple processors) rather than sequentially.
[0323] In one or more examples, the described functions can be implemented with hardware, software, firmware, or any combination thereof. If implemented with software, these functions can be stored on a computer-readable medium as one or more instructions or codes, or sent via a computer-readable medium, and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium, which corresponds to a tangible medium such as a data storage medium, or a communication medium (which includes, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol). In this way, a computer-readable medium can generally correspond to (1) a tangible computer-readable storage medium as a non-temporary or (2) a communication medium (such as a signal or carrier wave). A data storage medium can be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for the implementation of the technology described in the present disclosure. A computer program product may include a computer-readable medium.
[0324] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, flash memory or any other medium that may be used to store desired program codes in the form of instructions or data structures and may be accessed by a computer. In addition, any connection may be appropriately referred to as a computer-readable medium. For example, if instructions are sent from a website, server or other remote source using a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwaves, then coaxial cable, optical fiber cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwaves are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are directed to non-temporary, tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer readable media.
[0325] Instructions may be executed by one or more processors such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Therefore, as used herein, the terms "processor" and "processing circuit" may refer to any of the aforementioned structures or any other structures suitable for the implementation of the techniques described herein. In addition, in some aspects, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. In addition, these techniques may be fully implemented in one or more circuits or logic units.
[0326] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses, including wireless handheld devices, integrated circuits (ICs), or a set of ICs (e.g., chipsets). Various components, modules, or units are described in the present disclosure to emphasize the functional aspects of devices configured to perform the disclosed techniques, but are not necessarily required to be implemented by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units, including one or more processors as described above in combination with appropriate software and / or firmware.
[0327] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for encoding and decoding media data, the method comprising: determining probability distribution function parameters for data elements of a data stream encoded or decoded by a neural-based media compression technique, wherein the probability distribution function parameters are based on a distribution of the data stream optimized for quantization; determining a code vector based on the probability distribution function parameters; and The data element is entropy encoded and decoded using the code vector.
2. The method according to claim 1, further comprising: The probability distribution function parameters are quantized before determining the code vector.
3. The method according to claim 1, wherein: The probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = T u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), wherein the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
4. The method according to claim 1, wherein: The probability distribution function parameter is a function of a standard deviation of the probability distribution function of the data stream.
5. The method according to claim 1, further comprising: generating said data elements using a neural-based compression technique; as well as quantizing the data elements to create quantized data elements, The entropy encoding and decoding of the data element using the code vector includes: entropy encoding the quantized data element using the code vector.
6. The method according to claim 5, wherein: Generating the data element using the neural-based compression technique includes: An image or video picture is processed using an image analysis neural network to generate the data element.
7. The method according to claim 6, further comprising: A camera is used to capture the image or the video picture.
8. The method according to claim 1, wherein: Entropy encoding and decoding the data element using the code vector includes entropy decoding the encoded data element using the code vector to create a quantized data element, the method further comprising: The quantized data elements are dequantized to create reconstructed data elements.
9. The method according to claim 8, further comprising: The reconstructed data elements are processed using an image synthesis neural network to reconstruct an image or video picture.
10. The method according to claim 9, further comprising: The image or the video picture is displayed.
11. An apparatus configured to encode and decode media data, the apparatus comprising: Memory; as well as one or more processors in communication with the memory, the one or more processors being configured to: determining probability distribution function parameters for data elements of a data stream encoded or decoded by a neural-based media compression technique, wherein the probability distribution function parameters are based on a distribution of the data stream optimized for quantization; determining a code vector based on the probability distribution function parameters; and The data element is entropy encoded and decoded using the code vector.
12. The device according to claim 11, wherein The one or more processors are further configured to: The probability distribution function parameters are quantized before determining the code vector.
13. The device according to claim 11, wherein: The probability distribution function parameter is u, the standard deviation of the probability distribution function is σ, and the minimum standard deviation is σ min , the maximum standard deviation is σ max , and the relationship between u and σ is defined as: σ = T u→σ (u) = T λ→σ (T u→λ (u)), where T λ→σ (λ)=exp(λln(σ max / σ min )+ln(σ min )), wherein the function T is defined according to an algorithm for measuring codec redundancy or by solving an ordinary differential equation.
14. The device according to claim 11, wherein: The probability distribution function parameter is a function of a standard deviation of the probability distribution function of the data stream.
15. The device according to claim 11, wherein The one or more processors are further configured to: generating said data element using said neural-based compression technique; as well as quantizing the data elements to create quantized data elements, The entropy encoding and decoding of the data element using the code vector includes: entropy encoding the quantized data element using the code vector.
16. The device according to claim 15, wherein: To generate the data element using the neural-based compression technique, the one or more processors are further configured to: An image or video picture is processed using an image analysis neural network to generate the data element.
17. The apparatus according to claim 16, further comprising: A camera configured to capture said image or said video picture.
18. The device according to claim 11, wherein Entropy encoding and decoding the data element using the code vector comprises entropy decoding the encoded data element using the code vector to create a quantized data element, and wherein the one or more processors are further configured to: The quantized data elements are dequantized to create reconstructed data elements.
19. The device according to claim 18, wherein: The one or more processors are further configured to: The reconstructed data elements are processed using an image synthesis neural network to reconstruct an image or video picture.
20. The apparatus according to claim 19, further comprising: A display configured to display the image or the video picture.
