Video decoding method and encoding method applying dimension-decomposition for weights determination
The dimension-decomposition method addresses redundancy in neural network weights by decomposing within specific dimensions, enhancing video coding efficiency and reducing storage and computational demands.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHENZHEN TCL NEW-TECH CO LTD
- Filing Date
- 2024-11-13
- Publication Date
- 2026-04-23
AI Technical Summary
Existing video coding methods fail to effectively reduce redundancy in neural network weights, particularly in sparse matrices and weights with only one dimension, leading to inefficiencies in model size and inference speed.
Implement a dimension-decomposition method that decomposes neural network weights within a specific dimension, allowing for a more efficient representation and transmission of weight components, reducing redundancy and improving compression efficiency.
The method enhances video coding by minimizing weight redundancy and optimizing storage and computational resources, improving compression efficiency and inference speed.
Smart Images

Figure CN2024131875_23042026_PF_FP_ABST
Abstract
Description
VIDEO DECODING METHOD AND ENCODING METHOD APPLYING DIMENSION-DECOMPOSITION FOR WEIGHTS DETERMINATIONTECHNICAL FIELD
[0001] The present disclosure generally relates to encoding and decoding technology, and in particular to a video decoding method, a video encoding method, a video coding apparatus and a computer readable medium.BACKGROUND
[0002] The success of neural networks has extended to the field of video coding and has shown promising capabilities of visual representation. For example, in the development of the standardization of neural network-based video coding, neural networks have been employed for multiple machine vision tasks, e.g., pixel prediction, reference frame generation, coding artifact removal, super-resolution. These neural networks establish pre-specified computational graphs based on the video profile or neural network configurations, and then load weights stored in the video codec offline to achieve their respective functions.
[0003] Decomposition has been used in neural networks to reduce model size and speed up inference by minimizing weight redundancy. These methods assume the intrinsic rank of weights is smaller than their dimensions, thus applying decomposition across these dimensions. In this paradigm, decomposed components represent information of weights. However, in some cases (e.g., sparse weight matrices) , weights may have redundancy within a specific dimension, which can hardly be reduced by existing schemes. Additionally, for weights with only one dimension (e.g., bias, multipliers) , existing schemes have to fully preserve or transmit all weight elements.SUMMARY
[0004] Accordingly, the present disclosure aims to provide a video decoding method, a video encoding method, a video coding apparatus and a computer readable medium.
[0005] A technical scheme adopted by the present disclosure is to provide a video decoding method. The method is executed by a decoder deployed with a neural network. The method includes: acquiring a dimension-decomposition information, wherein the dimension-decomposition information comprises at least one of: an amount of decomposed weight components; or one or more sizes of the decomposed weight components; determining a set of values of the decomposed weight components based on the dimension-decomposition information; determining a sequence of weight information based on the decomposed weight components; and determining weights of the neural network based on the sequence of weight information.
[0006] Another technical scheme adopted by the present disclosure is to provide a video encoding method. The method is executed by an encoder deployed with a neural network. The method includes: determining a dimension-decomposition information, wherein the dimension-decomposition information comprises at least one of: an amount of decomposed weight components; or one or more sizes of the decomposed weight components; and transmitting a bitstream to a decoder, wherein the bitstream comprises the dimension-decomposition information; wherein the dimension-decomposition information is configured to determine a sequence of weight information by the decoder.
[0007] Another technical scheme adopted by the present disclosure is to provide an apparatus for encoding or decoding. The apparatus includes a processor and a memory. The memory is configured to store executable instructions that, when executed by the processor, cause the processor to perform any of the foregoing methods.
[0008] Another technical scheme adopted by the present disclosure is to provide a computer readable medium. The computer readable medium is configured to store executable instructions that, when executed by the processor, cause the processor to perform any of the foregoing methods.BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to clearly explain the technical solutions in the embodiments of the present disclosure, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are merely some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings may also be obtained based on these drawings without any creative work.
[0010] FIG. 1 shows a schematic diagram of a conventional video encoding system.
[0011] FIG. 2 shows a schematic diagram of a conventional video decoding system.
[0012] FIG. 3 shows a schematic diagram of a video encoding system implemented with a neural network according to an embodiment of the present disclosure.
[0013] FIG. 4 shows a schematic diagram of a video encoding system implemented with a neural network according to another embodiment of the present disclosure.
[0014] FIG. 5 shows a schematic diagram of a video encoding system implemented with a neural network according to yet another embodiment of the present disclosure.
[0015] FIG. 6 shows a schematic diagram of a video decoding system implemented with a neural network according to an embodiment of the present disclosure.
[0016] FIG. 7 shows a schematic diagram of a video decoding system implemented with a neural network according to another embodiment of the present disclosure.
[0017] FIG. 8 shows a schematic diagram of a video decoding system implemented with a neural network according to yet another embodiment of the present disclosure.
[0018] FIG. 9 conceptually illustrates a video encoding process applying dimension-wise decomposition method.
[0019] FIG. 10 conceptually illustrates a video encoding / decoding process applying dimension-wise decomposition method.
[0020] FIG. 11 shows an example where a slice of weights (also can be called a sequence of weight) is represented as three decomposed components.
[0021] FIG. 12 is a flowchart of a video decoding method according to an embodiment of the present disclosure.
[0022] FIG. 13 shows a scenario where the slice of weights generated from the dimension-wise decomposed weight components is taken as values of one-dimension weights of the neural network.
[0023] FIG. 14 shows a scenario where the slice of weights generated from the dimension-wise decomposed weight components is taken as values of another decomposed weight of the neural network.
[0024] FIG. 15 shows a scenario where two sets of decomposed weight components are utilized to generate the slice of weights.
[0025] FIG. 16 is a flowchart of a video encoding method according to an embodiment of the present disclosure.
[0026] FIG. 17 shows a process of determination of a transform type based on intra prediction mode and a look-up table.
[0027] FIG. 18 shows the generalized data-flow chart of selecting edge operators to be applied to the predictor of a current block.
[0028] FIG. 19 shows the data-flow chart of selecting an edge operator for the intra prediction mode derivation process where the edge operator of 2x2 size is applied to the predictors of blocks with the smallest size (i.e., 4x4, 4x8, and 8x4) whereas the edge operator of 3x3 size is applied to the predictors of blocks of other sizes.
[0029] FIG. 20 shows the generalized data-flow chart of selecting an edge operator for the intra prediction mode derivation process.
[0030] FIG. 21 shows a process of determination of a transform type based on intra prediction mode and a lookup table with block size dependency.
[0031] FIG. 22 shows an example of template / reference areas in TMRL mode.
[0032] FIG. 23 shows a flowchart of MPM list derivation process.
[0033] FIG. 24 shows a flowchart to eliminate DC mode from the process of obtaining candidate modes from neighbor blocks.
[0034] FIG. 25 shows an exemplary non-adjacent DIMD process.
[0035] FIG. 26 shows a process of projecting a non-adjacent reference line onto the adjacent reference line according to a selected angular mode direction.
[0036] FIG. 27 shows a flowchart for refining the candidate list based on HoG.
[0037] FIG. 28 is a schematic diagram of a video coding apparatus according to an embodiment of the present disclosure.DETAILED DESCRIPTION
[0038] The disclosure will now be described in detail with reference to the accompanying drawings and examples. Apparently, the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0039] To help understand the technical solutions proposed in the embodiments of this application, a brief introduction of video encoding and decoding system will be provided below.
[0040] As shown in FIG. 1, a video encoding system 110 may include multiple modules, such as block partitioning unit 1101, transform and quantization unit 1102, intra-frame estimation unit 1103, intra-frame prediction unit 1104, motion compensation unit 1105, motion estimation unit 1106, an inverse transformation and inverse quantization unit 1107, a filter control analysis unit 1108, a filtering unit 1109, an encoding unit 1110, an encoded image buffer unit 1111 and a subtractor 1112.
[0041] Original video signals include video frames. Each video frame is divided into blocks by a block partitioning unit 1101. For each of the video frames, the subtractor 1112 generates residual pixel information about a residual frame by subtracting the input video frame from the output of the intra-frame prediction unit 1104 or the motion compensation unit 1105. The residual pixel information obtained after intra-frame prediction or inter-frame prediction (motion compensation) , is transformed by the transformation and quantization unit 1102. The transformation includes transforming the residual pixel information from the pixel domain to a transform domain, and the resulting transform coefficients are quantized to further reduce the bit rate. The intra-frame estimation unit 1103 performs intra-frame estimation, and the intra-frame prediction unit 1104 performs intra-frame prediction on the video reconstructed blocks. Motion estimation performed by the motion estimation unit 1106 is a process of generating a motion vector that can estimate the displacement of the reconstructed video block, and then motion compensation is performed by the motion compensation unit 1105 based on the determined motion vector. After determining an intra-frame prediction mode, the intra-frame prediction unit 1104 provides selected intra-frame predicted data to the encoding unit 1110, and the motion estimation unit 1106 also sends calculated motion vector data to the encoding unit 1110. The inverse transform and inverse quantization unit 1107 reconstructs the video reconstructed blocks and reconstructs a residual block in the pixel domain, and the filtering unit 1109 is controlled by the filter analysis unit 1108 to remove the blocking artifacts in the reconstructed residual block, and the encoding unit 1110 adds the reconstructed residual block to the prediction block of the encoded image buffer unit 1111 to generate a reconstructed block. The encoding unit 1110 is used for encoding various encoding parameters and quantized transform coefficients (quantized transform coefficients) into bitstream, and outputs the bitstream of the video signals. The encoded image buffer unit 1111 is used for storing reconstructed blocks as the reference blocks for intra-frame prediction. As the video image encoding progresses, new reconstructed blocks are continuously generated, and these blocks are stored in the encoded image buffer unit 1111.
[0042] As shown in FIG. 2, a video decoding system 120 may include multiple modules such as a decoding unit 1201, an inverse transform and inverse quantization unit 1202, an intra-frame prediction unit 1203, a motion compensation unit 1204, a filtering unit 1205, a decoded image buffer unit 1206 and a post filtering unit 1207.
[0043] The input signals of video frames are encoded by the video encoding system 110 to obtain an output bitstream. The video encoding system 110 transmits the bitstream to the video decoding system 120. The video decoding system 120 receives the bitstream representing the video frames in an encoded format (i.e., in a compressed format) . In the video decoding system 120, the bitstream is processed by the decoding unit 1201 to obtain decoded transform coefficients. The inverse transform and inverse quantization unit 1202 process the transform coefficients to generate a residual block in the pixel domain. The intra-frame prediction unit 1203 is operable to generate an intra-frame prediction block for a current video decoding block based on a determined intra-frame prediction mode and data from previously decoded blocks of the current video frame or picture. The motion compensation unit 1204 determines the inter-frame prediction information for the current video decoding block and generates an inter-frame prediction block by parsing the motion vector and other associated syntax elements. Finally, the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 1202 and the corresponding prediction block generated by the intra-frame prediction unit 1203 or the motion compensation unit 1204. In order to improve video quality, the decoded video blocks are filtered through the filtering unit 1205 to remove blocking artifacts. The decoded video block is then stored in the decoded image buffer unit 1206 as the reference block for subsequent intra-prediction or motion compensation, and for video output, i.e., to reproduce and reconstruct the original video signals. The output video can be optionally further processed by a post filtering unit 1207 for more suitable or enhanced viewing experiences.
[0044] Neural networks have been applied in the video compression system to improve the compression efficiency. Recent works mainly focus on developing neural network for intra prediction, inter prediction, and loop filtering, which are integrated along with the intra-frame estimation unit 1103, intra-frame prediction unit 1104, motion estimation unit 1106, motion compensation 1105, and loop filters unit 1109 at the video encoder side, as well as intra prediction unit 1203, motion compensation unit 1204, and loop filters unit 1205 at the video decoder side.
[0045] For instance, neural network loop filter has been developed based on neural networks with / without original loop filters unit. A neural network unit 1313 may be employed to replace the loop filters unit 1109 as indicated in FIG. 3. Alternatively, a neural network unit 1413 may be sequentially connected with the loop filters unit 1109, e.g., after the loop filters unit 1109 as indicated in FIG. 4. Alternatively, a neural network unit 1513 may be combined with the loop filters unit 1109, e.g., by a selective usage with loop filters unit 1109 as indicated in FIG. 5.
[0046] Similarly, at the video decoder side, a neural network unit 1608 may be employed to replace the loop filters unit 1205 as indicated in FIG. 6. Alternatively, a neural network unit 1708 may be sequential connected with the loop filters unit 1205, e.g., after the loop filters unit 1205 as indicated in FIG. 7. Alternatively, a neural network unit 1808 may be combined with the loop filters unit 1205, e.g., selective usage with the loop filters unit 1205 as indicated in FIG. 8.
[0047] For detailed implementation of neural networks in the video encoding / decoding system, please refer to [JVET-T0088 AHG11: Convolutional neural networks-based in-loop filter] , and [JVET-T0079 AHG11: Neural Network-based In-Loop Filter] , and [JVET-X0054 AHG11: Neural Network based In-loop Filter with Adaptive Model Selection] . Neural network-based intra prediction and inter prediction can be implemented similarly.
[0048] The present disclosure aims to specify and apply a decomposition within a specific dimension of weight of a given neural network. The following sections provide introduction for several related technologies of the present disclosure, including: 1) basic information about decomposition; 2) basic information about neural network; and 3) related scheme of decomposition for neural network weights.
[0049] ● Decomposition
[0050] In mathematics, decomposition refers to representing a number or a mathematical object as a product of several factors.
[0051] In most cases, the factors are usually smaller or simpler objects of the same kind. Typical methods of decomposition include matrix decomposition and tensor decomposition.
[0052] A matrix decomposition represents a matrix by a product of matrices. Typical methods include matrix rank decomposition and singular value decomposition.
[0053] Matrix rank decomposition decomposes a matrix into two matrices. Given a field nonnegative integers a, b , and a matrix amatrix rank decomposition of A is a matrix product in a form of: A=A1A2 Eq. (1)
[0054] where and {A1, A2} can be regarded as a decomposed form of A (referred to as decomposed component) .
[0055] The operation of matrix product is calculated as
[0056] For r<rank (A) , such operation is often referred to as a matrix low-rank decomposition, and {A1, A2} is often regarded as a low-rank decomposed form of A.
[0057] Singular value decomposition decomposes a matrix into three matrices. Given a field nonnegative integers a, b , and a matrix a singular value decomposition of A is a matrix product in a form of: A=A1A3A2 Eq. (3)
[0058] where and are orthogonal matrices, and is a diagonal matrix with the singular values on the diagonal.
[0059] Similarly, for r<rank (A) , such operation is often referred to as a compact singular value decomposition, and {A1, A2, A3} is often regarded as a low-rank decomposed form of A.
[0060] A tensor decomposition represents a tensor by a product of tensors or matrices. Typical methods include linear tensor decomposition (Tensor rank decomposition) and multilinear tensor decomposition (Tucker decomposition) .
[0061] Tensor rank decomposition (also referred to as CANDECOMP / PARAFAC decomposition) decomposes a tensor into a collection of rank-1 tensors. Given a field aset of nonnegative integers d1, d2, …, dN, and a matrix atensor rank decomposition of A is in a form of linear combination of rank-1 tensors as
[0062] In the above equation, and with 1≤n≤N. denotes an operation of Kronnecker product, and the operation is calculated as:
[0063] When the number of terms R is smaller than the rank of the tensor, such operation is often referred to as a tensor low-rank decomposition, and {A1, r, A2, r, …, AN, r} is often regarded as a low-rank form of A.
[0064] Tucker decomposition decomposes a tensor into a tensor (referred to as core tensor) and a collection of matrices. Given a field a set of nonnegative integers d1, d2, …, dN, and a matrix atucker decomposition of A is a multilinear combination of core tensor and matrices in a form of: A= ( (A0×1 A1) ×2 A2) …×N AN Eq. (6)
[0065] In the above equation, is the core tensor and with 1≤n≤N. ×n denotes an operation of n -mode product of a tensor with a matrix, and the operation is calculated as:
[0066] When the number of terms rn is smaller than dn, such operation is often referred to as a compact tucker decomposition, and {A0, A1, A2, …, AN} is often regarded as a low-rank form of A.
[0067] ● Neural Network
[0068] A neural network (e.g., convolutional neural network, fully connected neural network, Vision Transformer neural network) is a computation graph consisting of one or multiple layers of computation. It is typically constructed in a hierarchical manner, where each neuron (also called neural node) within the neural layer extracts learned visual features or patterns of increasing complexity from the input image. For instance, convolutional neural network consists of one or more convolutional layers, where each layer applies a set of learned convolutional filters to detect various spatial features or patterns from the input data. Here, each convolutional filter represents one neuron, and it is convolved with the input image to produce a feature map that represents the presence of a specific feature or pattern. This operation is referred to as a visual feature extraction.
[0069] Specifically, a neural network can be regarded as a stack of sequential neural projection operations with a total layer number of L, which can be formulated as:
[0070] The neural projection operations can be typically formulated as:
[0071] where Wl denotes parameter weight of the neural projection operator, bl denotes a neural projection bias, hl (·) denotes a non-linear activation, and αl denotes a control factor of hl (·) .
[0072] Given an input image xin , a prediction ypred of the neural network a process commonly called inference, is:
[0073] In the above equation, θNN denotes the weights of and it can be obtained by training on a given task or tasks (including upstream tasks or pretext tasks) and datasets D (including especially large-scale datasets or multi-modal datasets) .
[0074] For example, for current neural network-based loop filtering, the target is to output the high-quality filtered sample of the low-quality reconstructed version close to the original sample. The optimal is supposed to make the difference between the high-quality restored sample and the original input sample as minimum as possible. For instance, given training database (e.g., DIV2K in [NTIRE 2017 Challenge on Single Image Super-resolution: Dataset and Study. IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW) , pp. 126-135, 2017] , BVI-DVC in [BVI-DVC: A Training Database for Deep Video Compression. IEEE Transactions on Multimedia, 24: 3847-3858, 2021] , TVD in [Tencent Video Dataset (TVD) : A Video Dataset for Learning-based Visual Data Compression and Analysis [J] . arXiv preprint arXiv: 2105.05961, 2021] ) with paired original sample xorg (i.e., the output result of sample partition unit 1101) and its corresponding low-quality reconstructed sample xin, is expressed as:
[0075] In the above equation, denotes the error metric (e.g., absolute error, mean square error) . The filtered result will be
[0076] Beyond mere inference, neural networks can also serve as accessory modules and auxiliary modules. Specifically, the accessory module refers to a supplemental module or set of modules that are not part of the main workflow of inference, but assist in the overall functioning and performance of the method (e.g., word embedding layers in image caption, which convert words into vectors) , while the auxiliary module refers to an additional module or set of modules that perform secondary tasks to support the primary objective of the method (e.g., teacher neural network in knowledge distillation, which are used to provide additional labels during training but not used for inference) . Typically, these modules still rely on the visual feature extraction conducted by neural node. Therefore, they are included in the scope of this disclosure.
[0077] Topology of a neural network refers to the neurons in a neural network and the connections between these neurons. Information about topology may indicate the structure of neural networks and how the network processes and transmits information.
[0078] The structure of neural networks includes at least one layer, with each layer contains one or more neurons responsible for extracting features from the input data. The neural network may typically include the following types of layers: 1) projection layers, including but not limited to convolutional layer, fully connected layer, embedding layer; 2) normalization layers, including but not limited to batch normalization, instance normalization, adaptive instance normalization, group normalization, weight normalization, switchable normalization; and 3) activation layers, including but not limited to Parametric Rectified Linear Unit (PReLU) .
[0079] Weight of a neuron refers to a numerical value associated with the neuron. The weight may be used to scale the signal passing through the associated neuron. The weights of a neural network refer to a set of weights that are associated with all the neurons contained in the neural network. Weights are usually learnable parameters. For example, given a set of data samples, the values of weights can be learned.
[0080] The process of training a neural network involves modifying the weights to reduce the error between the predicted output and the ground-truth output. This is typically done using a learning algorithm (e.g., backpropagation) combined with an optimization technique (e.g., gradient descent) and a loss function specific to a learning task. For example, during backpropagation, the error is calculated at the output and propagated back through the network to update the weights in a way that optimally reduces the overall error.
[0081] An update of weights refers to a set of weights that contain information about how to modify the weights of a neural network. The weights that have been modified are often referred to as updated weights. Typically, an update of weights can directly be expressed as updated weights.
[0082] In another implementation, an update of weights can also be expressed as the difference (e.g., an increment, a multiplier) between the weights and its updated weights, and it is often referred to as a weight update.
[0083] Existing schemes for standards-essential neural networks mainly include 1) architecture design, 2) input design, and 3) adaptability design.
[0084] The architecture design explores neural network structures that align closely with a specific functionality (e.g., filtering, prediction) , including basic module design (e.g., separate convolution in [JVET-AD0156 EE1-1.1: Complexity Reduction on Neural-Network Loop Filter] , Transformer block in [JVET-AH0205 EE1-2.3: Integer implementation of HOP In-loop filter with Transformer samples and Attention samples] ) and branch design (e.g., cross-component branch in [JVET- T0094 AHG11: In-loop filtering based on neural network] , shared inference branch in [JVET-W0113 AHG11: neural network based in-loop filter] ) . The goal is to find the optimal with corresponding θ*, which can be formulated as:
[0085] The input design introduces additional inputs, such as image type in [JVET-AC0179 AHG11: Swin-Transformer based In-Loop Filter for Natural and Screen Contents] , quantization step in [JVET-U0115 AHG11: Neural Network-based In-Loop Filter Performance with No Desampleing Filtering stage] , rotation information in [JVET-AE0161 AHG11: Input and output rotation of model for NNVC in-loop filter] ) . The goal is to find the optimal additional input xadd for i.e.,
[0086] The adaptability design involves an update of weights of neural networks, as present in [JVET-AH0096 EE1-1.4: Content-adaptive loop-filter] . Typically, a given neural network gets overfitted based on the samples to be encoded at the encoder side, and then the update of weights is signaled to the decoder side for correct decoding. The goal is to find the optimal update of weights θupdate, i.e.,
[0087] ● Related Scheme of Decomposition for Neural Network Weights
[0088] Some related works have already applied decomposition to the weights or weight updates of neural networks.
[0089] As for decomposition of weights, such schemes reduce storage costs for neural network deployment. For example, in [JVET-AF0071 EE1-related: Further complexity reduction on the joint EE1-0 (LOP. 2) unified filter] , CANDECOMP / PARAFAC (CP) decomposition transforms a 3-by-3 convolution kernel into a sequence of a 3-by-1 and a 1-by-3 convolution, thus reducing computation. Various matrix and tensor decomposition methods for weight compression are discussed in [Model Compression and Hardware Acceleration for Neural Networks: A Comprehensive Survey. Proceedings of the IEEE, vol. 108, no. 4, pp. 485-532, 2020] . Additionally, the Neural Network Coding and Representation standard (NNR, officially issued as ISO / IEC 15938-17: 2022) specifies Singular Value Decomposition (SVD) to support decomposed weights.
[0090] As for decomposition of weight updates, recent attempts apply decomposition to an update of weights (e.g., a weight update, updated weights) , lowering the computational resources required for training and reducing signaling costs. For example, in [PCT / CN2024 / 098802] , a low-rank representation of weight updates is proposed to facilitate content-adaptive filtering.
[0091] It is important to note that all existing schemes expect that the intrinsic rank of weights (or their updates) is smaller than their dimensions, thus applying decomposition across dimensions of weights. In this paradigm, each decomposed matrix or tensor represents information of weights of at least one complete dimension.
[0092] According to current techniques, a weight update (or updated weight) may be signaled to the decoder. For example, in [JVET-AH0096 EE1-1.4: Content-adaptive loop-filter] , each element of the inserted multiplier is signaled, which can consume more than 5%of the bitrate in low bitrate scenarios (e.g., quantization parameters are set to 37 or 42) . Thus, a compact representation of multiplier weights is especially needed in such cases, which may lead to reduction of the number of parameters signaled and to reduction of the overall bitrate cost.
[0093] In the context of neural network-based video coding, the present disclosure introduces a dimension-wise decomposition. The decomposition may be applied within a selected dimension rather than across multiple dimensions.
[0094] FIG. 9 conceptually illustrates a video encoding process applying dimension-wise decomposition method. As shown in FIG. 9, the process may involve: obtaining a weight of a neural network; obtaining information on dimension-wise decomposition (relative to reshaping of the weight) ; and signaling the information on dimension-wise decomposition in a bitstream. FIG. 10 conceptually illustrates a video encoding / decoding process applying dimension-wise decomposition method. As shown in FIG. 10, the process may involves: obtaining the information on dimension-wise decomposition from, for example, the bitstream; determining the dimension-wise decomposed weight based on the information; calculating a reshaped weight and then acquiring the weight of a neural network accordingly.
[0095] The dimension-wise decomposition method may be applied to various convolutional neural networks and machine tasks (e.g., machine vision tasks, natural language processing tasks, reinforcement-based decision-making tasks, generative tasks) . Furthermore, this method is expected to be beneficial for both conventional video coding frameworks and end-to-end neural network-based video coding frameworks. Moreover, it can also be used in systems designed for human consumption as well as systems for machine consumption (e.g., Video Coding for Machines) . In addition, this method is not only applicable to neural network input formats but can also be used as an image / video processing or analysis method and is further widely used in common media data processing systems. Different implementations will be elaborated in subsequent sections of the present disclosure.
[0096] The present disclosure provides a dimension-decomposition (also called dimension-wise decomposition) method. The idea of dimension-decomposition involves a decomposition within a specific dimension of weights. For a given dimension, the corresponding weight slice may be taken as a set of (two or more) sub-dimensions, each sub-dimension being a division of the original dimension. By applying decomposition across these sub-dimensions, the weight slice may be represented by decomposed components, each corresponding to one sub-dimension. The dimension-decomposition information is configured for description of these decomposed weight components.
[0097] FIG. 11 shows an example where a slice of weights is represented as three decomposed weight components. In this example, the slice of weight includes 32 weight elements. Every four elements in the slice are taken as a unit, which corresponds to the first sub-dimension. Every four units are taken as a group, which corresponds to the second sub-dimension. And there are two divided groups, which corresponds to the third sub-dimension. Eventually, the slice of weight with 32 weight elements may be represented by three decomposed weight components. The first decomposed weight component corresponds to the first sub-dimension, and contains four elements. The second decomposed weight component corresponds to the second sub-dimension, and contains four elements. The third decomposed weight component corresponds to the third sub-dimension, and contains two elements. In this case, the amount of decomposed weight components for the slice of weight is equal to 3, while the sizes of the decomposed weight components are 4, 4, and 2 respectively (expressed as 4×4×2) .
[0098] In some cases, the size and amount of high-level sub-dimensions (e.g., the (k+1) -th) can be different among various components decomposed from a low-level one (e.g., the k-th) . For example, the weight slice (containing 32 elements) in FIG. 11 may alternatively be decomposed into two components with a total element number of 4 and 8 respectively. Moreover, the first component with 4 elements may be further decomposed into two sub-components each with 2 elements, and the second component with 8 elements may be further decomposed into one sub-component with 2 elements and one sub-component with 4 elements.
[0099] It should be understood that, the specific way for derivation of decomposed components is not limited to the above method. In one possible implementation, decomposed components are obtained by applying decomposition to the trained slice of weights. In another possible implementation, a set of decomposition components is created, and then participates in the training to obtain values.
[0100] An example is given below. Assuming a slice of weights contains 32 elements [2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, ] , and the amount and sizes of decomposed weight components are 3 and [4, 4, 2] respectively, the slice of weights may be decomposed into three sub-dimensions. The decomposed weight components may be referred to as A1, A2 and A3. The above sizes [4, 4, 2] indicates that the first sub-dimension contains 4 elements, the second sub-dimension contains 4 elements, and the third sub-dimension contains 2 elements.
[0101] In one case, the rank of each decomposed weight component is equal to 1. Accordingly, A1 may contain 4 elements, A2 may contain 4 elements, and A3 may contain 2 elements. For instance, A1 could be a vector [2, 2, 2, 3] , A2 could be a vector [1, 1, 1, 1] , A3 could be a vector [1, 1] . The decomposed weight components A1, A2 and A3 are decomposition representation of the original slice of weights. To resume or construct the original slice of weight, we can firstly calculate the outer product of A1 and A2, which is equal to a 2-dimension tensor M= [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] . Then the outer product of M and A3 may be calculated, which is equal to a 3-dimension tensor R= [ [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] , [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] ] . Finally, values of the 3-dimension tensor R may be extracted (in other words, the 3-dimension tensor R may be “flattened” ) so as to acquire the original slice of weight.
[0102] In another case, the rank of A1, A2 may be equal to 2, and the rank of A3 may be equal to 1. Accordingly, A1 may contain 8 (4-by-2) elements, A2 may contain 8 (4-by-2) elements, and A3 may contain 2 (2-by-1) elements. For instance, A1 could be a 4-by-2 matrix [ [1, 1] , [1, 1] , [1, 1] , [1, 1] ] , A2 could be a 2-by-4 matrix [ [1, 1, 1, 1.5] , [1, 1, 1, 1.5] ] , A3 could be a vector [1, 1] . The decomposed weight components A1, A2 and A3 are decomposition representation of the original slice of weights. To resume the original slice of weight, we can firstly multiply A1 and A2, which is equal to a 2-dimension tensor (matrix) M= [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] . Then the outer product of M and A3 may be calculated, which is equal to a 3-dimension tensor R= [ [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] , [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] ] . Finally, values of the 3-dimension tensor R may be extracted (in other words, the 3-dimension tensor R may be “flattened” ) so as to acquire the original slice of weight.
[0103] Furthermore, the dimension-wise decomposition may be applied to only a part of the given dimension. For example, for the weight slice with 32 elements shown in FIG. 11, it is possible to only decompose the first half of slice (containing 16 elements) . Similarly, the size and amount of sub-dimensions can be different among different parts of the weight slice. For example, the weight slice with 32 elements shown in FIG. 11 can be divided into two parts with 8 elements and 24 elements respectively. Each of these sub-dimensions can be further decomposed into 2×4 and 3×8 respectively.
[0104] In one embodiment, the dimension-wise decomposition may be applied to only a part of the given dimension, while keeping the remaining part undecomposed. This might be used in case that e.g. size of the given dimension equal to a prime value. For example, given size of dimension equal to 13, the dimension-wise decomposition can be applied to 12 elements (e.g., using 3×4) from 13, and keeping the remaining 1 element unmodified.
[0105] In one case, the center part of the element is dimension-wise decomposed, and the elements on the edges of the two sides of the dimension keep unmodified. For example, for a weight dimension size of 17, 3×5 can be used to obtain 15 elements, and the first and last elements keep unmodified. In case the number of unmodified elements is odd, a pre-defined strategy of rounding either up or down may be applied to obtain a number of elements to be unmodified at the beginning and, consequently, a complementary number of elements keep unmodified from the end.
[0106] In another case, elements on a specific side of the element keep unmodified. For example, for a weight dimension size of 17, 3×5 can be used to obtain 15 elements, and the first (or last) two elements keep unmodified.
[0107] In one case, dimension-wise decomposition is applied with an offset, in which elements after (or before) a certain number of elements in a certain direction (e.g., from the beginning towards the end, from the end towards the beginning) keep unmodified. For example, given an offset equal to 1 from the start, the first 1 element of the 17 elements obtained by 3×5 is modified, and the subsequent 15 elements are collected for dimension-wise decomposition. The offset information of the cropping can be preset or signaled.
[0108] In another embodiment, the dimension-wise decomposition may be applied to only a larger number, and then it is cropped into the size of given dimension. This might also be used in case that e.g. size of the given dimension equal to a prime value. For example, given size of dimension equal to 13, the dimension-wise decomposition can be applied to 15 elements (e.g., using 3×5) , and then crop 2 elements from 15.
[0109] In one case, a center cropping is used, in which the center part of the element is retained, and the elements on the edges of the two sides of the dimension are discarded. For example, for a weight dimension size of 13, 3×5 can be used to obtain 15 elements, and the first and last elements are discarded. Similarly, in case the number of cropped elements is odd, a pre-defined strategy of rounding either up or down may be used.
[0110] In another case, a start / end cropping is used, in which elements on a specific side of the element are discarded. For example, for a weight dimension size of 13, 3×5 can be used to obtain 15 elements, and the first (or last) two elements are discarded.
[0111] In one case, cropping is used with an offset, in which elements after (or before) a certain number of elements in a certain direction (e.g., from the beginning towards the end, from the end towards the beginning) are retained. For example, given an offset equal to 1 from the start, the first 1 element of the 15 elements obtained by 3×5 is discarded, and the subsequent 13 elements are collected as weight dimension. Similarly, the offset information of the cropping can be preset or signaled.
[0112] In some embodiments, a slice of weight (also can be called a sequence of weight) may represent two or more given dimensions. In other words, the weight slices of these dimensions are flattened into a one-dimension weight slice, and then similar dimension-decomposition method may be applied. Note that, rather than simply applying dimension-decomposition to two or more dimension separately, this embodiment involves weight elements from two or more dimensions into the division of sub-dimensions. This may allow weight elements from different dimensions to participate in the same sub-dimension, thereby constructing potential associations based on element positions (e.g., dividing weights of input channel dimension and output channel dimension by channel index, thus constructing sub-dimensions group-by-group) .
[0113] Based on the idea of dimension-decomposition, the present disclosure provides a video decoding method. The method may be executed by a decoder deployed with a set of parameters. For example, the set of parameters may belong to one or several neural units of a neural network, e.g., neurons of fully connected neural network, filters of convolutional neural network, embedded matrices of Transformer model. In another example, the set of parameters may belong to one or more coefficients of a machine learning model (e.g., support vector machine, decision trees, decision forests, Boltzman machine, regression model) , e.g., weight vectors of support vector machine, weight coefficients of linear regression model. As shown in FIG. 12, the method includes operations described in blocks S201 to S204.
[0114] In S201, a dimension-decomposition information is determined.
[0115] The dimension-decomposition information includes at least one of: an amount of decomposed weight components; or one or more sizes of the decomposed weight components. The amount of decomposed weight components specifies how many decomposed weight components (i.e., sub-dimensions) a sequence of weight should be decomposed into, which also indicates how many sub-dimensions the sequence of weight is divided into. The sizes of the decomposed weight components specify the size of each decomposed weight component, which also indicates how many elements each sub-dimension contains. In one exemplary case where the rank of the decomposed weight components is equal to 1, assuming the dimension-decomposition information contains an amount of 3 and three sizes [4, 4, 2] , it means a sequence of weight is decomposed into three components, the first component includes 4 elements (i.e., 4-by-1) , the second component includes 4 elements (i.e., 4-by-1) , and the third component includes 2 elements (i.e., 2-by-1) . In the case where the rank of a decomposed weight component is equal to n, the number of elements of the decomposed weight component is equal to n multiplied by its size. For instance, if the size and rank of a decomposed weight component are 3 and 2 respectively, the decomposed weight component contains 6 elements (i.e., 3-by-2) .
[0116] In some embodiments, the dimension-decomposition information may be acquired from a bitstream received from an encoder.
[0117] The bitstream may include value (s) of the dimension-decomposition information.
[0118] In one embodiment, the bitstream may include value of the amount of decomposed weight components and / or value (s) of sizes of the decomposed weight components. Typically, the value of the amount can be represented as an integer value.
[0119] For example, when the video decoder receives a set of data units, it obtains the amount information by where DataK denotes the data units of an amount of sub-dimensions, IK indicates the format of amount, e.g., when IK=n , K is represented by unsigned integer using n bits. Note that, in some cases, the amount information is demultiplexed with the size information from the bitstream. The amount information should be decoded first, followed by the size information.
[0120] For example, when the video decoder receives a set of data units, it obtains the size information by where represents a data decoding operation, denotes the data units of a size of sub-dimensions, indicates the format of size, e.g., when each dk is represented by unsigned integer using n bits, and K denotes the total number of dk, indicating the amount of sub-dimensions to be decomposed into. Note that, when the weight dimensions are known to the decoder, the decoder may obtain partial size information (e.g., the data units containing only K-1 elements of sizes) and deduce the remaining part from relevant information. That is, the last elements of the sizes can be deduced based on previous sizes and the size of the sequence of weight information.
[0121] In another embodiment, the bitstream may include an identifier for determining the dimension-decomposition information from a set of possible values for the dimension-decomposition information. The set of possible values may be preconfigured to the decoder.
[0122] For example, the set of possible values for the dimension-decomposition information may be stored in a lookup table LUTK [·] . When a decoder receives an identifier i, it uses the identifier as a key to the lookup table LUTK [·] to obtain the stored amount (s) and / or size (s) corresponding to that key, e.g.: K=LUTK [i] , given that there is a set of amount (s) and / or size (s) available at both encoder and decoder side. Note that, in most cases, lookup tables should contain at least one amount value equal to 1, indicating that no dimension-wise decomposition to be applied. Alternatively or additionally, lookup tables should contain at least one number equal to weights dimension size, indicating that no dimension-wise decomposition to be applied.
[0123] In some cases, the amount information may be combined with the size information. For instance, a single index i indicates both K and value for each size of sub-dimensions, given that there is a set of amount (s) and corresponding size (s) available at both encoder and decoder side.
[0124] Note that the dimensions of weights are usually set according to certain rules, e.g., convolutional neural networks usually use a total number of channels that is a multiple of 8 for hardware convenience. Therefore, it is practical to save all common divisors of the dimensions (as candidates of sub-dimension sizes) in a lookup table in advance and reduce the bitrate cost of size information by signaling the index.
[0125] The bitstream may include both the amount information and the size information. However, in some cases, the bitstream may only include either the amount information or the size information, and the one not included in the bitstream may be deduced. Several ways are explained below.
[0126] In some embodiments, the bitstream may include the one or more sizes of the decomposed weight components. Accordingly, the amount of the decomposed weight components may be deduced based on the one or more sizes of the decomposed weight components and a size of the sequence of weight information. Specifically, once all sizes of sub-dimensions are obtained, the amount may be determined as the number of elements contained in the size information. For example, K elements of sizes are obtained followed by an indicator indicating “stop of decoding size” information, where K is the amount of sub-dimensions. In another example, when all sizes of sub-dimensions are specified or pre-defined to be the root of weights dimension size (e.g., square root, cube root) , the order of root is the amount of sub-dimensions.
[0127] Since the product result of all sub-dimension sizes needs to be equal to the size of corresponding dimension, the size information can be derived from dimension of weights. In one example, given dimension d′n of a weight and the front K-1 sizes {dk} K-1, dK can be calculated as dK=d′n / (d1×…×dK-1) . This suggests that part of the size information may not be stored or transmitted to save bitrate cost. In some embodiments, the one or more sizes of the decomposed weight components may be deduced based on an n-th (n is a positive integer) root of a size of the sequence of weight information. For example, size of sub-dimensions can be a specific order of root of weights dimension size, e.g., in case of square root. In another case, when a specific order of root is not an integer, the size can be the round result (e.g., round up, round down) of this root to obtain an integer value, and the size of remaining sub-dimension is deduced from the size of the first sub-dimension size and weights dimension size, e.g., for d′n=15 , (e.g., round down) , and d2=d′n / d1=5. In some embodiments, value of n may be equal to the amount of the decomposed weight components. For example, if the decoder knows the amount of sub-dimensions of the sequence of weight information is equal to 2, it may determines the size of each sub-dimension as the square root of the size of the sequence of weight information.
[0128] In some embodiments, the dimension-decomposition information is deduced from a pre-set configuration. The dimension-decomposition information may be pre-set in codec profile, video configuration, neural network configuration, etc. For example, a default of two sub-dimensions may be set, indicating the amount of decomposed weight components is equal to 2. Alternatively, the dimension-decomposition information is determined as a previously used value (the most recently used one) . For example, the decoder may use the most recent size of sub-dimensions for the current dimension-wise decomposition. Note that the use case of pre-set numbers may also be cooperated with other related processes. For example, given only two options available for the decoder: non-decomposed or decomposed with a pre-set number of K (e.g., K=2) , when the decoder receives a binary / 1-bit flag, it may use a dimension-wise decomposition with K=2 when the flag equal to True / 1.
[0129] In this way, the video bitstream may not include any data units or identifiers related to size or amount information, e.g., the indication being NULL, or the corresponding payload being empty. When a video decoder receives a NULL indication (or empty payload) , it may use a pre-specified size / amount as the one (s) required.
[0130] The size information of the decomposed weight components can also be deduced from one or more other relevant information, including but not limited to: 1) input of the neural network; 2) coding condition; and 3) performance requirement.
[0131] In some embodiments, the one or more sizes of the decomposed weight components is determined based on an input of the neural network. The size information can be derived from one or more aspects of input (e.g., video, frame, block) of a model that uses the decomposed weights. In one example, the size is determined based on the resolution of the input (e.g., input samples of the neural network, input feature maps of the current neural unit) . Typically, a lower resolution allows the neural network to utilize a more compact representation, thus a smaller size (often accompanied with a larger amount) can be used. In another example, the size can be determined by predefined features of the input (e.g., colour, edge, texture) . Generally, input with rich features requires efficient visual feature extraction, thus a larger size (often accompanied by a smaller amount) should be used.
[0132] In some embodiments, the one or more sizes of the decomposed weight components is determined based on a coding condition. Size information can also be derived from one or more aspects of conditions or environment that the video coding is implemented. In one example, the size is determined by a quantization parameter (e.g., at frame level, at slice level) . In case that dimension-wise decomposition is applied to an update of weights, for low bitrate scenarios (e.g., high value of quantization parameters) , a smaller size is often specified. In another example, the size is determined by the storage resources of deployment, e.g., a smaller size is often specified for space-constrained application (e.g., chips) .
[0133] For instance, both the encoder and the decoder may be pre-configured a set of sizes. Both the encoder and the decoder may be set to use a smaller size for an update of weights in low bitrate cases (e.g., for quantization parameter equal to 32, 37, 42) by default, and may be set to use a larger size in high bitrate cases (e.g., for quantization parameter equal to 22, 27) .
[0134] In some embodiments, the one or more sizes of the decomposed weight components is determined based on required model performance. The size information can be derived from the performance of a model that uses the decomposed weights. In one example, given a metric of performance (e.g., based on accuracy or error of the model output, difference between original weights and weights reconstructed by the dimension-wise decomposed components, ratio between accuracy and bitrate cost) , the size can be determined as the one with the highest performance (e.g., Peak Signal to Noise Ratio (PSNR) , Structural Similarity Index Measure (SSIM) , Multi-Scale Structural Similarity Index Measure (MS-SSIM) ) / the minimum error (e.g., Mean Squared Error (MSE) , Mean Absolute Error (MAE) , L1 energy error) , or the one satisfying a pre-defined threshold of accuracy or error and having the minimum amount of parameters. To combine the relative impact of each of these factors, one could additionally incorporate an additional Lagrange multiplier to control the importance of each of these factors on the final selection decision. Note that, in some cases, the size and amount information are derived jointly from performance of model, e.g., for d′n=32, the size and amount can be determined as {dk} K= {4, 4, 2} rather than {dk} K= {4, 8} .
[0135] For instance, for two pre-configured set of sizes with corresponding decomposed components, the model performance may be obtained at the encoder side and signaled to the decoder side. Then, the decoder may select one size set from the two, according to the performance requirements of the application scenarios.
[0136] It should be understood that, the size information can be deduced by jointly considering the relevant information provided above. For instance, the remaining kpart elements can be identified as those that satisfy both the dimension size of the weights and a performance metric, given the dimension d′n of a weight and the sizes of the first K-kpart elements.
[0137] It is appreciated that, the present disclosure does not mandatorily apply dimension-wise decomposition to each weight. For cases where no decomposition is applied, it can: 1) be indicated by an indicator; or 2) be regarded as a special case of the dimension-wise decomposition with an amount of sub-dimensions equal to 1, thus the above process can also be used to determine the application of decomposition. Similarly, for cases where no decomposition is applied, it can also be regarded as a special case of the dimension-wise decomposition with a size of sub-dimensions equals to weights dimension size, thus the above process can also be used to determine the application of decomposition.
[0138] In S202, a set of values of the decomposed weight components are determined.
[0139] In case that dimension-wise decomposition is applied to weights, a decoder determines a set of values of the decomposed weight components from a neural network representation bitstream e.g. preconfigured at decoder side. For example, for a specific set of parameters (e.g., from a neural network) with one dimension of its weight equal to 32, sizes of sub-dimensions equal to 4 and 8, and rank equal to 1, a total number of 12 elements (instead of 32) are preconfigured as its weight at the decoder. During the decoding process, once the decoder determines the amount as 2, the size as 4×8, and the rank as 1, 4 elements are used from the 12 as the first decomposition component with a shape of 4-by-1, and the other 8 elements are used as the second component with a shape of 8-by-1. Similarly, when rank equals to 2, 24 elements (instead of 32) are preconfigured as its weight at the decoder. During the decoding process, 8 elements are used as the first decomposition component with a shape of 4-by-2, and the other 16 elements are used as the second component with a shape of 8-by-2.
[0140] In case that dimension-wise decomposition is applied to an update of weights, a decoder acquires the set of values from a video bitstream or a neural network representation bitstream received from an encoder. For example, for a specific set of parameters (e.g., from a weight update) with one dimension of its weight equal to 32, sizes of sub-dimensions equal to 4 and 8, and rank equal to 1, a total number of 12 elements (instead of 32) are signaled from encoder to decoder. During the decoding process, once the decoder determines the amount as 2, the size as 4×8, and the rank as 1, 4 elements are used from the 12 as the first decomposition component with a shape of 4-by-1, and the other 8 elements are used as the second component with a shape of 8-by-1. Similarly, when rank equals to 2, 24 elements (instead of 32) are signaled. During the decoding process, 8 elements are used as the first decomposition component with a shape of 4-by-2, and the other 16 elements are used as the second component with a shape of 8-by-2.
[0141] In S203, a sequence of weight information based on the decomposed weight components is determined.
[0142] Once the amount, sizes and values of the decomposed weight components are acquired, the decomposed weight components may be utilized to generate a sequence of weight information. The method of determination of the sequence of weight information depends on what type of decomposition (e.g., matrix rank decomposition, singular value decomposition, linear tensor decomposition, multilinear tensor decomposition) is applied to the set of parameters. In general, the method may include: calculating a product result of the decomposed weight components, and determining values of the sequence of weight information as elements of the product result. The “product result” may refer to, for example, outer product (e.g., in case of matrix rank decomposition with rank equal to 1) , matrix multiplication (e.g., in case of matrix rank decomposition with rank larger than 1) , tensor mode product (e.g., in case of Tucker decomposition) , etc.
[0143] Given a set of parameters (e.g., weights) of a specified neural unit and its specified dimension to be decomposed dimension-wise, each slice of weights at a specified dimension is represented by a set of decomposed components, where each component represents a corresponding sub-dimension.
[0144] In one example, assuming three decomposed weight components A1, A2 and A3 are determined in previous operations, where A1 is a vector [2, 2, 2, 3] , A2 is a vector [1, 1, 1, 1] , and A3 is a vector [1, 1] . The product result of A1, A2 and A3 may be a 3-dimension tensor R= [ [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] , [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] ] . Values of the 3-dimension tensor R may be extracted such that the sequence of weight information may be determined as [2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3] .
[0145] In another example, assuming three decomposed weight components A1, A2 and A3 are determined in previous operations, where A1 is a 4-by-2 matrix [ [1, 1] , [1, 1] , [1, 1] , [1, 1] ] , A2 is a 2-by-4 matrix [ [1, 1, 1, 1.5] , [1, 1, 1, 1.5] ] , and A3 is a vector [1, 1] . The product result of A1, A2 and A3 may be acquired by firstly performing matrix multiplication to A1 and A2, and then applying an outer product to the matrix multiplication result and A3, which gives a 3-dimension tensor R= [ [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] , [ [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] , [2, 2, 2, 3] ] ] . Values of the 3- dimension tensor R may be extracted such that the sequence of weight information may be determined as [2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3] .
[0146] It is appreciated that, the above method of determination of the sequence of weight may be an independent step, or it can be integrated into the operation of determining the set of parameters, which is not limited in the present disclosure.
[0147] In some embodiments, the sequence of weight information is a one-dimension sequence of weight information.
[0148] Specifically, the sequence of weight information may include values corresponds to the set of parameters, e.g., one or several weight dimensions of the neural network deployed at the decoder. For example, values of the sequence of weight information may be weight values or weight update values of one or more weight dimensions of the neural network. For example, the one-dimensional sequence of weight information may correspond to a slice of weight at a weight dimension of the set of parameters (e.g., a weight dimension of a neural network) .
[0149] Alternatively, the one-dimensional sequence of weight information may corresponds to a flattened sequence of slices at two or more weight dimensions of the set of parameters (e.g., two or more weight dimensions of a neural network) . For example, the foregoing acquired sequence of weight information [2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3] may be utilized to represent two slice of weights: [2, 2, 2, 3, 2, 2, 2, 3] and [2, 2, 2, 3, 2, 2, 2, 3] .
[0150] In some embodiments, the decoder may acquire type and / / or rank information of the dimension-decomposition process, and determine the construction method for the sequence of weight from the decomposed weight components based on such information.
[0151] For type of decomposition, it may include at least one of 1) matrix decomposition (e.g., matrix rank decomposition, singular value decomposition) , 2) tensor decomposition (e.g., linear tensor decomposition, multilinear tensor decomposition) . Note that the type of decomposition will determine the product operation to be used, e.g., outer product in case of matrix rank decomposition / singular value decomposition when rank equal to 1, matrix multiplication in case of matrix rank decomposition / singular value decomposition when rank larger than 1, Kronnecker product in case of tensor rank decomposition, tensor n-mode product in case of tucker decomposition.
[0152] For rank of decomposition, it may include at least one of 1) scope of rank (e.g., the one or more specific matrix / tensor a given rank refers to) , 2) value of rank (e.g., an integer value, or a set of integer values) .
[0153] For detailed description of the type and rank of decomposition, please refer to the patent application PCT / CN2024 / 098802.
[0154] In some embodiments, an optional shuffle operation can be introduced to exchange the position of weight elements, thus potentially improving the representation capability of dimension-wise decomposition. This process obtains a shuffle information about the specific shuffling operation which may be utilized for determination of the sequence of weight information.
[0155] The shuffle indication may indicate whether a shuffle operation is used or not. It can be received from a bitstream. For example, the decoder receives a binary indicator / a bitmap indicator / a string or Type indicator equal to "True" / "1" / "shuffle" , it may apply a shuffle to the weight. Alternatively, the shuffle indication may be pre-configured to the decoder. For example, the shuffle indication may be included in codec profile, video configuration, neural network configuration, or a pre-defined identifier / index of a list / look-up table (e.g., stored together with the amount and size information) .
[0156] Alternatively or additionally, the shuffle indication may indicate the shuffle order of weight elements, including static strategy (e.g., a pre-defined shuffle order, random channel shuffle, grouped channel shuffle) and dynamic strategy (e.g., auto-shuffle, dynamic shuffle, learned shuffle e.g. predicted by a specialized neural network) . This shuffle pattern information may be received from a bitstream. For example, when the decoder receives an identifier of a list / look-up table storing pre-defined orders, it may apply the shuffle based on the corresponding order of the received identifier. In another implementation, when the decoder receives a type identifier of dynamic strategy, it may apply the shuffle based on the indicated strategy. Alternatively, the shuffle pattern information pre-configured to the decoder. For example, the shuffle pattern information may be included in codec profile, video configuration, neural network configuration, or a pre-defined identifier / index of a list / look-up table (e.g., stored together with the amount and size information) .
[0157] The shuffle operation may be performed to the elements of the product result of the decomposed weight components. Alternatively, the shuffle operation may be performed to at least one of the decomposed weight components. For example, assuming the product result of three decomposition weight components A1, A2 and A3 is R, the shuffle operation may be performed to the result R, or to some or all of the decomposed weight components A1, A2 and A3.
[0158] In S204, weights of the set of parameters are determined based on the sequence of weight information.
[0159] As explained above, the sequence of weight information may correspond to weight values or weight update values. Thus, the sequence of weight information acquired in S203 may be utilized to determine the set of parameters.
[0160] The process applies a dimension-wise decomposition on a weight, based on at least one of 1) the specified size of sub-dimensions, 2) the weight of the specified neural unit, and 3) the specified dimension to be decomposed dimension-wise. Based on the type of weights to be dimension-wise decomposed, the sequence of weight information may be utilized in different ways.
[0161] FIG. 13 shows a scenario where the sequence of weight information generated from the dimension-wise decomposed weight components is taken as values of one-dimension weights of the neural network. That is, the sequence of weight information is utilized to generate a complete weight not processed by any decomposition. It can be an original weight, a weight update (or updated weight) .
[0162] FIG. 14 shows a scenario where the sequence of weight information generated from the dimension-wise decomposed weight components is taken as values of another decomposed weight of the neural network. That is, the sequence of weight is utilized to generate a decomposed weight processed by an existing scheme, with decomposition applied across dimensions. It can be a decomposed original weight and a decomposed weight update (or a decomposed updated weight) .
[0163] FIG. 15 shows a scenario where two sets of decomposed weight components are utilized to generate the slice of weights. The sequence of weight information may be utilized to generate a first decomposed weight component, while another similar process may be utilized to generate a second decomposed weight component. In other words, the dimension-decomposition information may include a first dimension-decomposition information and a second dimension-decomposition information. A first set of decomposed weight components may be determined based on the first dimension-decomposition information. A second set of decomposed weight components may be determined based on the second dimension-decomposition information. The sequence of weight information based on an outer product result of a first sequence corresponding to the first set of decomposed weight components and a second sequence corresponding to the second set of decomposed weight components. Then this sequence of weight information may be further utilized for determination of the set of parameters.
[0164] In order to clarify to what specific items the sequence of weight information correspond, the method may further include, before the determining the weights of the set of parameters, acquiring an indication of the sequence of weight information.
[0165] In one embodiment, the indication indicates a neural unit to which the set of parameters belongs. That is, the indication may be a neural unit-related information which indicates the neural unit to which the decomposition is to be applied and the set of parameters belongs.
[0166] The neural unit-related information may be an explicit indication showing, for example, 1) a specific neural network; 2) a specific module, layer, or neural unit within neural network; 3) a specific type of modules, layers, or neural units within neural network. Alternatively or additionally, the indication may be acquired based on relevant information, for example, performance of model. Specifically, if one required performance metric (based on accuracy or error of the model output, difference between original weights and weights reconstructed by the dimension-wise decomposed components, ratio between accuracy and bitrate cost) is provided, the neural unit-related information can be obtained as the neural units that meet the metric.
[0167] When the topology information about neural network is known to both encoder and decoder side, the information can further include identifiers of neural units, e.g., 1) module identifier, 2) layer identifier, 3) operation identifier, or 4) type identifier of module, layer or operation.
[0168] In another embodiment, the indication indicates a dimension of the weights of the neural network to which the sequence of weight information belongs. That is, the indication may be a weight dimension-related information which indicates the dimension of the weights for decomposition.
[0169] The video bitstream may include explicit indication (s) about the weight dimension to be decomposed based on the above dimension-wise decomposition method. For example, when the video decoder receives an index of dimension / a bitmap indicator / a string or Type indicator (e.g. equal to "inChannel" / "outChannel" / "height" / "width" ) , the dimension-wise decomposition is applied to the dimension corresponding to the index / corresponding to the index with value "1" in the bitmap / corresponding to string (e.g. on the input channel / output channel / height / width dimension) . The above description is an example of a four-dimensional weight (e.g., two-dimensional convolutional layers) ; however, the above description can be obviously extended to other dimensions, including especially one-dimensional (e.g., fully connected layer) , two-dimensional (e.g., embedded matrix, graph neural unit) , three-dimensional (fully separate grouped convolutional layers) , or five-dimensional convolutions (e.g., three-dimensional convolutional layers) .
[0170] Alternatively or additionally, the weight dimension-related information may be derived from additional information. By analyzing relevant information, the video decoder can deduce the dimension to be dimension-wise decomposed. For example, the weight dimension-related information may be derived from size of sub-dimensions. Since size of the dimension needs to be equal to the product result of sizes from all corresponding sub-dimension, the dimension information can be derived from sizes of sub-dimensions. In one example, given a size of sub-dimensions {dk} K, the dimension d′n satisfying that d′n=d1×…×dK is determined as the one to be dimension-wise decomposed. For example, the weight dimension-related information may be pre-configured to the decoder. The dimension of weights can be derived from pre-settings (e.g., codec profile, video configuration, neural network configuration, a pre-defined identifier / index of a list / look-up table) .
[0171] In another implementation, when the weight of the indicated module, layer, or neural unit can be squeezed into a one-dimensional vector, the dimension d′n>1 is determined as the one to be dimension-wise decomposed. Similarly, if the original weight is a one-dimensional vector, this single dimension is determined for decomposition.
[0172] Based on the indication of the sequence of weight information, the decoder may know how to use the sequence of weight information determined in S203 to determine the set of parameters. Methods and calculation process for different scenarios are given below.
[0173] (1) Applying dimension-wise decomposition on complete weights
[0174] Given weights of a specified neural unit and its specified dimension to be decomposed dimension-wise, each slice of weights at a specified dimension is represented by a set of decomposed components, where each component represents a corresponding sub-dimension.
[0175] Specifically, given weights of a given layer (or its updated weights or its weight update) , where N denotes the total amount of dimensions and d′n denotes the size of the n-th dimension of θ, the slice of weight at the n-th dimension can be represented by a set of dimension-wise decomposed components as:
[0176] In the above equation, A1…Ak…AK means the product result of decomposed weight components A1 to AK, the sequence to is the sequence of weight information.
[0177] The weight may further get reshaped to align the dimension with θ as:
[0178] Additionally, or alternatively, when the shuffle indication indicates a usage of shuffle operations, the slice of weights may further get shuffled as:
[0179] Where are the slice of weight after shuffling. Mn is a permutation matrix, i.e., a square binary matrix that has one entry of 1 in each row and each column and zeros elsewhere, and it is derived based on the shuffle pattern.
[0180] Additionally, or alternatively, the shuffle operation can be applied to one or more dimension-wise decomposed components before obtaining the slice of weight (i.e., Eq. 15Eq. (15) ) . And then, the slice of weight is obtained based on the shuffled components.
[0181] When dimension-wise decomposition is applied to a part of weight dimension or a flattened sequence from two or more dimensions, the product result may be used for the corresponding part / the corresponding two or more dimensions.
[0182] (2) Applying dimension-wise decomposition on decomposed weights
[0183] In this scheme, the dimension-wise decomposition scheme can be applied to a decomposed weight, which is processed by an existing decomposition scheme.
[0184] Specifically, given a set of decomposed weights (or a set of decomposed updated weights, a set of decomposed weight updates) , e.g. {X″n} n=0, …, N where the slice of the k″-th dimension can be represented by a set of dimension-wise decomposed components as:
[0185] The decomposed weight may further get reshaped to align the dimension as:
[0186] In the above equation, denotes an arithmetic operation that combines a set of decomposed weights back into their complete form, and it depends on the type of decomposition used. For instance, in the case of matrix rank decomposition, is defined as matrix multiplication, resulting in the complete version to be reconstructed by multiplying matrices from the set {X″n} n=0, …, N. For more details, please refer to patent application PCT / CN2024 / 098802.
[0187] Additionally or alternatively, the slice of decomposed weight may further get shuffled, as indicated in Eq. 17. Additionally or alternatively, the shuffle operation can be applied to one or more dimension-wise decomposed components before obtaining the slice of decomposed weight.
[0188] (3) Applying second dimension-wise decomposition on dimension-wise decomposed weights
[0189] In this scheme, the dimension-wise decomposition can be applied to a dimension-wise decomposed weight, which is previously processed by a dimension-wise decomposition.
[0190] Given a set of first decomposed weights, e.g. can be represented by a set of second decomposed components as: Ak, j…Ak, j′…=Ak Eq. (1)
[0191] The second decomposed weight may further get reshaped to align the dimension as:
[0192] Additionally or alternatively, the slice of first dimension-wise decomposed weights may further get shuffled, as indicated in Eq. 17. Additionally or alternatively, the shuffle operation can be applied to one or more dimension-wise decomposed components before obtaining the slice of first dimension-wise decomposed weight.
[0193] The present disclosure further provide a video encoding method which applies the dimension-decomposition method. FIG. 16 is a flowchart of a video encoding method according to an embodiment of the present disclosure. The method may be executed by an encoder. As shown in FIG. 16, the method includes operations described in blocks S301 and S302.
[0194] In S301, a dimension-decomposition information is acquired.
[0195] The dimension-decomposition information comprises at least one of: an amount of decomposed weight components; or one or more sizes of the decomposed weight components.
[0196] In S302, a bitstream including the dimension-decomposition information is transmitted to a decoder.
[0197] The dimension-decomposition information may be utilized for the decoder to determine a sequence of weight information.
[0198] Concepts and processes of the dimension-decomposition method included in the encoding process have been explained in foregoing section, and will not be repeated herein.
[0199] The present disclosure further provides exemplary design elements high-level syntax and semantics for a specification process of dimension-wise decomposition. The related syntax elements may be introduced into different locations, including 1) header of a specified syntax structure, 2) supplemental enhancement information (SEI) message, or 3) separate bitstream.
[0200] In one solution, information about dimension-wise decomposition may be introduced into a header of syntax structure, including Group-of-Pictures (GoP) header, picture header, slice header, video parameter set (VPS) , sequence parameter set (SPS) , picture parameter set (PPS) , adaptation parameter set (APS) . For example, the specification text for SPS header may be as shown in Table 1.
[0201] Table 1 SPS rbsp syntax
[0202] In Table 1, if the parameter sps_nnlf_enabled_flag is equal to 1, it specifies that neural network filter is enabled for the CLVS. If the parameter sps_nnlf_dim_cp_flag is equal to 1, it specifies that dimension-wise decomposition is enabled for weights of neural network filter for the CLVS. The parameter sps_nnlf_dim_cp_payload_size_minus1 plus 1 specifies the bytes of payloads containing size of sub-dimensions, and the parameter sps_nnlf_dim_cp specifies an array of size elements.
[0203] The payload may further include the following elements: 1) sps_nnlf_dim_cp_dimId , which specifies the index of weight dimension to be decomposed dimension-wise; 2) sps_nnlf_dim_cp_rank , which specifies the rank of decomposition to be applied by the dimension-wise decomposition; 3) sps_nnlf_dim_cp_typeId, which specifies the index of decomposition type to be applied by the dimension-wise decomposition.
[0204] The proposed SPS structure is typically expected to be used in cases where dimension-wise decomposition is applied to a weight of a neural network. The neural network filter should be aware of the size of sub-dimensions at least before processing each GoP.
[0205] In another implementation, information about dimension-wise decomposition can be specified in nn_filter_update_data () when aps_params_type == NN_UPDATE_APS, and the syntax of dimension-wise decomposition may be specified as illustrated in Table 2.
[0206] Table 2 APS parameters type codes and types of APS parameters
[0207] The parameter aps_nnlf_dim_cp specifies an array of size elements. Note that the payload of nn_filter_update_data () may further include information corresponding to fields of SPS. The proposed APS structure is typically expected for use in cases where dimension-wise decomposition is applied to a weight update.
[0208] In one solution, a SEI structure of message is proposed, which includes information about dimension-wise decomposition. In this case, the media bitstream includes one or more media units and a SEI message related to this process.
[0209] The SEI message includes at least two independently parsable structures: 1) a first independently parsable structure comprising information to identify a standard neural unit or separately provided neural unit via a reference identifier; and 2) a second independently parsable structure comprising required information to derive a size, or a list of sizes, and apply it to the decomposed weight of the neural unit identified by the above mentioned independently parsable structure to derive a reconstructed weight.
[0210] The payload of the second independently parsable structure may further include information corresponding to fields of sequence parameter set.
[0211] Typically, the proposed SEI structure is expected to be used in post-filtering (rather than in-loop filtering) of video coding system, or neural network-based image / video processing used in products or manufactures (e.g., device, chip) .
[0212] In one solution, information about dimension-wise decomposition may be introduced into a separate bitstream. For example, the signaling may be interpretated based on the related syntax and semantics as specified in ISO / IEC 15938-17 to generate a NNR bitstream.
[0213] In one possible implementation, the size of sub-dimensions and corresponding information indicating an application of dimension-wise decomposition can be introduced into nnr_model_parameter_set_header () as illustrated in Table 3.
[0214] Table 3 NNR model parameter set unit syntax
[0215] nn_dim_cp_data () is a container or a structure containing information specifying sizes of sub-dimensions to be applied. The payload of nn_dim_cp_data () comprises at least one of the following elements: 1) nn_dim_cp_size_tensor, whic specifies a tensor of sizes of sub-dimensions relative to a dimension-wise decomposition; 2) nn_dim_cp_size_present_flag, which specifies whether a tensor of sizes of sub-dimensions is provided. nn_dim_cp_size_present_flag shall be set to 1, if nn_dim_cp_size_tensor is contained in payload of nn_dim_cp_data () .
[0216] The specification text of layer parameter set (LPS) can be as illustrated in Table 4.
[0217] Table 4 NNR layer parameter set unit payload syntax
[0218] The parameter dim_decomposition_performance_map () specifies a mapping between different sizes of sub-dimensions to be used in dimension-wise decomposition and resulting NN inference performance. The resulting performance is provided separately for different aspects or characteristics of the output of the NN.
[0219] For a classifier NN (e.g., VVC intra mode predictor) , each size of sub-dimensions is mapped to separate accuracies for each class, in addition to an overall accuracy which considers all classes. Classes are ordered based on the neural network output order, i.e. the order specified during training.
[0220] dim_decomposition_performance_map () may be defined as follows:
[0221] Table 5 NNR model parameter set unit payload syntax
[0222] In Table 5, mse_threshold specifies an array of MSE thresholds which are applied to derive the sizes of the different dimension-wise decomposition processes. ddpm_nn_accuracy specifies the overall accuracy of the NN (e.g. classification accuracy by considering all classes) . nn_reduction_ratio [i] specifies the ratio between the total number of parameters after tensor decomposition of the whole model and the number of parameters in the original model. ddpm_count_classes specifies number of classes for which separate accuracies are provided for each decomposition thresholds. ddpm_nn_class_accuracy specifies an array of accuracies for a certain class, when a certain decomposition threshold is applied.
[0223] Note that the payload of dim_decomposition_performance_map () may further include information corresponding to fields of sequence parameter set.
[0224] For a regression NN (e.g., loop filtering, reference frame generation, super-resolution) , each size of sub-dimensions is mapped to separate quality metric of reconstruction / prediction (e.g., PSNR, SSIM, MS-SSIM) .
[0225] dim_decomposition_performance_map () may be defined as follows:
[0226] Table 6 NNR model parameter set unit payload syntax
[0227] In table 6, mse_threshold specifies an array of MSE thresholds which are applied to derive the sizes of the different dimension-wise decomposition processes. ddpm_nn_quality specifies the overall quality of output reconstruction of the NN (e.g. reconstruction accuracy by considering all pixel elements) . nn_reduction_ratio [i] specifies the ratio between the total number of parameters after tensor decomposition of the whole model and the number of parameters in the original model.
[0228] Note that the payload of dim_decomposition_performance_map () may further include information corresponding to fields of sequence parameter set.
[0229] Different embodiments of the dimension-wise decomposition method provided in the present disclosure may offer at least some of the following advantages over existing techniques.
[0230] a) Reduction of weight redundancy within a specific dimension. Compared with existing schemes that require each decomposed component to represent at least one complete dimension, this invention uses one decomposed component to represent one sub-dimension within a selected dimension. This allows each dimension to be represented by two or more decomposed components with fewer parameters, effectively reducing the representation redundancy.
[0231] b) Support for various weight shapes and types. Compared with existing schemes that are limited to weights with more than two dimensions, this dimension-wise decomposition is applicable for different weight shapes (e.g., one-dimensional multipliers proposed in [JVET-AH0096 EE1-1.4: Content-Adaptive Loop Filter] ) and different weight types (e.g., low-rank decomposed weights proposed in [PCT / CN2024 / 098802] ) .
[0232] c) Reduction of storage / bitrate cost. The proposed scheme may significantly reduce storage and transmission costs by representing extensive weight information with a reduced number of parameters. For example, given original weights with a shape of 64×64, the dimension-wise decomposition requires (8×1+1×8) + (8×1+1×8) =32 elements (in case that each dimension is decomposed dimension-wise into two components with sizes of 8×8 with rank equals to 1) , while existing decomposition requires 64×1+1×64=128 elements (in case of rank equals to 1) .
[0233] d) Reduction of training cost. As this invention allows the decomposed representations of weights (or their updates) to directly participate in a training process, it is expected to reduce the number of optimization operations (particularly the number of gradient-based backpropagation optimization in one training iteration) required to be implemented, thus reducing training costs.
[0234] e) Support for flexible control over size of weights (or their updates) . Compared with existing approaches where the number of weight elements is tied to the size of weight dimensions, this invention offers flexibility to control or adjust the bitstream size dedicated to weights (or their updates) by modifying the size of sub-dimensions.
[0235] The dimension-wise decomposition is applied to the multiplier proposed in [JVET-AI0111 AhG11: Content-adaptive LOP3 filter] for effect validation. Experimental protocols are as follows. As for training data, for each overfitting, only samples from the corresponding GoP of JVET CTC sequences are used. For details, please refer to [JVET-AI0111 AhG11: Content-adaptive LOP3 filter] . As for evaluation metrics, Bjontegaard Delta (BD) -rate is used, where a negative value indicates performance gain. As for implementation details, all simulations have been carried out on a computing server with Intel (R) Xeon (R) Platinum 8358P CPU @2.60GHz, 2064GB RAM, and NVIDIA A10 24GB×4.
[0236] Multipliers with 8, 16, 32, 128, and 144 channels are decomposed dimension-wise into two components with sizes of 4×2 , 4×4 , 8×4 , 64×2 , and 72×2 , respectively. Note that, the training pipeline includes: the two components are initialized firstly, and then get trained, thus the results between d1×d2 and d2×d1 should be nearly the same. All dimension-wise decompositions use matrix rank decomposition with rank equal to 1. The same parameter selection and weight update signaling strategies are applied.
[0237] The experimental results under random access configuration over NNVC9.1 and JVET-AI0111 are reported in Table 7 below. As seen, the proposed method demonstrates gains in both Luma and Chroma.
[0238] Table 7
[0239] The present disclosure further provides a method of usage of DIMD block size dependent switching for selecting a transform.
[0240] In current design of ECM, the type of a secondary transform applied to a residual signal before quantization is determined based on the lookup table (see FIG. 17) . To select a secondary transform kernel, an intra prediction mode index is used as an input of the look-up table.
[0241] For a directional, DC and planar intra prediction, a type of transform is determined as 1-to-1 relationship in the VVC and ECM designs. However, in general, the intra prediction mode index might be one of the input signals to select a transform kernel for a given block. However, for some intra predictors obtained by using, for example, MIP, EIP, intraTMP, IBC) or inter prediction mode, the intra prediction mode index is not specified. Therefore, it should be derived by applying the HoG (Histogram of Gradients) derivation process to the predictors. The intra prediction mode index corresponding to the maximum value of the gradient magnitude within the calculated HoG is further used as an input of the look-up table.
[0242] In this embodiment, it is proposed to apply a mechanism switching edge operators based on the size of a current (predicted) block as shown in FIG. 18. FIG. 19 illustrates the particular embodiment comprising the condition that the edge operator of 2x2 size is applied to the predictors of blocks of the smallest sizes (i.e. 4x4, 4x8 and 8x4) . The predictors of blocks of other sizes are processed by edge operators of 3x3 size used in DIMD in the ECM reference software. The coefficients of the spatial filters of both edge operators are shown in FIG. 18.
[0243] The generalized process of switching between different edge operators subject to geometric parameters of a current (predicted block) is shown in FIG. 20, where the area, aspect ratio, and orientation of the block are used as input parameters of the function f () , which provides the index of the selected edge operator in a look-up table of edge operator filters. At the final step, the filters of the selected edge operator are fetched from the look-up table where they are stored in.
[0244] This embodiment is applicable for blocks predicted using MIP, IntraTMP, EIP, or inter-prediction methods. As FIG. 21 illustrates, the exemplary process of the transform kernel selection for a given block comprises the following steps:
[0245] 1) Fetch a predictor of a current blocks;
[0246] 2) Select an edge operator for this predictor using the procedure described above;
[0247] 3) Collect a HoG for the predictor by iterating the selected edge operator over the predictor;
[0248] 4) Select the index of the intra prediction mode with the greatest gradient magnitude in the built HoG;
[0249] 5) Use the index of the derived intra prediction mode as an input value to the look-up table, which stores the transform kernels.
[0250] Explanation of abbreviations mentioned in the present embodiment is given below.
[0251] The present disclosure further provides an improved TMRL mode.
[0252] Template-based multiple reference line intra prediction (TMRL) mode combines reference line and prediction mode together and uses a template matching method to construct a list of candidate combinations. An index to the candidate combination list is coded to indicate which reference line and prediction mode is used in coding the current block. The regular multiple reference line (MRL) for the non-TIMD part is replaced with TMRL mode.
[0253] The TMRL mode extends reference line candidate list and the intra-prediction-mode candidate list. The extended reference line candidate list is {1, 3, 5, 7, 12} . The size of the intra-prediction-mode candidate list is 10. The construction of the intra-prediction-mode candidate list is similar to MPM except the PLANAR mode is excluded from the intra-prediction-mode candidate list, DC mode is added after 5 neighboring PUs’ modes and DIMD modes if it is not included and the angular modes with delta angles from ±1 to ±4 (compared the existing angular modes in the intra-prediction-mode candidate list) are added. The precision of angular prediction is extended from 65 to 129. Additionally non-adjacent positions are added as candidates in constructing the intra candidate list. If the neighbouring or non-adjacent blocks are coded with SGPM or GPM modes, the intra modes of the blocks are replaced by the partitioning angles.
[0254] The TMRL candidate is constructed as follows. There are 5x10=50 combinations of the extended reference line and the allowed intra-prediction modes for a block. Since the extended reference line starts from reference line 1, the area covered by reference line 0 is used for template matching. The SAD costs over the template area (see FIG. 22) are calculated between the predictions (generated by 50 combinations) and the reconstructions. The 20 combinations with the least SAD cost are selected in an ascending order to form the TMRL candidate list.
[0255] For TMRL signalling instead of coding the reference line and the intra mode directly, an index to the TMRL candidate list is coded to indicate which combination of reference line and prediction mode is used for coding the current block.
[0256] For more details about TMRL, please refer to [M. Coban, R. -L. Liao, K. Naser, J. L. Zhang, "Algorithm description of Enhanced Compression Model 13 (ECM 13) , " JVET contribution JVET-H2025] .
[0257] An embodiment provided by the present disclosure involves changes in the TMRL construction.
[0258] In TMRL, a list of candidates is constructed based on the template matching cost determined for each of the candidate. A candidate is a set of prediction parameters, comprising at least a combination of an intra prediction mode and a reference line index.
[0259] The list of intra prediction modes that is used to obtain the list of candidates could be taken form the most probable modes (MPM) list. The flowchart of MPM list derivation is shown in FIG. 23.
[0260] It could be noticed that the list of modes may comprise such modes, as planar mode or DC mode. Planar mode is excluded from the list of candidate TMRL modes since ECM-14.0 does not support the design of planar mode for non-adjacent reference lines. Although DC mode can be constructed from non-adjacent reference lines, the predictors generated by DC mode from those lines are selected by an ECM encoder less frequently compared to other TMRL candidates. This fact can be explained as follows: DC mode actually predicts just the mean value within a current (predicted) block. This mean value tends to be closer to the mean value of its adjacent reference line than to any non-adjacent reference line. Thus, DC mode which fills all the samples of the current block with the same values is not able to produce predictors, that have any directionality, either. For this reason, DC mode may not justify the overhead caused by the states allocated for this mode (which might be available for all the non-adjacent reference lines) in the TMRL candidate list.
[0261] In FIG. 24 a flowchart to eliminate DC mode from the process of obtaining candidate modes from neighbor blocks is shown. This process uses a list of processed modes, that is being checked at “Mode already added” step. It is suggested to add DC mode to the list of processed modes before the process of obtaining candidate modes from neighbor blocks has started.
[0262] In this embodiment, some other mode that is obtained from neighboring blocks will be used instead of the DC mode.
[0263] This embodiment may be also used in the non-adjacent DIMD process, where DIMD derivation is invoked for each of the reference lines (see FIG. 25) .
[0264] In another embodiment, default list of TMRL may further include a set of directional modes that regularly subdivides an angular rage of available prediction directions.
[0265] In another embodiment, default list of TMRL may further include the following intra prediction modes: VER_IDX, HOR_IDX, VER_IDX -4, VER_IDX + 4, 14, 22, 42, 58, 10, 26, 38, 62, 6, 30, 34, 66, 2, 48, 52, 16.
[0266] In this list VER_IDX = 50 and HOR_IDX = 18.
[0267] An embodiment provided by the present disclosure involves similarity estimation based on the projections onto the adjacent reference line of a current (predicted block) .
[0268] As explained in foregoing section, each TMRL candidate added to a TMRL candidate list is a pair of 1) a non-adjacent reference line, and 2) an intra-prediction mode (or a set of modes if DIMD fusion is used in the case of non-adjacent DIMD applied to TMRL) .
[0269] To compare template matching (TM) costs (which is estimated by using the SAD metric in TMRL as implemented in ECM-14.0) , each non-adjacent reference line added to the TMRL candidate list is projected onto the adjacent reference line of a current block according to the angular mode direction of a TMRL candidate as FIG. 26 illustrates. If DIMD fusion is enabled for a TMRL candidate, a projection of each mode is obtained and, then, these projections are combined according to the weights assigned to each angular mode belonging to this set. Weights can be obtained from HoG built according to the non-adjacent DIMD process, or they can be computed as the values, which are inversely proportional the TM costs calculated for each individual angular mode as done in TIMD. These weight derivation mechanisms are provided by way of example and not limitation. The obtained projections or their combinations are used to calculate the template matching (TM) cost involving the adjacent reference line.
[0270] The basic idea behind this embodiment is to use these projections or their combinations obtained for each TMRL candidate to estimate their similarity with one another. Thus, the value of a metric (e.g., sum of squared differences (SSD) , sum of absolute differences (SAD) , or sum of absolute transformed differences (SATD) ) or a combination of metrics applied to these projections or their combinations of different TMRL candidates in the TMRL list is used to estimate how similar TMRL candidates are. Thus, the only difference between this embodiment and the similarity estimation mechanism disclosed in the previous patent application is that the similarity estimation process is applied to these projections or their combinations rather than to the predictors of a current block. Note that in contrast to the mechanism disclosed in the previous patent application, these projections and their combinations are constructed anyway to estimate TM costs. So, the results of the TM cost calculation stage can be reused when the similarity of TMRL candidates is estimated.
[0271] Note that the mechanism exploiting projections onto the adjacent reference line or combinations of these projections of estimating the similarity of TMRL candidates can be used in different ways.
[0272] In a first option, it can be used as a replacement of estimating the similarity of the current block ‘spredictors constructed for each TMRL candidate to reduce the complexity of the similarity check process.
[0273] In a second option, it can be used as a preliminary step to filter out some combinations of TMRL candidates before estimating the similarity of TMRL candidates based on the current block’s predictors generated for these TMRL candidates.
[0274] Thus, this embodiment discloses the mechanism aimed at the complexity reduction of the similarity check process applied to the predictors of a current block.
[0275] An embodiment provided by the present disclosure involves preparation of the candidate list based on HoG (Histogram of Gradients) .
[0276] As described in the foregoing section, candidate list initialized from intra prediction modes of the neighbor blocks may comprise some modes that does not provide a directional intra predictor. It is not beneficial to keep such modes in the candidate list, since the prediction result will not have directional information. For the same motivation described above with regard to a DC mode, in this embodiment it is proposed to remove the modes that have low magnitude in HoG from the candidate list (see FIG. 27) . Resulting list after such processing may be shorter, and the missing elements could be added from the default list as shown in FIG. 22.
[0277] In this embodiment, the HoG may be built for the modes in lower precision, and the list of the intra prediction modes from the neighbor blocks may comprise modes in higher precision (e.g. obtained by TIMD) . In order to map low precision to high precision the following operation could be performed:
[0278] wherein is the index of an intra prediction mode in a lower precision (e.g., ) , is the index of an intra prediction mode in a higher precision (e.g., ) .
[0279] Mapping of higher precision to lower precision could be performed as follows:
[0280] The steps of this embodiment shown in FIG. 27 could be performed individually per each reference line.
[0281] The value of the threshold in FIG. 27 could be defined with regard to the bitdepth of the picture and be equal, e.g. to bitepth >>4, or bitepth >>5.
[0282] FIG. 28 conceptually illustrates an apparatus 400 with which some embodiments of the invention are implemented. The apparatus 400 may be a computer (e.g., a desktop computer, personal computer, tablet computer, etc. ) , phone, PDA, or any other sort of electronic device. Such an apparatus includes various types of computer readable media and interfaces for various other types of computer readable media. The apparatus 400 includes a processor 402 and a memory 404. The memory 404 is configured to store executable instructions that, when executed by the processor, cause the processor to perform any one of the foregoing decoding or encoding methods.
[0283] The processor 402 may be a single processor or a multi-core processor in different embodiments. In some embodiments, the processor may include a GPU, NPU or DSP which may offload various computations or complement the image processing provided by the processor 402.
[0284] Some embodiments include electronic components, such as microprocessors, storage and memory that store computer program instructions in a machine-readable or computer-readable medium (alternatively referred to as computer-readable storage media, machine-readable media, or machine-readable storage media) . Some examples of such computer-readable media include RAM, ROM, read-only compact discs (CD-ROM) , recordable compact discs (CD-R) , rewritable compact discs (CD-RW) , read-only digital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM) , a variety of recordable / rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc. ) , flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc. ) , magnetic and / or solid state hard drives, read-only and recordable discs, ultra density optical discs, any other optical or magnetic media, and floppy disks. The computer-readable media may store a computer program that is executable by at least one processing unit and includes sets of instructions for performing various operations. Examples of computer programs or computer code include machine code, such as is produced by a compiler, and files including higher-level code that are executed by a computer, an electronic component, or a microprocessor using an interpreter.
[0285] While the above discussion primarily refers to microprocessor or multi-core processors that execute software, some embodiments are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs) . In some embodiments, such integrated circuits execute instructions that are stored on the circuit itself. In addition, some embodiments execute software stored in programmable logic devices (PLDs) , ROM, or RAM devices.
[0286] As used in this specification and any claims of this application, the terms “computer” , “server” , “processor” , and “memory” all refer to electronic or other technological devices. These terms exclude people or groups of people. As used in this specification and any claims of this application, the terms “computer readable medium, ” “computer readable media, ” and “machine readable medium” are entirely restricted to tangible, physical objects that store information in a form that is readable by a computer. These terms exclude any wireless signals, wired download signals, and any other ephemeral signals.
[0287] The present disclosure further provides a computer readable media which is configured to store executable instructions. When the instructions are executed by a processor, the processor may perform any one of the foregoing methods and processes. Many of the above-described features and applications are implemented as software processes that are specified as a set of instructions recorded on a computer readable storage medium (also referred to as computer readable medium) . When these instructions are executed by one or more computational or processing unit (s) (e.g., one or more processors, cores of processors, or other processing units) , they cause the processing unit (s) to perform the actions indicated in the instructions. Examples of computer readable media include, but are not limited to, CD-ROMs, flash drives, random access memory (RAM) chips, hard drives, erasable programmable read only memories (EPROMs) , electrically erasable programmable read-only memories (EEPROMs) , etc. The computer readable media does not include carrier waves and electronic signals passing wirelessly or over wired connections.
[0288] In this specification, the term “software” is meant to include firmware residing in read-only memory or applications stored in magnetic storage which can be read into memory for processing by a processor. Also, in some embodiments, multiple software inventions can be implemented as sub-parts of a larger program while remaining distinct software inventions. In some embodiments, multiple software inventions can also be implemented as separate programs. Finally, any combination of separate programs that together implement a software invention described here is within the scope of the invention. In some embodiments, the software programs, when installed to operate on one or more electronic systems, define one or more specific machine implementations that execute and perform the operations of the software programs.
[0289] While the disclosure has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the invention can be embodied in other specific forms without departing from the spirit of the invention. In addition, a number of the figures conceptually illustrate processes and methods. The specific operations of these processes may not be performed in the exact order shown and described. The specific operations may not be performed in one continuous series of operations, and different specific operations may be performed in different embodiments. Furthermore, the process could be implemented using several sub-processes, or as part of a larger macro process.
[0290] The foregoing is merely embodiments of the present disclosure, and is not intended to limit the scope of the disclosure. Any transformation of equivalent structure or equivalent process which uses the specification and the accompanying drawings of the present disclosure, or directly or indirectly application in other related technical fields, are likewise included within the scope of the protection of the present disclosure.
Claims
1.A video decoding method, executed by a decoder deployed with a set of parameters, comprising:acquiring a dimension-decomposition information, wherein the dimension-decomposition information comprises at least one of:an amount of decomposed weight components; orone or more sizes of the decomposed weight components;determining a set of values of the decomposed weight components based on the dimension-decomposition information;determining a sequence of weight information based on the decomposed weight components; anddetermining weights of the set of parameters based on the sequence of weight information.2.The method of claim 1, whereinthe sequence of weight information is a one-dimensional sequence of weight information.3.The method of claim 2, whereinthe one-dimensional sequence of weight information corresponds to a slice of weight at a weight dimension of the set of parameters; orthe one-dimensional sequence of weight information corresponds to a flatten sequence of slices at two or more weight dimensions of the set of parameters.4.The method of claim 3, whereinthe one-dimensional sequence of weight information belongs to a part of the slice of weight at the weight dimension of the set of parameters.5.The method of claim 3,wherein the one-dimensional sequence of weight information has more elements than the slice of weight at the weight dimension of the set of parameters;wherein the one-dimensional sequence of weight information is cropped to acquire the slice of weight.6.The method of claim 1, whereinthe dimension-decomposition information is acquired from a bitstream received from an encoder.7.The method of claim 6,wherein the bitstream comprises a set of values of the dimension-decomposition information, and / or an identifier corresponding to a preconfigured set of values of the dimension-decomposition information.8.The method of claim 6,wherein the bitstream comprises the one or more sizes of the decomposed weight components;wherein the amount of the decomposed weight components is deduced based on the one or more sizes of the decomposed weight components and a size of the sequence of weight information.9.The method of claim 6,wherein the bitstream comprises the one or more sizes of the decomposed weight components except for last one of the one or more sizes of the decomposed weight components;wherein the last one of the one or more sizes of the decomposed weight components is deduced based on previous sizes of the one or more sizes of the decomposed weight components and a size of the sequence of weight information.10.The method of claim 1,wherein the one or more sizes of the decomposed weight components is deduced based on an n-th root of a size of the sequence of weight information, wherein n is a positive integer.11.The method of claim 1,wherein n is equal to the amount of the decomposed weight components.12.The method of claim 1,wherein the one or more sizes of the decomposed weight components is determined based on an input of a neural network to which the set of parameters belong.13.The method of claim 1,wherein the one or more sizes of the decomposed weight components are determined based on a coding condition.14.The method of claim 1,wherein the one or more sizes of the decomposed weight components are determined based on required model performance.15.The method of claim 1,wherein the dimension-decomposition information is deduced from a pre-set configuration; orwherein the dimension-decomposition information is determined as a previously used value.16.The method of claim 1, before the determining the weights of the set of parameters, further comprising:acquiring an indication of the set of parameters.17.The method of claim 16, wherein the indication indicates a neural unit to which the set of parameters belongs.18.The method of claim 16, wherein the indication indicates a dimension of a neural network to which the set of parameters belongs.19.The method of claim 1, before the determining the sequence of weight information, further comprising:acquiring a shuffle information for determination of the sequence of weight information.20.The method of claim 1, wherein the determining the sequence of weight information based on the decomposed weight components comprises:calculating a product result of the decomposed weight components; anddetermining values of the sequence of weight information as elements of the product result.21.The method of claim 20, before the determining elements of the product result as values of the sequence of weight information, further comprising:performing a shuffle operation to the elements of the product result.22.The method of claim 20, before the calculating the product result of the decomposed weight components, further comprising:performing a shuffle operation to at least one of the decomposed weight components.23.The method of claim 1,wherein the dimension-decomposition information comprises a first dimension-decomposition information and a second dimension-decomposition information;wherein the determining the sequence of weight information comprises:determining a first set of decomposed weight components based on the first dimension-decomposition information;determining a second set of decomposed weight components based on the second dimension-decomposition information; anddetermining the sequence of weight information based on a product result of a first sequence corresponding to the first set of decomposed weight components and a second sequence corresponding to the second set of decomposed weight components.24.The method of claim 1, wherein the sequence of weight information is weight values or weight update values of one or more dimensions of a neural network to which the set of parameters belong.25.The method of claim 1, wherein the set of parameters belongs to a neural network or a machine learning model.26.A video encoding method, executed by an encoder deployed with a set of parameters, comprising:determining a dimension-decomposition information, wherein the dimension-decomposition information comprises at least one of:an amount of decomposed weight components; orone or more sizes of the decomposed weight components; andtransmitting a bitstream to a decoder, wherein the bitstream comprises the dimension-decomposition information;wherein the dimension-decomposition information is configured to determine a sequence of weight information by the decoder.27.A video coding apparatus, comprising a processor and a memory, wherein the memory is configured to store executable instructions that, when executed by the processor, cause the processor to perform the method of any of claims 1 to 26.28.A computer readable medium storing executable instructions that, when executed by a processor, cause the processor to perform the method of any of claims 1 to 26.
Citation Information
Patent Citations
Large-scale neural network parameter compression method and system based on tensor decomposition
CN116542315A
Learning a truncation rank of singular value decomposed matrices representing weight tensors in neural networks
US20190332941A1
Optimized neural network data organization
WO2020231477A1