Method for changing neural network parameter in video compression
Adaptive neural network parameter changes in a deep learning-based in-loop filter improve video encoding efficiency and quality for real-time applications, addressing computational complexity and data size challenges in existing technologies.
Patent Information
- Application Number
- PCT/KR2025/004982
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-04-09
- Filing Date
- 2025-04-11
- Publication Date
- 2025-10-30
AI Technical Summary
Existing video compression technologies face challenges in achieving efficient encoding and improved image quality due to increasing data sizes and computational complexity, particularly in real-time applications involving deep learning-based image processing.
A method for adaptively changing neural network parameters in a deep learning-based in-loop filter using content-adaptive parameters, involving a convolutional layer and activation function, to optimize rate distortion in video encoding and decoding processes.
Enhances video encoding efficiency and quality, reducing network burden and energy consumption for high-definition and immersive video content, such as UHD, game broadcasting, and VR/AR streaming.
Smart Images

Figure KR2025004982_30102025_PF_FP_ABST
Abstract
Description
Methods for Modifying Neural Network Parameters in Video Compression
[0001] The present disclosure relates to a method for changing neural network parameters for real-time content adaptation in video compression.
[0002] The content described below merely provides background information related to the present invention and does not constitute prior art.
[0003] Since video data has a large amount of data compared to voice data or still image data, it requires a lot of hardware resources, including memory, to store or transmit it without processing for compression.
[0004] Therefore, when storing or transmitting video data, the encoder compresses the video data and stores or transmits it, and the decoder receives the compressed video data, decompresses it, and plays it back. These video compression technologies include H.264 / AVC, HEVC (High Efficiency Video Coding), and VVC (Versatile Video Coding), which improves encoding efficiency by about 30% compared to HEVC.
[0005] However, as the size, resolution, and frame rate of images are gradually increasing, and the amount of data that needs to be encoded is also increasing, a new compression technology that has better encoding efficiency and better image quality improvement than existing compression technologies is required.
[0006] Recently, deep learning-based image processing technologies are being applied to existing encoding element technologies. By applying deep learning-based image processing to existing encoding techniques, such as inter-prediction, intra-prediction, in-loop filters, and transformation, encoding efficiency can be improved. Representative application examples include inter-prediction based on virtual reference frames generated using deep learning models and in-loop filters based on image restoration models.
[0007] Meanwhile, in deep learning-based image processing technology, a multi-pass encoding process is used to adaptively modify neural network parameters based on content. The multi-pass encoding process involves 1) constructing neural network parameters adaptive to the current video frame, and 2) encoding the configured parameters. However, due to its computational complexity, the multi-pass encoding process may be difficult to apply to real-time encoding. Therefore, to enhance video encoding efficiency and improve video quality, a method for efficiently modifying neural network parameters for real-time content adaptation needs to be considered.
[0008] The present disclosure aims to provide a video coding method and device that adaptively changes neural network parameters to content in terms of rate distortion optimization, in relation to a deep learning-based in-loop filter.
[0009] According to an embodiment of the present disclosure, a method for applying an in-loop filter to a current block, performed by a video decoding device, is provided, comprising: decoding parameters of the in-loop filter from a bitstream; wherein the in-loop filter is pre-trained based on deep learning and includes a convolutional layer and an activation function; obtaining content-adaptive parameters related to the in-loop filter; obtaining a reconstruction block of the current block, wherein the reconstruction block includes a luma block and a chroma block; generating stacked blocks based on the luma block and the chroma block; and inputting the stacked blocks to the in-loop filter and applying the content-adaptive parameters to the convolutional layer or the activation function, thereby performing filtering.
[0010] According to another embodiment of the present disclosure, a method for applying an in-loop filter to a current block, performed by a video encoding device, is provided, comprising: obtaining parameters of the in-loop filter, wherein the in-loop filter is pre-trained based on deep learning and includes a convolutional layer and an activation function; obtaining content-adaptive parameters related to the in-loop filter; obtaining a reconstruction block of the current block, wherein the reconstruction block includes a luma block and a chroma block; generating stacked blocks based on the luma block and the chroma block; inputting the stacked blocks to the in-loop filter and applying the content-adaptive parameters to the convolutional layer or the activation function, thereby performing filtering; and encoding the parameters of the in-loop filter and the content-adaptive parameters.
[0011] According to another embodiment of the present disclosure, a method for providing video data to a video decoding device is provided, comprising: encoding the video data into a bitstream; and transmitting the bitstream to the video decoding device, wherein the encoding the video data comprises: obtaining parameters of an in-loop filter, wherein the in-loop filter is pre-trained based on deep learning and includes a convolutional layer and an activation function; obtaining content-adaptive parameters related to the in-loop filter; obtaining a reconstruction block of a current block, wherein the reconstruction block includes a luma block and a chroma block; generating stacked blocks based on the luma block and the chroma block; inputting the stacked blocks to the in-loop filter and applying the content-adaptive parameters to the convolutional layer or the activation function, thereby performing filtering; and encoding the parameters of the in-loop filter and the content-adaptive parameters.
[0012] As described above, according to the present embodiment, in relation to a deep learning-based in-loop filter, there is provided a video coding method and device that adaptively changes neural network parameters to content in terms of rate distortion optimization, thereby making it possible to improve video encoding efficiency and enhance video quality.
[0013] In addition, according to the present embodiment, by providing a video coding method and device that adaptively changes neural network parameters to content in relation to a deep learning-based in-loop filter, it is possible to reduce the burden on the network based on bit rate reduction in various contents such as UHD (Ultra High Definition) video, game broadcasting, 360-degree video streaming, VR / AR (Virtual Reality / Augmented Reality) video, online lectures, etc., and to reduce energy consumption for a video playback device.
[0014] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the techniques of the present disclosure.
[0015] Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT (QuadTree plus BinaryTree TernaryTree) structure.
[0016] FIGS. 3A and 3B are diagrams illustrating multiple intra prediction modes, including wide-angle intra prediction modes.
[0017] Figure 4 is an example diagram of the surrounding blocks of the current block.
[0018] FIG. 5 is an exemplary block diagram of an image decoding device capable of implementing the techniques of the present disclosure.
[0019] Figure 6 is an example diagram showing a multilayer neural network as a deep learning-based neural network.
[0020] Figure 7 is an example diagram showing the operation of a convolution layer.
[0021] Figure 8 is an example diagram showing a SISR (Single Image Super Resolution) network.
[0022] Figure 9 is an example diagram showing a residual block used in SISR.
[0023] Figure 10 is an example diagram showing a fixed coefficient in-loop filter based on a CNN (Convolutional Neural Network).
[0024] Figure 11 is an example diagram conceptually representing a low-complexity operating point (LOP) in-loop filter.
[0025] Figure 12 is an example diagram showing the input section of the LOP in-loop filter.
[0026] Figure 13 is an example diagram showing the preprocessing unit of the LOP in-loop filter.
[0027] Figure 14 is an example diagram showing the backbone block of the LOP in-loop filter.
[0028] Figure 15 is an example diagram showing the post-processing part of the LOP in-loop filter.
[0029] FIG. 16 is an exemplary diagram showing a backbone block of a LOP in-loop filter according to one embodiment of the present disclosure.
[0030] FIG. 17 is an exemplary diagram illustrating the generation of content adaptive parameters according to one embodiment of the present disclosure.
[0031] Figure 18 is an example diagram showing a PReLU (parameterized rectified linear unit) activation function.
[0032] FIG. 19 is a flowchart illustrating a method for controlling neural network-based video tools performed by a video encoding device according to one embodiment of the present disclosure.
[0033] FIG. 20 is a flowchart illustrating a method for controlling neural network-based video tools performed by a video decoding device according to one embodiment of the present disclosure.
[0034] Hereinafter, embodiments of the present invention will be described in detail with reference to exemplary drawings. When designating components in each drawing, it should be noted that, where possible, identical components are given the same reference numerals, even if they appear in different drawings. Furthermore, in describing the present embodiments, detailed descriptions of related known structures or functions will be omitted if they are deemed to obscure the gist of the present embodiments.
[0035] FIG. 1 is an exemplary block diagram of an image encoding device capable of implementing the techniques of the present disclosure. Hereinafter, the image encoding device and its subcomponents will be described with reference to the illustration in FIG. 1.
[0036] The video encoding device may be configured to include a picture segmentation unit (110), a prediction unit (120), a subtractor (130), a transformation unit (140), a quantization unit (145), a reordering unit (150), an entropy encoding unit (155), an inverse quantization unit (160), an inverse transformation unit (165), an adder (170), a loop filter unit (180), and a memory (190).
[0037] Each component of the video encoding device may be implemented in hardware, software, or a combination of hardware and software. Furthermore, the functions of each component may be implemented in software, with a microprocessor executing the software functions corresponding to each component.
[0038] A single image (video) is composed of one or more sequences containing multiple pictures. Each picture is divided into multiple regions, and encoding is performed for each region. For example, a single picture is divided into one or more tiles and / or slices. Here, one or more tiles can be defined as a tile group. Each tile or slice is divided into one or more Coding Tree Units (CTUs). Each CTU is then divided into one or more Coding Units (CUs) by a tree structure. Information applied to each CU is encoded as the syntax of the CU, and information commonly applied to CUs included in a CTU is encoded as the syntax of the CTU. In addition, information commonly applied to all blocks within a single slice is encoded as the syntax of the slice header, and information applied to all blocks constituting one or more pictures is encoded in the Picture Parameter Set (PPS) or the picture header. Furthermore, information commonly referenced by multiple pictures is encoded in a Sequence Parameter Set (SPS). And, information commonly referenced by one or more SPS is encoded in a Video Parameter Set (VPS). In addition, information commonly applied to one tile or tile group may be encoded as syntax of a tile or tile group header. Syntaxes included in an SPS, PPS, slice header, tile or tile group header may be referred to as high level syntax.
[0039] The picture segmentation unit (110) determines the size of the CTU. Information about the size of the CTU (CTU size) is encoded as the syntax of SPS or PPS and transmitted to the image decoding device.
[0040] The picture segmentation unit (110) divides each picture constituting an image into a plurality of CTUs having a predetermined size, and then recursively divides the CTUs using a tree structure. A leaf node in the tree structure becomes a CU, which is a basic unit of encoding.
[0041] The tree structure may be a QuadTree (QT) in which an upper node (or parent node) is divided into four lower nodes (or child nodes) of the same size, a BinaryTree (BT) in which an upper node is divided into two lower nodes, or a TernaryTree (TT) in which an upper node is divided into three lower nodes in a 1:2:1 ratio, or a structure that mixes two or more of the QT structures, BT structures, and TT structures. For example, a QTBT (QuadTree plus BinaryTree) structure may be used, or a QTBTTT (QuadTree plus BinaryTree TernaryTree) structure may be used. Here, BTTT may be combined and referred to as a MTT (Multiple-Type Tree).
[0042] Figure 2 is a drawing for explaining a method of dividing a block using the QTBTTT structure.
[0043] As illustrated in FIG. 2, a CTU may first be split into a QT structure. The quadtree splitting may be repeated until the size of the splitting block reaches the minimum block size (MinQTSize) of the leaf node allowed in the QT. A first flag (QT_split_flag) indicating whether each node of the QT structure is split into four nodes of the lower layer is encoded by the entropy encoding unit (155) and signaled to the image decoding device. If the leaf node of the QT is not larger than the maximum block size (MaxBTSize) of the root node allowed in the BT, it may be further split into one or more of the BT structure or the TT structure. There may be multiple splitting directions in the BT structure and / or the TT structure. For example, there may be two directions in which the block of the corresponding node is split horizontally and two directions in which the block is split vertically. As illustrated in FIG. 2, when MTT splitting begins, a second flag (mtt_split_flag) indicating whether nodes have been split, and if splitting has occurred, a flag indicating the splitting direction (vertical or horizontal) and / or a flag indicating the splitting type (Binary or Ternary) are encoded by the entropy encoding unit (155) and signaled to the image decoding device.
[0044] Alternatively, before encoding the first flag (QT_split_flag) indicating whether each node is split into four nodes of a lower layer, a CU split flag (split_cu_flag) indicating whether the node is split may be encoded. If the CU split flag (split_cu_flag) value indicates that the node is not split, the block of the corresponding node becomes a leaf node in the split tree structure and becomes a CU (coding unit), which is a basic unit of encoding. If the CU split flag (split_cu_flag) value indicates that the node is split, the video encoding device starts encoding from the first flag in the above-described manner.
[0045] As another example of a tree structure, when QTBT is used, there may be two types: a type that horizontally splits the block of the corresponding node into two blocks of the same size (i.e., symmetric horizontal splitting) and a type that vertically splits it (i.e., symmetric vertical splitting). A split flag (split_flag) indicating whether each node of the BT structure is split into blocks of a lower layer and split type information indicating the type of split are encoded by the entropy encoding unit (155) and transmitted to the image decoding device. Meanwhile, there may additionally be a type that splits the block of the corresponding node into two blocks of an asymmetrical shape. The asymmetric shape may include a shape that splits the block of the corresponding node into two rectangular blocks with a size ratio of 1:3, or a shape that splits the block of the corresponding node in a diagonal direction.
[0046] A CU can have various sizes depending on the QTBT or QTBTTT partitioning from the CTU. Hereinafter, the block corresponding to the CU to be encoded or decoded (i.e., the leaf node of the QTBTTT) is referred to as the "current block." Depending on the QTBTTT partitioning employed, the current block may be rectangular as well as square.
[0047] The prediction unit (120) predicts the current block and generates a prediction block. The prediction unit (120) includes an intra prediction unit (122) and an inter prediction unit (124).
[0048] In general, each current block within a picture can be predictively coded. Prediction of the current block can typically be performed using either intra-prediction (using data from the picture containing the current block) or inter-prediction (using data from a picture coded before the picture containing the current block). Inter-prediction encompasses both unidirectional and bidirectional prediction.
[0049] The intra prediction unit (122) predicts pixels within the current block using pixels (reference pixels) located around the current block within the current picture including the current block. There are multiple intra prediction modes depending on the prediction direction. For example, as shown in Fig. 3a, the multiple intra prediction modes may include two non-directional modes including the Planar mode and the DC mode, and 65 directional modes. The surrounding pixels to be used and the calculation formula are defined differently depending on each prediction mode.
[0050] For efficient directional prediction for a rectangular current block, directional modes (intra prediction modes 67 to 80 and -1 to -14) indicated by dotted arrows in Fig. 3b may be additionally used. These may be referred to as "wide-angle intra-prediction modes." In Fig. 3b, the arrows point to corresponding reference samples used for prediction, and do not indicate the prediction direction. The prediction direction is opposite to the direction indicated by the arrows. Wide-angle intra-prediction modes are modes that perform prediction in the opposite direction of a specific directional mode without additional bit transmission when the current block is rectangular. At this time, among the wide-angle intra-prediction modes, some wide-angle intra-prediction modes available for the current block may be determined based on the ratio of the width and height of the rectangular current block. For example, wide-angle intra prediction modes (intra prediction modes 67 to 80) having an angle less than 45 degrees are available when the current block is a rectangular shape whose height is smaller than its width, and wide-angle intra prediction modes (intra prediction modes -1 to -14) having an angle greater than -135 degrees are available when the current block is a rectangular shape whose width is larger than its height.
[0051] The intra prediction unit (122) can determine an intra prediction mode to be used to encode the current block. In some examples, the intra prediction unit (122) can encode the current block using multiple intra prediction modes and select an appropriate intra prediction mode to be used from the tested modes. For example, the intra prediction unit (122) can calculate bit-rate distortion values using rate-distortion analysis for multiple tested intra prediction modes and select an intra prediction mode with the best bit-rate distortion characteristics among the tested modes.
[0052] The intra prediction unit (122) selects one intra prediction mode from among multiple intra prediction modes and predicts the current block using surrounding pixels (reference pixels) and an operation formula determined according to the selected intra prediction mode. Information about the selected intra prediction mode is encoded by the entropy encoding unit (155) and transmitted to the image decoding device.
[0053] The inter prediction unit (124) generates a prediction block for the current block using a motion compensation process. The inter prediction unit (124) searches for a block most similar to the current block within reference pictures that were encoded and decoded before the current picture, and generates a prediction block for the current block using the searched block. Then, a motion vector (MV) corresponding to the displacement between the current block within the current picture and the prediction block within the reference picture is generated. Generally, motion estimation is performed on the luma component, and the motion vector calculated based on the luma component is used for both the luma component and the chroma component. The motion information including information on the reference picture used to predict the current block and information on the motion vector is encoded by the entropy encoding unit (155) and transmitted to the image decoding device.
[0054] The inter prediction unit (124) may perform interpolation on a reference picture or a reference block to improve prediction accuracy. That is, subsamples between two consecutive integer samples are interpolated by applying filter coefficients to a plurality of consecutive integer samples including the two integer samples. When a process of searching for a block most similar to the current block is performed on the interpolated reference picture, the motion vector can be expressed up to a precision in decimal units rather than a precision in integer sample units. The precision or resolution of the motion vector can be set differently for each target region to be encoded, such as a slice, tile, CTU, CU, etc. When such adaptive motion vector resolution (AMVR) is applied, information on the motion vector resolution to be applied to each target region must be signaled for each target region. For example, when the target region is a CU, information on the motion vector resolution applied to each CU is signaled. Information on the motion vector resolution may be information indicating the precision of a differential motion vector, which will be described later.
[0055] Meanwhile, the inter prediction unit (124) can perform inter prediction using bi-prediction. In the case of bi-prediction, two reference pictures and two motion vectors indicating the block position most similar to the current block within each reference picture are used. The inter prediction unit (124) selects a first reference picture and a second reference picture from reference picture list 0 (RefPicList0) and reference picture list 1 (RefPicList1), respectively, and searches for a block similar to the current block within each reference picture to generate a first reference block and a second reference block. Then, the first reference block and the second reference block are averaged or weighted averaged to generate a prediction block for the current block. Then, motion information including information on two reference pictures used to predict the current block and information on two motion vectors is transmitted to the entropy encoding unit (155). Here, reference picture list 0 may be composed of pictures that are before the current picture in display order among the restored pictures, and reference picture list 1 may be composed of pictures that are after the current picture in display order among the restored pictures. However, this is not necessarily limited to this, and restored pictures that are after the current picture in display order may be additionally included in reference picture list 0, and conversely, restored pictures that are before the current picture may be additionally included in reference picture list 1.
[0056] Various methods can be used to minimize the number of bits required to encode motion information.
[0057] For example, if the reference picture and motion vector of the current block are identical to those of a neighboring block, the motion information of the current block can be transmitted to the image decoding device by encoding information that can identify the neighboring block. This method is called 'merge mode'.
[0058] In merge mode, the inter prediction unit (124) selects a predetermined number of merge candidate blocks (hereinafter referred to as 'merge candidates') from the surrounding blocks of the current block.
[0059] As the surrounding blocks for deriving merge candidates, all or part of the left block (A0), the lower left block (A1), the upper block (B0), the upper right block (B1), and the upper left block (B2) adjacent to the current block within the current picture may be used, as illustrated in FIG. 4. In addition, a block located within a reference picture (which may or may not be the same as the reference picture used to predict the current block) other than the current picture in which the current block is located may be used as a merge candidate. For example, a block co-located with the current block within the reference picture or blocks adjacent to the block at the co-located block may be additionally used as a merge candidate. If the number of merge candidates selected by the method described above is less than a preset number, a 0 vector is added to the merge candidates.
[0060] The inter prediction unit (124) uses these surrounding blocks to construct a merge list containing a predetermined number of merge candidates. Among the merge candidates included in the merge list, the merge candidate to be used as motion information of the current block is selected and merge index information for identifying the selected candidate is generated. The generated merge index information is encoded by the entropy encoding unit (155) and transmitted to the video decoding device.
[0061] Merge Skip mode is a special case of merge mode. After quantization, when all transform coefficients for entropy encoding are close to zero, only neighboring block selection information is transmitted without transmitting residual signals. By utilizing merge skip mode, relatively high encoding efficiency can be achieved for low-motion images, still images, and screen content images.
[0062] Hereinafter, merge mode and merge skip mode are collectively referred to as merge / skip mode.
[0063] Another method for encoding motion information is Advanced Motion Vector Prediction (AMVP) mode.
[0064] In AMVP mode, the inter prediction unit (124) derives predicted motion vector candidates for the motion vector of the current block using neighboring blocks of the current block. As neighboring blocks used to derive predicted motion vector candidates, all or some of the left block (A0), the lower left block (A1), the upper block (B0), the upper right block (B1), and the upper left block (B2) adjacent to the current block in the current picture as shown in FIG. 4 may be used. In addition, a block located in a reference picture (which may or may not be the same as the reference picture used to predict the current block) other than the current picture in which the current block is located may be used as the neighboring block used to derive predicted motion vector candidates. For example, a block co-located with the current block in the reference picture or blocks adjacent to the block in the co-located block may be used. If the number of motion vector candidates is less than a preset number by the method described above, a 0 vector is added to the motion vector candidates.
[0065] The inter prediction unit (124) derives predicted motion vector candidates using the motion vectors of these surrounding blocks, and determines a predicted motion vector for the motion vector of the current block using the predicted motion vector candidates. Then, the predicted motion vector is subtracted from the motion vector of the current block to produce a differential motion vector.
[0066] The predicted motion vector can be obtained by applying a predefined function (e.g., median, mean, etc.) to the predicted motion vector candidates. In this case, the image decoding device also knows the predefined function. In addition, since the surrounding blocks used to derive the predicted motion vector candidates are blocks that have already been encoded and decoded, the image decoding device also already knows the motion vectors of the surrounding blocks. Therefore, the image encoding device does not need to encode information to identify the predicted motion vector candidates. Therefore, in this case, information about the differential motion vector and information about the reference picture used to predict the current block are encoded.
[0067] Alternatively, the predicted motion vector can be determined by selecting one of the predicted motion vector candidates. In this case, information for identifying the selected predicted motion vector candidate is additionally encoded, along with information about the differential motion vector and the reference picture used to predict the current block.
[0068] The subtractor (130) subtracts the prediction block generated by the intra prediction unit (122) or inter prediction unit (124) from the current block to generate a residual block.
[0069] The transformation unit (140) transforms residual signals within a residual block having pixel values in a spatial domain into transform coefficients in a frequency domain. The transformation unit (140) may transform the residual signals within the residual block using the entire size of the residual block as a transformation unit, or may divide the residual block into a plurality of sub-blocks and use the sub-blocks as transformation units to perform the transformation. Alternatively, the residual signals may be transformed using only the transformation domain sub-block as a transformation unit by dividing the sub-blocks into two sub-blocks, that is, a transformation domain and a non-transform domain. Here, the transformation domain sub-block may be one of two rectangular blocks having a size ratio of 1:1 with respect to the horizontal axis (or vertical axis). In this case, a flag (cu_sbt_flag) indicating that only a sub-block has been converted, directionality (vertical / horizontal) information (cu_sbt_horizontal_flag), and / or position information (cu_sbt_pos_flag) are encoded by the entropy encoding unit (155) and signaled to the image decoding device. In addition, the size of the conversion area sub-block may have a size ratio of 1:3 with respect to the horizontal axis (or vertical axis), and in this case, a flag (cu_sbt_quad_flag) distinguishing the corresponding division is additionally encoded by the entropy encoding unit (155) and signaled to the image decoding device.
[0070] Meanwhile, the transformation unit (140) can individually perform transformations on the residual block in the horizontal and vertical directions. For the transformation, various types of transformation functions or transformation matrices can be used. For example, a pair of transformation functions for horizontal transformation and vertical transformation can be defined as a Multiple Transform Set (MTS). The transformation unit (140) can select one transformation function pair with the best transformation efficiency among the MTS and transform the residual block in the horizontal and vertical directions, respectively. Information (mts_idx) on the transformation function pair selected among the MTS is encoded by the entropy encoding unit (155) and signaled to the image decoding device.
[0071] The quantization unit (145) quantizes the transform coefficients output from the transform unit (140) using quantization parameters and outputs the quantized transform coefficients to the entropy encoding unit (155). The quantization unit (145) may directly quantize a related residual block without transformation for a certain block or frame. The quantization unit (145) may also apply different quantization coefficients (scaling values) according to the positions of the transform coefficients within the transform block. The quantization matrix applied to the quantized transform coefficients arranged in two dimensions may be encoded and signaled to an image decoding device.
[0072] The rearrangement unit (150) can perform rearrangement of coefficient values for quantized residual values.
[0073] The reordering unit (150) can change a two-dimensional coefficient array into a one-dimensional coefficient sequence by using coefficient scanning. For example, the reordering unit (150) can output a one-dimensional coefficient sequence by scanning from the DC coefficient to the coefficients of the high-frequency region by using a zig-zag scan or a diagonal scan. Depending on the size of the transformation unit and the intra prediction mode, a vertical scan that scans the two-dimensional coefficient array in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficients in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, the scanning method to be used may be determined among the zig-zag scan, the diagonal scan, the vertical scan, and the horizontal scan.
[0074] The entropy encoding unit (155) generates a bitstream by encoding a sequence of one-dimensional quantized transform coefficients output from the rearrangement unit (150) using various encoding methods such as CABAC (Context-based Adaptive Binary Arithmetic Code) and Exponential Golomb.
[0075] In addition, the entropy encoding unit (155) encodes information related to block division, such as CTU size, CU division flag, QT division flag, MTT division type, and MTT division direction, so that the image decoding device can divide the block in the same manner as the image encoding device. In addition, the entropy encoding unit (155) encodes information about a prediction type indicating whether the current block is encoded by intra prediction or inter prediction, and encodes intra prediction information (i.e., information about an intra prediction mode) or inter prediction information (information about an encoding mode of motion information (merge mode or AMVP mode), a merge index in the case of a merge mode, and a reference picture index and a differential motion vector in the case of an AMVP mode) according to the prediction type. In addition, the entropy encoding unit (155) encodes information related to quantization, that is, information about a quantization parameter and information about a quantization matrix.
[0076] The inverse quantization unit (160) inversely quantizes the quantized transform coefficients output from the quantization unit (145) to generate transform coefficients. The inverse transform unit (165) transforms the transform coefficients output from the inverse quantization unit (160) from the frequency domain to the spatial domain to restore the residual block.
[0077] An adder (170) adds the restored residual block and the predicted block generated by the prediction unit (120) to restore the current block. The pixels within the restored current block are used as reference pixels when intra-predicting the next block.
[0078] The loop filter unit (180) performs filtering on restored pixels to reduce blocking artifacts, ringing artifacts, blurring artifacts, etc. that occur due to block-based prediction and transformation / quantization. The loop filter unit (180) may include all or part of a deblocking filter (182), a sample adaptive offset (SAO) filter (184), and an adaptive loop filter (ALF, 186) as an in-loop filter.
[0079] The deblocking filter (182) filters the boundaries between restored blocks to remove blocking artifacts caused by block-based encoding / decoding, and the SAO filter (184) and the ALF (186) perform additional filtering on the deblocking-filtered image. The SAO filter (184) and the ALF (186) are filters used to compensate for the differences between restored pixels and original pixels caused by lossy coding. The SAO filter (184) improves not only subjective image quality but also encoding efficiency by applying an offset in units of CTUs. In contrast, the ALF (186) performs block-based filtering, and compensates for distortion by applying different filters by distinguishing the edges and degrees of variation of the corresponding block. Information on filter coefficients to be used in the ALF can be encoded and signaled to an image decoding device.
[0080] The restored blocks filtered through the deblocking filter (182), SAO filter (184), and ALF (186) are stored in the memory (190). When all blocks within a picture are restored, the restored picture can be used as a reference picture for inter-predicting blocks within a picture to be encoded later.
[0081] The video encoding device can store the bitstream of encoded video data on a non-transitory storage medium or transmit it to the video decoding device using a communication network.
[0082] FIG. 5 is an exemplary block diagram of an image decoding device capable of implementing the techniques of the present disclosure. Hereinafter, the image decoding device and its subcomponents will be described with reference to FIG. 5.
[0083] The video decoding device may be configured to include an entropy decoding unit (510), a rearrangement unit (515), an inverse quantization unit (520), an inverse transformation unit (530), a prediction unit (540), an adder (550), a loop filter unit (560), and a memory (570).
[0084] Similar to the video encoding device of FIG. 1, each component of the video decoding device may be implemented in hardware, software, or a combination of hardware and software. Furthermore, the functions of each component may be implemented in software, with a microprocessor executing the software functions corresponding to each component.
[0085] The entropy decoding unit (510) decodes the bitstream generated by the image encoding device to extract information related to block division, thereby determining the current block to be decoded, and extracts prediction information, information on residual signals, etc. required to restore the current block.
[0086] The entropy decoding unit (510) extracts information about the CTU size from the Sequence Parameter Set (SPS) or the Picture Parameter Set (PPS), determines the size of the CTU, and divides the picture into CTUs of the determined size. Then, the CTU is determined as the top layer of the tree structure, i.e., the root node, and the CTU is divided using the tree structure by extracting division information about the CTU.
[0087] For example, when splitting a CTU using the QTBTTT structure, first, the first flag (QT_split_flag) related to the splitting of QT is extracted, and each node is split into four nodes of the lower layer. Then, for the nodes corresponding to the leaf nodes of QT, the second flag (mtt_split_flag) related to the splitting of MTT and the split direction (vertical / horizontal) and / or split type (binary / ternary) information are extracted, and the corresponding leaf nodes are split into the MTT structure. Accordingly, each node below the leaf nodes of QT are split recursively into the BT or TT structure.
[0088] As another example, when splitting a CTU using the QTBTTT structure, the CU split flag (split_cu_flag) indicating whether the CU is split is first extracted, and if the block is split, the first flag (QT_split_flag) may be extracted. During the splitting process, each node may undergo zero or more repeated QT splits followed by zero or more repeated MTT splits. For example, a CTU may undergo an MTT split right away, or conversely, may undergo only multiple QT splits.
[0089] As another example, when splitting a CTU using the QTBT structure, the first flag (QT_split_flag) related to the splitting of QT is extracted, and each node is split into four nodes of the lower layer. Furthermore, for nodes corresponding to leaf nodes of QT, a split flag (split_flag) indicating whether to further split into BTs and splitting direction information are extracted.
[0090] Meanwhile, when the entropy decoding unit (510) determines the current block to be decoded by using the division of the tree structure, it extracts information on the prediction type indicating whether the current block is intra-predicted or inter-predicted. If the prediction type information indicates intra-prediction, the entropy decoding unit (510) extracts syntax elements for intra-prediction information (intra-prediction mode) of the current block. If the prediction type information indicates inter-prediction, the entropy decoding unit (510) extracts syntax elements for inter-prediction information, i.e., information indicating a motion vector and a reference picture referenced by the motion vector.
[0091] Additionally, the entropy decoding unit (510) extracts information about the quantized transform coefficients of the current block as information related to quantization and information about residual signals.
[0092] The rearrangement unit (515) can change the sequence of one-dimensional quantized transform coefficients entropy-decoded in the entropy decoding unit (510) back into a two-dimensional coefficient array (i.e., block) in the reverse order of the coefficient scanning performed by the image encoding device.
[0093] The inverse quantization unit (520) inversely quantizes the quantized transform coefficients and inversely quantizes the quantized transform coefficients using the quantization parameters. The inverse quantization unit (520) may also apply different quantization coefficients (scaling values) to the quantized transform coefficients arranged in two dimensions. The inverse quantization unit (520) may perform inverse quantization by applying a matrix of quantized coefficients (scaling values) from an image encoding device to a two-dimensional array of quantized transform coefficients.
[0094] The inverse transform unit (530) inversely transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to restore residual signals, thereby generating a residual block for the current block.
[0095] In addition, when the inverse transform unit (530) inversely transforms only a portion of a transform block (sub-block), it extracts a flag (cu_sbt_flag) indicating that only a sub-block of the transform block has been transformed, directionality (vertical / horizontal) information (cu_sbt_horizontal_flag) of the sub-block, and / or position information (cu_sbt_pos_flag) of the sub-block, and inversely transforms the transform coefficients of the corresponding sub-block from the frequency domain to the spatial domain to restore residual signals, and fills “0” values with residual signals for areas that have not been inversely transformed, thereby generating a final residual block for the current block.
[0096] In addition, when MTS is applied, the inverse transform unit (530) determines a transform function or a transform matrix to be applied in the horizontal and vertical directions using MTS information (mts_idx) signaled from the image encoding device, and performs inverse transform on the transform coefficients within the transform block in the horizontal and vertical directions using the determined transform function.
[0097] The prediction unit (540) may include an intra prediction unit (542) and an inter prediction unit (544). The intra prediction unit (542) is activated when the prediction type of the current block is intra prediction, and the inter prediction unit (544) is activated when the prediction type of the current block is inter prediction.
[0098] The intra prediction unit (542) determines the intra prediction mode of the current block among a plurality of intra prediction modes from the syntax elements for the intra prediction mode extracted from the entropy decoding unit (510), and predicts the current block using reference pixels around the current block according to the intra prediction mode.
[0099] The inter prediction unit (544) uses the syntax elements for the inter prediction mode extracted from the entropy decoding unit (510) to determine the motion vector of the current block and the reference picture referenced by the motion vector, and predicts the current block using the motion vector and the reference picture.
[0100] An adder (550) adds the residual block output from the inverse transform unit (530) and the predicted block output from the inter prediction unit (544) or the intra prediction unit (542) to restore the current block. The pixels within the restored current block are used as reference pixels when intra-predicting a block to be decoded later.
[0101] The loop filter unit (560) may include a deblocking filter (562), an SAO filter (564), and an ALF (566) as in-loop filters. The deblocking filter (562) deblocks the boundaries between restored blocks to remove blocking artifacts caused by block-by-block decoding. The SAO filter (564) and the ALF (566) perform additional filtering on restored blocks after deblocking filtering to compensate for differences between restored pixels and original pixels caused by lossy coding. The filter coefficients of the ALF are determined using information about filter coefficients decoded from the non-stream.
[0102] The restored blocks filtered through the deblocking filter (562), SAO filter (564), and ALF (566) are stored in the memory (570). When all blocks within a picture are restored, the restored picture is used as a reference picture for inter-predicting blocks within a picture to be encoded later.
[0103] The present embodiment relates to encoding and decoding of images (videos) as described above. More specifically, in relation to a deep learning-based in-loop filter, a video coding method and device are provided that adaptively changes neural network parameters to content in terms of rate distortion optimization.
[0104] The following embodiments may be performed by a loop filter unit (180) within a video encoding apparatus. In addition, the following embodiments may be performed by a loop filter unit (560) within a video decoding apparatus.
[0105] The video encoding device can generate signaling information related to the present embodiment in terms of rate distortion optimization in encoding the current block. The video encoding device can encode the signaling information using the entropy encoding unit (155) and then transmit it to the video decoding device. The video decoding device can decode the signaling information related to the decoding of the current block from the bitstream using the entropy decoding unit (510).
[0106] In the following description, the term "target block" may be used interchangeably with the current block or coding unit (CU). Alternatively, the term "target block" may also refer to a portion of a coding unit.
[0107] Also, a value of a flag being true indicates that the flag is set to 1. Also, a value of a flag being false indicates that the flag is set to 0.
[0108] The decoder side includes all or part of the inverse quantization unit (160), the inverse transform unit (165), the prediction unit (120), the adder (170), the loop filter unit (180), and the memory (190) in the video encoding device illustrated in FIG. 1. Alternatively, the decoder side includes all or part of the inverse quantization unit (520), the inverse transform unit (530), the prediction unit (540), the adder (550), the loop filter unit (560), and the memory (570) in the video decoding device illustrated in FIG. 5. With respect to a series of decoding processes, the decoder side of the video encoding device and the decoder side of the video decoding device perform the same operation. The video encoding device determines information related to the operation of the decoder side and signals the determined information to the video decoding device. The video decoding device can decode the signaled information and operate the decoder side based on the decoded information.
[0109] I-1. Multilayer Perceptron (MLP)
[0110] A multilayer perceptron (MLP) is composed of multiple neurons and edges connecting the neurons, as shown in the example in Figure 6. In addition to an input layer and an output layer, an MLP may include one or more hidden layers. Each hidden layer includes one or more hidden units (or hidden nodes). Additionally, different weights may be assigned to each edge. In addition, an activation function may be used in the process of propagating output values from one layer to the next. Representative activation functions include the sigmoid function, the tangent hyperbolic function, or the Relu (Rectified Linear Unit) function.
[0111] As illustrated in the example of Fig. 6, a two-layer MLP with a forward network structure passes an input vector x through an intermediate hidden unit to provide an output vector y. In the aforementioned forward network structure, any node value located in the output layer can be expressed as in mathematical equation 1.
[0112]
[0113] In mathematical equation 1, class is a weight matrix, corresponding to the edges connecting the input vectors and hidden units, and the edges connecting the hidden units and the output vectors, respectively. w ji (1) and w kj (2) are each class Indicates the component of y k represents the components of the output vector y. x0 and z0 represent the bias units of the input layer and the hidden layer, respectively. Therefore, D is the dimension of the input vector x, M represents the number of hidden units, and K is the dimension of the output vector y. In addition, h and σ are the activation functions applied to the hidden layer and the output layer, respectively. Meanwhile, the activation function is not necessarily applied to the output of the hidden layer and the output layer. If the activation function is not used, mathematical expression 1 becomes class It includes an operation corresponding to the weight matrix multiplication between the two.
[0114] The process of calculating weights based on training data and labels is called training. Training can typically be performed using the stochastic gradient descent (SGD) algorithm, which utilizes backpropagation. The process of calculating outputs in a feed-forward manner using the weights calculated through training is called inference or testing.
[0115] Hereinafter, multilayer neural networks, MLPs, or forward-facing networks can be used interchangeably.
[0116] I-2. CNN(Convolutional Neural Network)
[0117] CNN, a neural network comprised of multiple convolutional layers and pooling layers, is a deep learning technique known to be ideal for image processing. Convolutional layers extract feature maps (also known as "features" or "characteristics") using multiple kernels or filters. The kernel coefficients that make up the filters are parameters determined during the learning process.
[0118] Among the convolutional layers of CNN, the front layer closer to the input extracts feature maps that respond to simple, low-level image features such as lines, points, or surfaces, while the back layer closer to the output extracts feature maps that respond to higher-level features such as textures and object parts.
[0119] FIG. 7 is an exemplary diagram showing the operation of a convolutional layer according to one embodiment of the present disclosure.
[0120] A convolutional layer generates a feature map from an input image using a convolution operation. The example in Fig. 7 illustrates a kernel (or filter) with a kernel size of 3×3. The kernel size is also referred to as the kernel size or filter size. The kernel has kernel parameters, also called weights. The kernel illustrated in Fig. 7 has a total of nine kernel parameters. The kernel parameters are initially set to arbitrary values, and their values can be updated based on learning.
[0121] The convolution layer performs convolution operations using blocks of the same size as the kernel size in the input image. At this time, the blocks of the same size as the kernel size in the input image are referred to as windows.
[0122] When filtering an input image in raster scan order, the window movement size is called the stride. In the example of Fig. 7, the stride is 1. If the stride is set to 2, the convolution operation is performed by spacing the window by 2 samples, and as a result, the width and height of the feature map become half the width and height of the input image.
[0123] As mentioned above, a single convolutional layer can include multiple filters. The number of filters or kernels is called a channel. In other words, the number of channels is equal to the number of filters. Furthermore, the number of filters determines the dimensionality of the feature map.
[0124] Padding refers to a method of expanding input data by filling the area around it with a specific value before performing a convolution operation. Padding is primarily used to adjust the spatial size of the output data. The padding value can be determined by hyperparameters, but zero-padding is commonly used. Without padding, the spatial size of the output data decreases with each convolutional layer, potentially causing boundary information to disappear. Therefore, padding is used to prevent this problem. Specifically, padding can be used to match the spatial sizes of the output data from the convolutional layer to the input data.
[0125] The deconvolution layer performs the opposite operation to the convolution layer. It generates the desired data image from the input feature map as output.
[0126] The pooling layer performs pooling, a process of subsampling the feature map generated by the convolutional layer. The pooling layer uses a 2×2 window to select samples so that the output is half the width and height of the input. In other words, the pooling layer is used to reduce the size of the input image or input feature map by condensing a 2×2 region into a single sample.
[0127] The opposite concept of a pooling layer is defined as an unpooling layer. Unpooling layers, in contrast to pooling layers, function to expand the dimensionality and are primarily used after deconvolution layers.
[0128] The convolutional encoder-decoder architecture is a network structure composed of pairs of convolutional layers and deconvolutional layers. The convolutional encoder consists of a convolutional layer and a pooling layer, and outputs a feature map (or feature vector) from the input image. The final output vector of the convolutional encoder is also referred to as a latent vector. The convolutional decoder consists of a deconvolutional layer and an unpooling layer, and generates an output image from the feature map or latent vector.
[0129] The inputs and outputs of a convolutional encoder-decoder can be configured in various ways depending on the application and network purpose. For example, the inputs and outputs can be optical flow maps, saliency maps, image frames, etc.
[0130] Figure 8 is an example diagram showing an SISR network.
[0131] One example of CNN application is Single Image Super Resolution (SISR). The SISR network generates a high-resolution image from a low-resolution input image. As illustrated in Figure 8, the SISR network may include multiple convolutional layers. Each convolutional layer includes an activation function, such as the Rectified Linear Unit (ReLU). The parameters of the SISR network can be trained so that the resulting SR (Super Resolution) image approximates the Ground Truth (GT).
[0132] SR methods using CNN can improve SR performance by increasing the depth (e.g., increasing the number of convolutional layers). To overcome the overfitting problem that may occur in learning due to the increase in depth, a residual block that can perform skip connection and residual learning can be used in the SISR network. The residual block, as illustrated in Fig. 9, is a block that stores input features x l In addition to the path that applies the convolution operation, it includes a skip path. In addition, the residual block outputs x l+1 When generating, a path or skip path for applying convolution operations can also be selected based on learning efficiency. In the example of Fig. 9, the residual block includes a BN (Batch Normalization) layer.
[0133] For example, Enhanced Deep Residual Networks (EDSR) improves network performance by continuously connecting residual blocks to increase their depth. Another example is Accurate Image Super-Resolution Using Very Deep Convolutional Networks (VDSR), a CNN model based on the Visual Geometry Group (VGG) network that uses residual learning, a method that adds residual frames to the final output. VDSR adds the residual signal to the very end of the network, thereby adding it to the input signal.
[0134] As another example, CNN can be used as an in-loop filter in an image encoding device or an image decoding device. In this case, the deep learning-based in-loop filter can be applied to any position within the existing loop filter unit (180, 560) consisting of a deblocking filter, an SAO filter, and an ALF.
[0135] Among the deep learning-based in-loop filters are fixed-coefficient in-loop filters. Fixed-coefficient deep learning in-loop filters use the same CNN kernel parameters stored on the image encoding and decoding devices.
[0136] Figure 10 is an example diagram showing a CNN-based fixed coefficient in-loop filter.
[0137] A fixed-coefficient in-loop filter may be a noise-removing CNN model including multiple Dense Residual Units (DRUs). The input block (or input frame) passes through a normalized QP map and then is passed to the subsequent stage. The normalized QP map is used to reduce inference errors when quantization noises of different intensities are mixed during the learning and inference processes. The kernel parameters constituting the Dense Residual Units (DRUs) and convolutional layers may be stored identically and used in an image encoding device and an image decoding device. In the example of Fig. 10, each DRU may include all or part of a convolutional layer, a ReLU layer, and a depth-wise separable convolutional (DSC) layer.
[0138] Fixed-coefficient deep learning in-loop filters have the disadvantage of providing general performance for various video frames, which increases the number of layers in the CNN and thus increases the computation time.
[0139] As another example, there is a variable coefficient in-loop filter as a deep learning-based in-loop filter. A video encoding device trains a variable coefficient in-loop filter based on a target video frame and transmits filter parameters according to the training to a video decoding device. The variable coefficient in-loop filter may be a noise-removing CNN model including convolutional layers. As an example, based on an input block (or input frame) generated by packing Y, U, and V blocks, the variable coefficient in-loop filter may output a block from which noise has been removed. Since it is trained based on a target video frame, the kernel parameters can be adaptively configured to the target video. Since a parameter refresh is performed for each I-frame, the kernel parameters can be transmitted to the video decoding device for each I-frame, considering the size of the transmitted parameters.
[0140] The variable coefficient in-loop filter has the disadvantage of requiring double-loop coding because it is adaptively configured for the target video frame. Therefore, considering delay, the variable coefficient in-loop filter has limited applicability to random access scenarios.
[0141] I-3. Neural network-based video compression technology of NNVC (neural network video coding)
[0142] NNVC (Neural Network-based Video Coding), a branch of next-generation codecs, is a neural network-based video compression technology that discusses neural network-based filters such as in-loop filters and SR (super resolution) filters. In-loop filters are referred to as LOP (low-complexity operating point) in-loop filters, HOP (high-complexity operating point) in-loop filters, or VLOP (Very Low-complexity Operating Point) in-loop filters. SR filters are also referred to as LOP SR filters or HOP SR filters.
[0143] Hereinafter, a luma block may include a luma component (or a luma channel), and a chroma block may include a first chroma component (or a first chroma channel) and a second chroma component (or a second chroma channel). For example, (luma component, first chroma component, second chroma component) may be expressed as YUV, YCoCg.
[0144] On the input side of a neural network-based filter, blocks or frames can be utilized as input. A frame can be a combination of blocks.
[0145] The input block of a neural network-based filter includes a luma block and a chroma block. As described above, the neural network-based filter can be implemented using an MLP, CNN, or the like.
[0146] The color format (i.e., sampling format) can have formats of 4:2;0, 4:2:2, and 4:4;4, depending on the size ratio between the luma block and the chroma block. Here, the 4:2;0 format means that the horizontal / vertical ratio between the luma block and the chroma block is both 2, the 4:2;2 format means that the horizontal / vertical ratio between the luma block and the chroma block is both 2, and the 4:4;4 format means that the horizontal / vertical ratio between the luma block and the chroma block is both 1.
[0147] The following examples are described with a focus on a low-complexity operating point (LOP) in-loop filter, but can be applied equally or similarly to other neural network-based filters.
[0148] Figure 11 is an example diagram conceptually representing a LOP in-loop filter.
[0149] The LOP in-loop filter of the NNVC may include an input unit (1110), a pre-processing unit (1120), a series of backbone blocks (1130), and a post-processing unit (1140). The LOP in-loop filter includes a skip path. Therefore, the main path of the LOP in-loop filter (i.e., including the pre-processing unit (1120), the backbone block (1130), and the post-processing unit (1140)) generates a residual signal of the input components.
[0150] An image encoding device including an LOP in-loop filter may additionally include a training unit (not shown) for training the LOP in-loop filter in addition to the above-described components, or may be implemented in a form that is linked to an external training unit.
[0151] The example of Fig. 12 may correspond to an input portion (1110) of the LOP in-loop filter. As an example, for a video sequence having a 4:2:0 color format, the luma block and chroma block of the LOP in-loop filter may be processed as in Fig. 12. The video decoding device increases the resolution of the chroma block (e.g., U and V blocks) to match the spatial resolution of the luma block (e.g., Y block). In Fig. 12, the Rec block stacks the reconstructed luma block and two chroma channels. The video decoding device may input the stacked channels to the LOP in-loop filter to extract features. In the example of Fig. 12, the width and height of the luma block are represented by W and H, respectively.
[0152] In FIG. 12, d1 is the number of output channels of the convolution layer in the input unit (1110), which may vary depending on the type of neural network-based filter (e.g., SR filter or in-loop filter), complexity (e.g., LOP, VLOP, or HOP), etc.
[0153] The input unit (1110) can obtain a prediction block as an additional input block in addition to the luma / chroma restoration block. In addition, the input unit (1110) can obtain quantization parameters, boundary strength, and / or block shape as additional inputs. Here, the block shape represents one of the IPB (Intra / Predictive / Bi-predictive) blocks.
[0154] The preprocessing unit (1120) is located at the front end of the backbone blocks and combines the input components as described above using a convolutional layer and an activation function as shown in FIG. 13. The preprocessing unit (1120) can be implemented as a single path without distinguishing between luma and chroma to combine the input components. In FIG. 13, d6 is the number of output channels of the first convolutional layer. C Y +C UV is the number of output channels of the second convolutional layer, which represents the sum of the number of channels of the luma component and the number of channels of the chroma component. PReLU (parameterized rectified linear unit) represents the activation function.
[0155] Figure 14 is an example diagram showing the backbone block of the LOP in-loop filter.
[0156] The backbone block (1130) includes convolutional layers, activation functions, and sparse convolutional layers, as in the example of FIG. 14. The backbone block (1130) can be implemented with two paths to process luma / chroma components. For example, in the example of FIG. 11, N Yis the number of backbone blocks for processing the luma component, and N UV is the number of backbone blocks for processing chroma components. The backbone block (1130) processes preprocessed input components and transmits the processed results to the postprocessing unit (1140).
[0157] In the example of Fig. 14, h and w represent the height and width of the input of the backbone block. C is the number of input / output channels of the backbone block, which can be set differently for the luma component and the chroma component. C×C1, C1×C, C×C 21 , C 21 ×C, C×C, etc. all represent the number of output channels of the convolutional layer.
[0158] The post-processing unit (1140) is located at the rear end of the backbone blocks and processes the output of the backbone blocks using convolution layers, sparse convolution layers, and activation functions, as shown in FIG. 15, to ultimately generate residual signals of luma / chroma components. The post-processing unit (1140) may be implemented with two paths to process the luma / chroma components. FIG. 15 illustrates a post-processing unit (1140) for processing the luma component. As shown in FIG. 15, the post-processing unit (1140) may apply pixel shuffle to the luma component. In FIG. 15, C Y ×C Y21 , C Y21 ×C Y , C Y ×C Y , C Y ×4 etc. all indicate the number of output channels of the convolutional layer.
[0159] By adding the input block transmitted along the skip path and the output of the post-processing unit (1140), the LOP in-loop filter can generate an output block.
[0160] The configuration of the LOP in-loop filter as described above can be similarly applied to other neural network-based filters such as the VLOP in-loop filter, the HOP in-loop filter, the LOP SR filter, and the HOP SR filter.
[0161] Meanwhile, in the neural network-based video compression technology described above, a multi-pass encoding process is used to adaptively change neural network parameters for the content. The multi-pass encoding process includes 1) configuring neural network parameters adaptive to the current video frame, and 2) encoding the configured parameters. However, the multi-pass encoding process may be difficult to apply to real-time encoding, except for the random access (RA) video coding configuration. For example, a video encoding device can change neural network parameters when necessary. However, re-learning of in-loop filter parameters is required for every frame or every group of pictures (GOP), which may excessively increase encoding complexity.
[0162] The present disclosure proposes a method for content-adaptive changing of neural network parameters based on rate distortion optimization without a multipass encoding process, in order to address the problems of the multipass encoding process.
[0163] The following embodiments are described with a focus on a video decoding device, but can be implemented in the same or similar manner in a video encoding device. Alternatively, the following embodiments are described with a focus on the decoder side of a video decoding device, but can be implemented in the same or similar manner in a decoder side of a video encoding device.
[0164] II. Embodiments according to the present disclosure
[0165] In the conventional neural network operation method for content adaptation, the image encoding device relearns both W and b as in Equation 2, and transmits the relearned parameters.
[0166]
[0167] To reduce the amount of computation, only the multiplication factor m can be relearned while keeping W and b fixed, as in Equation 3.
[0168]
[0169] In Equations 2 and 3, x represents the input of the convolutional layer, and y represents the output of the activation function σ. W represents the filter kernel, * represents the convolution operation, and b represents the bias. In addition, m represents a content-adaptive parameter. Except for m, they are pre-trained values. The video decoding device can signal the aforementioned pre-trained values to the video decoding device. m can be determined adaptively to the content during the training process and transmitted to the video decoding device in the form of a real number (floating) or an integer. In this case, after quantization is applied to the real number m, m in the form of an integer can be transmitted. Hereinafter, in Equation 3, W*x+b is defined as the output of the convolutional layer.
[0170] FIG. 16 is an exemplary diagram showing a backbone block of a LOP in-loop filter according to one embodiment of the present disclosure.
[0171] In Fig. 16, a content-adaptive parameter m is applied to the output of the convolutional layer of the backbone block (1130) as in Equation 3. An activation function can be applied to the output to which m is applied. The output to which m is applied or the output of the activation function is passed to the next convolutional layer.
[0172] Even though the computational complexity is reduced according to Equation 3, the problems inherent in the conventional multipass encoding process described above may still persist. Below, a method for determining m by analyzing the characteristics of a video frame or block without a multipass encoding process is described, using m according to Equation 3.
[0173] The video encoding device and the video decoding device are m1~ m N A set (i.e., a list) M of N candidates is shared. The video encoding device finds the optimal m within the set M in terms of rate distortion optimization. * , and select the optimal m * Signals the corresponding index or real number value to the video decoding device. The video decoding device m * The image decoding device decodes the decoded m to the output of the convolutional layer as in mathematical expression 3. * By multiplying the odds, content adaptation can be performed.
[0174] The N candidates can be adaptively changed based on one or more of a block, a slice, a quantization parameter (QP), a picture, or a group of arbitrary pictures (e.g., an integer multiple of a GOP). That is, the range of m can be set differently depending on the block type, the slice type, and the quantization parameter value. For example, when the QP is a value between 20 and 30, the set M can be composed of values from 0.2 to 10 at an interval of 0.2. When the QP is a value between 30 and 40, the set M can be composed of values from 0.1 to 10 at an interval of 0.2.
[0175] In addition to the method of constructing a predefined set M, a candidate m can be output using a separate neural network, as shown in FIG. 17. In FIG. 17, the aforementioned neural network uses QP, slice type, restoration block, prediction block, etc. as inputs to output candidate m. For example, 10 candidates can be generated by multiplying candidate m by 10 values from 1 to 10 with an interval of 1, and a set M including the generated candidates can be constructed.
[0176] If it is difficult to select the optimal m within the set M during the encoding process, m can be set to 1.
[0177] In addition to multiplying the output of the convolutional layer by m, as shown in Equation 3, another implementation method allows the parameters of the neural network to be content-adaptive by controlling the operation of the activation function. Rectified linear unit (ReLU) is commonly used as the activation function, and parameterized rectified linear unit (PReLU) as shown in Figure 18 is used in the in-loop filter of NNVC. Equation 4 illustrates the PReLU operation.
[0178]
[0179] In Equation 4, if the input x is less than 0, ax(0 <a<1)가 출력되고, 입력 x가 0보다 큰 경우, x가 출력된다. 이때, a는 기설정된 값이거나, 사전에 트레이닝에 의해 업데이트될 수 있다. 본 개시에서는, 수학식 5와 같이 콘텐츠 적응적 파라미터 m을 변경하여 동작 방식을 제어하는 활성화 함수 PropPReLU(proportional PReLU)가 사용된다.
[0180]
[0181] In Equation 5, if the input x is greater than 0, PropPReLU outputs mx. As described above, the image encoding device can predefine various m and select the optimal m. Alternatively, the PReLU function can be predefined according to various formulas, and the image encoding device can select the optimal PReLU among the defined functions. Alternatively, similar to a, m can be updated through training.
[0182] In addition to using PropPReLU in Equation 5, various combinations of activation functions can be utilized. For example, the activation function PropReLU with various m applied to ReLU, as in Equation 6, can be utilized.
[0183]
[0184] In Equation 6, if the input x is greater than 0, PropReLU outputs mx. As described above, the image encoding device can predefine various m and select the optimal m. Alternatively, m can be updated through training. Alternatively, various activation functions can be predefined and the image encoding device can select the optimal activation function among the defined functions.
[0185] As described above, the content-adaptive parameter m can be applied to the convolutional layers or activation functions included in the backbone block. Furthermore, the content-adaptive parameter m can also be applied to the convolutional layers or activation functions included in other components of the LOP in-loop filter. Furthermore, the content-adaptive parameter m can also be applied to the convolutional layers or activation functions included in components within the neural network-based filter.
[0186] Below, a method of applying an in-loop filter to the current block is described using the cities of FIGS. 19 and 20.
[0187] FIG. 19 is a flowchart illustrating a method of applying an in-loop filter to a current block, performed by a video encoding device according to one embodiment of the present disclosure.
[0188] The image encoding device obtains parameters of an in-loop filter (S1900).
[0189] The video encoding device can pre-train an in-loop filter based on deep learning. As described above, the in-loop filter may include a convolutional layer and an activation function.
[0190] The video encoding device obtains content-adaptive parameters related to the in-loop filter (S1902).
[0191] An image encoding device generates a list containing content-adaptive parameter candidates. The image encoding device can determine content-adaptive parameters from the list in terms of rate-distortion optimization.
[0192] As an example, the video encoding device can generate content-adaptive parameter candidates based on one or more of a restoration block, a slice, a quantization parameter, a picture, and a group of pictures.
[0193] As another example, an image encoding device may input one or more of a quantization parameter, a slice type, a restoration block, and a prediction block of a current block into a deep learning-based neural network to generate an output. The image encoding device may generate content-adaptive parameter candidates based on the generated output.
[0194] The video encoding device obtains a restoration block of the current block (S1904). Here, the restoration block includes a luma block and a chroma block.
[0195] The video encoding device generates stacked blocks based on the luma block and the chroma block (S1906).
[0196] The image encoding device inputs the stacked blocks into an in-loop filter and performs filtering by applying content-adaptive parameters to a convolutional layer and an activation function (S1908).
[0197] As an example, an image encoding device may apply content-adaptive parameters to the output of a convolutional layer. The image encoding device may apply the output with the content-adaptive parameters to an activation function.
[0198] As another example, when the activation function is a parameterized rectified linear unit (PReLU) and the input value of the activation function is greater than 0, the image encoding device can generate the output of the activation function by multiplying the input by a content-adaptive parameter.
[0199] The video encoding device encodes parameters of an in-loop filter and content adaptive parameters (S1910).
[0200] For example, the video encoding device can generate an index indicating a content-adaptive parameter from the above-described list and encode the index.
[0201] FIG. 20 is a flowchart illustrating a method of applying an in-loop filter to a current block, performed by an image decoding device according to one embodiment of the present disclosure.
[0202] The video decoding device decodes parameters of an in-loop filter from a bitstream (S2000). The in-loop filter may be pre-trained based on deep learning and may include a convolutional layer and an activation function.
[0203] The video decoding device obtains content-adaptive parameters related to the in-loop filter (S2002).
[0204] A video decoding device generates a list containing content-adaptive parameter candidates. The video decoding device can decode an index indicating one of the content-adaptive parameter candidates from the bitstream. The video decoding device can extract a content-adaptive parameter from the list based on the decoded index.
[0205] As an example, the video decoding device can generate content-adaptive parameter candidates based on one or more of a restoration block, a slice, a quantization parameter, a picture, and a group of pictures.
[0206] As another example, an image decoding device may input one or more of a quantization parameter, a slice type, a reconstruction block, and a prediction block of the current block into a deep learning-based neural network to generate output. The image decoding device may generate content-adaptive parameter candidates based on the generated output.
[0207] The video decoding device obtains a restoration block of the current block (S2004). Here, the restoration block includes a luma block and a chroma block.
[0208] The video decoding device generates stacked blocks based on the luma block and the chroma block (S2006).
[0209] The image decoding device inputs the stacked blocks into an in-loop filter and performs filtering by applying content-adaptive parameters to a convolutional layer or an activation function (S2008).
[0210] As an example, an image decoding device may apply content-adaptive parameters to the output of a convolutional layer. The image decoding device may apply the output with the content-adaptive parameters to an activation function.
[0211] As another example, when the activation function is PReLU and the input value of the activation function is greater than 0, the image decoding device can generate the output of the activation function by multiplying the input by a content-adaptive parameter.
[0212] Although the flowchart / timing diagram of this specification describes each process as being executed sequentially, this is merely an illustrative description of the technical idea of one embodiment of the present disclosure. In other words, a person of ordinary skill in the art to which one embodiment of the present disclosure belongs may modify and apply various modifications and variations by changing the order described in the flowchart / timing diagram without departing from the essential characteristics of one embodiment of the present disclosure, or by executing one or more of the processes in parallel. Therefore, the flowchart / timing diagram is not limited to a chronological order.
[0213] It should be understood that the exemplary embodiments described above can be implemented in many different ways. The functions or methods described in one or more examples can be implemented in hardware, software, firmware, or any combination thereof. It should be understood that the functional components described herein are labeled as "units" to further emphasize their implementation independence.
[0214] Meanwhile, the various functions or methods described in this embodiment may also be implemented as instructions stored on a non-transitory storage medium that can be read and executed by one or more processors. Non-transitory storage media include, for example, all types of storage devices that store data in a form readable by a computer system. For example, non-transitory storage media include storage media such as erasable programmable read-only memory (EPROM), flash drives, optical drives, magnetic hard drives, and solid-state drives (SSDs).
[0215] The above description is merely an example of the technical idea of the present embodiment, and those skilled in the art to which the present embodiment pertains may make various modifications and variations without departing from the essential characteristics of the present embodiment. Therefore, the present embodiments are not intended to limit the technical idea of the present embodiment, but to explain it, and the scope of the technical idea of the present embodiment is not limited by these embodiments. The protection scope of the present embodiment should be interpreted by the following claims, and all technical ideas within a scope equivalent thereto should be interpreted as being included in the scope of rights of the present embodiment.
[0216]
[0217]
[0218] CROSS-REFERENCE TO RELATED APPLICATION
[0219] This patent application claims priority to Korean patent application No. 10-2024-0055697, filed in Korea on April 25, 2024, and Korean patent application No. 10-2025-0045925, filed in Korea on April 9, 2025, the entire contents of which are incorporated herein by reference.
Claims
1. In a method for applying an in-loop filter to a current block, performed by a video decoding device, A step of decoding parameters of the in-loop filter from a bitstream, wherein the in-loop filter is pre-trained based on deep learning and includes a convolutional layer and an activation function; A step of obtaining content adaptive parameters related to the above in-loop filter; A step of obtaining a restoration block of the current block, wherein the restoration block includes a luma block and a chroma block; A step of generating stacked blocks based on the luma block and the chroma block; and A step of performing filtering by inputting the stacked blocks into the in-loop filter and applying the content adaptive parameters to the convolutional layer or the activation function. A method comprising:
2. In paragraph 1, The step of obtaining the above content adaptive parameters is: A step of generating a list containing content-adaptive parameter candidates; A step of decoding an index indicating one of the content-adaptive parameter candidates from the bitstream; and A step of extracting the content adaptive parameter from the list according to the index. A method comprising:
3. In paragraph 2, The steps to create the above list are: A method for generating content-adaptive parameter candidates based on one or more of the above restoration blocks, slices, quantization parameters, pictures, and groups of pictures.
4. In paragraph 2, The steps to create the above list are: A step of generating an output by inputting one or more of a quantization parameter, a slice type, the restoration block, and the prediction block of the current block into a neural network; and A step of generating content-adaptive parameter candidates based on the above output. A method comprising:
5. In paragraph 1, The steps for performing the above filtering are: A step of applying the above content-adaptive parameters to the output of the convolutional layer; and A step of applying the output to which the above content-adaptive parameters are applied to the above activation function. A method comprising:
6. In paragraph 1, The steps for performing the above filtering are: A method for generating an output of the activation function by multiplying the content-adaptive parameter by the input when the above activation function is a PReLU (parameterized rectified linear unit) and the input value of the activation function is greater than 0.
7. A method for applying an in-loop filter to a current block, performed by a video encoding device, A step of obtaining parameters of the above in-loop filter, wherein the in-loop filter is pre-trained based on deep learning and includes a convolutional layer and an activation function; A step of obtaining content adaptive parameters related to the above in-loop filter; A step of obtaining a restoration block of the current block, wherein the restoration block includes a luma block and a chroma block; A step of generating stacked blocks based on the luma block and the chroma block; A step of performing filtering by inputting the stacked blocks into the in-loop filter and applying the content-adaptive parameters to the convolutional layer or the activation function; and A step of encoding the parameters of the above in-loop filter and the content adaptive parameters. A method comprising:
8. In paragraph 7, The step of obtaining the above content adaptive parameters is: generating a list containing content-adaptive parameter candidates; and A step of determining the content adaptive parameters from the above list in terms of rate distortion optimization. A method comprising:
9. In paragraph 8, The steps to create the above list are: A step of generating an output by inputting one or more of a quantization parameter, a slice type, the restoration block, and the prediction block of the current block into a neural network; and A step of generating content-adaptive parameter candidates based on the above output. A method comprising:
10. In paragraph 8, The step of encoding the above content adaptive parameters is: generating an index indicating the content adaptive parameter from the above list; and Step of encoding the above index A method comprising:
11. In paragraph 7, The steps for performing the above filtering are: A step of applying the above content-adaptive parameters to the output of the convolutional layer; and A step of applying the output to which the above content-adaptive parameters are applied to the above activation function. A method comprising:
12. In paragraph 7, The steps for performing the above filtering are: A method for generating an output of the activation function by multiplying the content-adaptive parameter by the input when the activation function is a parameterized rectified linear unit (PReLU) and the input value of the activation function is greater than 0.
13. In a method for providing video data to a video decoding device, A step of encoding the above video data into a bitstream; and A step of transmitting the above bitstream to the image decoding device Including, The step of encoding the above video data is: A step of obtaining parameters of an in-loop filter, wherein the in-loop filter is pre-trained based on deep learning and includes a convolutional layer and an activation function; A step of obtaining content adaptive parameters related to the above in-loop filter; A step of obtaining a restoration block of a current block, wherein the restoration block includes a luma block and a chroma block; A step of generating stacked blocks based on the luma block and the chroma block; A step of performing filtering by inputting the stacked blocks into the in-loop filter and applying the content-adaptive parameters to the convolutional layer or the activation function; and A step of encoding the parameters of the above in-loop filter and the content adaptive parameters. A method comprising:
Citation Information
Patent Citations
Recycled coal briquettes and its manufacturing method
KR1020220068136A
Antibody-chelator conjugate
KR1020250045545A
Gas management system in ship
KR1020250064702A
Apparatus for manufacturing composite yarn
KR102156367B1
Method and apparatus for video encoding / decoding using image analysis
KR102624286B1