VCT: A Video Compression Transformer
Abstract
We show how transformers can be used to vastly simplify neural video compression.
Previous methods have been relying on an increasing number of architectural biases and priors, including motion prediction and warping operations, resulting in complex models.
Instead, we independently map input frames to representations and use a transformer to model their dependencies, letting it predict the distribution of future representations given the past.
The resulting video compression transformer outperforms previous methods on standard video compression data sets.
Experiments on synthetic data show that our model learns to handle complex motion patterns such as panning, blurring and fading purely from data.
Our approach is easy to implement, and we release code to facilitate future research.
Introduction
Neural network based video compression techniques have recently emerged to rival their non-neural counter parts in rate-distortion performance [ e.g. , 1, 17, 30, 42].
These novel methods tend to incorporate various architectural biases and priors inspired by the classic, non-neural approaches.
While many authors tend to draw a line between “hand-crafted” classical codecs and neural approaches, the neural approaches themselves are increasingly “hand-crafted”, with authors introducing complex connections between the many sub-components.
The resulting methods are complicated, challenging to implement, and constrain themselves to work well only on data that matches the architectural biases.
In particular, many methods rely on some form of motion prediction followed by a warping operation [ e.g. , 1, 17, 19, 23, 42, 41].
These methods warp previous reconstructions with the predicted ﬂow, and calculate a residual.
In this paper we replace ﬂow prediction, warping and residual compensation, with an elegantly simple but powerful transformer-based temporal entropy model.
The resulting video compression transformer (VCT) outperforms previous methods on standard video compression data sets, while being free from their architectural biases and priors.
Furthermore, we create synthetic data to explore the effect of architectural biases, and show that we compare favourably to previous approaches on the types videos that the architectural components were designed for (panning on static frames, or blurring), despite our transformer not relying on any of these components.
More crucially, we outperform previous approaches on videos that have no obvious matching architectural component (sharpening, fading between scenes), showing the beneﬁt of removing hand-crafted elements and letting a transformer learn everything from data.
We use transformers to compress videos in two steps (see Fig. 1):
First, using lossy transform coding [3], we map frames x i from image space to quantized representations y i , independently for each frame .
From y i we can recover a reconstruction ˆ x i .
Second, we let a transformer leverage y i−y i−y
i x i−x i−
Q
Q Q
Transformer
Masked BlockAutoregressiveTransformer y i,<t
y i− 2 Already transmitted
Bottleneck
To be transmitted y i−
P(y i,t | y i,<t ,y i− 2 , y i− 1 ) x i−x i−x i
E E E
D
D temporal redundancies to model the distributions of the representations. We use these predicted distributions to losslessly compress the quantized y i using entropy coding [43, Sec 2.2.1]. The better the transformer predicts the distributions, the fewer bits are required to store the representations.
This setup avoids complex state transitions or warping operations by letting the transformer learn to leverage arbitrary relationships between frames.
As a bonus, we get rid of temporal error propagation by construction since the reconstruction ˆ x i does not depend on previous reconstructions.
Contrast with warping-based approaches, where ˆ x i is a function of the warped ˆ x i − 1 meaning that any visual errors in ˆ x i will be propagated forward and require additional bits to correct with residuals.
VCT is based on the original language translation transformer [35]: We can view our problem as “translating” two previous representations y i − 2 , y i − 1 to y i .
However, there are various challenges in the way of directly applying the NLP formulation.
Consider a 1080p video frame; using a typical neural image compression encoder [4] that downscales by a factor 16 and has 192 output channels, a (1080, 1920, 3)-dimensional input frame is mapped to a (68, 120, 192)-dimensional feature representation leading to approximately 1 . 6 million symbols.
Naively correlating all of these symbols to all symbols in a previous representation would yield a 1 .
6 M × 1 .
6 M-dimensional attention matrix.
To address this computationally impractical problem, we introduce independence assumptions to shrink the attention matrix and enable parallel execution on subsets of the symbols.
Our model is easy to implement with contemporary machine learning frameworks, and we provide an extensive code and model release to allow future work to build on this direction.
Related Work
Transformers were initially proposed for machine translation [35], where an encoder-decoder structure was used to obtain state-of-the-art results.
This led to a wide range of follow-up research, and stateof-the-art natural language processing (NLP) models are still based on transformers [ e.g. , 6, 8, 7, 11].
Motivated by these advancements, Dosovitski et al.
[10] replaced CNNs with a transformer-based architecture to achieve state-of-the-art results in image classiﬁcation, which in turn spurred more exploration of transformers in the computer vision community including both image tasks [ e.g. , 22, 37, 45] as well as video analysis [ e.g. , 2, 5, 12, 28, 32].
Recently, transformers were incorporated into neural image compression models.
Qian et al.
[29] replaced the autoregressive hyperprior [26] with a self-attention stack, and Zhu et al.
[46] replaced all convolutions in the standard approach [4, 27] with Swin Transformer [22] blocks.
Neural video compression remains CNN-based.
After initial work used frame interpolation [39, 9], Lu et al.
[23] followed the more traditional approach of predicting optical ﬂow between the previous reconstruction and the input, transmitting a compressed representation of the ﬂow, and also transmitting a residual image to correct visual errors after warping.
Many papers extended this [Figure] approach, for example
Agustsson et al.
[1] introduced the notion of a ﬂow predictor that also supports blurring called “Scale Space Flow” (SSF), which became a building block for other approaches [42, 30].
Rippel et al.
[30] achieved state-of-the-art results by using SSF and more context to predict ﬂow.
RNNs and ConvLSTMs were used to build recurrent decoders [13] or entropy models [41].
Some work does not rely on pixel-space ﬂow: Habibian et al. [14] used a 3D autoregressive entropy model, FVC [17] predicted ﬂow in a 2 × downscaled feature space, and Liu et al. [20] used a ConvLSTM to predict representations which are transmitted using an iterative quantization scheme.
DCVC [19] estimated motion in pixel space but performed residual compensation in a feature space.
Liu et al.
[21] also losslessly encoded frame-level representations, but rely on CNNs for temporal modelling.
Finally, recent work employed GAN losses to increase realism [24, 40].
Method 3.1 Overview and Background
Frame encoding and decoding A high-level overview of our approach is shown in Fig.
We split video coding into two parts.
First, we independently encode each frame x i into a quantized representation y i = (cid:98) E
( x i ) (cid:101) using a CNN-based image encoder E followed by quantization to an integer grid.
The encoder downscales spatially and increases the channel dimension, resulting in y i being a ( H, W, d C ) -dimensional feature map, where H, W are 16 × smaller than the input image resolution.
From y i , we can recover a reconstruction ˆ x i using the decoder D .
We train E, D using standard neural image compression techniques to be lossy transforms reaching nearly any desired distortion d ( x i , ˆ x i ) by varying how large the range of each element in y i is.
For now, let us assume we have a pair E, D reaching a ﬁxed distortion.
Naive approach After having lossily converted the sequence of input frames x i to a sequence of representations
y i = (cid:98) E ( x i ) (cid:101) , one can naively store all y i to disk losslessly .
To see why this is suboptimal, let each element y i,j of y
i be a symbol in S
=
{− L, . . .
, L } .
Assuming that all |S| symbols appear with equal probability, i.e. , P ( y i,j ) = 1 / |S| , one can transmit y i using H · W · d C · log 2 |S| bits.
Using a realistic L =32 , this implies that we would need 9 MB , or ≈ 2Gbps at 30fps, to encode a single HD frame ( where H · W · d C ≈ 1 .
6 M, see Introduction).
While arguably inefﬁcient, this is a valid compression scheme which will result in the desired distortion.
The aim of this work is to improve this scheme by approximately two orders of magnitude.
An efﬁcient coding scheme Given a probability mass function (PMF) P estimating the true distribution Q of symbols in y i , we can use entropy coding (EC) to transmit y i with H · W · d C · E y ∼ Q ( y i )
[ − log 2 P ( y )] bits.
By using EC, we can encode more frequently occurring values with fewer bits, and hence improve the efﬁciency.
Note that the expectation term representing the average bit count corresponds to the cross-entropy of Q with respect to P .
Our main idea is to parameterize P 2 Consistent with neural compression literature but in contrast to Information Theory, we use P for the model.
b i−b i−b
i
P ( t 3 | ... )
P ( t 2 | ... )
P ( t 1 | ... )
Masked Transformer Layer z joint .........
Transformer Layer Transformer Layer
Masked MHSA
MHSA K
K
V V
Q Q
Norm Norm
Norm Norm
MLP
MLP + + + +
MHSA K
V
Q
Norm
Norm MLP + +
Masked Transformer Layer
Transformer Layer
Transformer Layer
Project + Pos Project + Pos Project + Pos
Temporal Pos
T sep
T joint
T sep
T cur t 1 t S t 2 t 16 ...
z joint
Already Transmitted
To be transmitted as a conditional distribution using very ﬂexible transformer models, and to minimize the cross-entropy and thus maximize coding efﬁciency. We emphasize that we use P for lossless EC, we do not sample from the model to transmit data. Even if the resulting model of P is sub-optimal, y i can still be stored losslessly, albeit inefﬁciently.
Why would one hope to do better than the uniform distribution over y i ?
In principle, the model should be able to exploit the temporal redundancy across frames, and the spatial consistency within frames.
3.2 Transformer-based Temporal Entropy Model
To transmit a video of F frames, x 1 , . .
, x F , we ﬁrst map E over each frame obtaining quantized representations y 1 , . . .
, y F .
Let’s assume we already transmitted y 1 , . . .
, y i − 1 .
To transmit y i , we use the transformer to predict P ( y i | y
i − 2 , y i − 1 ) .
Using this distribution, we entropy code y i to create a compressed, binary representation that can be transmitted.
To compress the full video, we simply apply this procedure iteratively, letting the transformer predict P ( y j | y j − 2 , y j − 1 ) for j ∈ { 1 , . .
, F } , padding with zeros when predicting distributions for y 1 , y 2 .
The receiver follows the same procedure to recover all y j , i.e. , it iteratively calculates P ( y j | y j − 2 , y j − 1 ) to entropy decode each y j .
After obtaining each representation, y 1 , y 2 , . . .
, y F , the receiver generates reconstructions.
Tokens When processing the current representation y i , we split it spatially into non-overlapping blocks with size w c × w c as shown in Fig.
Previous representations y
i − 2 , y i − 1 become corresponding overlapping w p × w p blocks (where w p > w c ) to provide both temporal and spatial context for predicting P ( y i |
y
i − 2 , y i − 1 ) .
Intuitively, the larger spatial extent provides useful context to predict the distribution of the current block.
Note that all blocks span a relatively large spatial region in image space due to the downscaling convolutional encoder E .
We ﬂatten each block spatially (see Fig. 2) to obtain tokens for the transformers.
The transformers then run independently on corresponding blocks/tokens, i.e. , tokens of the same color in Fig.
2 get processed together, trading reduced spatial context for parallel execution.
This independence assumption allows us to focus on a single set of blocks, e.g. , the pink blocks in
Fig.
In the following text and in Fig.
3, we thus show how we predict distributions for the w 2 c = tokens t 1 , t 2 , . . .
, t 16 in block b i , given the 2 w 2 p =128 tokens from the previous blocks
b i − 2 , b i − 1 .
Step 1: Temporal Mixer We use two transformers to extract temporal information from b i − 2 , b i − 1 .
A ﬁrst transformer T sep operates separately on each previous block.
Then, we concatenate the outputs in the token dimension and run the second transformer, T joint , on the result to mix information across time.
The output z joint is 2 w 2 p features, containing everything the model “knows” about the past.
Step 2:
Within-Block-Autoregression
The second part of our method is the masked transformer
T cur , which predicts PMFs for each token using auto-regression within the block.
We obtain a [Figure] powerful model by conditioning T cur on z joint as well as already transmitted tokens within the block.
For entropy coding, both the sender and the receiver must be able to obtain exactly the same PMFs, i.e. , T cur must be causal and start from a known initialization point.
For the latter, we learn a start token t S .
To send the tokens, we ﬁrst obtain z joint .
After that, we feed [ t S ] to T cur , obtain P ( t 1 | t S ; z joint ) , and use entropy coding to store the d C symbols in token t 1 into a bitstream using P ( t 1 | t S ; z joint ) .
Then, we feed [ t S , t 1 ] , obtain P ( t 2 | t 1 , t S ; z joint ) , store t 2 in the bitstream, and so on.
The receiver gets the resulting bitstream and can obtain the same distributions, and thereby the tokens, by ﬁrst feeding [ t S ] to T cur , obtaining P ( t 1 | t S ; z joint ) , entropy decoding t 1 from the bitstream, then feeding [ t S , t 1 ] to obtain P ( t 2 | t 1 , t S ; z joint ) , and so on.
Fig.
3 visualizes this for P ( t 3 | . . . ) .
We run this procedure in parallel over all blocks, and thereby send/receive y i by running T cur w 2 c = times.
Each run produces (cid:100) H/w c (cid:101) · (cid:100) W/w c (cid:101) ·
d C distributions.
To ensure causality of T cur during training, we mask the self-attention blocks similar to [35].
Independence Apart from assuming blocks in y i are independent, we emphasize that each token is a vector and that we assume the symbols within each token are conditionally independent given previous tokens, i.e. , T cur predicts the d C distributions required for a token at once .
One could instead predict a joint distribution over all possible |S| d C realisations, use channel-autoregression [27], or use vector quantization on tokens.
The latter two are interesting directions for future work.
Finally, we note that we do not rely on additional side information, in contrast to, e.g. , autoregressive image compression entropy models [26, 27].
3.3 Architectures
Transformers As visualized in Fig.
3, all of our transformers are based on standard architectures [35, 10].
We start by projecting the d C -dimensional tokens to a d T -dimensional space ( d T = in our model) using a single fully connected layer, and adding a learned positional embedding.
While both T sep and T joint are stacks of multi-head self-attention (MHSA) layers, T cur uses masked “conditional” transformer layers, similar to Vaswani et al.
These alternate between masked
MHSA layers and MHSA layers that use z joint as keys (K) and values (V), as shown in Fig.
We use 6 transformer layers for T sep , 4 for T joint , and 5 masked transformer layers for T cur .
We use
[Figure]
attention heads everywhere.
We learn a separate temporal positional embedding to add to the input of
T joint .
Image encoder E , decoder D
The image encoder and decoder E, D are not the focus of this paper, so we use architectures based on standard image compression approaches [26, 27].
For the encoder, we use 4 strided convolutional layers, downscaling by a factor 16 × in total.
For the decoder, we use transposed convolutions and additionally add residual blocks at the low resolutions.
We use d ED =192 ﬁlters for all layers.
See App. A.1 for details and an exploration of architecture variants.
3.4 Loss and Training Process
The modeling choices introduced in the previous section allow for an efﬁcient training procedure where we decompose the training into three stages, which enables rapid experimentation (Tab. 1).
In Stage I we train the per-frame encoder E and decoder D by minimizing the rate-distortion trade-off [43, Sec 3.1.1].
Let U denote a uniform distribution in [ − 0 .
We minimize
L I = E x ∼ p X ,u ∼U [ − log p (˜ y + u ) (cid:124) (cid:123)(cid:122) (cid:125) bit-rate r + λ MSE ( x, ˆ x ) (cid:124) (cid:123)(cid:122) (cid:125) distortion d ] , ˜ y =
E ( x ) , ˆ x = D ( round STE (˜ y )) , (1) using ˜ y to refer to the unquantized representation, and x ∼ p X are frames drawn from the training set.
Intuitively, we want to minimize the reconstruction error under the constraint that we can effectively quantize the encoder output, with λ controlling the tradeoff.
For Stage I , we thus employ the meanscale hyperprior [26] approach to estimate p , the de facto standard in neural image compression, which we discard for later stages.
4 To enable end-to-end training, we also follow [26], adding i.i.d. [Table] Loss B
N
[Table]
LR [Table] s Stage I
E, D r + λd  1 E −2M
Stage II
T sep , T joint , T cur r  1 E −1M
Stage III
T sep , T joint , T cur , E, D r + λd  2 .
5 E −250k
[Table]
[Table]
ˆ x i −ˆ x i −
Decode: 0 tokensblock 2 tokensblock 13 tokensblock 0kB
0.13kB 0.78kB uniform noise u to ˜ y when calculating r , and using straight-through estimation (STE) [33, 27] for gradients when rounding ˜ y to feed it to D .
For Stage II , we train the transformer to obtain p , and only minimize rate:
[Equation]
where ( x 1 , x 2 , x 3 ) ∼ p X 1:3 are triplets of adjacent video frames.
We assume each of the d C unquantized elements in each token follow a Gaussian distribution, p ∼ N , and let the transformer predict d C means and d C scales per token.
Finally, we ﬁnetune everything jointly in Stage III , adding the distortion loss d from Eq.
1 to Eq.
We note that it is also possibe to train the model from scratch , see App.
A.2. To obtain a discrete PMF P for the quantized symbols (for entropy coding), we again follow standard practice [4], convolving p with a unit-width box and evaluating it at discrete points, P ( y )
= (cid:82) u ∈U p ( y + u ) du, y
∈
Z [see, e.g. , 43, Sec. 3.3.3, for details].
To train, we use random spatio-temporal crops of ( B, N F , 256 , 256 , 3) pixels, where B is the batch size, and N F the number of frames (values are given in Tab. 1).
We use the linearly decaying learning rate (LR) schedule with warmup, where we warmup for 10k steps and then linearly decay from the LR shown in the table to 1 E − 5 .
Stage
I is trained using λ =0 .
To navigate the rate-distortion trade-off and obtain results for multiple rates, we ﬁne-tune 9 models in Stage III , using λ =0 .
01 · 2 i , i ∈{− 3 , . . .
We train all models on[-
-]
Google Cloud TPUv4 chips.
3.5 Latent Residual Predictor (LRP)
To further leverage the powerful representation that the transformer learns, we adapt the “latent residual predictor” (LRP) from recent work in image compression [27]: The ﬁnal features z cur from
T cur have the same spatial dimensions as y i , and contain everything the transformer knows about the current and previous representations.
Since we have to compute them to compute P , they constitute “free” extra features that are helpful to reconstruct ˆ x i .
We thus use z cur by feeding y (cid:48) i
= y i + f LRP ( z cur ) to D (we enable this in Stage III ), where f LRP consists of a 1 × 1 convolution mapping from d T to d ED followed by a residual block.
We note that this implies that ˆ x i
= D ( y (cid:48)
i ) indirectly depends on y i − 2 , y i − 1 , y i .
Since this is a bounded window into the past and y (cid:48)
i does not depend on ˆ x j< i , we remain free from temporal error propagation.
[Table]
Experiments
Data sets We train on one million Internet video clips, where each clip has nine frames.
We obtained high-resolution videos which we downscale with a random factor (removing previous compression artifacts), from which we get a central 256 crop.
Training batches are made up of randomly selected triplets of adjacent frames.
We evaluate on two common benchmark data sets: (1)
MCL-JCV [36, MIT Licence] made up of thirty 1080p videos captured at either 25 or 30FPS and averaging 137 frames per video, and (2) UVG [25, CC-BY-NC Licence] containing twelve 1080p 120FPS videos with either 300 or 600 frames each.
Synthetic videos We explore three parameterized synthetic data sets that we build by generating videos from still images from the CLIC2020 test set [34, Unsplash licence], (see Fig. 5).
Each data set has a parameter x that we vary, and we create 100 videos for each value of x .
Each video isframes of 512 × 512 px.
We explore: Shift , where we pan from the center of the image towards the lower right, shifting by x pixels in each step.
SharpenOrBlur , where if x ≥ 0 , we apply Gaussian blurring with sigma x · t at time step t .
If x< 0 , we create videos that get sharper over time by playing a video blurred with | x | in reverse.
Fade , where we linearly transition between two unrelated images using alpha blending (as in a scene cut).
We release the code to synthesize these videos.
Models We refer to our video compression transformer as VCT .
We run the widely used, nonneural, standard codec HEVC [31] ( a.k.a. H.265) using the ffmpeg x265 codec in the medium and veryslow settings, as well as H.264 using x264 in the medium setting.
For a fair comparison to our method, we follow previous work [1, 24, 30] in disabling B-Frames, but do not constrain the codecs in any other way.
We run the public DVC [23] code, and additionally obtain numbers from the following papers: SSF [1], which introduced scale-space-ﬂow, an architectural component to support warping and blurring, commonly used in follow-up work, ELF-VC [30], to the best of our knowledge the state-of-the-art neural method in terms of PSNR on MCL-JCV, which extends the motion compensation of SSF with more motion priors, FVC [17] and DCVC [19], both strong models based on warping plus residual coding in a representation space, RLVC [41], using ConvLSTMs as a sequence model, and Liu et al.
[21], who study losslessly transmitting representations using CNNs for temporal entropy modelling.
To explore how architectural biases behave on synthetic data, we reproduce SSF, using exactly the same training data as for VCT.
Metrics We evaluate the common PSNR and MS-SSIM [38] in RGB.
We train all models using
MSE as a distortion and use 200 · (1 − MS-SSIM ( x, ˆ x )) as the training objective in Stage III (Tab. 1) to obtain MS-SSIM models.
Results 5.1 Comparison to State of the Art
In Fig.
4, we depict rate distortion graphs for our method and the neural video compression methods introduced in Sec. 4, on MCL-JCV and UVG.
Despite the simplicity of our approach, and the fact that we use no motion or warping components, we outperform all methods in both PSNR and MS-SSIM.
In Fig.
5, we show how the transfomer learns to exploit various types of temporal patterns by applying it to the synthetic data sets introduced in Sec. 4, and reporting the evaluation R-D loss.
5 We compare to HEVC and SSF, which both have explicit support for shifting motion, while SSF also has explicit support for blurring.
We expect them to perform well on temporal patterns for which they have corresponding architectural priors.
In contrast, VCT has no such priors.
For each data set, we explore different values for the parameter x
(see Sec. 4), a point in the plot represents the average evaluation loss over the 100 videos created with x .
We observe: a) On videos with shifting based motion, VCT obtains ≈ 45% lower R-D loss compared to SSF, which saturates at about x = 10 , presumably due to the shallow CNN used for ﬂow estimation.
Since HEVC supports motion compensating with arbitrary shifts of previous frames, it excels on these kinds of videos.
For shifts that are a multiple of 16, the representations shifts by exactlysymbol in each step, and VCT matches HEVC.
The reason for this is that our encoder is a CNN, so it is only shift-equivariant for shifts which are multiples of the stride (16).
Any shift in [1, 15]
pixels causes the representation to change in a complex way (cf.
b) For blurring/sharpening, we outperform both HEVC and SSF, despite the latter having explicit support for blurring.
Note that the curve for SSF is asymmetric: since it has built-in support for blurring, it gets a ≈ 20% lower RD loss on blurring compared to sharpening.
c) VCT learns to handle fading, exhibiting a near-constant RD loss as we increase x , in contrast to the baselines, neither of which has a explicit support for fading.
SSF is ≈ 20% better than HEVC, possibly due to its blurrying capabilities.
For completely static videos x =0 , we observe that VCT is at a slight disadvantage compared to the previous approaches.
Overall, we believe that synthetic data can give better insight into the strengths and weaknesses of methods, and hope that future work can compare on these data sets.
After having seen k tokens in each block, the transformer predicts a PMF P ( t k +1 | t ≤ k , z joint ) .
This induces a joint distribution P ( t >k | . . . )
over all unseen (not yet decoded) tokens.
Intuitively, if the transformer is certain about the future, this distribution will be concentrated on the actual future tokens we will decode.
In Fig.
6, we visualize the sample mean of this distribution by feeding it through D , i.e. , we sample N realisations of the unseen tokens in each block, conditioned on the k already decoded ones, for k ∈ { 0 , 2 , 13 } .
In the middle image in Fig.
6, we show what the transformer expects at the current frame, before decoding any information ( k = 0 , i.e. , 0 bits).
We observe that the model is able—to some degree—to learn second order motion implicitly.
The next two images shows that as we decode more tokens, the model gets more certain, and the image sharpens.
In Tab. 2, we explore the importance of temporal context from previous frames and latent residual prediction (LRP) on MCL-JCV.
We start from a baseline that does not use any previous frames, i.e. , an image model, used to independently code each frame.
Conditioning on one previous frame reduces bitrate by − 58% .
Using two previous frames yields an additional improvement of − 6% .
In the ﬁnal conﬁguration (our model, VCT), which adds LRP, we observe an increase in PSNR of 0.7dB at the same bitrate.
We did not observe further gains from more context.
To obtain runtimes of the transformers ( T sep , T joint , T cur ) and the decoder ( D ), we employ a Google
Cloud TPU v4 (single core) using Flax [16], which has an efﬁcient implementation for autoregressive transformers.
We use Tensorﬂow Compression to measure time spent entropy coding (EC), on an Intel Skylake CPU core.
In Tab. 3, we report numbers for 1280 × 720 px, 480 px, and 480 × 360 px.
Since this benchmark is not fully end-to-end, we only report an FPS estimate by calculating 1000 / ( sum of individual runtimes in ms ) .
Note that running T cur at 720p once only takes ≈ 2 .
8 ms, but we run it w 2 c
=16 times to decode a frame.
To run T joint , we only have to run T sep once per representation, since we can re-use the output of running T sep on the previous representation.
[Table] Many neural compression methods do not detail inference time and do not have code available, but we copy the results from DCVC [19], FVC [17], and ELF-VC [30], in Table 4.
Conclusion and Future Work
We presented an elegantly simple transformer-based approach to neural video compression, outperforming previous methods without relying on architectural priors such as explicit motion prediction or warping.
Notably, our results are achieved by conditioning the transformer only on a 2-frame window into the past.
For some types of videos, it would be interesting to scale this up, or to introduce a notion of more long-term memory, possibly leveraging arbitrary reference frames.
As mentioned towards the end of Sec. 3.2, various different ways to factorize the distributions could be explored, including vector quantization, channel-autoregression, or changing the independence assumptions around how we split representations into blocks.
Societal Impact We hope our method can serve as the foundation for a new generation of video codecs.
This could have a net-positive impact on society by reducing the bandwidth needed for video conferencing and video streaming and to better utilize storage space, therefore increasing the capacity of knowledge preservation.
Acknowledgements We thank Basil Mustafa, Ashok Popat, Huiwen Chang, Phil Chou, Johannes
Ballé, and Nick Johnston for the insightful discussions and feedback.
[Table]