Video content represents the majority of total Internet traffic and is expected to increase even more as spatial resolution frame rate, and color depth of videos increase and more users adopt earning services. Although existing codecs have achieved impressive performance, they have been engineered to the point where adding further small improvements is unlikely to meet future demands. Consequently, exploring fundamentally different ways to perform video coding may advantageously lead to a new class of video codecs with improved performance and flexibility.
For example, one advantage of using a trained machine learning (ML) model, such as a neural network (NN), in the form of a generative adversarial network (GAN) for example, to perform video compression is that it enables the ML model to infer visual details that it would otherwise be costly in terms of data transmission, to obtain. However, the model size remains an important issue in current state-of-the-art proposals and existing solutions require significant computation effort on the decoding side. That is to say, one significant drawback of existing GAN-based compression frameworks is that they typically require large decoder models that are sometimes trained on private datasets. Therefore, retraining these models to their original performance is not generally possible, and even when the training data is available, retraining the model would be complicated and time consuming. Moreover, the memory requirements and the inference time of exiting large decoder models make them less practical, especially in the context of video coding.
The following description contains specific information pertaining to implementations in the present disclosure. One skilled in the art will recognize that the present disclosure may be implemented in a manner different from that specifically discussed herein. The drawings in the present application and their accompanying detailed description are directed to merely exemplary implementations. Unless noted otherwise, like or corresponding elements among the figures may be indicated by like or corresponding reference numerals. Moreover, the drawings and illustrations in the present application are generally not to scale, and are not intended to correspond to actual relative dimensions.
The present application is directed to systems and methods for providing machine learning (ML) model-based video codecs. In addition, the present application discloses a knowledge distillation (KD) approach that enables the retention of good perceptual image quality while reducing the size of the decoder. According to the present novel and inventive principles, the goal of KD is to transfer the learned knowledge of a teacher network to a smaller student network that remains competitive to the teacher network's performance. By requiring less memory and computational power than the initial teacher network, the student network could, for instance, run on less powerful devices such as mobile phones or dedicated devices. The ability to compress the generator network or decoder in the auto-encoder setting, as disclosed herein, is advantageous both in terms of memory requirements and computational efficiency. This is especially important for image and video compression, where the majority of the computation should preferably be performed on the sender (encoder) side, while the decoding should be simple. Especially in the context of video streaming, an asset will typically be encoded once for distribution, but may be decoded millions of times.
One advantage of using a trained machined learning model, such as an artificial neural network (NN) for example, to perform video compression is that it enables the machine learning model to infer visual details that it would otherwise be costly in terms of data transmission to obtain. Consequently, the resulting images are typically visually pleasing without requiring a high bitrate. Some image details synthesized when using a machine learning model-based video codec may look realistic tile deviating slightly from the ground truth. Nevertheless, the present machine learning model based video compression solution is capable of providing image quality that would be impossible using the same amount of transmitted data in conventional approaches. Moreover, in some implementations, the present machine learning model-based solution can be implemented as substantially automated systems and methods.
It is noted that, as used in the present application, the terms “automation,” “automated,” and “automating” refer to systems and processes that do not require the participation of a human user, such as a human editor or system administrator. Although, in some implementations, a human system administrator may review the performance of the automated systems operating according to the automated processes described herein, that human involvement is optional. Thus, the processes described in the present application may be performed under the control of hardware processing components of the disclosed systems.
It is further noted that, as defined in the present application, the expression “machine learning model” (hereinafter “ML model”) refers to a mathematical model for making future predictions based on patterns learned from samples of data obtained from a set of trusted known matches and known mismatches, known as training data. Various learning algorithms can be used to snap correlations between input data and output data. These correlations form the mathematical model that can be used to make future predictions on new input data. Such a predictive model may include one or more logistic regression models, Bayesian models, or NNs, for example. In addition, machine learning models may be designed to progressively improve their performance of a specific task.
A “deep neural network” (deep NN) in the context of deep learning, may refer to an NN that utilizes multiple hidden layers between input and output layers, which may allow for learning based on features not explicitly defined in raw data. As used in the present application, a feature labeled as an NN refers to a deep neural network. In various implementations, NNs may be utilized to perform image processing or natural-language processing. Although the present novel and inventive principles are described below by reference to an exemplary NN class known as generative adversarial networks (GANs), that characterization is provided merely the interests of conceptual clarity.
As further shown in
Although the present application refers to ML model-based video encoder 108 as being stored in system memory 106 for conceptual clarity, more generally system memory 106 may take the form of any computer-readable non-transitory storage medium. The expression “computer-readable non-transitory storage medium,” as used in the present application, refers to any medium, excluding a carrier wave or other transitory signal that provides instructions to processing hardware 104 of computing platform 102. Thus, a computer-readable non-transitory storage medium may correspond to various types of media, such as volatile media and non-volatile media, for example. Volatile media may include dynamic memory, such as dynamic random access memory (dynamic RAM), while non-volatile memory may include optical, magnetic, or electrostatic storage devices. Common forms of computer-readable non-transitory storage media include, for example, optical discs, RAM, programmable read-only memory (PROM), erasable PROM (EPROM), and FLASH memory.
Moreover, although
Processing hardware 104 may include multiple hardware processing units, such as one or more central processing units, one or more graphics processing units, and one or more tensor processing units, one or more field-programmable gate arrays (FPGAs), custom hardware for machine-learning training or inferencing, and an application programming interface (API) server, for example. By way of definition, as used in the present application, the terms “central processing unit” (CPU), “graphics processing unit” (GPU), and “tensor processing unit” (TPU) have their customary meaning in the art. That is to say, a CPU includes an Arithmetic Logic Unit (ALU) for carrying out the arithmetic and logical operations of computing platform 102, as well as a Control Unit (CU) for retrieving programs, such as ML model-based video encoder 108, from system memory 106, while a GPU may be implemented to reduce the processing overhead of the CPU by performing computationally intensive graphics or other processing tasks. A TPU is an application-specific integrated circuit (ASIC) configured specifically for artificial intelligence (AI) processes such as machine learning.
In some implementations, computing platform 102 may correspond to one or more web servers, accessible over communication network 110 in the form of a packet-switched network such as the Internet, for example. Moreover, in some implementations, communication network 110 may be a high-speed network suitable for high performance computing (HPC), for example a 10 GigE network or an Infiniband network. In some implementations, computing platform 102 may correspond to one or more computer servers supporting a private wide area network (WAN), local area network (LAN), or included in another type of limited distribution or private network. As yet another alternative, in some implementations, system 100 may be implemented virtually, such as in a data center. For example, in some implementations, system 100 may be implemented in software, or as virtual machines.
According to the implementation shown by
Although user system 120 is shown as a desktop computer in
With respect to display 122 of user system 120, display 122 may be physically integrated with user system 120 or may be communicatively coupled to but physically separate from user system 120. For example, where user system 120 is implemented as a smartphone, laptop computer, or tablet computer, display 122 will typically be integrated with user system 120. By contrast, where user system 120 is implemented as a desktop computer, display 122 may take the form of a monitor separate from user system 120 in the form of a computer tower. Moreover, display 122 may take the form of a liquid crystal display (LCD), a light-emitting diode (LED) display, an organic light-emitting diode (OLED) display, a quantum dot (QD) display, or a display using any other suitable display technology that performs a physical transformation of signals to light.
By way of background, a mapping from image space to latent space may be achieved using ML, model-based video encoder 108, where the bottleneck values constitute the latent representation. A function g denotes the mapping from image space to latent space performed by ML model-based video encoder 108, and g−1 denotes the reverse mapping. An uncompressed original image x is first mapped to its latent representation y=g(x). After quantization, the resulting quantized latents ŷ are encoded losslessly to compressed video bitstream 118 that can be decoded into the uncompressed image {circumflex over (x)}=g−1 (ŷ) that corresponds to original image x.
Image compression can formally be expressed as minimizing the expected length of the bitstream as well as the expected distortion of the reconstructed image compared to the original, formulated as optimizing the following rate-distortion objective function:
L
g,p
=[−log2pŷ(ŷ)+λd(x,{circumflex over (x)})] (Equation 1)
where: −log2pŷ(ŷ) is the rate term and d(x,{circumflex over (x)}) is the distortion term.
It is noted that in the notation used in Equation 1, the parameters of g include g−1. Here d indicates a distortion measure and can include a combination of l2, structural similarity index measure (SSIM), learned perceptual image patch similarity (LPIPS), and the like. The rate corresponds to the length of the bitstream needed to encode the quantized representation ŷ, based on a learned entropy model pŷ over the unknown distribution of natural images px. By reducing the weight λ, better compression can be achieved at the cost of larger distortion on the reconstructed image.
According to one implementation of the present novel and inventive concepts, the ML model-based image compression formulation described above can be augmented with an ML model in the form of a conditional GAN. In such a case of adversarial training, D is denoted as the discriminator neural network that learns to distinguish between the ground truth x and the decoded images {circumflex over (x)} conditioned on the latent representation ŷ:
L
D=[−log(1−D({circumflex over (x)},ŷ)−log(D(x,ŷ))] (Equation 2)
The training of the discriminator is alternated with the training of image compression ML model 232, in which case the rate-distortion objective augmented with the adversarial loss is optimized:
L
g,p
=[−log2pŷ(ŷ)+λd(x,{circumflex over (x)})+β log D({circumflex over (x)},ŷ)] (Equation 3)
where: −log2pŷ and d(x,{circumflex over (x)}) remain the rate and distortion terms, respectively, while) D({circumflex over (x)},ŷ) is the adversarial loss.
In order to take advantage of temporal redundancy in video encoding, video compression relies on information transfer through motion compensation. More precisely, a subsequent frame xt+1 can be predicted from its preceding frame xt by considering motion information. As defined in the present application, the expression “motion compensation” refers to the full process that computes and encodes motion vectors, as well as any post-processing that may occur. For simplicity, it is assumed that motion compensation has been completed, and the result is an estimate of the image {tilde over (x)}t+1 and a motion vector field {circumflex over (m)}t+1.
Microdosing for Low Bitrate Compression:
First, a High-Fidelity Compression (HiFiC) or other high-performance decoder is replaced with a much smaller student-decoder. It is noted that HiFiC presently provides the state-of-the-art in low bitrate neural image compression (i.e., approximately 0.15 bits per pixel) and produces extremely competitive results at the cost of a relatively big (i.e., approximately 156 million parameters) decoder network. However. although a HiFiC architecture is shown to be utilized in existing approach 232, that representation is merely exemplary. In other implementations, the HiFiC encoder-decoder network of existing approach 232 may be replaced by substantially any GAN trained network having a similar architecture based on residual blocks.
By contrast to existing approach 232, microdosing compression approach 234 disclosed by the present application advantageously allows for a much smaller decoder (e.g., approximately 8 million parameters) and fifty percent (50%) faster decoding time wile producing output images that are visually similar to those provided by HiFiC. Second, the application of the present microdosing KD strategy in a neural video compression framework based on latent, residuals is described. In such a scenario, the reduced student-decoder is overfitted to a sequence so that a sequence specific decoder can be provided.
As shown in
According to the present microdosing approach 234 by contrast, ML model-based video encoder 208 is configured to partition uncompressed video sequence 216 data into subsets , and to learn a content-specific decoder with corresponding information θ for each subset. This specialization enables the training of a ML model-based video decoder 238 that advantageously requires fewer parameters, a smaller memory footprint, and using fewer computations. It is noted that ML model-based video encoder 208, uncompressed video sequence 216, and ML model-based video decoder 238 correspond respectively in general to ML model-based video encoder 108, uncompressed video sequence 116, and ML model-based video decoder 138, in
Once ML model-based video decoder 238 is fully trained, and the reconstruction quality requirement of ML model-based video encoder 108 for the subset is fulfilled, the content-specific information (e.g., decompression data 236) may be stored alongside the subset. If ML model-based video decoder 238 wants to decode an image x∈, the subset specific decompression data θ, in the form of weights, has to be sent only once per subset. A procedure for applying the present microdosing KD approach to image compression with GANs and its extension to video compression using latent space residuals is discussed below.
However, if it is known in advance which images should be compressed (e.g., frames of a video sequence having similar features), it is possible to overfit to that data during encoding and send only the necessary weights to properly decode those images (i.e., decompression data 236). That is what is implemented using the NN architecture disclosed in the present application and described by reference to
According to the exemplary implementation shown by
According to the exemplary implementation shown in
Let x∈ be an image of subset and {tilde over (x)} be the image compressed by the teacher network. According to the present concepts, the following loss function is optimized:
(x;θ)=kMMSE({tilde over (x)},{circumflex over (x)})+kpdp({circumflex over (x)},x) (Equation 4)
where {circumflex over (x)} is the output of the student network, MSE (mean squared error) and dp are the distortion losses, and kM and kp are their corresponding weights. The perceptual loss dp=LPIPS is used. As a result, the loss forces ML model-based video decoder 438 to generate images that look similar to those generated by teacher-decoder 452 and further reduces the perceptual loss to the ground truth image. It is noted that the encoder and the entropy model, which may be modeled using a hyperprior, are frozen. Consequently, compression data 236 “θ” only contains the weights of Micro-RN 460. This advantageously leverages the powerful encoder and hyperprior of HiFiC as well as the model's knowledge of the private training data set.
To show the application of KD in neural video compression scenarios, a network. such as network 570 in
First, the I-frame (x0) may be compressed using a neural image compression network to generate the encoded latent y0. Let {circumflex over (x)}0 denote the reconstructed frame from the quantized latent ŷ0. Then, for each P-frame, xt+1, 1≤t+1≤GOP: (1) a temporal prediction, xt+1Pred, of xt+1 is generated from the previous reconstructed frame, {circumflex over (x)}t, using FPN 692. FPN 692 works by first computing the optical flow ft+1 between xt+1 and {circumflex over (x)}t. (2) Use the neural motion compression network to generate the encodings and quantized latents ŵt+1 of ft+1. (3) Warp {circumflex over (x)}t with the decompressed flow {circumflex over (f)}t+1, and then motion compensate it to generate the temporal xt+1Pred.
To compute the residual between the temporal prediction and the P-Frame, LRN 574 is used to: (4) encode both, the prediction xt+1Pred and xt+1, with EI 576 (a pre-trained image compression encoder) and (5) compute the latent residual, xt+1, between the latents of the P-frame against the predicted frame, rt+1=yt+1−yt+1Pred, which is then quantized and entropy coded with EMI 578. The final compressed bitstream of a GOP is then composed of {ŷ0, ŵ1, . . . , ŵGOP, {circumflex over (r)}1, . . . , {circumflex over (r)}GOP} i.e., latent of the I-frame and the compressed flow fields and latent residuals for each of the P-frames (all quantized and entropy encoded).
In the low bitrate setting, HiFiC would scent like a suitable choice for the neural image compression architecture that could be used together with the above latent space residual framework. As noted above, however, the size of the HiFiC decoder is a limiting factor. Moreover, inference time can be critical in the video where maintaining a decoding frame rate of approximately thirty frames per seconds (30 fps) is often necessary. The microdosing solution disclosed in the present application advantageously advances the state-of-the-art by increasing computational efficiency while reducing inference time. During encoding, the present solution is overfitted to a specific sequence so that the θ only need to be sent once for all the frames of that sequence. The present novel and inventive decoding process then proceeds by receiving and loading sequence-specific Micro-RN weights on ML model-based video decoder 438, which is then fixed during the decode of the sequence. As a result of the small computational overhead imposed by the present microdosing solution, decoding time can advantageously be reduced by 50% while achieving visual that is similar to bigger and slower existing decoders.
The knowledge distillation with microdosing approach described above by reference to
Referring now to
Flowchart 680 further includes determining, from among the plurality of video frames, a first video frame subset and a second video frame subset (action 682). In some implementations, the determination of the first video frame subset and the second video frame subset, in action 682 may be based on similarity and dissimilarity among the video frames included in uncompressed video sequence 116/219. In other words, in some implementations, the first video frame subset determined in action 682 may include video frames that are visually similar to one another, while the second video frame subset may include other video frames that are more visually similar to one another than to the video frames included in the first video frame subset. Continuing to refer to
Flowchart 680 further includes encoding the first video frame subset determined in action 682 to produce first compressed video frame subset (action 683). As described above, the encoding of the first video frame subset to produce first compressed video frame subset , in action 683, may be performed by ML model-based video encoder 108/208, executed by processing hardware of 104 of system 100.
Flowchart 680 further includes identifying first decompression data θ for first compressed video frame subset (action 684). In some implementations, identifying first decompression data θ comprises overfitting first decompression data θ during the encoding of the first video frame subset in action 683. That is to say, in some implementations, identification of first decompression data θ in action 684, may be performed in parallel, i.e., substantially concurrently, with the encoding of the first video frame subset to produce first compressed video frame subset in action 682. As described above, identifying first decompression data θ for first compressed video frame subset , in action 684, may be performed by ML model-based video encoder 108/208, executed by processing hardware of 104 of system 100.
Flowchart 680 further includes encoding the second video frame subset determined in action 682 to produce second compressed video frame subset (action 685). As described above, the encoding of the second video frame subset to produce second compressed video frame subset , in action 685, may be performed by ML model-based video encoder 108/208, executed by processing hardware of 104 of system 100.
Flowchart 680 further includes identifying second decompression data θ for second compressed video frame subset (action 686). In some implementations, identifying second decompression data θ comprises overfitting second decompression data θ during the encoding of the second video frame subset in action 685. That is to say, in some implementations, identification of second decompression data θ in action 686, may be performed in parallel, i.e., substantially concurrently, with the encoding of the second video frame subset to produce second compressed video frame subset in action 685. As described above, identifying first decompression data θ for second compressed video frame subset2, in action 686, may be performed by ML model-based video encoder 108/208, executed by processing hardware of 104 of system 100.
With respect to first and second decompression data θ and θ, it is noted that those data are specific to the respective compressed video frame subsets they accompany. Thus, first decompression data θ is specific to decoding first compressed video frame subset but not second compressed video frame subset , and second decompression data θ is specific to decoding second compressed video frame subset but not first compressed video frame subset .
It is further noted that although flowchart 680 depicts actions 685 and 686 as following actions 683 and 684, that representation is provided merely by way of example. In some other implementations, actions 683 and 685 may be performed in parallel prior to actions 684 and 686, which, in some implementations, may also be performed in parallel. Thus, in some implementations, action 683 and 684 may be performed in parallel with action 685 and 686.
In some implementations, the method outlined by flowchart 680 may conclude with action 686. However, in other implementations, that method may be extended by one or more of the actions described by flowchart 790, in
Flowchart 790 further includes receiving first compressed video frame subset , second compressed video frame subset , first decompression data θ, and second decompression data θ (action 792). As shown in
Flowchart 790 further includes decoding first compressed video frame subset using first decompression data θ (action 793). As described above, the decoding of first compressed video frame subset using first decompression data θ, in action 793, may be performed by ML model-based video decoder 138/238/438, executed by user system. processing hardware 124, or by processing hardware of 104 of system 100.
In some implementations, as noted above, ML model-based video decoder 138/238/438 may include an NN, such as a MicroRN for example. In implementations in which ML model-based video decoder 138/238/438 includes a MicroRN, first decompression data θ may contain only the weights of that MicroRN for use in decoding first compressed video frame subset . Moreover, in some implementations, first decompression data θ may be received once, and only once, for decoding first compressed video frame subset in its entirety.
Flowchart 790 further includes decoding second compressed video frame subset using second decompression data θ (action 794). As described above, the decoding of second compressed video frame subset θ using first decompression data θ, in action 794, may be performed by ML model-based video decoder 138/238/438, executed by user system processing hardware 124, or by processing hardware of 104 of system 100.
In implementations in which ML model-based video decoder 138/238/438 includes a MicroRN, second decompression data θ may contain only the weights of that MicroRN for use in decoding first compressed video frame subset . Moreover, in some implementations, second decompression data θ may be received once, and only once, for decoding second compressed video frame subset in its entirety.
It is noted that although flowchart 790 depicts action 794 as following action 793, that representation is provided merely by way of example. In some implementations, the decoding of first compressed video frame subset using first decompression data θ, in action 793, and the decoding of second compressed video frame subset using second decompression data θ, in action 794, may be performed in parallel, i.e., substantially concurrently.
Regarding the combination of ML model-based video encoder 108/208 and ML model-based video decoder 138/238/438. it s noted that ML model-based video encoder 108/208 may be implemented as a HiFiC encoder, while ML model-based video decoder 138/238/438 is configured so as to have fewer parameters, such as ten time fewer parameters for example, than a HiFiC decoder, i.e. a large decoder that does not use first decompression data θ, and second decompression data θ. Moreover, ML model-based video decoder 138/238/438 may be configured so as to achieve a faster decoding time, such as a fifty percent (50%) faster decoding time for example, than a HiFiC decoder, i.e., a large decoder that does not use first decompression data θ, and second decompression data θ.
With respect to the actions described in
Thus, the present application discloses a framework including an ML model-based video compression solution based on knowledge distillation (KD) and microdosing to enable use of a video compression codec that has similar hallucination capacity to a trained GAN, which is particularly important when targeting low bit-rate video compression. In addition, the present application discloses an approach that enables the retention of good perceptual image quality while reducing the size of the decoder. According to the present novel and inventive principles, the goal of KD is to transfer the learned knowledge of a teacher network to a smaller student network that remains competitive to the teacher network's performance. By requiring less memory and computational power than the initial teacher network, the student network could advantageously be run on less powerful devices such as mobile phones or dedicated devices. The ability to compress the generator network or decoder in the auto-encoder setting, as disclosed above, is advantageous both in terms of memory requirements and computational efficiency.
From the above description it is manifest that various techniques can be used for implementing the concepts described in the present application without departing from the scope of those concepts. Moreover, while the concepts have been described with specific reference to certain implementations, a person of ordinary skill in the art would recognize that changes can be made in form and detail without departing from the scope of those concepts. As such, the described implementations are to be considered in all respects as illustrative and not restrictive. It should also be understood that the present application is not limited to the particular implementations described herein, but many rearrangements, modifications, and substitutions are possible without departing from the scope of the present disclosure.
The present application claims the benefit of and priority to Provisional Patent Application Ser. No. 63/172,315, filed Apr. 8, 2021, and titled “Neural Network Based Video Codecs,” and Provisional Patent Application Ser. No. 63/255,280, filed Oct. 13, 2021, and titled “Microdosing For Low Bitrate Video Compression,” which are hereby incorporated fully by reference into the present application.
Number | Date | Country | |
---|---|---|---|
63172315 | Apr 2021 | US | |
63255280 | Oct 2021 | US |