Coding and decoding method, device and readable medium
By reshaping the four-dimensional parameter tensor of the deep neural network into a three-dimensional union partition, combined with entropy coding technology, it solves the problem of wasting storage and computing resources of the deep neural network model in mobile and edge devices, and achieves more efficient compression and inference. performance.
Patent Information
- Application Number
- CN202080037115.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-19
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-11-19
AI Technical Summary
Existing technologies cannot effectively solve the problem of wasting storage and computing resources caused by the high dimensionality of weight tensors when compressing deep neural network models. Especially in mobile and edge devices, traditional matrix multiplication operations cannot be fully utilized. Memory characteristics without considering local distribution and sparsity.
Build a 3D tree for each unit by reshaping the four-dimensional parameter tensor of the neural network into a three-dimensional tensor and partitioning it into 3D encoding and decoding tree units along the input feature and output feature dimensions, using quadtree recursive partitioning until a predetermined depth , and performs entropy encoding on tree node values to achieve more efficient compression and storage.
It significantly reduces the consumption of storage and computing resources, improves the inference efficiency of neural network models in mobile and edge devices, adapts to local distribution and sparsity characteristics, and improves device performance.
Smart Images

Figure CN114041292B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the following patent applications filed in the United States Patent and Trademark Office: U.S. Provisional Patent Application No. 62 / 939,054 filed on November 22, 2019, U.S. Provisional Patent Application No. 62 / 940,427 filed on November 26, 2019, U.S. Provisional Patent Application No. 62 / 957,699 filed on January 6, 2020, U.S. Provisional Patent Application No. 62 / 957,691 filed on January 6, 2020, U.S. Provisional Patent Application No. 62 / 975,485 filed on February 12, 2020, U.S. Provisional Patent Application No. 62 / 994,660 filed on March 25, 2020, and U.S. Patent Application No. 17 / 081,158 filed on October 27, 2020. The entire disclosures of these prior applications are incorporated herein by reference in their entirety. Background Art
[0003] Deep neural networks (DNNs) have been successful in a large number of video applications such as semantic classification, object detection / recognition, object tracking, and video quality enhancement, which require compressed DNN models. Therefore, the Moving Picture Experts Group (MPEG) is actively studying the Coding Representation of Neural Network Standard (NNR). This standard is used to encode DNN models to save storage and computation. Summary of the invention
[0004] According to an embodiment, a method of encoding and decoding is performed by at least one processor, and the method includes: reshaping a four-dimensional (4D) parameter tensor of a neural network into a 3D parameter tensor of the neural network, the 3D parameter tensor including a convolution kernel size, an input feature size, and an output feature size; partitioning the 3D parameter tensor into 3D codec tree units CTU3D along a plane formed by the input feature size and the output feature size; recursively partitioning each of the CTU3Ds into multiple 3D codec units CU3D using a quadtree until a predetermined depth; constructing a 3D tree for each of the multiple CU3Ds; and entropy encoding each of multiple values of multiple nodes of the 3D tree.
[0005] According to an embodiment, a coding and decoding device comprises: at least one memory configured to store program code; and at least one processor configured to read the program code and operate according to the instructions of the program code, wherein the program code comprises: a reshaping code configured to cause the at least one processor to: reshape a four-dimensional 4D parameter tensor of a neural network into a 3D parameter tensor of the neural network, wherein the 3D parameter tensor comprises a convolution kernel size, an input feature size, and an output feature size; a first partitioning code configured to cause the at least one processor to: The invention relates to a method for partitioning a 3D parameter tensor into a 3D codec tree unit CTU3D according to a plane formed by a size and an output feature size; a second partitioning code is configured to enable the at least one processor to recursively partition each of the CTU3Ds into a plurality of 3D codec units CU3D using a quadtree until a predetermined depth; a first construction code is configured to enable the at least one processor to build a 3D tree for each of the plurality of CU3Ds; and a first entropy encoding code is configured to enable the at least one processor to entropy encode each of a plurality of values of a plurality of nodes of the 3D tree.
[0006] According to an embodiment, a non-transitory computer-readable medium storing instructions, when executed by at least one processor, causes the at least one processor to: reshape a four-dimensional (4D) parameter tensor of a neural network into a 3D parameter tensor of the neural network, the 3D parameter tensor including a convolution kernel size, an input feature size, and an output feature size; partition the 3D parameter tensor into 3D codec tree units (CTU3D) along a plane formed by the input feature size and the output feature size; recursively partition each of the CTU3Ds into multiple 3D codec units (CU3Ds) using a quadtree until a predetermined depth; construct a 3D tree for each of the multiple CU3Ds; and entropy encode each of multiple values of multiple nodes of the 3D tree.
[0007] According to an embodiment, a non-transitory computer-readable medium storing instructions, when executed by at least one processor, causes the at least one processor to: perform a method of encoding and decoding.
[0008] According to an embodiment, a coding and decoding apparatus includes: at least one memory configured to store program code; and at least one processor configured to read the program code and operate according to instructions of the program code to execute the coding and decoding method.
[0009] According to an embodiment, a coding and decoding device includes: a reshaping unit, which reshapes a four-dimensional (4D) parameter tensor of a neural network into a 3D parameter tensor of the neural network, wherein the 3D parameter tensor includes a convolution kernel size, an input feature size, and an output feature size; a first partitioning unit, which partitions the 3D parameter tensor into 3D codec tree units CTU3D along a plane formed by the input feature size and the output feature size; a second partitioning unit, which recursively partitions each of the CTU3Ds into multiple 3D codec units CU3D using a quadtree until a predetermined depth; a first construction unit, which constructs a 3D tree for each of the multiple CU3Ds; and a first entropy coding unit, which entropy codes each of multiple values of multiple nodes of the 3D tree. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a schematic diagram of the GEPM / GEPP division method;
[0011] Figure 2 is a diagram of an environment in which the methods, devices, and systems described herein may be implemented according to an embodiment;
[0012] Figure 3 yes Figure 2 block diagram of example components of one or more devices;
[0013] Figure 4 is a functional block diagram of a system for neural network model compression according to an embodiment;
[0014] Figure 5 is a diagram of two examples of adaptive CTU3D / 3D codec unit (CU3D) partitioning using raster scanning in the vertical direction according to an embodiment;
[0015] Figure 6 is an example diagram of a 3D octree structure with three depths according to an embodiment;
[0016] Figure 7 is a flow chart of a 3D tree encoding and decoding method for neural network model compression according to an embodiment;
[0017] Figure 8 is a block diagram of an apparatus for 3D tree encoding and decoding for neural network model compression according to an embodiment; DETAILED DESCRIPTION
[0018] The present disclosure relates to neural network model compression. More specifically, the methods and apparatus described herein relate to 3D tree encoding and decoding for neural network model compression.
[0019] Scan Order
[0020] In neural network compression for multimedia content description and analysis, if the dimension of the weight tensor is greater than 2 (e.g., a convolutional layer), the weight tensor is reshaped into a two-dimensional (2D) tensor. If the dimension of the weight tensor does not exceed 2 (e.g., a fully connected layer or a bias layer), no reshaping is performed.
[0021] The codec method scans the weight coefficients from left to right in a row-first manner and scans the rows from top to bottom.
[0022] Table 1
[0023]
[0024] Quantification
[0025] In neural network compression for multimedia content description and analysis, nearest neighbor quantization is applied to each weight coefficient in the weight matrix in a uniform manner. A fixed step size is applied. The reconstructed values in the decoded matrix are integer multiples of the step size. The step size is defined as a 32-bit floating point number.
[0026] Table 2
[0027] step_size(){ step_size flt(32) }
[0028] step_size is the quantization step size.
[0029] Entropy encoding and decoding
[0030] In Neural Network Compression for Multimedia Content Description and Analysis, each quantized weight level is encoded according to the following procedure using an integer parameter maxNumNoRem:
[0031] In the first step, a binary syntax element sig_flag is encoded for the quantization weight level, which specifies whether the corresponding level is equal to zero. If sig_flag is equal to 1, another binary syntax element sign_flag is encoded. A binary number indicates whether the current weight level is positive or negative. Next, the unary binary sequence is encoded, followed by the fixed length sequence, as shown below:
[0032] The variable k is initialized to zero, and X is initialized to 1<<k. Encode a syntax element abs_level_greater_X, which represents that the absolute value of the quantization weight level is greater than X. If abs_level_greater_X equals 1, and if X is greater than maxNumNoRem, then the variable k is incremented by 1. Then, 1<<k is added to X, and another abs_level_greater_X is encoded. This process continues until an abs_level_more_X equals 0. At this point, X must be one of the values in (X, X - 1, … X – (1<<k)+1). Encode a code of length k that points to a value in a list that is the absolute quantization weight level.
[0033] Context modeling corresponds to associating three types of flags sig_flag, sign_flag, and abs_level_more_X with context models. In this way, flags with similar statistical behavior can be associated with the same context model so that a probability estimator (inside the context model) can adapt to the underlying statistics.
[0034] The context modeling of the proposed method is as follows:
[0035] For sig_flag, three context models are distinguished according to whether the adjacent quantization weight level on the left is zero, less than zero, or greater than zero.
[0036] For sign_flag, three other context models are distinguished according to whether the adjacent quantization weight level on the left is zero, less than zero, or greater than zero.
[0037] For the abs_level_greater_X flag, one or two separate context models are used for each X. If X <= maxNumNoRem, two context models are distinguished according to sign_flag. If X > maxNumNoRem, only one context model is used.
[0038] Table 3
[0039]
[0040] sig_flag indicates whether the quantization weight QuantWeight[i] is non-zero. sig_flag equals 0 means that QuantWeight[i] is zero.
[0041] sign_flag indicates whether the quantization weight QuantWeight[i] is positive or negative. sign_flag equals 1 means that QuantWeight[i] is negative.
[0042] abs_level_greater_x[j] indicates whether the absolute level of QuantWeight[i] is greater than j+1.
[0043] abs_level_greater_x2[j] includes the unary part of the exponential Golomb remainder.
[0044] abs_remainder indicates a fixed-length remainder.
[0045] The inference operation of deep learning systems makes extensive use of matrix multiplication, so a high-performance matrix multiplication library (GEMM) is key to inference operations. Based on the size of the left-hand side (lhs) matrix and the size of the right-hand side (rhs) matrix, two GEMM routines (GEPP / GEBP, GEPM / GEBP) have been recognized as the optimal GEMM solutions in the industry over the past decade. Figure 1 As shown, both methods recursively partition the lhs matrix and the rhs matrix to take full advantage of the different characteristics of off-chip memory (such as double data rate (DDR)) and on-chip memory (such as multi-level cache) in modern computing platforms, and usually store the lhs matrix in column-major order to achieve the optimal memory access pattern. The lhs matrix is usually transposed to achieve the optimal memory access pattern. Some newer GEMM routines (such as QNNPACK) are optimized for neural networks designed for mobile and edge devices, are variants of the GEPP routine or the GEPM routine, and follow a similar matrix blocking / partitioning approach.
[0046] The matrix scanning order in NNR is defined as a row-first manner from left to right, and multiple rows from top to bottom. This scanning order does not match the scanning order required for inference operations, because inference operations must buffer excessively large weight coefficients before starting operations. For example, when performing inference operations on the first fully connected layer of VGG16, assuming that the matrix size of this layer is 25088×4096, a buffer capable of storing N×25088 coefficients must be reserved to execute the GEMM routine. If N=64 for normal GEMM operations, the buffer size will be 1.5MB even if the coefficients are represented by 8-bit integers instead of 32-bit floating point numbers, but this buffer size is too high, especially for mobile and edge devices.
[0047] In addition, entropy coding in NNR is performed directly on the quantized weight coefficients. After partitioning the weight tensor into non-overlapping 2D / 3D codec tree units (CTU) / 3D codec tree units (CTU3D), NNR does not consider the local distribution. After the sparse / pruning operation, most of the weight coefficients are zero.
[0048] Figure 22 is a diagram of an environment 200 in which the methods, devices, and systems described herein may be implemented, according to an embodiment. Figure 2 As shown, environment 100 may include user device 110, platform 120, and network 130. The devices of environment 100 may be interconnected via wired connections, wireless connections, or a combination of wired and wireless connections.
[0049] The user device 210 includes one or more devices that can receive, generate, store, process and / or provide information related to the platform 220. For example, the user device 210 may include a computing device (e.g., a desktop computer, a laptop computer, a tablet computer, a handheld computer, a smart speaker, a server, etc.), a mobile phone (e.g., a smart phone, a wireless phone, etc.), a wearable device (e.g., smart glasses or a smart watch), or a similar device. In some embodiments, the user device 210 can receive information from the platform 220 and / or send information to the platform 220.
[0050] The platform 220 includes one or more devices as described elsewhere herein. In some embodiments, the platform 220 may include a cloud server or a cloud server group. In some embodiments, the platform 220 may be designed to be modular so that software components may be swapped in or out. In this way, the platform 220 may be easily and / or quickly reconfigured to have different uses.
[0051] In some embodiments, as shown, the platform 220 may be hosted in a cloud computing environment 222. It is worth noting that although the embodiments described herein describe the platform 220 as being hosted in a cloud computing environment 222, in some embodiments, the platform 220 is not cloud-based (i.e., may be implemented outside of a cloud computing environment) or may be partially cloud-based.
[0052] Cloud computing environment 222 includes an environment hosting platform 220. Cloud computing environment 222 can provide computing, software, data access, storage, and other services that do not require end users (e.g., user devices 210) to be aware of the physical location and configuration of the systems and / or devices hosting platform 220. As shown, cloud computing environment 222 can include a set of computing resources 224 (collectively, “computing resources 224” and individually, “computing resource 224”).
[0053] The computing resources 224 include one or more personal computers, workstation computers, server devices, or other types of computing and / or communication devices. In some embodiments, the computing resources 224 can host the platform 220. Cloud resources can include computing instances executed in the computing resources 224, storage devices provided in the computing resources 224, data transmission devices provided by the computing resources 224, etc. In some embodiments, the computing resources 224 can communicate with other computing resources 224 via wired connections, wireless connections, or a combination of wired and wireless connections.
[0054] Further Figure 2 As shown, the computing resources 224 include a set of cloud resources, such as one or more application programs ("APP") 224-1, one or more virtual machines ("VM") 224-2, virtualized storage ("VS") 224-3, one or more hypervisors ("HYP") 224-4, etc.
[0055] The applications 224-1 include one or more software applications that can be provided to or accessed by the user device 210 and / or the platform 220. The applications 224-1 do not require the software applications to be installed and executed on the user device 210. For example, the applications 224-1 can include software associated with the platform 220, and / or any other software that can be provided through the cloud computing environment 222. In some embodiments, one application 224-1 can send / receive information to or from one or more other applications 224-1 through the virtual machine 224-2.
[0056] Virtual machine 224-2 includes a software implementation of a machine (e.g., a computer) that executes programs, similar to a physical machine. Virtual machine 224-2 can be a system virtual machine or a process virtual machine, depending on the use and correspondence of virtual machine 224-2 to any real machine. System virtual machines can provide a complete system platform that supports the execution of a complete operating system ("OS"). Process virtual machines can execute a single program and can support a single process. In some embodiments, virtual machine 224-2 can execute on behalf of a user (e.g., user device 210) and can manage the infrastructure of cloud computing environment 222, such as data management, synchronization, or long-term data transfer.
[0057] Virtualized storage 224-3 includes one or more storage systems and / or one or more devices that use virtualization technology within the storage system or device of computing resource 224. In some embodiments, within the context of a storage system, the types of virtualization may include block virtualization and file virtualization. Block virtualization may refer to the abstraction (or separation) of logical storage from physical storage so that the storage system may be accessed without regard to physical storage or heterogeneous structures. Separation may allow administrators of storage systems to flexibly manage storage for end users. File virtualization may eliminate the dependency between data accessed at the file level and the location of the physical storage file. This may optimize the performance of storage usage, server consolidation, and / or non-disruptive file migration.
[0058] Hypervisor 224-4 may provide hardware virtualization technology that allows multiple operating systems (e.g., "guest operating systems") to execute simultaneously on a host computer such as computing resource 224. Hypervisor 224-4 may provide a virtual operating platform to the guest operating systems and may manage the execution of the guest operating systems. Multiple instances of various operating systems may share virtualized hardware resources.
[0059] The network 230 includes one or more wired and / or wireless networks. For example, the network 230 may include a cellular network (e.g., a fifth generation (5G) network, a long-term evolution (LTE) network, a third generation (3G) network, a code division multiple access (CDMA) network, etc.), a public land mobile network (PLMN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), a telephone network (e.g., a public switched telephone network (PSTN)), a private network, an ad hoc network, an intranet, the Internet, a fiber-based network, etc., and / or a combination of these or other types of networks.
[0060] Figure 2 The number and arrangement of devices and networks shown are provided as examples. Figure 2 There may be more devices and / or networks, fewer devices and / or networks, different devices and / or networks, or different arrangements of devices and / or networks than those shown. Figure 2Two or more of the devices shown may be implemented in a single device, or Figure 2 The single device shown may be implemented as multiple distributed devices. Additionally or alternatively, one set of devices (eg, one or more devices) of environment 200 may perform one or more functions described as being performed by another set of devices of environment 200.
[0061] Figure 3 yes Figure 2 Device 300 may correspond to user device 210 and / or platform 220. Figure 3 As shown, device 300 may include a bus 310 , a processor 320 , a memory 330 , a storage component 340 , an input component 350 , an output component 360 , and a communication interface 370 .
[0062] The bus 310 includes components that allow communication between components of the device 300. The processor 320 is implemented in hardware, firmware, or a combination of hardware and software. The processor 320 is a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), a microprocessor, a microcontroller, a digital signal processor (DSP), a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or another type of processing component. In some embodiments, the processor 320 includes one or more processors that can be programmed to perform functions. The memory 330 includes a random access memory (RAM), a read-only memory (ROM), and / or another type of dynamic or static storage device (e.g., flash memory, magnetic memory, and / or optical memory), which stores information and / or instructions for use by the processor 320.
[0063] Storage component 340 stores information and / or software related to the operation and use of device 300. For example, storage component 340 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optical disk, and / or a solid-state disk), a compact disk (CD), a digital versatile disk (DVD), a floppy disk, a cassette, a magnetic tape, and / or another type of non-volatile computer-readable medium, and a corresponding drive.
[0064] Input components 350 include components that allow device 300 to receive information, such as through user input, such as a touch screen display, a keyboard, a keypad, a mouse, buttons, switches, and / or a microphone. Additionally or alternatively, input components 350 may include sensors for sensing information (e.g., global positioning system (GPS) components, accelerometers, gyroscopes, and / or actuators). Output components 360 include components that provide output information from device 300, such as a display, a speaker, and / or one or more light emitting diodes (LEDs).
[0065] The communication interface 370 includes a transceiver-like component (e.g., a transceiver and / or a separate receiver and transmitter) that enables the device 300 to communicate with other devices, for example, via a wired connection, a wireless connection, or a combination of wired and wireless connections. The communication interface 370 can allow the device 300 to receive information from another device and / or provide information to another device. For example, the communication interface 370 can include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a Wi-Fi interface, a cellular network interface, etc.
[0066] Device 300 can perform one or more processes described herein. Device 300 can perform these processes in response to processor 320 executing software instructions stored by non-volatile computer readable media (e.g., memory 330 and / or storage component 340). Computer readable media is defined herein as non-volatile memory devices. Memory devices include storage space within a single physical storage device or storage space distributed on multiple physical storage devices.
[0067] The software instructions may be read into the memory 330 and / or storage component 340 from another computer-readable medium or from another device through the communication interface 370. When executed, the software instructions stored in the memory 330 and / or storage component 340 may cause the processor 320 to perform one or more processes described herein. Additionally or alternatively, hardwired circuitry may be used in place of or in combination with software instructions to perform one or more processes described herein. Thus, the embodiments described herein are not limited to any specific combination of hardware circuitry and software.
[0068] Figure 3 The number and arrangement of components shown are provided as examples. Figure 3 Compared to the components shown, device 300 may include more components, fewer components, different components, or components arranged differently. Additionally or alternatively, one set of components (e.g., one or more components) of device 300 may perform one or more functions described as being performed by another set of components of device 300.
[0069] Figure 4 is a functional block diagram of a system 400 for neural network model compression according to an embodiment.
[0070] like Figure 4 As shown, the system 400 includes a parameter reduction module 405, a parameter approximation module 410, a reconstruction module 415, an encoder 420 and a decoder 425.
[0071] The parameter reduction module 405 reduces a set of parameters of the input neural network to obtain an output neural network. The neural network may include parameters and architecture specified by a deep learning framework.
[0072] For example, the parameter reduction module 405 can sparsify (set weights to zero) and / or prune connections of the neural network. In another example, the parameter reduction module 405 can perform matrix decomposition on the parameter tensor of the neural network, decomposing the parameter tensor matrix into a set of smaller parameter tensors. The parameter reduction module 405 can perform these methods in cascade, for example, first sparsifying the weights and then decomposing the resulting matrix.
[0073] The parameter approximation module 410 applies parameter approximation techniques to the parameter tensor extracted from the output neural network obtained from the parameter reduction module 405. For example, these techniques may include any one of quantization, transformation, and prediction or any combination thereof. The parameter approximation module 410 outputs, from the modified second parameter tensor, a first parameter tensor not modified by the parameter approximation module 410, a second parameter tensor modified or approximated by the parameter approximation module 410, and corresponding metadata for reconstructing the original parameter tensor not modified by the parameter approximation module 410.
[0074] The reconstruction module 415 reconstructs the original parameter tensor from the modified second parameter tensor obtained from the parameter approximation module 410 and / or the decoder 425 using the corresponding metadata obtained from the parameter approximation module 410 and / or the decoder 425. The reconstruction module 415 can reconstruct the output neural network using the reconstructed original parameter tensor and the first parameter tensor.
[0075] The encoder 420 may perform entropy encoding on the first parameter tensor, the second parameter tensor, and the corresponding metadata obtained from the parameter approximation module 410. This information may be encoded into a code stream that flows to the decoder 425.
[0076] The decoder 425 may decode the code stream obtained from the encoder 420 to obtain a first parameter tensor, a second parameter tensor, and corresponding metadata.
[0077] System 400 may be implemented in platform 220, and Figure 4 One or more modules of the system may be executed by a device or a group of devices (such as user device 210) that is separate from or includes platform 220.
[0078] The method and apparatus for 3D tree encoding and decoding for compressing a neural network model will now be described in detail.
[0079] CTU3D Partition
[0080] If the lhs tensor is stored in column-major order, or after the transpose of a row-major tensor, the dimension of the weight tensor is typically 4 for convolutional layers with [R][S][C][K] layout, 2 for fully connected layers with [C][K] layout, and 1 for bias and batch norm layers. R / S is the convolution kernel size, C is the input feature size, and K is the output feature size.
[0081] In an embodiment, for a convolutional layer, the 2D [R] [S] dimension is reshaped into a 1D [RS] dimension so that a four-dimensional (4D) tensor [R] [S] [C] [K] is reshaped into a 3D tensor [RS] [C] [K]. A fully connected layer is considered as a special case of a 3D tensor with R = S = 1.
[0082] Since the kernel size RS is usually much smaller than C / K, the 3D tensor [RS][C][K] is partitioned into non-overlapping smaller blocks (CTU3D) along the [C][K] plane. Each CTU3D has the shape of [RS][ctu3d_height][ctu3d_width], where ctu3d_height=max_ctu3d_height, ctu3d_width=max_ctu3d_width, and max_ctu3d_height / max_ctu3d_width is encoded in the model header. For CTU3D located on the right and / or bottom of the tensor, its ctu3d_height is the remainder of C / max_ctu3d_height, and its ctu3d_width is the remainder of K / max_ctu3d_width.
[0083] like Figure 5 As shown, for CTU3D 505 at the right and / or bottom of the tensor, the parent CU3D node 510 at a given depth may not have all 4 child nodes. For CU3D 510 located at the right and / or bottom of the tensor, cu3d_height is the remainder of max_ctu3d_height / max_cu3d_height, and cu3d_width is the remainder of max_ctu3d_width / max_cu3d_width.
[0084] In a further embodiment, a square partition is used so that max_ctu3d_height=max_ctu3d_width, and the variable max_ctu3d_size is used to represent both max_ctu3d_height and max_ctu3d_width. max_ctu3d_size is defined as 2**N, and the values of N are 8, 16, 32, 64.
[0085] To facilitate on-chip memory requirements in inference operations, in an embodiment, a flag is defined to indicate whether there is a limit on the total CTU3D size for layers with different kernel sizes. A flag equal to 0 indicates that ctu3d_height / ctu3d_width remain unchanged regardless of the kernel size, and in this case, the size of the CTU3D of the convolutional layer is RS times larger than the size of the CTU3D of the fully connected layer. A flag equal to 1 indicates that ctu3d_height / ctu3d_width is scaled based on the kernel size. For example, ctu3d_height=ctu3d_width=int(ctu3d_height*ctu3d_width / R / S).
[0086] Although any scan order may be used to scan and process the CTU3D in the 3D tensor, in an embodiment, the CTU3D is scanned and processed using a raster scan order in either the horizontal direction (SCAN_CK) or the vertical direction (SCAN_KC).
[0087] Examples of the corresponding syntax tables are listed in Table 4-6 below:
[0088] Table 4
[0089]
[0090] Table 5
[0091]
[0092] enable_max_ctu3d_size being 0 indicates that ctu3d_height / ctu3d_width is kept unchanged regardless of the kernel size, and enable_max_ctu3d_size being 1 indicates that ctu3d_height / ctu3d_width is scaled based on the kernelsize.
[0093] max_ctu3d_idx is in the following equation:
[0094] max_ctu_3d_size=(max_ctu3d_idx==0)? 64: (max_ctu3d_idx==1)? 32: (max_ctu3d_idx==2)? 16:8 (1)
[0095] Table 6
[0096]
[0097] layer_scan_order is 0 indicating a raster scan order in the horizontal direction, while layer_scan_order is 1 indicating a raster scan order in the vertical direction.
[0098] Adaptive CU3D Partitioning
[0099] In an embodiment, a CTU / CU adaptive partitioning method applied in a video coding standard is used.
[0100] Use a simplified block structure where CTU3D / CU3D is recursively divided into smaller CU3Ds using a quadtree structure until the maximum recursion depth is reached. Starting from the CTU3D node, the CU3D quadtree is scanned and processed using a depth-first quadtree scan order. Child nodes under the same parent node are scanned and processed in a raster scan order in either the horizontal or vertical direction.
[0101] For CU3Ds of a given quadtree depth, the max_cu3d_height / max_cu3d_width of these CU3Ds are calculated using the following equations (2) and (3), and the maximum recursion depth is reached when max_cu3d_height and max_cu3d_width are less than or equal to a predefined threshold. The threshold can be explicitly included in the bitstream or it can be a predefined number (e.g. 8) so that the decoder can implicitly infer the threshold.
[0102] max_cu3d_height=max_ctu3d_height>>depth (2)
[0103] max_cu3d_width=max_ctu3d_width>>depth (3)
[0104] In a further embodiment, a square partition is used so that max_ctu3d_height = max_ctu3d_width. For a given quadtree depth CU3D, the max_cu3d_size of these CU3Ds is calculated using the following equation (4), and the maximum recursion depth is reached when max_cu3d_size is less than or equal to a predefined threshold. The threshold can be explicitly included in the bitstream or can be a predefined number (e.g., 8) so that the decoder can implicitly infer the threshold.
[0105] max_cu3d_size=max_ctu3d_size>>depth (4)
[0106] like Figure 5 As shown, for CTU3D 505, on the right and / or bottom of the tensor, the parent CU3D node 510 at a given depth may not have all 4 child nodes. For CU3D 510 located on the right and / or bottom of the tensor, cu3d_height is the remainder of max_ctu3d_height / max_cu3d_height, and cu3d_width is the remainder of max_ctu3d_width / max_cu3d_width.
[0107] In a further embodiment, a rate-distortion (RD) based on the encoding algorithm is used to determine whether to split a parent CU3D into multiple smaller child CU3Ds. If the combined RD of these smaller child CU3Ds is less than the RD from the parent CU3D, the parent CU3D will be split into multiple smaller child CU3Ds. Otherwise, the parent CU3D will not be split. A split flag is defined to record the split decision.
[0108] Examples of the corresponding syntax tables are listed in Table 7 and Table 8:
[0109] Table 7
[0110]
[0111] Table 8
[0112]
[0113]
[0114] split_flag is a flag indicating whether to split a parent CU3D into 4 child CU3Ds.
[0115] Kernel Plane Reordering
[0116] As described above, a simplified partitioning structure is used, where a CTU3D / CU3D is recursively divided into smaller CU3Ds using a quadtree structure until a maximum recursion depth is reached.
[0117] In a further embodiment, to facilitate better compression operation, the 2D planes of the RS number within a CU3D or CTU3D may be reordered along the [RS] axis. The reordering index is encoded in the CU3D header so that each CU3D has its own reordering index, or the reordering index is encoded in the CTU3D header so that all CU3Ds in the CTU3D share the same reordering index. A flag is defined to indicate whether the reordering operation is allowed. The flag is encoded in the model header or the layer header.
[0118] zdep_array[RS] is defined to store the reordered indices of RS number of 2D planes. zdep_array[n] indicates that the index n of the reordered 2D plane comes from the index zdep_array[n] of the original 2D plane. Since the first 2D plane does not need to be reordered to another position, zdep_arrya[0] is always 0.
[0119] Because the reordering operation is always performed in a closed form, zdep_array can be scanned starting from next_idx=first_idx, and next_idx=zdep_array[next_idx] is iteratively assigned. A cycle will be found where zdep_array[next_idx]=first_idx. If not all zdep_array indexes are included in the cycle, zdep_array can be scanned continuously starting from the first index that is not included in all previous cycles, and next_idx=zdep_array[next_idx] is iteratively assigned.
[0120] Using the zdep_array scanning method mentioned above, a queue is defined to store the sequence of next_idx. The pseudo code for queue generation is listed below:
[0121]
[0122]
[0123] Based on the reordering method, the contents of the first and last positions of the queue can be inferred, as can the contents of the last position of any given cycle.
[0124] Table 9-11 below lists examples of the corresponding syntax tables:
[0125] Table 9
[0126]
[0127] enable_zdep_reorder is 0, which means that reordering of zdep_array is not allowed. enable_zdep_reorder is 1, which means that reordering of zdep_array is allowed.
[0128] Table 10
[0129]
[0130] Table 11
[0131]
[0132]
[0133]
[0134] reorder_flag is 0, which means that zdep_array is not reordered. reorder_flag is 1, which means that zdep_array is reordered.
[0135] signalled_flag is 0 to indicate that the content of position n in the queue is inferred, and signalled_flag indicates that the content of position n in the queue is signaled.
[0136] qval_minus_one means the content of position n in the queue = qval_minus_one+1.
[0137] In further embodiments, a 3D octree structure, a 3D tag tree structure, a 3D unit tree structure and corresponding encoding methods may be used to encode CU3D.
[0138] 3D Octree Encoding and Decoding
[0139] like Figure 6 As shown, the octree 605 is a tree data structure in which each internal node 610 has exactly eight child nodes 615. The three-dimensional octree is used to partition the three-dimensional tensor 620 by recursively subdividing the three-dimensional tensor 620 into eight octants 625 along the z, y, and x axes.
[0140] In an embodiment, a 3D octree structure may be used to represent the significant (non-zero) status of coefficients in a CU3D.
[0141] The 3D octree (3D-Octree) for CU3D is constructed as follows. The node value of the 3D octree position at the last depth is 1, indicating that the codebook index (if the codebook encoding method is used) or the coefficient (if the direct quantization encoding method is used) in the corresponding CU3D is not zero. The node value of the 3D octree position at the bottom depth is 0, indicating that the codebook index or coefficient in the corresponding CU3D is zero. The node value of the 3D octree position at another depth is defined as the maximum or minimum value of its eight child nodes.
[0142] After constructing the 3D octree, all nodes are scanned using a predefined scan order to encode the corresponding node values.
[0143] In one embodiment, starting from the top node, all child nodes are scanned using a depth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0,0)->(0,0,1)->(0,1,0)->(0,1,1)->(1,0,0)->(1,0,1)->(1,1,0)->(1,1,1).
[0144] In another embodiment, starting from the top node, all child nodes are scanned using a breadth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0,0)->(0,0,1)->(0,1,0)->(0,1,1)->(1,0,0)->(1,0,1)->(1,1,0)->(1,1,1).
[0145] Several node skipping methods are introduced to obtain a compact representation of the codestream.
[0146] If the node value of the 3D octree position at another depth is defined as the maximum value of its eight child nodes, and if the value of the parent node is 0, then the scanning and encoding of the child nodes of the parent node (and the child nodes of these child nodes) are skipped, because their values should always be 0. If the value of the parent node is 1 and the values of all child nodes except the last child node are 0, then the last child node is still scanned, but the encoding of the last child node value is skipped, because it should always be 1.
[0147] If the node value of the 3D octree position at another depth is defined as the minimum value of its eight child nodes, and if the value of the parent node is 1, then the scanning and encoding of the child nodes of the parent node (and the child nodes of these child nodes) are skipped, because their values should always be 1. If the value of the parent node is 0 and the values of all child nodes except the last child node are 1, then the last child node is still scanned, but the encoding of the value of the last child node is skipped, because it should always be 0.
[0148] encoding_start_depth is defined to indicate the first depth involved in the encoding process. When scanning all nodes using a predefined scanning order, if the depth of the current node exceeds encoding_start_depth, the encoding of the node value is skipped.
[0149] When the value of the node at the bottom depth is 1, if the codebook encoding and decoding method is used, the non-zero codebook index corresponding to the value of the node is encoded. If the direct quantization encoding and decoding method is used, the sign bit of the non-zero coefficient corresponding to the value of the node is encoded, and then the absolute value of the non-zero coefficient is encoded.
[0150] For some CU3Ds with different depth / height / width, there are not enough coefficients to build a complete 3D octree in which all parent nodes have all eight available child nodes. If a parent node does not have all eight child nodes, scanning and encoding of these non-existent child nodes will be skipped.
[0151] Table 12 below lists examples of the corresponding syntax tables:
[0152] Table 12
[0153]
[0154]
[0155]
[0156]
[0157]
[0158] 3D Marker Tree Encoding and Decoding
[0159] In an embodiment, a 3D label tree structure may be used to represent the absolute values of coefficients in a CU3D.
[0160] The 3D label tree for CU3D is constructed as follows. The node value of the 3D label tree position at the last depth indicates that the absolute value of the codebook index in the corresponding CU3D (if the codebook codec method is used) or the absolute coefficient (if the direct quantization codec method is used) is not zero. The node value of the 3D label tree position at another depth is defined as the maximum or minimum value of the eight child nodes of the node at that position.
[0161] After the 3D label tree is constructed, all nodes are scanned using a predefined scanning order to encode the corresponding node values.
[0162] In one embodiment, starting from the top node, all child nodes are scanned using a depth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0,0)->(0,0,1)->(0,1,0)->(0,1,1)->(1,0,0)->(1,0,1)->(1,1,0)->(1,1,1).
[0163] In another embodiment, starting from the top node, all child nodes are scanned using a breadth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0,0)->(0,0,1)->(0,1,0)->(0,1,1)->(1,0,0)->(1,0,1)->(1,1,0)->(1,1,1).
[0164] If the node is a top node without a parent node, the corresponding node value is encoded. For any child node, the difference between the parent node and the child node is encoded. Several node skipping methods are introduced to obtain a compact representation of the code stream.
[0165] If the node value of the 3D mark tree position at another depth is defined as the maximum value of the eight child nodes of the node at that position, and if the value of the parent node is 0, then the scanning and encoding of the child nodes of the parent node (and the child nodes of these child nodes) are skipped, because their values should always be 0. If the value of the parent node is X and the values of all child nodes except the last child node are less than X, the last child node is still scanned, but the encoding of the value of the last child node is skipped, because the last child node should always be X.
[0166] If the node value of a 3D marker tree position at another depth is defined as the minimum value of the eight child nodes of the node at that position, and if the value of the parent node is X and the values of all child nodes except the last child node are greater than X, the last child node is still scanned, but the encoding of the last child node value is skipped because it should always be X.
[0167] encoding_start_depth is defined to indicate the first depth involved in the encoding process. When scanning all nodes using the predefined scan order, if the depth of the current node exceeds encoding_start_depth, the encoding of the value of the current node is skipped. If the depth of the current node is equal to encoding_start_depth, the actual value is encoded instead of the difference between the parent node and the current node.
[0168] If the value of the node at the bottom depth is not zero and the direct quantization coding method is used, the sign bit of the non-zero coefficient corresponding to the node is encoded.
[0169] For some CU3Ds with different depth / height / width, there are not enough coefficients to build a complete 3D tag tree in which all parent nodes have all eight available child nodes. If a parent node does not have all eight child nodes, scanning and encoding of these non-existent child nodes will be skipped.
[0170] An example of the corresponding syntax table is listed in Table 13 below:
[0171] Table 13
[0172]
[0173]
[0174]
[0175]
[0176]
[0177]
[0178] Escape Codec
[0179] In the codebook encoding and decoding method, the escape index is a special index, where the coefficient represented by the escape index can have different quantized coefficient values. The quantized coefficient values of all escape indexes need to be explicitly encoded in the bitstream.
[0180] After completing the 3D octree or 3D tag tree encoding, if the codebook encoding and decoding method is used, the escape encoding process is started. Scan all codebook indexes, and if an escape index is found, encode the non-zero flag of the corresponding quantized coefficient value. If the coefficient value is not zero, encode the sign bit, which is followed by the absolute value of the quantized coefficient value.
[0181] An example of the corresponding syntax table is listed in Table 14 below:
[0182] Table 14
[0183]
[0184] nzflag non-zero flag
[0185] sign
[0186] abs_q quantization coefficient q = (sign? - int (abs_q): abs_q)
[0187] CTU3D Head
[0188] The codec algorithm can be applied to use the 3D octree method and the 3D tag tree method, and a mode with better RD is selected as the winner. The mode decision is recorded, and ctu3d_map_mode_flag is defined to indicate whether all CU3Ds in this ctu3d share the same map_mode. enable_start_depth is also defined to indicate whether CU3D codec can start from a depth other than the bottom depth.
[0189] Examples of the corresponding syntax tables are listed in Tables 15 and 16 below:
[0190] Table 15
[0191]
[0192] Table 16
[0193]
[0194] ctu3d_map_mode_flag is 0, which means each cu3d uses its own map_mode. ctu3d_map_mode_flag is 1, which means all cu3d share one map_mode.
[0195] A map_mode of 0 indicates that the 3D octree encoding and decoding method is selected, and a map_mode of 1 indicates that the 3D cousin tree encoding and decoding method is selected.
[0196] enable_start_depth is 0 means cu3d encoding always starts from the bottom depth, enable_start_depth is 1 means cu3d encoding can start from a depth other than the bottom depth.
[0197] Mode Decision
[0198] The encoding and decoding algorithm can be applied to use the 3D octree method and the 3D label tree method, and a mode with better RD is selected as the winner. The mode decision is recorded in the CU3D syntax section. The CU3D syntax section also records encoding_start_depth.
[0199] Table 17 below lists examples of the corresponding syntax tables:
[0200] Table 17
[0201]
[0202] A map_mode of 0 indicates that the 3D octree method is selected, and a map_mode of 1 indicates that the 3D marker tree method is selected.
[0203] start_depth_delta start_depth=total_depth-1-start_depth_delta
[0204] 3D unit number encoding and decoding
[0205] If the node value of the 3D octree position at another depth is defined as the maximum value of the eight child nodes of the node at that position, then the node value is zero, indicating that all child nodes of the node (and all child nodes of the child nodes, including the node at the last depth) have the same zero value. The zero value of the node at the last depth indicates that the corresponding codebook index or coefficient is also zero.
[0206] In an embodiment, the above requirement is relaxed so that the aforementioned identical value can be any value, not just zero.
[0207] The 3D unit tree (3D-Unitree) for CU3D is constructed as follows. The node value of the 3D unit tree position at other depths except the last depth is 1, indicating that the child nodes of the node at this position (and the child nodes of these child nodes, including the node at the last depth) have non-uniform (different) values. The node value of the 3D unit tree position at other depths except the last depth is 0, indicating that all the child nodes of the node at this position (and the child nodes of all the child nodes, including the node at the last depth) have uniform (same) values.
[0208] For nodes at the last depth with the same parent node, if the codebook index in the corresponding CU3D (if the codebook encoding method is used) or the absolute value of the coefficient (if the direct quantization encoding method is used) has a non-uniform value, the value 1 is assigned to these nodes. If the codebook index in the corresponding CU3D (if the codebook encoding method is used) or the absolute value of the coefficient (if the direct quantization encoding method is used) has a uniform value (including zero) of any value, the value 0 is assigned to these nodes.
[0209] After the 3D cell tree is constructed, all nodes are scanned using a predefined scan order to encode the corresponding node values.
[0210] In one embodiment, starting from the top node, all child nodes are scanned using a depth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0,0)->(0,0,1)->(0,1,0)->(0,1,1)->(1,0,0)->(1,0,1)->(1,1,0)->(1,1,1).
[0211] In another embodiment, starting from the top node, all child nodes are scanned using a breadth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0,0)->(0,0,1)->(0,1,0)->(0,1,1)->(1,0,0)->(1,0,1)->(1,1,0)->(1,1,1).
[0212] In order to obtain a compact representation of the code stream, after encoding the value of a given node, if the value of the given node is zero, the uniform value corresponding to the given node is also encoded, but the scanning and encoding of the child nodes of the given node (and the child nodes of these child nodes) are skipped because their values should always be equal to the uniform value.
[0213] encoding_start_depth is defined to indicate the first depth involved in the encoding process. When scanning all nodes using a predefined scanning order, if the depth of the current node exceeds encoding_start_depth, the encoding of the node value is skipped.
[0214] When reaching the node at the last depth, if encoding_start_depth is the last depth or the parent node value of the node at the last depth is not zero, the codebook index or coefficient corresponding to the node at the last depth is encoded into the bitstream. Otherwise, if the direct quantization encoding and decoding method is used and the corresponding uniform value at the last depth is not zero, the sign bit of the coefficient is encoded into the bitstream.
[0215] For some CU3Ds with different depth / height / width, there are not enough coefficients to build a complete 3D octree where all parent nodes have all eight available child nodes. If a parent node does not have all eight child nodes, scanning and encoding of these non-existent child nodes will be skipped.
[0216] An example of the corresponding syntax table is listed in Table 18 below:
[0217] Table 18
[0218]
[0219]
[0220]
[0221]
[0222]
[0223] CTU3D Head
[0224] The codec algorithm is applied when using the 3D octree method and the 3D tag tree method, and the 3D cell tree method is also applied when using the 3D octree method. A mode with better RD is selected as the winner. The mode decision is recorded, and ctu3d_map_mode_flag is defined to indicate whether all CU3Ds in this CTU3D share the same map_mode. enable_start_depth is also defined to indicate whether CU3D codec can start from a depth other than the bottom depth.
[0225] Mode Decision
[0226] The codec algorithm is applied when using the 3D octree method and the 3D label tree method, and the 3D cell tree method is also applied when using the 3D octree method. One mode with better RD is selected as the winner. The mode decision is documented in the CU3D syntax section.
[0227] Table 19 below lists examples of the corresponding syntax tables:
[0228] Table 19
[0229]
[0230] A map_mode of 0 indicates that the 3D octree method is selected, and a map_mode of 1 indicates that the 3D marker tree method is selected.
[0231] start_depth_delta start_depth=total_depth-1-start_depth_delta
[0232] A uni_mode of 0 indicates that the 3D octree method is selected, and a uni_mode of 1 indicates that the 3D unit tree method is selected.
[0233] Improvement of tree encoding and decoding method
[0234] In the original disclosure, tree[z][y][x] is used to access the position [z][y][x] at the last depth of a 3D tree (3D octree, 3D cell tree, or 3D tag tree), and map[z][y][x] is used to access the index map of CU3D.
[0235] Since zdep_array[n] represents the original nth 2D plane before the kernel plane reordering operation, the kernel plane reordering operation requires that the z axis be indexed by zdep_array[n] instead of n.
[0236] In an embodiment, the z-axis access of the encoding and decoding method is modified so that tree[zdep_array[z]][y][x] is used to access the position [z][y][x] at the last depth of the 3D tree (3D octree, 3D unit tree or 3D tag tree), and map[zdep_array[z]][y][x] is used to access the index map of CU3D.
[0237] Examples of corresponding syntax table modifications are listed in Tables 20 and 21 below:
[0238] Table 20: Original syntax table
[0239]
[0240]
[0241]
[0242] To process the 2D plane at the last depth, the variable zs_idx is defined as the new z_idx.
[0243] Table 21: Modified syntax table
[0244]
[0245]
[0246]
[0247] In a further embodiment, additional 3D tag tree modes, corresponding flags and corresponding encoding methods are used to encode CU3D.
[0248] 3D Marker Tree Mode Decision
[0249] As described above, one version of the 3D tag tree is to define the node value of a 3D tag tree position as the maximum value of the eight children of the node at that position (tagtree3d). Another version of the 3D tag tree is to define the node value of a 3D tag tree position as the minimum value of the eight children of the node at that position (tagtree3dm). One of the two versions of the 3D tag is used to encode CU3D.
[0250] In an alternative embodiment, the CU3D is encoded using two versions of the 3D label tree, and the candidate with the best RD is selected as the winner.
[0251] Specifically, the encoding algorithm can use the 3D octree method and the 3D tag tree method. The 3D cell tree method is applied when the 3D octree method is used, and the two versions of the 3D tag tree method are applied when the 3D tag tree method is used. The mode with better RD is selected as the winner, and the mode decision is recorded in the cu3d syntax section.
[0252] Table 22 below lists an example of the syntax table corresponding to the tagtree3d mode decision:
[0253] Table 22
[0254]
[0255] A map_mode of 0 indicates that the octree method is selected, and a map_mode of 1 indicates that the Tagtree3d method is selected.
[0256] start_depth_delta start_depth=total_depth-1-start_depth_delta
[0257] A uni_mode of 0 indicates that the octree method is selected, and a uni_mode of 1 indicates that the Unitree3d method is selected.
[0258] A tgt_mode of 0 indicates that version 1 of the 3D tag tree (tagtree3d) method is selected, and a tgt_mode of 1 indicates that version 2 of the 3D tag tree (tagtree3d) method is selected.
[0259] Table 23 below lists the corresponding syntax examples for tagtree3d encoding and decoding method 1:
[0260] Table 23
[0261]
[0262]
[0263]
[0264]
[0265] nzflag_index Non-zero flag indexed
[0266] index index value
[0267] delta_index index value = parent node index value - delta_index
[0268] nzflag_q Non-zero flag for quantized coefficients
[0269] abs_q absolute value of the quantization coefficient
[0270] delta_abs_q absolute value of quantization coefficient = parent node value - delta_abs_q
[0271] sign_q The sign bit of the quantized coefficient
[0272] Table 24 below lists an example of the syntax table corresponding to tagtree3d encoding method 2:
[0273] Table 24
[0274]
[0275]
[0276]
[0277]
[0278]
[0279]
[0280] CU3D is encoded using the additional 3D tag tree modes, corresponding flags and corresponding encoding methods.
[0281] Combined 3D cell tree and marker tree encoding and decoding
[0282] Uniform coefficients and non-uniform coefficients can coexist in one CU3D, so such a CU3D can be encoded using a combination of the 3D unit tree coding method and the 3D tag tree coding method.
[0283] Both the 3D tag tree and the 3D unit tree are constructed using the 3D tag tree and 3D unit tree construction methods. After the 3D tag tree and the 3D unit tree are constructed, all nodes are scanned using a predefined scanning order to encode corresponding node values.
[0284] In one embodiment, starting from the top node, all child nodes are scanned using a depth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0,0)->(0,0,1)->(0,1,0)->(0,1,1)->(1,0,0)->(1,0,1)->(1,1,0)->(1,1,1).
[0285] In another embodiment, starting from the top node, all child nodes are scanned using a breadth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0,0)->(0,0,1)->(0,1,0)->(0,1,1)->(1,0,0)->(1,0,1)->(1,1,0)->(1,1,1).
[0286] In order to obtain a compact representation of the code stream, the value of a given node from the 3D unit tree is first encoded. If the 3D unit tree node value is zero, the uniform value corresponding to the 3D unit tree node is encoded, and the scanning and encoding of the child nodes of the 3D unit tree node (and the child nodes of these child nodes) are skipped because their values should always be equal to the uniform value. If the 3D unit tree node value is not zero, the 3D tag tree value (if the node is a top node without a parent node) or the difference between the 3D tag tree value of the parent node and the child nodes of the parent node is encoded using the 3D tag tree encoding and decoding method. The node skipping method introduced in the above-mentioned tag tree encoding and decoding part is also adopted.
[0287] encoding_start_depth is defined to indicate the first depth involved in the encoding process. When scanning all nodes using a predefined scanning order, if the depth of the current node exceeds encoding_start_depth, the encoding of the current node value is skipped.
[0288] If the node at the last depth is reached, and if the value of the node at the bottom depth is not zero and the direct quantization encoding and decoding method is used, the sign bit of the non-zero coefficient corresponding to the node is encoded.
[0289] For some CU3Ds with different depth / height / width, there are not enough coefficients to build a complete 3D octree in which all parent nodes have all eight available child nodes. If a parent node does not have all eight child nodes, the scanning and encoding of these non-existent child nodes is skipped.
[0290] Encoding and decoding of combined 2D cell tree and marker tree
[0291] In an embodiment, the CU3D is encoded using the aforementioned combined 3D unit tree and tag tree codec. In a further embodiment, the 2D plane sequence is encoded independently instead of using a 3D octree structure, and for each independent 2D plane, a 2D unit tree and a 2D tag tree are constructed using a quadtree structure.
[0292] The 3D tag tree and the 3D unit tree are represented using an octree structure. In these embodiments, the 2D tag tree and the 2D unit tree are represented using a quadtree structure. The 2D tag tree and the 2D unit tree are constructed using the same principles as those for constructing the 3D tag tree and the 3D unit tree.
[0293] After constructing the 2D tag tree and the 2D unit tree, all nodes are scanned using a predefined scanning order to encode the corresponding node values.
[0294] In one embodiment, starting from the top node, all child nodes are traversed using a depth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0)->(0,1)->(1,0)->(1,1).
[0295] In another embodiment, starting from the top node, all child nodes are scanned using a breadth-first search. The scanning order of child nodes sharing the same parent node can be arbitrarily defined, such as (0,0)->(0,1)->(1,0)->(1,1).
[0296] In order to obtain a compact representation of the code stream, the value of a given node from the unit tree is first encoded. If the value of a given node of the unit tree is zero, the uniform value corresponding to the given node is encoded, and the scanning and encoding of the child nodes of the given node (and the child nodes of these child nodes) are skipped because their values should always be equal to the uniform value. If the value of a given node of the unit tree is not zero, the difference in the marked tree value (if the node is a top node without a parent node) or the marked tree value between the parent node and the child nodes of the parent node is encoded using the marked tree encoding and decoding method. The node skipping method introduced in the above-mentioned marked tree encoding and decoding part is also adopted.
[0297] encoding_start_depth is defined to indicate the first depth involved in the encoding process. When scanning all nodes using a predefined scanning order, if the depth of the current node exceeds encoding_start_depth, the encoding of the current node value is skipped.
[0298] If the node at the last depth is reached, and if the value of the node at the bottom depth is not zero and the direct quantization encoding and decoding method is used, the sign bit of the non-zero coefficient corresponding to the node at the last depth is encoded.
[0299] After the encoding of one 2D plane is completed, the encoding of the next 2D plane begins, and the process is repeated until the last 2D plane is encoded.
[0300] For some CU3Ds with different heights / widths, there are not enough coefficients to construct a complete 2D quadtree in which all parent nodes have all four available child nodes. If a parent node does not have all four child nodes, scanning and encoding of these non-existent child nodes is skipped.
[0301] Mode Decision
[0302] Along with other codecs, CU3D may be encoded using a combined unit tree and tag tree codec, and the candidate with the best RD among all codecs is selected as the winner.
[0303] Specifically, the codec algorithm uses both the 3D octree method and the 3D tag tree method. The 3D unit tree method is applied when the 3D octree method is used, and the combined -unit tree-tag tree method is applied when the 3D tag tree method is used. The mode with better RD in the 3D octree method and the 3D tag tree method is selected as the winner, and the mode decision is recorded in the cu3d syntax section.
[0304] An example of the corresponding syntax table for tagtree3d mode decision is listed in Table 25 below:
[0305] Table 25
[0306]
[0307]
[0308] A map_mode of 0 indicates that the octree method is selected, and a map_mode of 1 indicates that the Tagtree3d method is selected.
[0309] start_depth_delta start_depth=total_depth-1-start_depth_delta
[0310] A cbook_esc_mode of 0 means that escapes are not reordered, and a cbook_esc_mode of 1 means that escapes are reordered.
[0311] A uni_mode of 0 indicates that the octree method is selected, and a uni_mode of 1 indicates that the Unitree3d method is selected.
[0312] A tgt_mode of 0 indicates that the uni_tgtree3d method is selected, and a tgt_mode of 1 indicates that the Tagtree3d method is selected.
[0313] Table 26 below lists an example of a corresponding syntax table for the uni_tagtree3d encoding and decoding method:
[0314] Table 26
[0315]
[0316]
[0317]
[0318]
[0319]
[0320] Figure 7 is a flow chart of a method 700 for adaptive block partitioning of a neural network model compression according to an embodiment. In some implementations, Figure 7 One or more processing blocks of may be executed by platform 220. In some embodiments, Figure 7 One or more processing blocks of may be performed by another device or group of devices (eg, user device 210) that is separate from or includes platform 220.
[0321] like Figure 7 As shown, in operation 710, method 700 includes reshaping a four-dimensional 4D parameter tensor of a neural network into a 3D parameter tensor of the neural network, where the 3D parameter tensor includes a convolution kernel size, an input feature size, and an output feature size.
[0322] In operation 720 , the method 700 includes partitioning the 3D parameter tensor into 3D codec tree units CTU3D along a plane formed by the input feature size and the output feature size.
[0323] In operation 730, the method 700 includes recursively partitioning each of the CTU3Ds into a plurality of 3D codec units CU3D using a quadtree, up to a predetermined depth. It should be noted that the maximum depth may be zero, which means that the CTU3D does not need to be partitioned into CU3Ds.
[0324] In operation 740 , method 700 includes building a 3D tree for each of the plurality of CU3Ds.
[0325] In operation 750 , the method 700 includes entropy encoding each of a plurality of values of a plurality of nodes of the 3D tree.
[0326] In some embodiments, the 3D tree may be a 3D octree. Based on the codebook index or coefficient of each CU3D in the plurality of CU3Ds not being 0, the value of the node included in the last depth of the 3D octree may be 1. Based on the codebook index or coefficient of each CU3D in the plurality of CU3Ds being zero, the value of the node included in the last depth of the 3D octree may be 0. The value of a parent node at another depth of the 3D octree other than the last depth may be the maximum value or minimum value of the child nodes of the parent node.
[0327] In some embodiments, the 3D tree may be a first 3D label tree. Based on the absolute value of the codebook index or coefficient of each CU3D among the multiple CU3Ds being not 0, the value of the node included in the last depth of the first 3D label tree may be 1. Based on the absolute value of the codebook index or coefficient of each CU3D among the multiple CU3Ds being 0, the value of the node included in the last depth of the first 3D label tree may be 0. The value of the parent node at another depth of the first 3D label tree other than the last depth may be the maximum value of the child nodes of the parent node.
[0328] The method 700 may further include: constructing a second 3D label tree for each of the multiple CU3Ds. Based on the absolute value of the codebook index or coefficient of each CU3D in the multiple CU3Ds being not 0, the value of the node included in the last depth of the second 3D label tree may be 1. Based on the absolute value of the codebook index or coefficient of each CU3D in the multiple CU3Ds being 0, the value of the node included in the last depth of the second 3D label tree may be 0. The value of the parent node at another depth of the second 3D label tree other than the last depth may be the minimum value of the child nodes of the parent node of the second 3D label tree. The method 700 may further include entropy encoding each of the multiple values of the multiple nodes of the second 3D label tree, and selecting the entropy encoded multiple values of the multiple nodes of the one with higher rate distortion from the first 3D label tree and the second 3D label tree.
[0329] In some embodiments, the 3D tree may be a 3D unit tree. Based on the child nodes of the parent node of the 3D unit tree having different values, the value of the parent node may be 1, wherein the parent node is a parent node included in the depth other than the last depth of the 3D unit tree. Based on the child nodes of the parent node having the same value, the value of the parent node may be 0. Based on the absolute values of the codebook indexes or coefficients of each CU3D in a plurality of CU3Ds having different values, the value of the node included in the last depth may be 1. Based on the absolute values of the codebook indexes or coefficients of each CU3D in a plurality of CU3Ds having the same value, the value of the node included in the last depth may be 0.
[0330] The method 700 may further include: constructing a 3D label tree for each of the plurality of CU3Ds. Based on the absolute value of the codebook index or coefficient of each CU3D in the plurality of CU3Ds not being 0, the value of the node included in the last depth of the 3D label tree may be 1. Based on the absolute value of the codebook index or coefficient of each CU3D in the plurality of CU3Ds being 0, the value of the node included in the last depth of the 3D label tree may be 0. The value of the parent node at another depth of the 3D label tree other than the last depth may be the minimum value of the child nodes of the parent node at the other depth of the 3D label tree. Entropy encoding each of multiple values of multiple nodes of a 3D tree may include: entropy encoding the value of a current node of the 3D unit tree; skipping entropy encoding of values of child nodes of the current node of the 3D unit tree based on the entropy encoded value of the current node of the 3D unit tree being 0; entropy encoding the value of the current node of the 3D label tree corresponding to the current node of the 3D unit tree based on the entropy encoded value of the current node of the 3D unit tree being non-0 and the current node of the 3D unit tree being the top node; and entropy encoding the difference between the value of the current node of the 3D label tree and the value of the parent node of the current node of the 3D label tree based on the entropy encoded value of the current node of the 3D unit tree being non-0 and the current node of the 3D unit tree being not the top node.
[0331] The method 700 may further include: reordering two-dimensional 2D planes in the CTU3D and at least one of the plurality of CU3Ds along an axis formed by the convolution kernel size to generate reordering indexes corresponding to the order of the 2D planes, respectively, and encoding the reordering indexes in a header of the CTU3D and at least one of the plurality of CU3Ds.
[0332] although Figure 7 Example blocks of method 700 are shown, but in some implementations, method 700 may include additional blocks, fewer blocks, different blocks, or different blocks. Figure 7 In addition, or alternatively, two or more blocks of method 700 may be performed in parallel.
[0333] Figure 8 8 is a diagram of an apparatus 800 for adaptive block partitioning of a neural network model compression according to an embodiment. Figure 8 As shown, the apparatus 800 includes a reshaping code 810 , a first partition code 820 , a second partition code 830 , a first construction code 840 , and a first entropy coding code 850 .
[0334] The reshaping code 810 is configured to cause at least one processor of the device 800 to reshape a four-dimensional 4D parameter tensor of the neural network into a 3D parameter tensor of the neural network, wherein the 3D parameter tensor includes a convolution kernel size, an input feature size, and an output feature size.
[0335] The first partitioning code 820 is configured to cause the at least one processor to partition the 3D parameter tensor into 3D codec tree units CTU3D along a plane formed by the input feature size and the output feature size.
[0336] The second partitioning code 830 is configured to cause the at least one processor to recursively partition each of the CTU3Ds into a plurality of 3D codec units CU3Ds using a quadtree until a predetermined depth.
[0337] The first construction code 840 is configured to cause the at least one processor to: construct a 3D tree for each of the plurality of CU3Ds.
[0338] The first entropy encoding code 850 is configured to cause the at least one processor to entropy encode each of a plurality of values of a plurality of nodes of the 3D tree.
[0339] In some embodiments, the 3D tree may be a 3D octree. Based on the codebook index or coefficient of each CU3D in the plurality of CU3Ds not being 0, the value of the node included in the last depth of the 3D octree may be 1. Based on the codebook index or coefficient of each CU3D in the plurality of CU3Ds being zero, the value of the node included in the last depth of the 3D octree may be 0. The value of a parent node at another depth of the 3D octree other than the last depth may be the maximum value or minimum value of the child nodes of the parent node.
[0340] In some embodiments, the 3D tree may be a first 3D label tree. Based on the absolute value of the codebook index or coefficient of each CU3D among the multiple CU3Ds being not 0, the value of the node included in the last depth of the first 3D label tree may be 1. Based on the absolute value of the codebook index or coefficient of each CU3D among the multiple CU3Ds being 0, the value of the node included in the last depth of the first 3D label tree may be 0. The value of the parent node at another depth of the first 3D label tree other than the last depth may be the maximum value of the child nodes of the parent node at the other depth.
[0341] The device 800 may further include a second construction code 860. The second construction code 860 is configured to cause the at least one processor to: construct a second 3D label tree for each of the multiple CU3Ds. Based on the absolute value of the codebook index or coefficient of each CU3D in the multiple CU3Ds being not 0, the value of the node included in the last depth of the second 3D label tree may be 1. Based on the absolute value of the codebook index or coefficient of each CU3D in the multiple CU3Ds being 0, the value of the node included in the last depth of the second 3D label tree may be 0. The value of the parent node at another depth of the second 3D label tree other than the last depth may be the minimum value of the child nodes of the parent node of the second 3D label tree. The device 800 may further include a second entropy encoding code 870 and a selection code 880. The second entropy encoding code 870 is configured to cause the at least one processor to: entropy encode each of the multiple values of the multiple nodes of the second 3D label tree. And the selection code 880 is configured to cause the at least one processor to: select, from among the first 3D label tree and the second 3D label tree, the entropy-encoded multiple values of the multiple nodes of the one with higher rate distortion.
[0342] In some embodiments, the 3D tree may be a 3D unit tree. Based on the child nodes of the parent node of the 3D unit tree having different values, the value of the parent node may be 1, wherein the parent node is a parent node included in the depth of the 3D unit tree except the last depth. Based on the child nodes of the parent node having the same value, the value of the parent node may be 0. Based on the absolute values of the codebook indexes or coefficients of each CU3D in a plurality of CU3Ds having different values, the value of the node included in the last depth may be 1. Based on the absolute values of the codebook indexes or coefficients of each CU3D in a plurality of CU3Ds having the same value, the value of the node included in the last depth may be 0.
[0343] The second construction code 860 is further configured to cause the at least one processor to: construct a 3D label tree for each of the plurality of CU3Ds. Based on the absolute value of the codebook index or coefficient of each CU3D in the plurality of CU3Ds being not 0, the value of the node included in the last depth of the 3D label tree may be 1. Based on the absolute value of the codebook index or coefficient of each CU3D in the plurality of CU3Ds being 0, the value of the node included in the last depth of the 3D label tree may be 0. The value of the parent node at another depth of the 3D label tree other than the last depth may be the minimum value of the child nodes of the parent node at the other depth of the 3D label tree. The first entropy coding code 850 is further configured to cause the at least one processor to: entropy encode the value of the current node of the 3D unit tree; skip entropy encoding the values of the child nodes of the current node of the 3D unit tree based on the entropy encoded value of the current node of the 3D unit tree being 0; entropy encode the value of the current node of the 3D label tree corresponding to the current node of the 3D unit tree based on the entropy encoded value of the current node of the 3D unit tree being non-0 and the current node of the 3D unit tree being the top node; and entropy encode the difference between the value of the current node of the 3D label tree and the value of the parent node of the current node of the 3D label tree based on the entropy encoded value of the current node of the 3D unit tree being non-0 and the current node of the 3D unit tree being not the top node.
[0344] The apparatus 800 may further include a reordering code 890 and an encoding code 900. The reordering code 890 is configured to cause at least one processor to reorder two-dimensional 2D planes in at least one of the CTU3D and the plurality of CU3Ds along an axis formed by the convolution kernel size to generate reordering indexes corresponding to the order of the 2D planes, respectively. The encoding code 900 is configured to cause at least one processor to encode the reordering index in a header of the at least one of the CTU3D and the plurality of CU3Ds.
[0345] The above disclosure provides illustration and description, but is not intended to be exhaustive or to limit the implementation to the precise form disclosed. Modifications and variations are possible in light of the above disclosure or may be acquired from practice of the implementation.
[0346] As used herein, the term "component" is broadly interpreted as hardware, firmware, or a combination of hardware and software.
[0347] Obviously, the systems and / or methods described herein can be implemented in various forms of hardware, firmware, or a combination of hardware and software. The actual dedicated control hardware or software code used to implement these systems and / or methods does not limit the implementation. Therefore, the operation and behavior of the systems and / or methods are described herein without reference to specific software codes. It should be understood that software and hardware can be designed to implement the systems and / or methods based on the description herein.
[0348] Even though combinations of features are recited in the claims and / or specification, these combinations are not intended to limit the disclosure of possible implementations. In fact, many of these features can be combined in ways not specifically recited in the claims and / or disclosed in the specification. Although each dependent claim listed below may only directly depend on one claim, the disclosure of possible implementations includes each dependent claim in combination with every other claim in the claim set.
[0349] Unless explicitly stated, any element, behavior or instruction used herein shall not be interpreted as critical or essential. In addition, as used herein, the articles "a" and "an" are intended to include one or more entries and can be used interchangeably with "one or more". In addition, as used herein, the term "set" is intended to include one or more entries (e.g., related entries, unrelated entries, combinations of related and unrelated entries, etc.), and can be used interchangeably with "one or more". If only one entry is used, the term "one" or similar language is used. In addition, as used herein, the terms "has", "have", "having", etc. are intended to be open terms. In addition, unless explicitly stated otherwise, the phrase "based on" means "based at least in part on".
Claims
1. A coding and decoding method, characterized in that: The method comprises: Reshape the four-dimensional 4D parameter tensor of the neural network into a 3D parameter tensor of the neural network, wherein the 3D parameter tensor includes a convolution kernel size, an input feature size, and an output feature size; Partitioning the 3D parameter tensor into 3D codec tree units CTU3D along a plane formed by the input feature size and the output feature size; Recursively partitioning each of the CTU3Ds into a plurality of 3D codec units CU3D using a quadtree until a predetermined depth; constructing a 3D tree for each of the plurality of CU3Ds; and Performing entropy encoding on each of a plurality of values of a plurality of nodes of the 3D tree; Wherein, in the case where the 3D tree includes a first 3D label tree, the first 3D label tree is constructed as follows: Based on the absolute value of the codebook index or coefficient of each CU3D in the plurality of CU3Ds being not 0, the value of the node included in the last depth of the first 3D label tree is 1, Based on the absolute value of the codebook index or the coefficient of the respective CU3Ds in the plurality of CU3Ds being 0, the value of the node included in the last depth of the first 3D label tree is 0, and A value of a parent node at another depth of the first 3D label tree other than the last depth is a maximum value of child nodes of the parent node at the other depth.
2. The method according to claim 1, wherein: In case the 3D tree comprises a 3D octree, Based on the codebook index or coefficient of each CU3D in the plurality of CU3Ds not being 0, the value of the node included in the last depth of the 3D octree is 1, Based on the codebook index or the coefficient of each CU3D in the plurality of CU3Ds being 0, the value of the node included in the last depth of the 3D octree is 0, and A value of a parent node at another depth of the 3D octree other than the final depth is a maximum value or a minimum value of child nodes of the parent node.
3. The method according to claim 1, further comprising: constructing a second 3D label tree for each of the plurality of CU3Ds, The second 3D label tree is constructed as follows: based on the absolute value of the codebook index or the coefficient of each CU3D in the multiple CU3Ds not being 0, the value of the node included in the last depth of the second 3D label tree is 1, Based on the absolute value of the codebook index or the coefficient of the respective CU3Ds in the plurality of CU3Ds being 0, the value of the node included in the last depth of the second 3D label tree is 0, and A value of a parent node at another depth of the second 3D label tree other than the last depth is a minimum value of child nodes of the parent node of the second 3D label tree; entropy encoding each of a plurality of values of a plurality of nodes of the second 3D label tree; and The entropy encoded values of the plurality of nodes of one having a higher rate-distortion are selected from among the first 3D label tree and the second 3D label tree.
4. The method according to claim 1, wherein: In case the 3D tree comprises a 3D cell tree, The 3D unit tree is constructed as follows: child nodes of a parent node of the 3D unit tree have different values, the value of the parent node is 1, wherein the parent node is a parent node included in a depth of the 3D unit tree except for the last depth, Based on the child nodes of the parent node having the same value, the value of the parent node is 0, Based on the absolute values of codebook indices or coefficients of the respective CU3Ds in the plurality of CU3Ds having different values, the value of the node included in the final depth is 1, and Based on the codebook indices or the absolute values of the coefficients of the respective CU3Ds among the plurality of CU3Ds having the same value, the value of the node included in the final depth is 0.
5. The method according to claim 4, further comprising: constructing a 3D label tree for each of the plurality of CU3Ds, The 3D label tree is constructed as follows: based on the absolute value of the codebook index or the coefficient of each CU3D in the multiple CU3Ds being non-0, the value of the node included in the last depth of the 3D label tree is 1, Based on the absolute value of the codebook index or the coefficient of the respective CU3Ds in the plurality of CU3Ds being 0, the value of the node included in the last depth of the 3D label tree is 0, a value of a parent node at another depth of the 3D label tree other than the last depth, being a minimum value of child nodes of the parent node at the other depth of the 3D label tree; and The entropy encoding each of the multiple values of the multiple nodes of the 3D tree comprises: Performing entropy coding on the value of the current node of the 3D unit tree; Based on the entropy coded value of the current node of the 3D unit tree being 0, skipping entropy coding of values of child nodes of the current node of the 3D unit tree; Based on the entropy-encoded value of the current node of the 3D unit tree being non-zero and the current node of the 3D unit tree being a top node, entropy-encode a value of a current node of the 3D tag tree corresponding to the current node of the 3D unit tree; and Based on the entropy encoded value of the current node of the 3D unit tree being non-zero and the current node of the 3D unit tree not being the top node, entropy encoding a difference between the value of the current node of the 3D label tree and a value of a parent node of the current node of the 3D label tree.
6. The method according to any one of claims 1 to 5, further comprising: reordering two-dimensional 2D planes in at least one of the CTU3D and the plurality of CU3Ds along an axis formed by the convolution kernel size to generate reordering indexes respectively corresponding to the order of the 2D planes; and The reordering index is encoded in a header of the at least one of the CTU3D and the plurality of CU3Ds.
7. A coding and decoding device, characterized in that: The device comprises: at least one memory configured to store program code; and At least one processor is configured to read the program code and operate according to instructions of the program code to execute the method according to any one of claims 1 to 6.
8. A coding and decoding device, characterized in that: The device comprises: A reshaping unit, reshaping a four-dimensional 4D parameter tensor of a neural network into a 3D parameter tensor of the neural network, wherein the 3D parameter tensor includes a convolution kernel size, an input feature size, and an output feature size; A first partitioning unit, partitioning the 3D parameter tensor into 3D codec tree units CTU3D along a plane formed by the input feature size and the output feature size; A second partitioning unit, using a quadtree, recursively partitions each of the CTU3Ds into a plurality of 3D codec units CU3Ds until a predetermined depth; A first construction unit constructs a 3D tree for each of the plurality of CU3Ds; and A first entropy coding unit performs entropy coding on each of a plurality of values of a plurality of nodes of the 3D tree; Wherein, in the case where the 3D tree includes a first 3D label tree, the first 3D label tree is constructed as follows: Based on the absolute value of the codebook index or coefficient of each CU3D in the plurality of CU3Ds being not 0, the value of the node included in the last depth of the first 3D label tree is 1, Based on the absolute value of the codebook index or the coefficient of the respective CU3Ds in the plurality of CU3Ds being 0, the value of the node included in the last depth of the first 3D label tree is 0, and A value of a parent node at another depth of the first 3D label tree other than the last depth is a maximum value of child nodes of the parent node at the other depth.
9. The device according to claim 8, wherein: In case the 3D tree comprises a 3D octree, Based on the codebook index or coefficient of each CU3D in the plurality of CU3Ds not being 0, the value of the node included in the last depth of the 3D octree is 1, Based on the codebook index or the coefficient of each CU3D in the plurality of CU3Ds being 0, the value of the node included in the last depth of the 3D octree is 0, and A value of a parent node at another depth of the 3D octree other than the final depth is a maximum value or a minimum value of child nodes of the parent node.
10. The apparatus according to claim 8, further comprising: The second construction unit is configured to cause the at least one processor to: construct a second 3D tag tree for each of the plurality of CU3Ds; The second 3D label tree is constructed as follows: based on the absolute value of the codebook index or the coefficient of each CU3D in the multiple CU3Ds not being 0, the value of the node included in the last depth of the second 3D label tree is 1, Based on the absolute value of the codebook index or the coefficient of the respective CU3Ds in the plurality of CU3Ds being 0, the value of the node included in the last depth of the second 3D label tree is 0, and A value of a parent node at another depth of the second 3D label tree other than the last depth is a minimum value of child nodes of the parent node of the second 3D label tree; A second entropy encoding unit is configured to cause the at least one processor to: perform entropy encoding on each of a plurality of values of a plurality of nodes of the second 3D label tree; and A selection unit is configured to cause the at least one processor to select, from among the first 3D label tree and the second 3D label tree, the entropy-encoded values of the plurality of nodes of the one with a higher rate-distortion.
11. The device according to claim 8, wherein: In case the 3D tree comprises a 3D cell tree, The 3D unit tree is constructed as follows: child nodes of a parent node of the 3D unit tree have different values, the value of the parent node is 1, wherein the parent node is a parent node included in a depth of the 3D unit tree except for the last depth, Based on the child nodes of the parent node having the same value, the value of the parent node is 0, Based on the absolute values of codebook indices or coefficients of the respective CU3Ds in the plurality of CU3Ds having different values, the value of the node included in the final depth is 1, and Based on the codebook indices or the absolute values of the coefficients of the respective CU3Ds among the plurality of CU3Ds having the same value, the value of the node included in the final depth is 0.
12. The apparatus according to claim 11, further comprising a second construction unit configured to cause the at least one processor to: construct a 3D label tree for each of the plurality of CU3Ds, in, The 3D label tree is constructed as follows: based on the absolute value of the codebook index or the coefficient of each CU3D in the multiple CU3Ds being non-0, the value of the node included in the last depth of the 3D label tree is 1, Based on the absolute value of the codebook index or the coefficient of the respective CU3Ds in the plurality of CU3Ds being 0, the value of the node included in the last depth of the 3D label tree is 0, a value of a parent node at another depth of the 3D label tree other than the last depth, being a minimum value of child nodes of the parent node at the other depth of the 3D label tree; and The first entropy encoding unit is further configured to cause the at least one processor to: Performing entropy coding on the value of the current node of the 3D unit tree; Based on the entropy coded value of the current node of the 3D unit tree being 0, skipping entropy coding of values of child nodes of the current node of the 3D unit tree; Based on the entropy-encoded value of the current node of the 3D unit tree being non-zero and the current node of the 3D unit tree being a top node, entropy-encode a value of a current node of the 3D tag tree corresponding to the current node of the 3D unit tree; as well as Based on the entropy encoded value of the current node of the 3D unit tree being non-zero and the current node of the 3D unit tree not being the top node, entropy encoding a difference between the value of the current node of the 3D label tree and a value of a parent node of the current node of the 3D label tree.
13. The device according to any one of claims 8 to 12, further comprising: A reordering unit configured to cause at least one processor to: reorder two-dimensional 2D planes in at least one of the CTU3D and the plurality of CU3Ds along an axis formed by the convolution kernel size to generate reordering indexes respectively corresponding to the order of the 2D planes; as well as The encoding unit is configured to cause at least one processor to: encode the reordering index in a header of the at least one of the CTU3D and the plurality of CU3Ds.
14. A non-transitory computer-readable medium storing instructions, which, when executed by at least one processor, causes the at least one processor to: perform the method according to any one of claims 1 to 6.
15. A method for storing a video bitstream, characterized in that: A video bit stream is stored on a non-volatile computer-readable storage medium, wherein the video bit stream is obtained based on the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and apparatus for three-dimensional (3D)-tree coding for neural network model compression
US11234024B2
Adaptive block partition for neural network model compression
US62939054P0
3d-octree and 3d-tagtree coding method for neural network model compression
US62940427P0
Kernel plane reorder procedure for neural network model compression
US62957691P0
3d-unitree coding method for neural network model compression
US62957699P0
