# Reducing Video Coding Complexity Based on CNN-CBAM in HEVC
## 2 The Proposed Methods
### Proposed Algorithm  
#### 2.2.1 Proposed Structure of CNN  
Deep learning has been brought to video coding to reduce the time overhead of intra-frame coding by training a large number of parameters to learn the encoder CU partition rules. These methods can be broadly classified into two kinds: single CNN [21; 22; 23; 24; 25; 26; 27] and single CNN with some auxiliary data [28; 29; 30; 31; 32], For example, CNNs were initially used in video codecs by [PERSON] et al. [19], who presented a deep CNN to minimize the amount of CU/PU candidate patterns. Furthermore, size-specific down-sampling for different CU/PU sizes resulted in texture loss variances for different CU/PU layers, which had an effect on the anticipated results. To better understand the CU partition rules in the encoder, [PERSON] et al. [22] suggested a deep CNN method trained on numerous parameters to address the problem of redundant computation during intra-frame CU partition. [PERSON] et al. [28] introduced an efficient block partitioning CNN method that not only improved on the CNN, but also incorporated an adaptive threshold technique for the accurate management of CNN prediction errors. [PERSON] et al. [32] investigated the correlation between texture complexity, quantization parameters, and CU depth and proposed a CNN scheme based on texture classification aiming at accelerating CU partition. However, the huge reduction in the complexity of these methods based on CNN comes at the expense of a minor drop in RD performance. The latest study [28] showed a more significant improvement in both the complexity reduction and compression efficiency. However, there are still some  
Figure 1: Traditional CU partition (1, 2, and 3 denote different CU size of 32 \(\times\) 32, 16 \(\times\) 16, 8 \(\times\) 8 respectively). shortcomings. For example, in [28], although the different CU sizes could share the same convolution structure, the extracted global information was limited for larger CU sizes. In addition, this method used RDO in uncertain regions with a threshold of approximately 0.5, further increasing the computational complexity. Inspired by [21; 28], we propose a novel CNN-based approach to further reduce the coding complexity while sustaining the compression performances without a loss of generality. Unlike in [21; 28], the proposed CNN considers the global image information and designs a convolution operation that is compatible with the current CU size, thus the feature extraction is realized between adjacent scaling CU and the information interaction can be carried out in the same path. In addition, a convolution block with superposition performance was designed to extract the detailed features of the image blocks. Thus, the effective learning of the global information is achieved. The proposed CNN not only accurately predicts the CU partition to replace unnecessary encoding processes, but also strengthens the connection between CNN and different CU sizes. The proposed CNN is shown in Figure 2. Note that we selected original image luminance information as input to the network since it contained more visual information. There are three different branches of the proposed CNN, namely B1, B2, and B3, corresponding to the different CU sizes. The different branches are first pre-processed separately, and then the pre-processed CU information is passed through the convolution, concatenation, and fully connection layers in sequence until the CU partition decision results are output. The specific structures are described as follows:  
Figure 2: Structure of the CNN. **Convolution Layer:** The initial 64 \(\times\) 64 luminance pixel matrix serving as the input to this network is the corresponding preprocessing process before entering each of the three branches, with the preprocessed CU block serving as the input to the convolutional layer of that branch alone. Noted that in this paper, we fixed the size of the convolution kernel to be same as the step of this layer.