Decoding method, encoding method applying weight resampling, and apparatus incorporating the same

The flexible weight resampling operation addresses inefficiencies in neural network weight representation by adaptively modifying weight elements, enhancing efficiency and adaptability in video coding.

WO2026123385A1PCT designated stage Publication Date: 2026-06-18SHENZHEN TCL NEW-TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHENZHEN TCL NEW-TECH CO LTD
Filing Date
2024-12-14
Publication Date
2026-06-18

Smart Images

  • Figure CN2024139436_18062026_PF_FP_ABST
    Figure CN2024139436_18062026_PF_FP_ABST
Patent Text Reader

Abstract

A decoding method, an encoding method, a video coding apparatus, and a computer readable medium are provided. The decoding method may be executed by a decoder deployed with an artificial intelligence (AI) model or functionality. The method includes: obtaining a weight information; obtaining a resampling configuration; determining a resampled weight based on the weight information and the resampling configuration; and applying the resampled weight for the AI model or functionality.
Need to check novelty before this filing date? Find Prior Art

Description

DECODING METHOD, ENCODING METHOD APPLYING WEIGHT RESAMPLING, AND APPARATUS INCORPORATING THE SAMETECHNICAL FIELD

[0001] The present disclosure generally relates to encoding and decoding technology, and in particular to a decoding method, an 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] To enhance performance (e.g., improving output reconstruction quality) or reduce costs (e.g., storage, encoding time, bitrate) , an efficient representation of neural network weights is appreciated, especially one allowing to reduce weight redundancy. Existing technology relies on weight cropping or decomposition across or within dimension. However, these technologies may not be suitable for several application scenarios.

[0004] Accordingly, the present disclosure provides a flexible weight resampling operation which may generate efficient representation of neural network weights.SUMMARY

[0005] Accordingly, the present disclosure aims to provide decoding method, an encoding method, a video coding apparatus, and a computer readable medium.

[0006] A technical scheme adopted by the present disclosure is to provide a decoding method. The decoding method may be executed by a decoder deployed with an artificial intelligence (AI) model or functionality. The method includes: obtaining a weight information; obtaining a resampling configuration; determining a resampled weight based on the weight information and the resampling configuration; and applying the resampled weight for the AI model or functionality.

[0007] Another technical scheme adopted by the present disclosure is to provide an encoding method. The encoding method may be executed by an encoder deployed with an artificial intelligence (AI) model or functionality. The method includes: obtaining a weight information; obtaining a resampling configuration; determining a resampled weight based on the weight information and the resampling configuration; and applying the resampled weight for the AI model or functionality.

[0008] Another technical scheme adopted by the present disclosure is to provide a video coding apparatus. 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.

[0009] 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

[0010] 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.

[0011] FIG. 1 shows a schematic diagram of a conventional video encoding system.

[0012] FIG. 2 shows a schematic diagram of a conventional video decoding system.

[0013] FIG. 3 shows a schematic diagram of a video encoding system implemented with a neural network according to an embodiment of the present disclosure.

[0014] FIG. 4 shows a schematic diagram of a video encoding system implemented with a neural network according to another embodiment of the present disclosure.

[0015] 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.

[0016] FIG. 6 shows a schematic diagram of a video decoding system implemented with a neural network according to an embodiment of the present disclosure.

[0017] FIG. 7 shows a schematic diagram of a video decoding system implemented with a neural network according to another embodiment of the present disclosure.

[0018] 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.

[0019] FIG. 9 illustrates a flowchart of a decoding method according to an embodiment of the present disclosure.

[0020] FIG. 10 shows an exemplary video encoding process where the resampling operation is applied to a weight.

[0021] FIG. 11 shows an exemplary video encoding / decoding process where the resampling operation is applied to a weight.

[0022] FIG. 12 shows a scenario where the resampling operation is applied to a complete weight.

[0023] FIG. 13 shows a scenario where the resampling operation is applied to a decomposed weight.

[0024] FIG. 14 illustrates a flowchart of an encoding method according to an embodiment of the present disclosure.

[0025] FIG. 15 shows a schematic diagram of an apparatus for decoding or encoding according to an embodiment of the present disclosure.DETAILED DESCRIPTION

[0026] 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.

[0027] 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.

[0028] 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.

[0029] 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.

[0030] 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.

[0031] 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.

[0032] 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.

[0033] 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.

[0034] 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.

[0035] 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.

[0036] The present disclosure aims to specify and apply a resampling operation of neural network weights for neural processing digital image and digital image sequences. The following sections provide introduction for several related technologies of the present disclosure, including: 1) Introduction about neural network; and 2) Existing weight representation of neural network. ● Neural Network

[0037] 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.

[0038] 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:

[0039] The neural projection operations can be typically formulated as: 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 (·) .

[0040] Given an input image xin , a prediction ypred of the neural network aprocess commonly called inference, is:

[0041] 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) .

[0042] 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: where denotes the error metric (e.g., absolute error, mean square error) . The filtered result will  be

[0043] Beyond mere inference, neural networks can also serve as accessory modules and auxiliary modules. Specifically, the accessory module is referred 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 is referred 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.

[0044] 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.

[0045] 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; 3) activation layers, including but not limited to Parametric Rectified Linear Unit (PReLU) .

[0046] 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.

[0047] 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 minimally reduces the overall error.

[0048] An update of weights refers to a set of weights that contain information about how to modify the weights (referred to as base 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.

[0049] 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.

[0050] Based on the above-described inference paradigm, existing schemes for standards-essential neural networks mainly include 1) architecture design, 2) input design, and 3) adaptability design.

[0051] As for architecture design, these solutions 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:

[0052] As for input design, these solutions introduce 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.,

[0053] As for adaptability design, these solutions involve 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., ● Existing weight representation of neural network

[0054] Typically, weights of a neural network get automatically learned through a specific optimization algorithm (e.g., gradient descent and back propagation) , based on a given set of data samples (e.g., xin and xorg) and optimization objectives (e.g., Eq. 5, Eq. 6, Eq. 7) . Recent studies attempt to improve efficiency of weight representation, including model ensemble and weight redundancy reduction.

[0055] Model ensemble scheme (also known as model averaging or model ensemble) integrates the weights of different models into a single adjusted one, thus improving model performance with the same amount of weight elements. For example, given weights {θNN, k} K of a set of models, the integrated weights can be expressed as:

[0056] In the above equation, a balance factor αk often satisfies that ∑k=1, …, Kαk=1. For details, please refer to [Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. Advances in Neural Information Processing Systems (NeurIPS) , pp. 1195-1204, 2017] , [Ensemble deep learning: A review. Elsevier Engineering Applications of Artificial Intelligence, vol. 155, pp. 105151, 2022] .

[0057] Note that all existing techniques rely on additional trained model instances and obtain information in an across-model manner.

[0058] Weight redundancy reduction schemes reduce the amount of weight elements by applying one or more arithmetic operations, including weight decomposition and weight cropping.

[0059] As for weight decomposition, this operation applies a decomposition across / within dimension (s) of weights. For example, given a base weight θNN , the decomposed weights can be represented as a set of decomposed components:

[0060] 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 {θ′NN, k} K.

[0061] As for weight cropping, this operation discards one or more weight elements based on one or more specific metrices. One typical use case is channel pruning in convolutional neural network, where one or more convolutional filters are discarded based on a metric (e.g., L1 Norm of filter coefficients) . For example, given a base weight θNN and a weight dimension dn to be cropped, the cropped weights can be expressed as:

[0062] In the above equation, in denotes the weight elements lie on the lattice of weight dimension dn, and  denotes a subset of weight elements contained in the given slice of base weights W […, : , …] .

[0063] In the above-described related art, weight information is either derived through training using an optimization algorithm or integration across additional model instances, or decomposed or cropped with one or more specific arithmetic operations. These methods may demonstrate limited representation efficiency in some use cases and have restricted application scenarios.

[0064] In the context of neural network-based video coding, the present disclosure aims to introduce a weight resampling, where a specific resampling operation is applied to a weight to obtain its compact / complete version. Introduction about weight resampling operation is given below.

[0065] The resampling operation modifies the amount of elements contained in a specific weight (by deriving a resampled weight) while maintaining information contained in the specific weight structurally. It should be noticed, the specific weight could be a base weight or a weight update (or an updated weight) .

[0066] Each element in the resampled weight is obtained from a linear or nonlinear derivation involving one or more elements in the base weight. Specifically, given a slice of weight W, the n-th element in the resampled weight can be expressed as:

[0067] In the above equation,  denotes the resampling operation and it is depended on the type of weight resampling; m denotes the window size of weight resampling, indicating a size of weight resampling window to be applied; s denotes the stride of weight resampling, indicating a stride of resampling window to move; p denotes the padding of weight resampling, indicating one or more paddings to be added on a specific side; and k denotes the dilation of weight resampling, indicating a dilation rate between elements within resampling window.

[0068] Typically, the window size  / stride  / padding can be specified or derived based on the amount of elements targeted to be contained in a resampled weight. In other words, the resampling operation can be adaptively implemented. Therefore, the above information can be implicitly specified by a rate of weight resampling (i.e., the ratio of element amount between base weights and resampled weights) , and the resampled weight can also be expressed as:

[0069] In the above equation,  denotes the adaptive resampling operation and it is depended on the type of weight resampling; r denotes the rate of weight resampling, indicating the ratio of element amount between base weights and resampled weights.

[0070] Since information on window size  / stride  / padding and rate can be specified and derived from each other, embodiments are described mainly based on the former information.

[0071] Based on whether number of weight elements decrease or increase, weight resampling includes weight down-sampling and weight up-sampling, respectively.

[0072] (1) Weight down-sampling

[0073] The weight down-sampling decreases the amount of elements contained in the weight. Given a slice of weight W, the down-sampled weight can be expressed as:

[0074] In the above equation, W [n] is mapped to by integrating (e.g., combining, discarding) all the weight elements of W [n] which do not lie on the sublattice (μ) .

[0075] Based on the type of down-sampling method, weight down-sampling operation at least includes but not limit to 1) weight maximum pooling, 2) weight minimum pooling, 3) weight average pooling, 4) weight power-average pooling, 5) weight sum pooling, 6) weight product pooling, 7) weight learned pooling.

[0076] Regarding weight maximum pooling, given a weight composed of one or more weight planes, this operation uses the maximum value among all weight elements within resampling window as a resampled result. In the simplest example, the resampled weight can be expressed as:

[0077] In the above equation, m denotes the size of weight resampling, k denotes the dilation of weight resampling. Lattice index n and n×k+m′ satisfies that nstart≤n≤nend and nstart≤n×k+m′≤nend, where nstart and nend denotes the edge points of resampling operation. In one case, the start and end point are aligned with the first and last elements of base weight, while the other points are uniformly spaced in-between (stride and padding are derived accordingly) . In another example, the start point  / end point is explicitly specified as an index within weight lattice. It should be noticed that, the lattice index (including n, n×k+m′, nstart, nend) may be non-integer in some cases, e.g., when the stride s equal to a fractional value.

[0078] In some cases, window size  / stride  / padding of weight resampling is specified / derived based on 1) the amount of elements target to be contained in a resampled weight or 2) the ratio of element amount between base weights and resampled weights, and the weight maximum pooling can be implemented in an adaptive manner (referred to as weight adaptive maximum pooling) .

[0079] Regarding weight minimum pooling, this operation uses the minimum value among all weight elements within resampling window as a resampled result. For example, the resampled weight can be expressed as:

[0080] Similarly, window size  / stride  / padding of weight resampling can also be adaptively specified / derived (referred to as weight adaptive minimum pooling) .

[0081] Regarding weight average pooling, this operation uses the average value involving all weight elements within resampling window as a resampled result. For example, the resampled weight can be expressed as:

[0082] Similarly, window size  / stride  / padding of weight resampling can be adaptively specified / derived (referred to as weight adaptive minimum pooling) .

[0083] Regarding weight power average pooling, this operation uses the average power of values involving all weight elements within resampling window as a resampled result. For example, the resampled weight can be expressed as:

[0084] In the above equation, p denotes the power. At p=∞ , this operation is equivalent to weight maximum pooling. At p=1, this operation is equivalent to weight weight sum pooling.

[0085] Similarly, window size  / stride  / padding of weight resampling can be adaptively specified / derived (referred to as weight adaptive power-average pooling) .

[0086] Regarding weight sum pooling (or weight aggregation pooling) , this operation uses the sum of values involving all weight elements within resampling window as a resampled result. This operation is proportional to weight average pooling. For example, the resampled weight can be expressed as:

[0087] Similarly, window size  / stride  / padding of weight resampling can be adaptively specified / derived (referred to as weight adaptive sum-pooling) .

[0088] Regarding weight product pooling, this operation uses the product of values involving all weight elements within resampling window as a resampled result. For example, the resampled weight can be expressed as:

[0089] Similarly, window size  / stride  / padding of weight resampling can be adaptively specified / derived (referred to as weight adaptive multiplication-pooling) .

[0090] Regarding weight learned pooling, this operation uses a set of learned coefficients of all weight elements within resampling window. For example, the reshaped weight with additive learned coefficients (i.e., weighted sum pooing) can be expressed as: where {αm′} m′=0, …, m-1 denotes the additive coefficients and its values is learned.

[0091] It is appreciated that, other types of down-sampling, including mixed pooling (e.g., mixed maximum-average pooling) , tree pooling, stochastic pooling, rank-based pooling, pooling dropout, fractional pooling, spatial pyramid pooling, spectral pooling, wavelet pooling, per pixel pyramid pooling, S3pooling, can also be applicable to the present disclosure.

[0092] (2) Weight up-sampling

[0093] Weight up-sampling increases the amount of elements contained in the weight. Given a slice of weight W, the up-sampled weight can be expressed as:

[0094] In the above equation,  denotes the integer lattice of weight elements. In other words,  is formed by taking the samples of W [n] on the lattice and mapping them to the sublattice (Λ) (defined by Λ-1n) .

[0095] Based on the type of up-sampling method, weight up-sampling operation includes but not limit to 1) weight linear interpolation, 2) weight cubic interpolation, 3) weight nearest neighbor interpolation, 4) weight learned interpolation.

[0096] Regarding weight linear interpolation, this operation adds a new element at lattice position n′, and its value is derived by weighted averaging values of two adjacent weight elements (e.g., W[…, n, …] , W […, n+1, …] ) as: W[…, n′, …] =α·W […, n, …] + (1-α) ·W […, n+1, …] Eq. 21 where α denotes the weighted factor between the two weight elements.

[0097] Regarding weight cubic interpolation, this operation adds a new element at lattice position n′, and its value is derived by weighted averaging values of four adjacent weight elements e.g. as: where {αi} i=0, …, 3 denotes the weighted factor between the four weight elements.

[0098] Regarding weight nearest neighbor interpolation, this operation adds a new element at lattice position n′, and its value is is equal to the value of the weight element closest to the position to be interpolated. e.g. as:

[0099] Regarding weight learned interpolation, this operation uses a set of learned coefficients of all weight elements within resampling window. For example, the reshaped weight with additive learned coefficients can be expressed as: where {αm′} m′=0, …, m-1 denotes the additive coefficients and its values are learned.

[0100] Note that, the present invention is expected to be applied to various neural networks (e.g., convolutional neural network, fully connected neural network, Transformer neural network, graph neural network) or machine-learned model (e.g., support vector machine, decision trees, decision forests, Boltzman machine, regression model) , e.g., works raised by Joint Video Experts Team (JVET) AhG11 / AhG12, and machine tasks (e.g., machine vision tasks, natural language processing tasks, reinforcement-based decision-making tasks, generative tasks) , e.g., works raised by Joint Video Experts Team (JVET) AhG9 / AhG16.

[0101] Furthermore, this invention is expected to be beneficial for both conventional video coding frameworks and end-to-end neural network-based video coding frameworks, e.g., [ISO / IEC DIS 6048-1 Information Technology -Learning-based image coding -Core coding system] .

[0102] 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 (DCM) in MPEG-7 / MPEG-21, Data Coding for Machine-intelligence (DCM) in CCSA TC1 / TC10 TC28 SC29) .

[0103] In addition, this method is not only applicable to neural network formats or its specification (e.g., [ISO / IEC 15938-17 Information technology -Multimedia content description interface -Part 17: Compression of neural networks for multimedia content description and analysis -version 2] ) , but can also be used as an image / video processing or analysis method and is further widely used in common media data processing systems.

[0104] FIG. 9 illustrates a flowchart of a decoding method according to an embodiment of the present disclosure. The decoding method may be executed by a decoder deployed with an artificial intelligence (AI) model or functionality. The AI model or functionality may include any type of data-driven computational model, intelligent computational model, machine learning model, or neural network model. As shown in FIG. 9, the decoding method may include operations described in blocks S201 to S204.

[0105] In S201, a weight information is obtained.

[0106] In one embodiment, the weight information may include a base weight corresponding to any dimension (or multiple dimensions) of the AI model or functionality. The base weight may be pre-stored at the decoder. Thus, the decoder may acquire the base weight based on such pre-stored configuration. For example, given a weight with a dimension size equal to dn stored at decoder side. When a neural network required a weight with its dimension size equal to 2dn is invoked, the stored weight is resampled into an up-sampled version with a dimension size equal to 2dn; while when another neural network required a weight with its dimension size equal to dn / 2 is invoked, the weight is resampled into a down-sampled version with a dimension size dn / 2 . Alternatively, the base weight may be transmitted by an encoder in a bitstream, and accordingly the decoder may obtain the base weight from the bitstream.

[0107] In another embodiment, the weight information may include a weight update (or an updated weight) . The weight update may be received from an encoder. That is, the encoder may generate such weight update and transmit it to the decoder.

[0108] In S202, a resampling configuration is obtained.

[0109] The resampling configuration may be configured to indicate a resampling type. The resampling type, or type of weight resampling, refers to the type of weight resampling operation to be applied on a given weight. The resampling type may include a down-resampling and an up-resampling. At least one type of weight down-sampling operation or at least one corresponding type of weight up-sampling operation need to be obtained at both encoder and decoder sides.

[0110] Types of weight down sampling operation may include, but is not limited to: 1) weight maximum pooling (and its adaptive version; 2) weight minimum pooling (and its adaptive version) ; 3) weight average pooling (and its adaptive version) ; 4) weight power average pooling; 5) weight sum pooling; 6) weight product pooling; and 7) weight learned pooling. Types of weight up-sampling operation may include, but is not limited to: 1) weight linear interpolation; 2) weight cubic interpolation; 3) weight nearest neighbor interpolation; and 4) weight learned interpolation.

[0111] The configuration of resampling type may be received from a bitstream that is transmitted by an encoder. The bitstream contains explicit information about types of weight resampling. In one example, when the decoder receives an index corresponding to a lookup table, the type of weight resampling operation corresponding to this index is used. In another example, when the decoder receives a string or type indicator (e.g. equal to "max-pooling"  /  "min-pooling"  /  "min-pooling"  /  "avg-pooling"  /  "linear-interpolation"  /  "cubic-interpolation"  /  "nearest-interpolation" ) , the type of weight resampling operation corresponding to string is used. Note that, in case that type information of weight down-sampling and weight up-sampling is stored separately, the decoder must obtain type information of weight up-sampling; however, in case that type information of each weight down-sampling and its corresponding up-sampling is stored together, or there is an additional mapping table linking the types of weight down-sampling and corresponding up-sampling at the decoder side, the decoder can access the type information based on type information either of weight up-sampling or of down-sampling.

[0112] In another example, the configuration of resampling type may be derived from pre-specifications. The video bitstream may not include any data units or identifiers related to the type information (e.g., a NULL indicator or an empty payload) , and the decoder may use a pre-specified type, including: 1) a previous type (or a previous identifier or index associated to a list or lookup table) , e.g., the most recently used one; 2) a pre-set type, e.g., using average pooling and linear-interpolation as pre-set weight down-sampling and up-sampling operation, respectively.

[0113] Alternatively or additionally, the resampling configuration may be configured to indicate one or more aspects of resampling operation to be applied, i.e., one or more resampling parameters. The resampling parameter may include at least one selected from: a resampling window size, a resampling stride, a resampling padding, a resampling dilation, a resampling rate or resampling edge points.

[0114] The resampling parameter may be determined by an encoder. The encoder may include the resampling parameter in a bitstream and then transmit the resampling parameter to the decoder. Alternatively, the resampling parameter may be pre-configured at the decoder, i.e., the pre-defined coding parameters (also called codec parameters, coding conditions) may include the resampling parameter. Accordingly, the decoder may acquire the resampling parameter from such configuration file. Alternatively, the resampling parameter may be deduced by the decoder. Examples for acquiring the resampling parameter will be elaborated herein.

[0115] (1) Resampling window size

[0116] The resampling parameter may include the resampling window size. The resampling window size, or window size of weight resampling, refers to the size of resampling window, indicating the number of weight elements to be involved into derivation of each element of resampled weights. In most cases, a larger window size results in better performance of model and less amount of weight elements contained in the resampled weight. Typically, the size can be represented as one or more integer values, or a set of integer values, with each integer indicating the number of weight elements from one corresponding dimension to be involved.

[0117] The resampling window size may be received from a bitstream which is transmitted by an encoder. The video bitstream may contain explicit information about size (s) of weight resampling, including 1) data value; and / or 2) identifier. Specifically, the decoder can receive a set of data units and obtain size (s) of weight resampling from the data units. When a set of data unit is received, in one case, the decoder may firstly demultiplexes information on the total number of sizes to be decoded (i.e., the number of weight dimensions to be involved into a resampling operation) , and then decode size (s) from the data units, based on the number; in another case, an identifier indicating “stop of decoding” can be used, e.g., when a set of sizes are decoded followed by the indicator indicating “stop of decoding” , the decoded sizes are used. In one case, when all sizes of weight resampling window are the same, the decoder may obtain only one size from the data units. Alternatively or additionally, the decoder can receive an identifier i and uses the identifier as a key to a lookup table to obtain the stored size (s) corresponding to that key, given that there is a set of sizes available at both encoder and decoder side. Note that, in most cases, the size information is multiplexed  / stored along with one or more of: type  / stride  / padding  / dilation of weight resampling, e.g., in the same payload of bitstream or lookup-table.

[0118] Alternatively, the resampling window size may be derived from pre-specification, which include: 1) a previous size, or a previous identifier or index associated with a list or lookup table, such as the most recently used one; and 2) a pre-set size, for example, a default value that is pre-configured in the codec profile or neural network configuration.

[0119] Alternatively, the operation of obtaining the resampling window size may include: deducing the resampling window size based on at least one selected from: a required size of the resampled weight; the resampling rate; performance of the AI model or functionality; characteristics of an input of the AI model or functionality; or a coding parameter.

[0120] In one embodiment, size (s) of resampling window can be deduced from dimension size of resampled weights, given that stride and padding information known. In one example, given dimension size of base weights equal to dn and the target one equal to dn / 2, the sizes of down-sampling window may equal to 2, in case stride equal to 2 and padding equal to 0.

[0121] In one embodiment, if the rate of weight resampling is known, the resampling window size can be deduced based on the rate of weight resampling. Given a rate of weight resampling equal to 0.5, the sizes of up-sampling window may equal to 2, in case stride equal to 2 and padding equal to 0.

[0122] In one embodiment, the resampling window size is determined based on performance of the AI model or functionality that uses the resampled weights or resampled weight updates. For example, given a metric of performance (e.g., reconstruction quality or prediction accuracy of model output, difference between base weights and up-sampled weights reconstructed by a specific down-sampled weight, ratio between reconstruction quality  / prediction accuracy and number of weight elements  / bitrate cost) , the size (s) of resampling 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 in the final selection decision.

[0123] In one embodiment, the resampling window size can be deduced from one or more aspects of input (e.g., video, frame, block) of a neural network that uses the resampled weights or resampled weight updates. In one example, size (s) of resampling window is determined based on the resolution of input (e.g., input samples of the neural network, input feature maps of the current neural unit) . In most cases, a lower resolution of input allows a neural network to utilize a more compact representation, allowing a larger size without too much weight information loss. In another example, size (s) of resampling window can be determined by pre-defined features of the input (e.g., colour, edge, texture) . In most cases, input with rich features requires efficient visual feature extraction, thus a smaller size is often used to avoid too much weight information loss. In another example, the size can be determined by type of frame, e.g., whether the currently-processing frame is I, P or B frame. In most cases, P / B frame contains less visual information, allowing a larger size.

[0124] In one embodiment, the resampling window size can also be deduced from one or more aspects of conditions or environment that the video coding is implemented. In one example, size (s) of resampling window is determined by a quantization parameter (e.g., at frame level, at slice level) . In case that weight down-sampling is applied to an update of weights, for low bitrate scenarios (e.g., low value of quantization parameters) , a larger size of resampling window is often used to reduce bitrate cost for the update. In another example, size (s) of resampling window is determined by the storage resources of deployment, e.g., a larger size is often used for space-constrained application (e.g., chips) to reduce storage cost.

[0125] (2) Resampling stride

[0126] The resampling parameter may include the resampling stride. The resampling stride, or stride of weight resampling, refers to a distance (i.e., the number of weight element) that the resampling window moves along a specific weight dimension after each weight resampling operation, e.g., if the stride equals to 1, the resampling window moves forward by one weight element at a time. Note that, the stride (s) determine the degree of overlap between resampling windows, e.g., a larger size and smaller stride result in a greater overlap between the weight elements involved in two resampling operations. In most cases, a smaller stride results in better performance of model, while a larger stride results in less amount of weight elements contained in the resampled weight. In some cases, the stride can be represented as one or more integer values, or a set of integer values, with each integer indicating an element-wise distance for one specific dimension to move forward. Typically, integer-valued strides are used in weight down-sampling operations to straightforwardly derive the corresponding down-sampled weights. In another case, the stride can be represented as one or more fractional values (in a format of e.g. float, half float, double) , or a set of fractional values, with each fraction indicating a sub-element-wise distance to move forward. Typically, fraction-valued strides are used in weight up-sampling operations to derive interpolated values at a finer-grained weight value level. Note that, when strides of resampling windows are the same for all weight dimensions, the decoder may only obtain one stride.

[0127] In one embodiment, the stride information can be received from a bitstream which is transmitted by an encoder, e.g., in the form of data unit or an identifier. Alternatively, the stride information can be derived from pre-specifications, e.g., including a previous size (e.g., a most recently used one) or a pre-set size (e.g., pre-set as 1, indicating an element-wise pace; pre-set the same value as the window size, indicating a non-overlapping resampling windows) .

[0128] In one embodiment, the operation of obtaining the resampling stride may include: deducing the resampling stride based on at least one selected from: a required size of the resampled weight; the resampling rate; performance of the AI model or functionality; characteristics of an input of the AI model or functionality; or a coding parameter.

[0129] (3) Padding of weight resampling

[0130] The resampling parameter may include the padding of weight resampling. Padding of weight resampling refers to one or more additional weight elements added when processing weight boundaries. The padding information further include: 1) number of paddings, and 2) type of padding. In most cases, a smaller number of padding results in less amount of weight elements contained in the resampled weight.

[0131] The number of paddings may indicate the number of weight element (s) to be added at boundary. The number of paddings can be represented as an integer value, or a set of integer value (s) with each indicating the number of weight elements to be added at one specific dimension. Similarly, the number of paddings can be obtained by at least one of: 1) received from bitstream, e.g., from data unit or identifier; 2) deduced from relevant information, e.g., dimension size of resampled weights (in case of known window size and stride) , rate of weight resampling (in case of known window size and stride) , performance of model; or 3) derived from pre-specifications, e.g., a previous size (e.g., a most recently used one) or a pre-set size (e.g., pre-set as 0, indicating no padding; pre-set the half value of the window size) .

[0132] The type of paddings may indicate the value (s) of each added weight elements, including but not limited to 1) zero padding, 2) reflect padding, 3) constant padding, 4) replicate padding. In one example, when the decoder receives an index corresponding to a lookup table, the type of padding operations corresponding to the index is used. In another example, when the decoder receives a string or type indicator (e.g. equal to "zero"  /  "reflect"  /  "constant"  /  "replicate" , the type of padding operations corresponding to string.

[0133] (4) Resampling rate

[0134] The resampling parameter may include the resampling rate. The resampling rate, or rate of weight resampling, refers to the ratio of element amount between base weights and resampled weights. Typically, for weight up-sampling, the rate is often larger than 1; while for weight down-sampling, the rate is often smaller than 1. In most cases, a larger rate results in better performance of model, while a smaller rate results in less amount of weight elements contained in the resampled weight. In some cases, the rate can be represented as one or more fractional values (in a format of e.g. float, half float, double) , or a set of fractional values, with each fraction indicating a ratio of element amount corresponding to one dimension. Similarly, when rates of resampling windows are the same for all weight dimensions, the decoder may only obtain one rate.

[0135] In one embodiment, the rate information can be received from a bitstream that is transmitted by an encoder, e.g., in the form of data unit or an identifier. Alternatively, the rate information may be derived from pre-specifications, e.g., a previous rate (e.g., a most recently used one) or a pre-set rate.

[0136] In one embodiment, the operation of obtaining the resampling rate may include: deducing the resampling rate based on at least one selected from: a required size of the resampled weight; the resampling window size, the resampling stride, and the resampling padding; performance of the AI model or functionality; characteristics of an input of the AI model or functionality; or a coding parameter.

[0137] Note that, once window size, stride, and padding are obtained, there is often no need to obtain rate information. However, in some applications, one or more of the window size, stride, and padding are preset, and the rate of weight resampling can be obtained to derive the rest information.

[0138] (5) Dilation of weight resampling

[0139] The resampling parameter may include the dilation of weight resampling. Dilation of weight resampling refers to a distance (i.e., the number of weight element) between elements to be involved in a resampling window, e.g., a dilation rate equals to 1 result in weight elements only at intervals of one element within the resampling window involved to derive the resampled weights. The dilation rate can be represented as one or more integer values, or a set of integer values, with each integer indicating the distance for one specific dimension to be dilated. In a few cases, the dilation rate can be represented as one or more fractional values, or a set of fractional values. Note that when all dilation rates are the same, the decoder may only obtain one dilation rate.

[0140] Similarly, the dilation information can be obtained by at least one of: 1) received from bitstream, e.g., in the form of data unit or an identifier; or 2) derived from pre-specifications, e.g., a previous dilation rate or a pre-set dilation rate.

[0141] (6) Edge points of weight resampling

[0142] In one embodiment, the resampling parameter may include the resampling edge points. The resampling edge points, or edge points of weight resampling, refer to start / end positions of resampling in the resampled sequence of elements (e.g., a slice of weights) . In case of known stride, padding and dilation of weight resampling, one of the start or end edge points can be derived without a necessity to provide its value explicitly. In one case, when stride of weight resampling is represented in integer, an edge point can be represented as one or more integer values, or a set of integer values, with each indicating positions of weight elements within one specific dimension to be resampled. In another case, when stride of weight resampling is represented in fraction, an edge point can be represented as one or more fractional values (e.g., floating-point values) , each indicating sub-lattice positions of weight elements within one specific dimension to be resampled. Note that, the floating-point values can be further quantized to a fixed precision or represented using integer representation with a fixed precision. The edge point value can be expressed as fractional position between integer position in the resampled sequence or in relation to some other known settings of the resampling process, e.g. as multiply of stride or window size.

[0143] Additionally, for edge point specifying start position, a value of 0 may represent position of the first sample in the resampled sequence, values less than 0 representing positions in the sequence before the first sample (requiring some form of extrapolation) and values larger than 0 representing positions in the sequence after the first sample. Similarly, for the edge point specifying end position, a value of 0 may represent position of the last sample in the resampled sequence, values less than 0 representing positions in the sequence before the last sample and values larger than 0 representing positions in the sequence after the last sample (requiring some form of extrapolation) . When all start / end edge points are the same, the decoder may only obtain one common value for each start / end edge point.

[0144] In one embodiment, the edge point information can be received from a bitstream that is transmitted by an encoder, e.g., in the form of data unit or an identifier. Alternatively, the edge point information may be derived from pre-specifications, e.g., a previous edge point (or points) or a pre-set edge point (e.g., edges of base weights) .

[0145] In one embodiment, the operation of obtaining the resampling edge points may include: deducing the resampling edge points based on a required size of the resampled weight.

[0146] Moreover, the resampling configuration may include information other than the above resampling parameters. In one extended variant, the weight resampling operation can be further involved with a weight re-arrangement operation, including, for example, identity operation, shuffle operation, and ranking operation.

[0147] In one embodiment, the resampling configuration may include an identity information which is configured to indicate an identity operation to be applied to weight elements for constructing the resampled weight. An optional identity operation may be introduced to reference or copy a specific weight or a weight element. By creating an identity transformation in the computational graph of neural network, this operation controls the transfer flow of weight information between different devices, providing hardware friendliness (e.g., module parallel computing) .

[0148] In one embodiment, the resampling configuration may include a shuffle information which is configured to indicate position exchange of weight elements for acquiring the resampled weight. An optional shuffle operation may be introduced to exchange the position of weight elements, and then a weight resampling is applied on the shuffled weights, thus potentially improving the representation capability of weight resampling. The shuffle order of weight elements can be determined by e.g. a static strategy (e.g., a pre-defined shuffle order, random channel shuffle, grouped channel shuffle) or a dynamic strategy (e.g., auto-shuffle, dynamic shuffle, learned shuffle e.g. predicted by a specialized neural network) .

[0149] In one embodiment, the resampling configuration may include a ranking information which is configured to sort weight elements in ascending or descending order for constructing the resampled weight. An optional ranking operation may be introduced to sort the elements in ascending or descending order based on the value of weights, and the sorted weights are segmented, each segment equipped with a separate resampling rate. For example, for segments with larger values of weights, a smaller rate of weight down-sampling is used to retain more information, while for segments with smaller values of weights, a larger rate of weight down-sampling is used to reduce the bitrate cost of weight representation.

[0150] Moreover, the weight resampling operation can be further involved with a weight grouping operation (e.g., grouped convolutional layer, any type of channels / weights grouping) . Correspondingly, the resampling configuration may include a grouping information which is configured to indicate one or more groups of weight elements to be resampled for acquiring the resampled weight. Specifically, a specific resampling operation is applied on weight elements that fall into the same group independently while weight elements belonging to the other groups are not involved in this resampling operation. In one example, one or more groups of weight elements in a layer are resampled while other groups are kept unmodified (or identity transformed) . In another example, different aspects of weight resampling (e.g., type  / window size  / stride  / padding  / rate) can be specified for different groups in a layer. This prevents mixing of weights between groups, which may be useful in case that each weight group (or weight update group) has distinct characteristics.

[0151] Furthermore, the resampling configuration may include a weight residue information which is configured to indicate a difference between the resampled weight and an original weight, or between the resampled weight and an original weight update. Given a neural network, its weight may be represented as a base resampled weight and zero or more scalable resampled weight residues. Specifically, the weight residue between 1) sum of the corresponding up-sampled version of all down-sampled weights and 2) the base weight is calculated each time, and the weight residue is further represented by its resampled (e.g., down-sampled) version. For different practical applications, the resampled weight residuals can be saved in a lookup table, and the corresponding index is signaled. Similarly, a complete weight update can be represented by a base resampled weight update as well as zero or more scalable resampled residue of weight update. During decoding, the scalable resampled update of weights is provided progressively according to the requested video quality.

[0152] In S203, a resampled weight is determined based on the weight information and the resampling configuration.

[0153] The decoder may know to which aspect (s) of weight instance the resampling operation should be applied by pre-configuration. Otherwise, the decoder may acquire such information. For example, the process may obtain information about one or more aspects of weight instance to be resampled.

[0154] Specifically, a neural unit related information which is configured to indicate a neural unit to which weight resampling is to be applied may be acquired. The neural unit related information may indicate: 1) a specific neural network; 2) a specific module, layer, or neural unit within neural network; and / or 3) a specific type of modules, layers, or neural units within neural network. Methods for acquiring the neural unit related information may be similar as those described in patent applications [PCT / CN2024 / 098802] and [PCT / CN2024 / 118847] , and will not be elaborated herein for simplicity and clarity.

[0155] Alternatively or additionally, a weight dimension information which is configured to indicate a weight dimension to which weight resampling is to be applied may be acquired. In one embodiment, the weight dimension information may be received from a bitstream that is generated by an encoder. The video bitstream contains explicit indications about the dimension to be involved. 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) . For example, given a four-dimensional weight, a bitmap equal to "1100"indicates to apply weight resampling on dimensions of input and output channel. 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, multiplier 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) . In another embodiment, the weight dimension information may be derived from additional information. In other words, by analyzing relevant information, the decoder can deduce the dimension to be resampled. For example, since the dimension size of base weights needs to be equal to the one of up-sampled weights, the dimension to be involved can be derived from dimension size of the up-sampled weights.

[0156] Once the decoder has obtained the weight information and the resampling configuration, the decoder may determine a resampled weight based on the weight information and the resampling configuration. Calculation and determination methods for different types of down-resampling and up-resampling have been provided in previous sections of the present disclosure, which will not be repeated herein.

[0157] In one embodiment, the weight information acquired by the decoder is a base weight, and the resampling operation is applied to the base weight. The corresponding resampled weight may be a down-resampled base weight or an up-resampled base weight.

[0158] FIG. 10 shows an exemplary video encoding process where the resampling operation is applied to a base weight. The weight may be a base weight or an updated weight. As shown in FIG. 10, the encoder may firstly acquire weight information of a neural network which is pre-stored at the encoder, and then performs resampling based on resampling configuration to acquire a resampled weight. Then the encoder may apply the resampled weight to the resampling operation. Optionally, the encoder may include relative information of the resampling in a bitstream and transmit the bitstream to the decoder.

[0159] In one application, the resampling operation as shown in FIG. 10 may be up-sampling, when the pre-stored base weight is the down-sampled result of an original weight. This implementation may save storage costs. After the weight up-sampling operation, the resampled weight is determined, and it may align with the dimension size of the original weight.

[0160] A corresponding decoding process may be similar except that the decoder does not generate the bitstream. Specifically, the decoder may acquire a pre-stored base weight, and performs up-sampling to acquire the resampled weight which corresponds to the resampled weight at the encoder side and aligns with the original weight.

[0161] In another application, the resampling operation as shown in FIG. 10 may be down-sampling, when the pre-stored base weight is for a larger-scale model (e.g., a teacher model) . After the weight down-sampling operation, the resampled weight is determined, and it may be used for a smaller-scale model deployed in the encoding system to reduce coding time costs.

[0162] A corresponding decoding process may be similar except that the decoder does not generate the bitstream. Specifically, the decoder may acquire a pre-stored base weight, and performs down-sampling to acquire the resampled weight which corresponds to the resampled weight at the encoder side and can be used for a smaller-scale model deployed in the decoding system to reduce coding time costs.

[0163] In another embodiment, the weight information that the decoder acquired is a weight update, and the resampling operation is applied to the weight update. Correspondingly, the resampled weight may be a resampled weight update. FIG. 11 shows an exemplary video encoding / decoding process where the resampling operation is applied to a weight. The weight may be a weight update or a base weight.

[0164] Specifically, the encoder may perform weight resampling based on the resampling configuration for a given update so as to acquire a first resampled weight. The encoder may include the information about the first resampled weight in a bitstream and transmit the bitstream to the decoder. Then the encoder may perform an opposite resampling operation to acquire a second resampled weight, and apply the second resampled weight to update the weight of the neural network deployed in the encoding system.

[0165] Correspondingly, the decoder may receive information about the first resampled weight in the bitstream transmitted by the encoder. The decoder may, based on the resampling configuration, perform the resampling operation on the first resampled weight to acquire the second resampled weight, which corresponds to the second resampled weight at the encoder side. Then the decoder may apply the second resampled weight to update the weight of the neural network deployed in the decoding system.

[0166] It can be seen, the resampling operation for acquiring the first resampled weight and the resampling operation for acquiring the second resampled weight are opposite. If the first resampled weight is acquired by a down-resampling operation at the encoder, the second resampled weight may be acquired by an up-resampling operation at the decoder. In this way, the required bitrate cost for transmitting the weight update may be reduced. If the first resampled weight is acquired by an up-resampling operation at the encoder, the second resampled weight may be acquired by a down-resampling operation at the decoder. In this way, elements of the weight update may be de-correlated and weight representation capability may be improved.

[0167] Apparently, the determined resampled weight may be a complete weight. In addition, the weight resampling operation may be applied together with decomposition operation. In the latter case, the determined resampled weight may be a decomposed weight.

[0168] FIG. 12 shows a scenario where the resampling operation is applied to a complete weight. A resampled weight is: 1) not processed by any decomposition; or 2) reconstructed by decomposition components across or within dimensions. The resampled complete weight may be a resampled base weight, a resampled weight update, or a resampled updated weight. In the subfigure (a) of FIG. 12, a weight down-sampling operation for a complete weight is illustrated. In the subfigure (b) of FIG. 12, a weight up-sampling operation for a complete weight is illustrated.

[0169] Given weights of a specified neural unit and its specified dimension to be resampled, each slice of weights at a specified dimension is represented by its resampled version.

[0170] An example is provided, where weight resampling is applied on one-dimensional slice of weights. Given weights of a given layer (or its updated weights or its weight update) , where N denotes the total number 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 its resampled version:

[0171] In the above equation, the size d′n of the n-th dimension of equal to:

[0172] As shown in the above equation, typically a larger window size  / a larger stride  / a smaller padding results in smaller dimension size (s) of resampled weight.

[0173] FIG. 13 shows a scenario where the resampling operation is applied to a decomposed weight. A decomposed weight is acquired by decomposition across or within dimensions. The resampled decomposed weight may be a resampled decomposed based weight, a resampled decomposed weight update, or a resampled decomposed updated weight. In the subfigure (a) of FIG. 13, a weight down-sampling operation for decomposed weights is illustrated. In the subfigure (b) of FIG. 13, a weight up-sampling operation for decomposed weights is illustrated.

[0174] An example is provided, where weight resampling is applied on one-dimensional slice of decomposed weights. Given a set of decomposed weights (or a set of decomposed updated weights, a set of decomposed weight updates) , e.g.  where the slice of the k″-th dimension can be represented by its resampled version:

[0175] The size d′n of the n-th dimension of may be the same as that in Eq. 26.

[0176] The decomposed weight may further get combined into a complete weight as: where denotes an arithmetic operation that combines a set of decomposed weights back into their  complete form.

[0177] In S204, the resampled weight is applied for the AI model or functionality.

[0178] The resampled weight, which has been determined based on the weight information and the resampling configuration in the previous steps, is applied to the AI model or functionality. If the resampling is performed to a base weight, the resampled weight can be directly used for the AI model. On the other hand, if the resampling is performed to a weight update, the resampled weight can be used to update the weight for the AI model.

[0179] The above implementation provides a flexible and effective method for representation of weight for AI model / functionality, leading to improved performance of the video coding system.

[0180] The present disclosure further provides an encoding method applying weight resampling. FIG. 14 illustrates a flowchart of an encoding method according to an embodiment of the present  disclosure. The method may be executed by an encoder. As shown in FIG. 14, the method may include operations described in blocks S301 to S305.

[0181] In S301, a weight information is obtained.

[0182] In S302, a resampling configuration is obtained.

[0183] In S303, a resampled weight is determined based on the weight information and the resampling configuration.

[0184] In S304, the resampled weight is applied for the AI model or functionality.

[0185] In S305, the resampled weight is transmitted to the decoder. This operation is optional. In some applications, the encoder does not need to transmit information of the resampled weight to the decoder. For example, if the resampling is performed on a base weight, the decoder may acquire information of the base weight from pre-specifications rather than from the bitstream generated by the encoder. In contrast, if the resampling is performed on a weight update, normally the encoder needs to transmit information of the resampled weight update to the decoder.

[0186] In some embodiments, the weight information comprises a base weight pre-stored at the decoder.

[0187] In some embodiments, the resampled weight is a down-resampled base weight; or the resampled weight is an up-resampled base weight.

[0188] In some embodiments, the weight information is a weight update. The resampled weight is a resampled weight update. The applying the resampled weight for the AI model or functionality comprises: applying an opposite resampling operation to the resampled weight update to acquire a target weight update; and applying the target weight update to the AI model or functionality.

[0189] In some embodiments, wherein the resampled weight update is configured to be applied with the opposite resampling operation at the decoder.

[0190] In some embodiments, the method further includes: transmitting the resampling configuration to a decoder in a bitstream.

[0191] In some embodiments, the resampling configuration is configured to indicate a resampling parameter. The resampling parameter comprises at least one selected from: a resampling window size, a resampling stride, a resampling padding, a resampling dilation, a resampling rate or resampling edge points.

[0192] In some embodiments, the resampling parameter comprises the resampling window size. The obtaining the resampling parameter comprises: deducing the resampling window size based on at least one selected from: a required size of the resampled weight; the resampling rate; performance of the AI model or functionality; characteristics of an input of the AI model or functionality; or a coding parameter.

[0193] In some embodiments, the resampling parameter comprises the resampling window size. The obtaining the resampling parameter comprises: deducing the resampling window size based on at least one selected from: a required size of the resampled weight; the resampling rate; performance of the AI model or functionality; characteristics of an input of the AI model or functionality; or a coding parameter.

[0194] In some embodiments, the resampling parameter comprises the resampling stride. The obtaining the resampling parameter comprises: deducing the resampling stride based on at least one selected from: a required size of the resampled weight; the resampling rate; performance of the AI model or functionality; characteristics of an input of the AI model or functionality; or a coding parameter.

[0195] In some embodiments, the resampling parameter comprises the resampling rate. The obtaining the resampling parameter comprises: deducing the resampling rate based on at least one selected from: a required size of the resampled weight; the resampling window size, the resampling stride, and the resampling padding; performance of the AI model or functionality; characteristics of an input of the AI model or functionality; or a coding parameter.

[0196] In some embodiments, the resampling parameter comprises the resampling edge points. The obtaining the resampling parameter comprises: deducing the resampling edge points based on a required size of the resampled weight.

[0197] In some embodiments, the resampling configuration is configured to indicate a resampling type.

[0198] In some embodiments, the resampling type comprises a down-resampling and an up-resampling. The down-resampling comprises weight maximum pooling, weight minimum pooling, weight average pooling, weight power average polling, weight sum pooling, weight product pooling, and weight learned pooling. The up-resampling comprises weight linear interpolation, weight cubic interpolation, weight nearest neighbor interpolation, and weight learned interpolation.

[0199] In some embodiments, the resampling configuration comprises an identity information configured to indicate an identity operation to be applied to weight elements for constructing the resampled weight.

[0200] In some embodiments, the resampling configuration comprises a shuffle information configured to indicate position exchange of weight elements for acquiring the resampled weight.

[0201] In some embodiments, the resampling configuration comprises a ranking information configured to sort weight elements in ascending or descending order for constructing the resampled weight.

[0202] In some embodiments, the resampling configuration comprises a grouping information configured to indicate one or more groups of weight elements to be resampled for acquiring the resampled weight.

[0203] In some embodiments, the method further includes: transmitting a weight residue information to a decoder, wherein the weight residue information is configured to indicate a difference between the resampled weight and an original weight, or between the resampled weight and an original weight update.

[0204] In some embodiments, the method further includes: acquiring a neural unit related information configured to indicate a neural unit to which weight resampling is to be applied; and / or acquiring a weight dimension information configured to indicate a weight dimension to which weight resampling is to be applied.

[0205] In some embodiments, the resampled weight is a complete weight; or the resampled weight is a decomposed weight.

[0206] Steps and concepts of the operations S301 to S304 shown in FIG. 14 are similar to the operations S201 to S204 shown in FIG. 9, and will not be repeated for simplicity and clarity. In the following section, an introduction about how the encoder may signal resampling-related information.

[0207] In case weight resampling is specified and applied at the encoder side, information about resampling operation is signaled to the decoder to derive a corresponding resampled weight. This ensures a correct decoding of the bitstream. The signaling includes at least one of the following: resampling-related information; and weight-related information.

[0208] The resampling related information may include type of weight resampling. The information can be represented by 1) an index corresponding to a lookup table storing available types of weight resampling operations; 2) a string or type indicator. Alternatively or additionally, the resampling related information may include resampling window size, resampling stride, resampling padding, resampling rate, and / or resampling dilations. The information can be represented by 1) one or more integer (or fractional) values; 2) an index corresponding to a lookup table storing available window sizes  / strides  / paddings  / rates  / dilations of resampling windows.

[0209] The weight-related information may include neural unit-related information. It can be represented as one of the following: 1) neural network model identifier, 2) neural network functionality identifier. 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. Alternatively or additionally, the weight-related information may include weight dimension-related information. It can be represented by a binary indicator  / a bitmap indicator  / a string or Type indicator, where "True"  / a bit of "1" or "True"  / meaning of string indicates the application of dimension-wise decomposition on the corresponding dimension of weights.

[0210] The following paragraphs illustrate important design elements of high-level syntax and semantics for a specification process of weight resampling. 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.

[0211] In one solution, information about weight resampling operation 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) . Table 1 gives an example of the specification text for SPS header. Table 1 SPS rbsp syntax

[0212] In Table 1, sps_nnlf_enabled_flag equal to 1 specifies that neural network filter is enabled for the CLVS. sps_nnlf_weight_resample_flag equal to 1 specifies that weight resampling is enabled for weights of neural network filter for the CLVS. sps_nnlf_weight_resample_payload_size_minus1 plus 1 specifies the bytes of payloads containing information on weight resampling. sps_nnlf_weight_resample_typeID specifies the index of resampling type to be applied. sps_nnlf_weight_resample_rate specifies the rate of resampling to be applied.

[0213] The proposed SPS structure is typically expected to be used in cases where weight resampling is applied to a weight of a neural network. The neural network filter should be aware of the type and rate of weight resampling at least before processing each GoP.

[0214] In another implementation, information about weight resampling can be specified in nn_filter_update_data () when aps_params_type == NN_UPDATE_APS, and the syntax of weight resampling may be specified as shown in Table 2. Table 2 APS parameters type codes and types of APS parameters

[0215] In Table 2, aps_nnlf_weight_resample_typeID specifies the index of resampling type to be applied. aps_nnlf_weight_resample_rate specifies the rate of weight resampling to be applied. 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 weight resampling is applied to a weight update.

[0216] In one solution, a SEI structure of message is proposed, which includes information about weight resampling. In this case, the media bitstream includes one or more media units and a SEI message related to this process. 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 1) a type of resampling, 2) a rate of resampling, and apply it to the weight of the neural unit identified by the above mentioned independently parsable structure to derive a resampled weight. The payload of the second independently parsable structure may further include information corresponding to fields of sequence parameter set.

[0217] Typically, the proposed SEI structure is expected to be used e.g. in neural network-based post-filtering (but not in-loop filtering) or auxiliary neural networks (e.g., generating object mask information) of video coding system, or neural network-based image / video processing used in products or manufactures (e.g., device, chip) .

[0218] In one solution, information about weight resampling may be introduced into a separate bitstream. For example, the signaling may be interpreted based on the related syntax and semantics as specified in ISO / IEC 15938-17 to generate a NNR bitstream.

[0219] In one possible implementation, the type and rate of resampling and corresponding information indicating an application of weight resampling can be introduced into nnr_model_parameter_set_header () as shown in Table 3. Table 3 NNR model parameter set unit syntax

[0220] nn_weight_resample_data () is a container or a structure containing information specifying type and rate of weight resampling to be applied. The payload of nn_weight_resample_data () comprises at least one of the following elements.

[0221] nn_weight_resample_typeID specifies an index of weight resampling type to be applied. nn_weight_resample_rate specifies a rate of weight resampling to be applied. nn_weight_resample_size_present_flag specifies whether a tensor of sizes of sub-dimensions is provided. nn_weight_resample_size_present_flag shall be set to 1, if nn_weight_resample_size_tensor is contained in payload of nn_weight_resample_data () .

[0222] The specification text of layer parameter set (LPS) can be as shown in Table 4. Table 4 NNR layer parameter set unit payload syntax

[0223] tensor_resampling_performance_map () specifies a mapping between different rate of resampling to be used in weight resampling and resulting NN inference performance. The resulting performance is provided separately for different aspects or characteristics of the output of the NN.

[0224] For a classifier NN (e.g., VVC intra mode predictor) , each rate of resampling 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.

[0225] tensor_resampling_performance_map () is defined as shown in Table. 5. Table 5 NNR model parameter set unit payload syntax

[0226] In Table 5, mse_threshold specifies an array of MSE thresholds which are applied to derive the rates of the different tensor resampling 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 resampling 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 rate thresholds. ddpm_nn_class_accuracy specifies an array of accuracies for a certain class, when a certain rate threshold is applied. Note that the payload of tensor_resampling_performance_map () may further include information corresponding to fields of sequence parameter set. For a regression NN (e.g., loop filtering, reference frame generation, super-resolution) , each rate of resampling is mapped to separate quality metric of reconstruction / prediction (e.g., PSNR, SSIM, MS-SSIM) . tensor_resampling_performance_map () is defined as shown in Table 6. Table 6 NNR model parameter set unit payload syntax

[0227] mse_threshold specifies an array of MSE thresholds which are applied to derive the rates of the different tensor resampling 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 resampling of the whole model and the number of parameters in the original model. Note that the payload of tensor_resampling_performance_map () may further include information corresponding to fields of sequence parameter set.

[0228] Different embodiments of the present disclosure may offer one or several of the following advantages.

[0229] a) . Support for various weight dimensions. Compared with existing schemes of dimension-wise decomposition that require the dimension size of base weights to be a composite value, the present disclosure can accommodate any weight dimension size by controlling the window size  / stride  / padding  / rate of weight resampling. Besides, the weight information is structurally preserved (i.e., the information contained in the weight is preserved window by window) , which is expected to minimize information loss.

[0230] b) . Applicability in blind scenarios. The present disclosure allows to modify weight elements into any amount, eliminating the need for prior knowledge of the decoder neural network's relevant information (e.g., topology or weight dimensions) . For instance, during encoding, the amount of weight elements of an update can always be N elements. During decoding, for a given neural network with weight dimension size equal to M at a decoder side, weights of the updates can be resampled to M elements and then applied to the neural network.

[0231] c) . Improvement of representation flexibility in regularity constraint cases. By combining with fractional strides, the present disclosure improves representation flexibility for weights with regularity constraint, e.g., weights reconstructed by dimension-wise decomposed components. For example, for a weight dimension size of 12 and represented by dimension-wise components as 2×4, given a resampling step of 3 / 4, the weight with 8 elements is resampled into 12 elements, each corresponding to the lattice position of [0, 3 / 4, 1+2 / 4, 2+1 / 4, 3, 3+3 / 4, 4+2 / 4, 5+1 / 4, 6, 6+3 / 4, 7+2 / 4, 8+1 / 4] so that the i-th element is no longer completely correlated with the (i+6) -th element.

[0232] d) . Reduce storage / bitrate costs. Compared with existing schemes that require structural information, the present disclosure further reduces the amount of elements required for weight representation by maintaining the structure of base weights, thus reducing storage and signaling costs. For example, given the base weights of shape 64×1, the resampled weights require only weight information, while the most advanced dimensional decomposition may require e.g. size information of sub-dimensions or position information of decomposed components) .

[0233] e) . Reduction of training cost. As the present disclosure allows the resampled weights (or their updates) to directly participate in a training process, it is expected to reduce the 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] f) . Support for flexible control over size of weights (or their updates) . The present disclosure offers flexibility to control or adjust the bitstream size dedicated to weights (or their updates) by modifying one or more of: window size  / stride  / padding  / rate of weight resampling.

[0235] The weight resampling 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, and 32 channels are resampled into a half amount of weight elements, i.e., 4, 8, and 16 elements, respectively. The weight down-sampling operation is applied before training, and the down-sampled weights are directly updated during the training. Before inference, the down-sampled weights are up-sampled using weight linear interpolation with a rate of weight resampling equal to 2.

[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. Besides, compared with existing content-adaptive tool requires an average of 6290MB memory usage, this invention requires 6166MB, indicating a reduction of memory usage for training. Table 7

[0238] FIG. 15 conceptually illustrates an apparatus 400 with which some embodiments of the present disclosure 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.

[0239] 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.

[0240] 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.

[0241] 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.

[0242] 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.

[0243] The present disclosure further provides a computer readable medium 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.

[0244] 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 present disclosure. 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.

[0245] While the disclosure has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the present disclosure can be embodied in other specific forms without departing from the spirit of the present disclosure. 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.

[0246] 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 decoding method, executed by a decoder deployed with an artificial intelligence (AI) model or functionality, comprising:obtaining a weight information;obtaining a resampling configuration;determining a resampled weight based on the weight information and the resampling configuration; andapplying the resampled weight for the AI model or functionality.2.The method of claim 1,wherein the weight information comprises a base weight pre-stored at the decoder.3.The method of claim 2,wherein the resampled weight is a down-resampled base weight; orwherein the resampled weight is an up-resampled base weight.4.The method of claim 1,wherein the weight information comprises a weight update received from an encoder;wherein the resampled weight is a resampled weight update; andwherein the applying the resampled weight for the AI model or functionality comprises: applying the resampled weight update to a base weight to acquire an updated weight and applying the updated weight to the AI model or functionality.5.The method of claim 4,wherein the resampled weight update is acquired by a down-resampling operation while the weight update is acquired by an up-resampling operation at the encoder; orwherein the resampled weight update is acquired by an up-resampling operation while the weight update is acquired by an down-resampling operation at the encoder.6.The method of claim 1,wherein the resampling configuration is included in a bitstream received from an encoder; orwherein the resampling configuration is pre-configured at the decoder.7.The method of claim 1,wherein the resampling configuration is configured to indicate a resampling parameter;wherein the resampling parameter comprises at least one selected from: a resampling window size, a resampling stride, a resampling padding, a resampling dilation, a resampling rate or resampling edge points.8.The method of claim 7,wherein the resampling parameter comprises the resampling window size;wherein the obtaining the resampling parameter comprises:deducing the resampling window size based on at least one selected from:a required size of the resampled weight;the resampling rate;performance of the AI model or functionality;characteristics of an input of the AI model or functionality; ora coding parameter.9.The method of claim 7,wherein the resampling parameter comprises the resampling stride;wherein the obtaining the resampling parameter comprises:deducing the resampling stride based on at least one selected from:a required size of the resampled weight;the resampling rate;performance of the AI model or functionality;characteristics of an input of the AI model or functionality; ora coding parameter.10.The method of claim 7,wherein the resampling parameter comprises the resampling rate;wherein the obtaining the resampling parameter comprises:deducing the resampling rate based on at least one selected from:a required size of the resampled weight;the resampling window size, the resampling stride, and the resampling padding;performance of the AI model or functionality;characteristics of an input of the AI model or functionality; ora coding parameter.11.The method of claim 7,wherein the resampling parameter comprises the resampling edge points;wherein the obtaining the resampling parameter comprises:deducing the resampling edge points based on a required size of the resampled weight.12.The method of claim 1,wherein the resampling configuration is configured to indicate a resampling type.13.The method of claim 12,wherein the resampling type comprises a down-resampling and an up-resampling.14.The method of claim 13,wherein the down-resampling comprises weight maximum pooling, weight minimum pooling, weight average pooling, weight power average polling, weight sum pooling, weight product pooling, and weight learned pooling.15.The method of claim 13,wherein the up-resampling comprises weight linear interpolation, weight cubic interpolation, weight nearest neighbor interpolation, and weight learned interpolation.16.The method of claim 1,wherein the resampling configuration comprises an identity information configured to indicate an identity operation to be applied to weight elements for constructing the resampled weight.17.The method of claim 1,wherein the resampling configuration comprises a shuffle information configured to indicate position exchange of weight elements for acquiring the resampled weight.18.The method of claim 1,wherein the resampling configuration comprises a ranking information configured to sort weight elements in ascending or descending order for constructing the resampled weight.19.The method of claim 1,wherein the resampling configuration comprises a grouping information configured to indicate one or more groups of weight elements to be resampled for acquiring the resampled weight.20.The method of claim 1,wherein the resampling configuration comprises a weight residue information configured to indicate a difference between the resampled weight and an original weight, or between the resampled weight and an original weight update.21.The method of claim 1, further comprising:acquiring a neural unit related information configured to indicate a neural unit to which weight resampling is to be applied; and / oracquiring a weight dimension information configured to indicate a weight dimension to which weight resampling is to be applied.22.The method of claim 1, wherein the resampled weight is a complete weight.23.The method of claim 1, wherein the resampled weight is a decomposed weight.24.An encoding method, executed by an encoder deployed with an artificial intelligence (AI) model or functionality, comprising:obtaining a weight information;obtaining a resampling configuration;determining a resampled weight based on the weight information and the resampling configuration; andapplying the resampled weight for the AI model or functionality.25.The method of claim 24,wherein the weight information comprises a base weight pre-stored at the decoder.26.The method of claim 25,wherein the resampled weight is a down-resampled base weight; orwherein the resampled weight is an up-resampled base weight.27.The method of claim 24,wherein the weight information is a weight update;wherein the resampled weight is a resampled weight update;wherein the applying the resampled weight for the AI model or functionality comprises:applying an opposite resampling operation to the resampled weight update to acquire a target weight update; andapplying the target weight update to the AI model or functionality.28.The method of claim 27, further comprising:transmitting the resampled weight update to the decoder.29.The method of claim 28,wherein the resampled weight update is configured to be applied with the opposite resampling operation at the decoder.30.The method of claim 24, further comprising:transmitting the resampling configuration to a decoder in a bitstream.31.The method of claim 24,wherein the resampling configuration is configured to indicate a resampling parameter;wherein the resampling parameter comprises at least one selected from: a resampling window size, a resampling stride, a resampling padding, a resampling dilation, a resampling rate or resampling edge points.32.The method of claim 31,wherein the resampling parameter comprises the resampling window size;wherein the obtaining the resampling parameter comprises:deducing the resampling window size based on at least one selected from:a required size of the resampled weight;the resampling rate;performance of the AI model or functionality;characteristics of an input of the AI model or functionality; ora coding parameter.33.The method of claim 31,wherein the resampling parameter comprises the resampling stride;wherein the obtaining the resampling parameter comprises:deducing the resampling stride based on at least one selected from:a required size of the resampled weight;the resampling rate;performance of the AI model or functionality;characteristics of an input of the AI model or functionality; ora coding parameter.34.The method of claim 31,wherein the resampling parameter comprises the resampling rate;wherein the obtaining the resampling parameter comprises:deducing the resampling rate based on at least one selected from:a required size of the resampled weight;the resampling window size, the resampling stride, and the resampling padding;performance of the AI model or functionality;characteristics of an input of the AI model or functionality; ora coding parameter.35.The method of claim 31,wherein the resampling parameter comprises the resampling edge points;wherein the obtaining the resampling parameter comprises:deducing the resampling edge points based on a required size of the resampled weight.36.The method of claim 24,wherein the resampling configuration is configured to indicate a resampling type.37.The method of claim 36,wherein the resampling type comprises a down-resampling and an up-resampling.38.The method of claim 37,wherein the down-resampling comprises weight maximum pooling, weight minimum pooling, weight average pooling, weight power average polling, weight sum pooling, weight product pooling, and weight learned pooling.39.The method of claim 37,wherein the up-resampling comprises weight linear interpolation, weight cubic interpolation, weight nearest neighbor interpolation, and weight learned interpolation.40.The method of claim 24,wherein the resampling configuration comprises an identity information configured to indicate an identity operation to be applied to weight elements for constructing the resampled weight.41.The method of claim 24,wherein the resampling configuration comprises a shuffle information configured to indicate position exchange of weight elements for acquiring the resampled weight.42.The method of claim 24,wherein the resampling configuration comprises a ranking information configured to sort weight elements in ascending or descending order for constructing the resampled weight.43.The method of claim 24,wherein the resampling configuration comprises a grouping information configured to indicate one or more groups of weight elements to be resampled for acquiring the resampled weight.44.The method of claim 24, further comprising:transmitting a weight residue information to a decoder, wherein the weight residue information is configured to indicate a difference between the resampled weight and an original weight, or between the resampled weight and an original weight update.45.The method of claim 24, further comprising:acquiring a neural unit related information configured to indicate a neural unit to which weight resampling is to be applied; and / oracquiring a weight dimension information configured to indicate a weight dimension to which weight resampling is to be applied.46.The method of claim 24,wherein the resampled weight is a complete weight; orwherein the resampled weight is a decomposed weight.47.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 46.48.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 46.