{'fraction_non_alphanumeric': 0.03260869565217391, 'fraction_numerical': 0.013626723223753977, 'mean_word_length': 4.633512544802867, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Generative Compression for Face Video: A Hybrid Scheme

As the latest video coding standard, versatile video coding (VVC) has shown its ability in retaining pixel quality. To excavate more compression potential for video conference scenarios under ultra-low bitrate, this paper proposes a bitrate adjustable hybrid compression scheme for face video. This hybrid scheme combines the pixel-level precise recovery capability of traditional coding with the generation capability of deep learning based on abridged information, where Pixel wise Bi-Prediction, Low-Bitrate-FOM and Lossless Keypoint Encoder collaborate to achieve PSNR up to 36.23 dB at a low bitrate of 1.47 KB/s. Without introducing any additional bitrate, our method has a clear advantage over VVC under a completely fair comparative experiment, which proves the effectiveness of our proposed scheme. Moreover, our scheme can adapt to any existing encoder / configuration to deal with different encoding requirements, and the bitrate can be dynamically adjusted according to the network condition.


INTRODUCTION
In the context of COVID-19, more and more video calls are made, and face video compression technologies are becoming increasingly significant. In the case of poor network quality, achieving stable and smooth video call with ultra-low bitrate is a hot research topic. Existing methods for face video compression can be divided into two categories: traditional coding methods and deep-learning-based methods.
Traditional video coding methods have the advantage of pixel-level precise recovery even for rapidly changing scenes, where VVC [1] is the most advanced standard. Compared with HEVC [2], VVC saves about 50% of the bitrate while maintaining the similar visual quality. However, these traditional methods represented by VVC do not discriminate video content and compress all videos in the same way although in fact, face video compression should have more potential.
Deep learning has the generation capability based on abridged information, so it has great potential in face video compression. Researchers have proposed some deeplearning-based methods [3][4][5] to implement face video compression. Oquab et al. [5] designed a mobile-compatible architecture based on FOM [6], but bad results may appear with large attitude changes due to fixed reference frames. Wang et al. [4] proposed an one-shot neural talking-head synthesis approach which utilizes one reference frame to generate a freeview output video, but the objective quality is not that satisfactory. Feng et al. [3] proposed a video compression framework that utilizes pre-saved face frames as reference to reconstruct the target frame with fine details, where additional bitrates are introduced which leads to unfair bitrate comparison. The above methods [3][4][5]7] apply static reference frames, so it's hard to guarantee good performance in case of scene switch or large attitude transformation, which leads to a failure in high fidelity recovery. There also exists a generative compression method [7] based on FOM [6], utilizing one raw frame as reference and adding the generated frames to the reference frame pool, which tends to cause error accumulation. However, pixel-level accurate recovery is the strength of traditional coding methods. Consequently, we come up with the idea of designing a hybrid scheme which combines traditional coding with deep generation. Moreover, most of the existing AI-based video conference methods can hardly dynamically adjust the bitrate. For example, these methods [3][4][5]7] can only adjust the bitrate through adjusting the number of keypoints despite the fact that different numbers of keypoints correspond to different models, further limiting their practicality.
To tackle the aforementioned problems, we propose a bitrate-adjustable hybrid coding scheme. It is a hybrid scheme because we sample the key frames according to a certain frequency, encode these key frames with traditional method such as VVC, and use deep generative method to reconstruct nonkey frames according to the transmitted keypoints. Combining the pixel-level recovery capability of traditional coding with the detail generation capability of deep learning, our proposed hybrid scheme is able to synthesize high-quality face videos at ultra-low bitrate. Meanwhile, the bitrate can be dynamically adjusted through two channels: the sampling interval of key frames or the compression ratio of key frames. Thus, we can dynamically choose the right configuration according to the network condition, which is more practical than     Assuming the sampling interval is 5, the orange blocks are key frames and the blue ones are non-key frames. In (a), a non-key frame is predicted by the previous key frame. In (b), a non-key frame is predicted by the key frame closest to it. In (c), a non-key frame is predicted by two adjacent key frames jointly. the aforementioned methods.
In our scheme, inspired by bidirectional prediction idea of traditional coding, we design a Pixel-wise Bi-Prediction method shown in Figure 2(c), which uses two adjacent key frames and the keypoints of non-key frames to predict the non-key frames, greatly improving the smoothness of the generated video. Specifically, we selected FOM [6] as the basic generation model since it utilizes a sparse representation of human faces to implement face animation which costs a relatively-low bandwidth compared to [8][9][10][11]. Based on FOM [6], we propose a low bitrate version called LowBitrate-FOM (LB-FOM) to further lower the bitrate, taking the bitrate to one-twelfth of original FOM [6] with little loss of quality, and design a lossless coding scheme to conduct further compression. Overall, we assist traditional coding with deep generative methods to improve the detail retention and assist deep generative methods with traditional bidirectional prediction idea to improve smoothness, achieving the goal of generating smooth and detailed face video at ultra-low bitrate.
Our method does not introduce any additional bitrate, which means there is not any prior information at the receiver such as pre-saved reference frames before transmission. Thus, under a completely fair comparison, our method has an obvious advantage over VVC in face video com-pression, which proves the effectiveness of our proposed scheme. Moreover, our scheme applies to any existing encoder/configuration, to deal with different encoding requirements. The contributions can be summarized as: (1) We propose a hybrid compression scheme for face video which combines the advantages of traditional coding and deep learning, synthesizing high quality face video at ultra-low bitrate. (2) A Pixel-wise Bi-Prediction method is proposed to generate smooth videos. (3) We propose an LB-FOM which takes the bitrate to one-twelfth of original FOM [6] with little loss of quality. (4) Our scheme implements dynamically-adjustable bitrate and adapts to any existing encoder/configuration to deal with different encoding requirements.

METHOD
For a video sequence, at the sender, we sample the key frames according to a certain frequency (e.g., take one key frame every 5 frames), encode these key frames with VVenC [12], an efficient VVC realization which has compression performance similar to VVC but with much less encoding complexity, and transmit the bitstream to the receiver. For non-key frames, we use the proposed LB-FOM-KPDetector in Figure 4(b) to detect keypoints of type Uint8, encode them losslessly and transmit the bitstream to the receiver. At the receiver, the bitstream of VVenC is decoded to reconstruct the key frames. With the reconstructed key frames and the keypoints of the non-key frames, we utilize Bi-Net, the network of the proposed Pixel-wise Bi-Prediction method, to reconstruct the non-key frames. The network architecture is illustrated in Section 2.1. Finally, we rearrange all frames in chronological order to get the final video streaming at the receiving end. Details of the lossless coding scheme and bitrate calculation will be explained in Section 2.3.

Bi-Net: Pixel-wise Bi-Prediction
In Figure 2, Forward Prediction tends to lead to obvious jitter between the 5th and 6th frame, and Forward+Backward Prediction tends to lead to obvious jitter between the 3rd and  4th frame, damaging our subjective experience, which has been proved in Table 4. Thus, we propose a Pixel-wise Bi-Prediction method and design a Bi-Net to implement this idea. As shown in Figure 3, overall, the input of Bi-Net is two adjacent key frames (F k1 and F k2 ) and the keypoint heatmap of a non-key frame (H t ), and the output is the predicted nonkey frame F t corresponding to H t . Specifically, we feed F k1 and H t to G to get the intermediate product H k1 and the reenacted result F t1 . In the same way, F k2 and H t are fed to G to get H k2 and F t2 . Then, the concatenation of H k1 , H t and H k2 is fed to the Mask-Predictor with an encoder-decoder architecture to predict a mask M t with value between 0 and 1 which acts on F t1 and F t2 , obtaining the final result F t : The architecture of G is shown at the right of Figure 3, and the details of LB-FOM is illustrated below.
LB-FOM Siarohin et al. proposed FOM [6] to implement face animation. As shown in Figure 4(a), FOM [6] utilizes a KPDetector to predict the keypoints H s and correspond- ing Jacobian J s of the source image F s , and predict the keypoints H t and corresponding Jacobian J t of the target image F t , where all data is of type Float32. Then H s , J s , H t , J t and the source image F s are fed to the generator to obtain the final result F t .
In FOM [6], each frame is represented by a fixed number of keypoints (e.g. 10) along with their Jacobians. Each keypoint consists of an (x, y) coordinate, and the corresponding Jacobian is of size 2 × 2. Since all data is of type Float32, for each frame, the keypoints are represented by 80 Bytes and the Jacobians are represented by 160 Bytes, resulting in a total bitrate of 240 Bytes/frame.
To lower the bitrate, we propose a LowBitrate-FOM (LB-FOM) in Figure 4(b). Specifically, we remove the prediction of Jacobians and quantify the keypoints in [-1,1] into range [0, 255], which means data of type Float32 is converted to type Uint8. In this way, the total bitrate decreases from 240 Bytes/frame to 20 Bytes/frame. Table 1 shows the impact of such cuts. In Table 1, removing the Jacobian and converting Float32 to Uint8 directly lead to the continuous decline of PSNR, from 36.76 dB to 36.28 dB to 36.06 dB. This is probably because direct quantization is non-differentiable, resulting in the failure of gradient back propagation. When we add uniform noise to the predicted keypoints to simulate the quantization loss in the training phase, the PSNR value decreases only 0.29 dB compared to the original FOM [6], while the bitrate is reduced to one-twelfth of it, which is a good deal, demonstrating the effectiveness of our proposed LB-FOM. An ablation study is conducted in Table 5 to further explore the issue about keypoints quantization.

Training Schemes
First, we take two frames from the same video at a time as paired training data and train LB-FOM in a supervised manner with (5). After training LB-FOM, fix the weights of it, that is, fix G, and train the Mask-Predictor to predict a valid mask M t which acts on F t1 and F t2 to synthesize the final F t with (5). Specifically, we take three frames from the same video at a time, and let the intermediate frame as the non-key frame and the rest two frames as the key frames. After training the Mask-Predictor, finetune the whole Bi-Net for a few epochs. Finally, quantify the keypoints directly rather than use uniform noise to simulate the quantization loss, and finetune another epoch to further improve the performance.

Lossless Coding Scheme and Bitrate Calculation
In this paper, LB-FOM predicts 10 keypoints of type Uint8 for each non-key frame, so each non-key frame is represented by 20 Bytes if uncompressed. To encode these keypoints, we design a lossless coding scheme, in which way each non-key frame is compressed to 4.98 Bytes on average. Specifically, we utilize intra and inter prediction, exponential Golomb coding and adaptive binary arithmetic coding [14] to further reduce the bitrate. More details can be found in Sup.M at.. The total bitstream is composed of two parts: VVenC bitstream from key frames and keypoint bitstream from non-key frames. The sampled key frames are treated as a new video and VVenC is utilized to encode this video. The bitstream is determined by VVenC algorithm [12]. As mentioned above, each non-key frame is represented by 4.98 Bytes on average with our lossless coding scheme. Assuming that the sampling interval is N , which means there is one key frame in every N frames, we can calculate the average bitrate: where B k is the bitrate of the key frame, B nk is the bitrate of the non-key frame, and B avg is the average bitrate.

EXPERIMENTS
3.1. Implementation Details Datasets. In this paper, we use DFDC [15] as our trainset. DFDC dataset consists of over 15,000 face videos and each video consists of nearly 300 frames. To test our method, we download 15 videos from YouTube in VoxCeleb2 [16] as our testset, and each video consists of nearly 300 frames. All experiments were conducted at 256×256 image resolution, while Table 3 further shows some experimental results at 512×512 resolution. For all videos, frame rate is 30 FPS.
Metrics. We use PSNR(Y) (in dB), the Peak Signal-to-Noise Ratio value of Y channel in yuv format, as the main objective metric. For subjective metrics, in Table 2, fidelity score reflects the degree of detail retention and aesthetics score reflects the overall video visual quality. Specifically, we simultaneously show two videos encoded by VVenC and our method respectively and tell the users to choose the better one in fidelity or aesthetics, so the score is actually the user  preference percentage. In Table 4 and Table 5, the smoothness score reflects the degree of video smoothness and fluency. These methods are compared in pairs. For each method, smoothness-score = the number of times it was preferred / the total number of times it was compared.

Comparison Results
We mainly compare our proposed method with VVenC in Figure 5 and Figure 6. As shown in Figure 5, at the same bitrate, the visual quality of our generated images are obviously better than that of VVenC. For example, at the bitrate of 0.7 KB/s, VVenC obtained the performance of QP=62, while in our method, we encoded the key frames at QP=34 and generated the non-key frames almost with the same quality as the key frames, that is, cost the bitrate of QP=62 while achieved the quality of QP=34. Specific values of bitrate and PSNR are shown in Table 2, where the results demonstrate that our method achieves obviously better performance than VVenC in detail retention and overall quality. Additionally, we show more results at 256×256 and 512×512 resolutions in Table  3. Complete experimental data is shown in Sup.M at.. Figure 6 shows the quantitative results in LDP mode and RA mode. Without the loss of generality, we take Figure 6(a) as example. We choose VVenC as our baseline, and test its performance from QP=35 to QP=62. Higher QP value means higher compression ratio. As mentioned above, our method can implement dynamically-adjustable bitrate through two  channels: adjust the sampling interval of key frames or adjust the compression ratio (that is, QP value) of key frames. In Figure 6(a), the orange broken line shows the performance of different sampling intervals from 5 to 100 under QP=30, and the green broken line is the performance under QP=34. In fact, QP value and the sampling interval can be determined freely, not limited to those listed. In addition, we also compared our method with Wang et al. [4]. Since there is no released test code, we applied the data released in their paper and drew it in Figure 6. It can be found that our method achieves significantly better performance than VVenC and Wang et al. [4] in either LDP mode or RA mode.

Ablation Studies
As mentioned in Section 2.1, Forward Prediction and For-ward+Backward Prediction have the disadvantage of generating unsmooth video, so we propose the Pixel-wise Bi-Prediction method. To demonstrate its effectiveness, we compare these three prediction methods, and show results in Table 4, where the Pixel-wise Bi-Prediction method achieves the highest PSNR(Y) score and has the best performance in video smoothness. In Figure 7, we visualize the intermediate products generated in the inference process. It can be found that the predicted mask M t tends to trust the frame predicted by the key frame that looks more like F t , which makes sense. For example, in the first row, F k1 looks more like F t than F k2 , so the predicted mask gives more weight to F t1 than F t2 . We also conduct an ablation study in Table 5 to demonstrate the necessity of quantifying keypoints during training and the necessity of adding uniform noise to simulate the quantization loss. In Table 5, quantifying keypoints only in the testing phase results in relatively bad objective performance. Quantifying keypoints in the training phase without adding noise leads to an obvious decline in smoothness score. By contrast, quantifying keypoints in the training phase and adding uniform noise to simulate the quantization loss achieves satisfactory performance in both objective and subjective experiments.   Fig. 7: The intermediate products generated in the inference process. F t is the target non-key frame to be generated. F k1 & F k2 are two adjacent key frames, and F t1 & F t2 are their predictive results using G, respectively. E t1 is the error map between F t and F t1 , and E t2 is the error map between F t and F t2 . M t is the predicted mask which operates on F t1 and F t2 . F t is the final synthesized result.

CONCLUSION
In this paper, we propose a hybrid compression scheme for face video, which combines the pixel-level precise recovery capability of traditional coding with the generation capability of deep learning based on abridged information, achieving the purpose of high quality face video synthesis at ultralow bitrate. Our proposed Pixel-wise Bi-Prediction method helps generate smooth videos, greatly improving our subjective experience. Without introducing any additional bitrate, a series of completely fair experiments have demonstrated the effectiveness of our proposed scheme. Moreover, this scheme has the characteristic of dynamically-adjustable bitrate and adapts to any existing encoder/configuration to deal with different encoding requirements, resulting in a strong practicability. Our future work includes better keypoint compression method and delay optimization.