[go: up one dir, main page]

WO2023151170A1 - Point cloud compression method and point cloud decompression method - Google Patents

Point cloud compression method and point cloud decompression method Download PDF

Info

Publication number
WO2023151170A1
WO2023151170A1 PCT/CN2022/085657 CN2022085657W WO2023151170A1 WO 2023151170 A1 WO2023151170 A1 WO 2023151170A1 CN 2022085657 W CN2022085657 W CN 2022085657W WO 2023151170 A1 WO2023151170 A1 WO 2023151170A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
compressed
information
point cloud
context
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/085657
Other languages
French (fr)
Chinese (zh)
Inventor
李革
符纯阳
宋睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University Shenzhen Graduate School
Original Assignee
Peking University Shenzhen Graduate School
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University Shenzhen Graduate School filed Critical Peking University Shenzhen Graduate School
Publication of WO2023151170A1 publication Critical patent/WO2023151170A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/002Image coding using neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • the present disclosure relates to the technical field of point cloud data compression and decompression, in particular to a point cloud compression and decompression method.
  • Point cloud data is an important data structure for 3D representation, so effective compression technology is very necessary for the storage and transmission of 3D point cloud.
  • the point cloud is first voxelized and an octree structure is established, and the context information of the voxel structure corresponding to each node of the octree structure is used to learn the features of the binary code using a 3D convolutional neural network, and then The occupancy states of the eight child nodes of the octree node are obtained, thereby realizing lossless compression of the octree.
  • the present disclosure at least provides a point cloud compression and decompression method, which can perform compression and decompression processing through the node occupancy code and attribute information of the node to be compressed, and when performing compression and decompression, the corresponding node to be compressed can be
  • the node occupancy code and location information of the same layer node and parent node are used as the context information of the node to be compressed, which solves the technical problems of large amount of calculation and low compression efficiency in related technologies, and achieves the technology of improving the compression effect and reducing the amount of calculation Effect.
  • Some embodiments of the present disclosure provide a method for compressing a point cloud, wherein the compression method may include: performing binary encoding on point coordinates of the point cloud through a tree structure, converting the binary encoding into decimal encoding, as each point in the tree structure The node occupancy code corresponding to each node; move the preset window to the nodes in the tree structure, and determine the uncompressed node in the preset window as the current node to be compressed; input the context information of the current node to be compressed into the pre-trained
  • the probability distribution of the information to be compressed corresponding to the current node to be compressed is predicted; according to the probability distribution of the information to be compressed corresponding to the node to be compressed and the information to be compressed, input to the arithmetic encoder for entropy encoding to obtain a point cloud Code stream, the point cloud code stream is used as the compression result of the point cloud.
  • the tree structure may be an octree structure.
  • the preset window can be configured to move according to the breadth-first principle; when moving the preset window, arrange the nodes of the tree structure into a breadth-first sequence according to the breadth-first principle, and use the front nodes in the breadth-first sequence as the nodes to be compressed Nodes corresponding to nodes at the same level until the number of nodes at the same level in the preset window meets the preset number; when the number of nodes at the same level in the preset window and/or the number of multi-layer parent nodes of nodes at the same level cannot meet, you can Supplement the nodes in the preset window with default nodes.
  • the training step of the attention neural network model may include: building a tree structure from the sample point cloud, and determining the context information of the sample node and the information to be compressed of the node, wherein the sample point cloud is configured to be consistent with the test point cloud are different but similar; the context information of the sample node is input into the first layer of attention operation network of the attention neural network model, and the first weighted context matrix of the sample node is obtained; the first weighted context matrix is compared with the context information Adding, inputting the result of addition into the first layer of multi-layer perceptron network to obtain the second weighted context matrix; inputting the second weighted context matrix into the second layer of attention operation network to obtain the third weighted context matrix; Adding the third weighted context matrix to the second weighted context matrix, inputting the result of the addition into the second layer of multi-layer perceptron network, and obtaining the probability distribution of the information to be compressed corresponding to the predicted node to be compressed; multiple The probability distribution of the information to be compressed
  • the context information of the current node to be compressed may include: the multi-layer parent node of the same layer node corresponding to the current node to be compressed, the node occupancy code and location information of the previous node at the same layer, and the location information of the node to be compressed ;
  • the context information corresponding to the node to be compressed which can include : Use the node occupancy code and location information of the previous node of the current node to be compressed and the multi-layer parent node corresponding to the previous node of the same layer as the first context information corresponding to the current node to be compressed; the current node to be compressed
  • the location information may include: node index, and/or node depth, and/or bounding box coordinates of the node.
  • inputting the context information of the current node to be compressed into the pre-trained attention neural network model to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed may include: inputting the context information of the current node to be compressed Input to the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the current node to be compressed; add the first weighted context matrix and context information, and input the result of the addition to the first In the layer multi-layer perceptron network, the second weighted context matrix is obtained; the second weighted context matrix is input into the second layer of attention operation network to obtain the third weighted context matrix; the third weighted context matrix is combined with the second weighted context Matrix addition, the result of the addition is input into the second-layer multi-layer perceptron network to obtain the fourth weighted context matrix; the fourth weighted context matrix is input into the third-layer multi-layer perceptron network to obtain the fourth Five weighted context matrices;
  • the context information of the current node to be compressed is input into the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the current node to be compressed, which may include: the current node to be compressed
  • the context information is input to the first multi-layer perceptron to obtain the first output matrix
  • the context information of the current node to be compressed is input to the second multi-layer perceptron to obtain the second output matrix
  • the context information of the current node to be compressed is obtained Input to the third multilayer perceptron to obtain the third output matrix
  • the added result is input to the softmax function to obtain the attention matrix
  • the attention matrix is multiplied by the third output matrix to obtain the first weighted context matrix of the current node to be compressed.
  • each element in the attention matrix can be an attention value;
  • the attention value of the attention matrix can be calculated by the following formula:
  • the jth node is the jth node in the nodes of the same layer and is the current node to be compressed
  • f j is the context of the jth node information
  • f k is the context information of the kth node
  • the kth node is the preorder node of the jth node
  • denominator Refers to the sum of the similarity values between the jth node and the context of the first node to the jth node
  • MLP 2 (f j ) refers to inputting the context information of the jth node into the second multi-layer perception machine to obtain the second output matrix corresponding to the jth node
  • inputting the context information of the current node to be compressed into the pre-trained attention neural network model to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed may include: inputting the context information of the current node to be compressed Carry out dimension expansion to generate expanded dimension context information; input the expanded dimension context information into the pre-trained attention neural network model, and predict the probability distribution of the information to be compressed corresponding to the current node to be compressed.
  • expanding the context information of the current node to be compressed to generate the expanded context information may include: first expanding the dimension of the context information of the current node to be compressed through a one-hot code operation to generate a one-hot code of the context information , and the one-hot code of the context information is generated through the embedding operation to expand the dimension context information.
  • the point cloud compression method may include providing a point cloud compression device, which may include a first quantization module, a first determination module, a first prediction module, and a first compression module, wherein: the first quantization The module can be configured to binary code the coordinates of the point cloud through the tree structure, and convert the binary code into a decimal code as the node occupation code corresponding to each node in the tree structure; the first determination module can be configured as a tree structure The nodes in the structure move the preset window, and determine the uncompressed node in the preset window as the current node to be compressed; the first prediction module can be configured to input the context information of the current node to be compressed into the pre-trained attention In the neural network model, the probability distribution of the information to be compressed corresponding to the current node to be compressed is predicted; and the first compression module may be configured to input the probability distribution of the information to be compressed corresponding to the node to be compressed and the information to be compressed to the arithmetic encoder Entropy encoding is performed to
  • Other embodiments of the present disclosure also provide a method for decompressing a point cloud, which may include: moving a preset window for the tree structure, and determining the undecompressed nodes in the preset window each time as being currently to be decompressed Compress the node; input the context information of the current node to be decompressed into the pre-trained attention neural network model, predict the probability distribution of the information to be compressed corresponding to the current node to be decompressed; The probability distribution of the decompressed information and the point cloud code stream are input to the arithmetic decoder for entropy decoding, and the information to be decompressed corresponding to the node to be decompressed is obtained; the information to be decompressed is constructed into a tree structure, and the point cloud is obtained from the tree structure. Through inverse quantization, the decompressed point cloud is obtained.
  • the point cloud decompression method may include providing a point cloud decompression device, the decompression device may include: a second determination module, a second prediction module, a first decompression module and a second quantization module, wherein: the second determination module can be configured to move the preset window to the tree structure, and determine the uncompressed node in the preset window of each movement as the current node to be decompressed; the second prediction module can be configured to use the current The context information of the node to be decompressed is input into the pre-trained attention neural network model to predict the probability distribution of the information to be decompressed corresponding to the current node to be decompressed; the first decompression module can be configured to The probability distribution of the information to be decompressed corresponding to the compressed node and the point cloud code stream are input to the arithmetic decoder for entropy decoding to obtain the information to be decompressed corresponding to the current node to be decompressed; the second quantization module can be configured to convert the information to be
  • Some other embodiments of the present disclosure also provide an electronic device, which may include: a processor, a memory, and a bus.
  • the memory stores machine-readable instructions executable by the processor.
  • the processor and the memory pass through The bus communicates, and the machine-readable instructions are executed by the processor to execute the steps of the point cloud compression method in any one of the above possible implementations, and/or the steps of the point cloud decompression method.
  • Some other embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program can be stored, and when the computer program is run by a processor, it can perform the points in any of the above possible implementation manners.
  • the computer-readable storage medium may be a general-purpose storage medium capable of storing program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.
  • program codes such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.
  • the point cloud compression method may be: binary code the point cloud through a tree structure to point coordinates, convert the binary code into a decimal code, As the node occupancy code corresponding to each node in the tree structure; move the preset window for the nodes in the tree structure, and determine the uncompressed node in the preset window as the current node to be compressed; input the context information of the current node to be compressed To the pre-trained attention neural network model, predict the probability distribution of the information to be compressed corresponding to the current node to be compressed; according to the probability distribution of the information to be compressed corresponding to the node to be compressed and the information to be compressed, input to the arithmetic encoder for entropy Encode to get the point cloud code stream, and use the point cloud code stream as the compression result of the point cloud.
  • This disclosure abandons the context information of the voxel structure, and compresses and decompresses the node to be compressed by using the node occupancy code and location information of the same layer node and the parent node corresponding to the current node to be compressed as the context information of the current node to be compressed
  • the peer nodes and parent nodes of the current node to be compressed are considered, which solves the technical problems of large calculation and low compression efficiency in related technologies, and achieves the technical effect of improving the compression effect and reducing the calculation.
  • Fig. 1 shows a flowchart of a point cloud compression method provided by an embodiment of the present disclosure.
  • Fig. 2 shows a flowchart of a point cloud geometric compression method provided by an embodiment of the present disclosure.
  • Fig. 3 shows a flowchart of a point cloud attribute compression method provided by an embodiment of the present disclosure.
  • Fig. 4 shows a flow chart of a point cloud decompression method provided by an embodiment of the present disclosure.
  • Fig. 5 shows a flowchart of a method for geometrically decompressing a point cloud provided by an embodiment of the present disclosure.
  • Fig. 6 shows a flowchart of a point cloud attribute decompression method provided by an embodiment of the present disclosure.
  • FIG. 7 shows a schematic diagram of attribute completion provided by an embodiment of the present disclosure.
  • Fig. 8 shows a schematic diagram of a preset window provided by an embodiment of the present disclosure.
  • FIG. 9 shows a schematic diagram of an attention neural network model provided by an embodiment of the present disclosure.
  • Fig. 10 shows a schematic diagram of point cloud compression and decompression provided by an embodiment of the present disclosure.
  • Fig. 11 shows a schematic diagram of a point cloud compression device provided by an embodiment of the present disclosure.
  • Fig. 12 shows a schematic diagram of an apparatus for decompressing a point cloud provided by an embodiment of the present disclosure.
  • Fig. 13 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the voxel structure corresponding to the node to be compressed is used as context information, resulting in technical problems such as excessive calculation and inaccurate prediction results, or, the same voxel structure of the node to be compressed is not Layer nodes are used as the context information of the nodes to be compressed, resulting in inaccurate prediction results, which in turn leads to technical problems of poor compression effect.
  • an embodiment of the present disclosure provides a method for compressing and decompressing a point cloud.
  • the node occupancy code and location information of the node at the same layer and the parent node corresponding to the node to be compressed are used as The context information of the node to be compressed solves the technical problems of large amount of calculation and low compression efficiency in related technologies, and achieves the technical effect of improving the compression effect and reducing the amount of calculation.
  • the optional methods are as follows:
  • FIG. 1 is a flow chart of a point cloud compression method provided by an embodiment of the present disclosure.
  • a method for compressing a point cloud provided by an embodiment of the present disclosure may include the following steps:
  • the method may include quantifying the point cloud .
  • Quantifying the point cloud can be understood as approximating the discrete values of a large number of possible coordinates or attributes of the point cloud to fewer discrete values.
  • quantization may not be performed.
  • the tree structure may be an octree structure.
  • the minimum three-dimensional coordinate value that is, the three-dimensional coordinate value of the point in the lower right corner, referring to accompanying drawing 7
  • the three-dimensional coordinates of all points in the point cloud The difference between the value and the minimum three-dimensional coordinate value (that is, the point cloud data is shifted so that the point in the lower right corner of the shifted point cloud data is at the origin), and then the difference is compared with the quantization step and rounded, and the rounded
  • the adjusted ratio is used as the three-dimensional coordinate value of each point in the geometrically quantized point cloud data.
  • the original point cloud attribute can be compared with the quantization step size and then rounded, and the rounded ratio can be used as attribute quantization
  • attribute quantization that is, color (RGB value or YUV value) and/or reflectance quantization
  • the quantization step size (qs) is a user-adjustable parameter, and its value depends on the desired compression degree and acceptable distortion.
  • the larger the quantization step size the larger the distortion of the point cloud data, but the smaller the bit rate. This also means that our model can be applied to the compression of variable bit rates (the same model, achieving different compression sizes and distortions).
  • the quantization step size of geometric quantization and attribute quantization may be different.
  • the node occupancy code refers to the arrangement position of each point in the point cloud, and the eight-bit binary code of the arrangement position of each point is converted into a decimal code, and the decimal code is used as the node occupancy code of this node.
  • the voxel indicated by the node corresponding to the node occupancy code of 73 includes eight sub-voxels, and the sub-voxels are numbered, and the number ranges from number 0 to number 7.
  • the sub-voxel existence points where No. 1, No. 4 and No. 7 are located have a corresponding binary code of 01001001 (corresponding to 0a00b00c in Figure 7), which is converted to 73 in decimal, and 73 is the node occupancy code of this node.
  • the compression of point clouds can be divided into geometry compression and attribute compression.
  • geometry compression When performing geometry compression, it corresponds to the geometry preset window.
  • FIG. 8 shows a schematic diagram of a preset window provided by an embodiment of the present disclosure.
  • the " xi " node refers to the current node to be compressed
  • N 1 refers to the number of nodes in the same layer corresponding to the node to be compressed in the geometry preset window
  • N 2 refers to the number of nodes to be compressed in the attribute preset window
  • W1 refers to the geometric preset window with the number of nodes on the same layer (N 1 ) of the current node to be compressed is 8 and the layer height is 4
  • W2 refers to the same layer of the node to be compressed currently
  • the attribute preset window with the number of nodes (N 2 ) being 7 and the layer height being 1.
  • the preset window is configured to move according to the breadth-first principle.
  • the nodes of the tree structure can be arranged in a breadth-first sequence according to the breadth-first principle, and the nodes in the front of the breadth-first sequence are used as the same-layer nodes corresponding to the nodes to be compressed until the number of same-layer nodes in the preset window satisfies Preset quantity (N1 or N2).
  • Preset quantity N1 or N2
  • default nodes can be used to supplement the preset window node, which occurs in some layers of the tree structure near the root.
  • the peer nodes corresponding to the current node to be compressed may include the current node to be compressed, the previous peer node of the current node to be compressed, and/or the subsequent peer node of the current node to be compressed.
  • the context information of the current node to be compressed may include: the multi-layer parent node of the same layer node corresponding to the current node to be compressed, the preamble The node occupancy code and location information of nodes in the same layer, and the location information of the node to be compressed.
  • the context information corresponding to the current node to be compressed does not include the node occupancy code of the current node to be compressed, because the purpose of decompression is to decode the node occupancy code of the current node to be compressed, that is, the node occupancy of the current node to be compressed during decompression
  • the code is unknown, so it does not consider its own node occupation code when compressing.
  • the node occupancy code and location information of the multi-layer parent node corresponding to the previous node of the current node to be compressed and the corresponding multi-layer parent node can be used as the first context information corresponding to the node to be compressed; the location information of the node to be compressed , the node occupancy code of the previous compressed node at the same layer of the node to be compressed, and the node occupancy code and location information of the multi-layer parent node corresponding to the node to be compressed, as the second context information corresponding to the node to be compressed, the first The context information and the second context information serve as context information corresponding to the node to be compressed.
  • the location information may include: node index, and/or node depth, and/or bounding box coordinates of the node.
  • the node index refers to the position of the node in the sibling nodes of the same parent node, and the range of the node index is 0 to 7;
  • the node depth refers to the depth of the octree structure of the node, and the root node in the octree structure The depth is 1.
  • the bounding box refers to the cubic space of the voxel corresponding to the node, and the bounding box coordinates refer to the coordinates of the two vertices of the diagonal diagonal of the cubic space.
  • the diagonal directions of multiple bounding boxes corresponding to the same point cloud are the same , as shown in FIG. 8 , (x 0 , y 0 , z 0 , x 1 , y 1 , z 1 ) are the bounding box coordinates of the voxel corresponding to the node occupation code 73
  • a node whose node occupation code is 9 has a node depth of 1, a node index of 7, and node bounding box coordinates of (0,0,0,7,7,7).
  • the context information of the current node to be compressed can also include: the node occupancy code and location information of the multi-layer parent node of the same layer node corresponding to the current node to be compressed, and the node occupancy code and location information of the same layer node , the node attribute and/or the node attribute residual corresponding to the previous node at the same layer.
  • the context information of the current node to be compressed may include: the node at the same layer corresponding to the current node to be compressed Node occupancy codes and location information of multi-layer parent nodes, previous nodes of the same layer, subsequent nodes of the same layer, nodes to be compressed, and node attributes and/or node attribute residuals corresponding to the previous nodes of the same layer.
  • the node occupancy code and location information of the previous node of the current node to be compressed and the multi-layer parent node corresponding to the previous node of the same layer are used as the first context information corresponding to the node to be compressed; the current node to be compressed
  • the node occupancy code and location information of the multi-layer parent node corresponding to the subsequent node of the same layer and the subsequent node of the same layer are used as the second context information corresponding to the node to be compressed;
  • the node occupancy code and location information of the multi-layer parent node corresponding to the node to be compressed as the third context information corresponding to the node to be compressed;
  • the difference is used as the fourth context information corresponding to the node to be compressed; the first context information, the second context information, the third context information and the fourth context information are used as the context information corresponding to the node to be compressed.
  • the node at the same layer corresponding to the current node to be compressed may be the deepest leaf node in the tree structure, that is, a node without child nodes in the tree structure. Only leaf nodes have node attributes and/or node attribute residuals.
  • the node attribute can be the 3-bit RGB value or YUV value or reflectivity or other attributes of the node, and the node attribute residual can be the attribute coding difference between this node and the previous node after the attributes of the node are completed.
  • the value range of the three primary color channels of the 3-bit RGB value can be 0-255, that is, the node attribute can be a 3-bit RGB value.
  • Attribute completion can be for the convenience of constructing context and calculation of neural network, and the supplementary attribute value (residual value of attribute value) does not enter into entropy coding.
  • the attribute completion method of a node please refer to FIG. 7
  • FIG. 7 shows a schematic diagram of attribute completion provided by an embodiment of the present disclosure.
  • the node attribute value corresponding to the sub-voxel numbered 1 is a
  • the node attribute value corresponding to the sub-voxel numbered 4 The value is b
  • the attribute value of the node corresponding to the sub-voxel numbered 7 is c
  • the attribute code corresponding to the node corresponding to the node occupancy code 73 is 0a00b00c
  • 0 means that there is no point cloud point in the sub-voxel.
  • the first circular left-shift completion is aa0bb0cc
  • the attribute code after the first attribute completion still has an attribute code of zero
  • the second circular left-shift completion is aabbbccc
  • the attribute code after the second attribute completion has no zero code
  • the attribute completion is completed
  • the attribute code after attribute completion is aabbbccc. If the attribute code of the preceding node attribute completion is dddeeedd, the node occupation code is 73, and the corresponding node attribute residual is: (d-a)(d-a)(d-b)(e-b)(e-b)(e-c)( d-c)(d-c).
  • the information to be compressed corresponding to the current node to be compressed may include: the node occupancy code of the current node to be compressed; when performing attribute compression, the information to be compressed corresponding to the current node to be compressed may include: the current node to be compressed Node attributes and/or node attribute residuals for nodes.
  • the i-th node to be compressed can be determined as the current node to be compressed, and the context information of the i-th node to be compressed is input into the pre-trained attention neural network model to predict the i-th node to be compressed Probability distribution q i (x) of node occupancy codes corresponding to compressed nodes, that is, q i (x) is the probability distribution of node occupancy codes of the i-th node to be compressed being 1-255.
  • the probability distribution corresponding to the current node to be compressed is (0.01, 0.2, 0.056, ..., 0.36), which means that the probability of the node occupancy code of the current node to be compressed is 1 is 0.01, and the probability of being 2 is 0.2, which is 3
  • the probability of is 0.056, ..., the probability of being 255 is 0.36)
  • the sum of the probability distributions is 1.
  • the node attribute and/or node attribute residual probability distribution corresponding to the current node to be compressed can be predicted Right now, is the probability distribution of the nth node attribute and/or node attribute residual of the i- th node to be compressed.
  • the steps of training the attention neural network model can be: Step 1, construct a tree structure from the sample point cloud, and determine the context information of the sample node and the information to be compressed of the node (wherein, the sample point cloud is different from the point cloud of the test , but the sample point cloud is similar to the test point cloud, for example, it is a different frame of the same sequence point cloud or a similar point cloud); Step 2, input the context information of the sample node into the first node of the attention neural network model In the one-layer attention operation network, the first weighted context matrix of the sample node is obtained; Step 3, the first weighted context matrix is added to the context information, and the result of the addition is input into the first layer of multi-layer perceptron network, Obtain the second weighted context matrix; Step 4, input the second weighted context matrix into the second layer attention operation network to obtain the third weighted context matrix; Step 5, combine the third weighted context matrix with the second weighted context matrix Add, input the result of addition to the second layer of multi-layer per
  • loss 1 refers to the loss function of geometric compression
  • x i refers to the current node to be compressed (i-th node to be compressed)
  • f refers to the i-th node to be compressed after dimension expansion context information
  • w 1 refers to the weight of the geometric compression attention neural network
  • q i refers to the probability distribution of the node occupancy code corresponding to the ith node to be compressed
  • i refers to the range of all nodes to be compressed
  • f ; w 1 ) refers to the sum of the estimated code rates corresponding to all nodes to be compressed
  • loss 2 refers to the loss function of attribute compression
  • w 2 refers to the weight of attribute compression attention neural network
  • n A refers to the n Ath attribute (that is, which attribute in the RGB value, for example, R is the first attribute in the RGB value)
  • N A refers to is the total number of node attributes (for example, the RGB value is 3 attributes)
  • the range referred to by i is all the nodes to be compressed (that is, when the attribute is compressed, it is all the leaf nodes).
  • Step 7 Use an optimization algorithm based on deep learning to perform backpropagation to optimize the loss value and update the weight w 1 and/or w 2 of the attention neural network model. Steps 1 to 7 can be performed multiple times. When the rate of change of the loss value output by the loss function reaches a preset threshold (that is, the output value of the loss function converges), a trained attention neural network model is obtained.
  • Input the context information of the current node to be compressed into the pre-trained attention neural network model, and predict the probability distribution of the information to be compressed corresponding to the current node to be compressed which may include: expanding the context information of the current node to be compressed, Generate the expanded dimension context information; input the expanded dimension context information into the pre-trained attention neural network model, and predict the probability distribution of the information to be compressed corresponding to the current node to be compressed.
  • the context information of the current node to be compressed can be expanded through one-hot code operation to generate the one-hot code of the context information, and then the one-hot code of the context information can be embedded to generate the expanded context information.
  • One-hot code operation is a code system in which there are as many bits as there are states, and only one bit is 1, and the others are all 0. For example, if the node index of a certain node is 1, its one-hot code is (0,1,0,0,0,0,0,0), which expands the one-dimensional data into eight dimensions.
  • the embedding operation is to linearly map the result of the one-hot encoding operation to a preset dimension.
  • inputting the context information of the current node to be compressed into the pre-trained attention neural network model to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed may include:
  • H refers to the layer height of the preset window (the layer height of the geometry preset window is K, and the layer height of the attribute preset window is 1), and
  • C refers to the dimension of the context information (the dimension corresponding to the geometry compression is C G , the dimension corresponding to attribute compression is C A +K ⁇ C G );
  • H ⁇ C refers to the dimension of the context information in the preset window;
  • N 0 refers to the number of nodes to be compressed;
  • C 0 refers to the nodes to be compressed
  • the dimension of the corresponding probability distribution (the dimension corresponding to geometric compression is 255, and the dimension of attribute compression such as RGB is 3 ⁇ 256
  • the context information (N, H, C) of the current node to be compressed into the first layer of attention operation network to obtain the first weighted context matrix (N, H ⁇ C); then the first The weighted context matrix is added to the context information, and the added result is input to the first layer of multi-layer perceptron to obtain the second weighted context matrix (N, H ⁇ C); then the second weighted context matrix is input to the second In the two-layer attention operation network, the third weighted context matrix (N, H ⁇ C) is obtained; the third weighted context matrix is added to the second weighted context matrix, and the result of the addition is input to the second layer of multi-layer perception
  • the fourth weighted context matrix (N, H ⁇ C) is obtained, and the fourth weighted context matrix is input into the third layer multi-layer perceptron network, and the fifth weighted context matrix (N, C 0 ) is obtained;
  • the fifth weighted context matrix is passed through the softmax function to predict the probability distribution (N
  • Input the context information of the current node to be compressed into the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the current node to be compressed which may include:
  • the mask matrix (matrix with - ⁇ in the upper right corner and 0 in the lower left corner) can be used to predict the probability distribution corresponding to the current node to be compressed, only consider the compressed nodes in front of the current node to be compressed, and then lead to the attention value denominator
  • the sums are of different lengths. For example, when the jth node is the current node to be compressed, the context information of the j+1th node will not exist in the result of the jth node. Therefore, in one calculation, according to the output N results, the last N 0 results can be obtained by truncation as the probability distribution of the last N 0 nodes to be compressed, so as to reduce the number of network propagation and speed up the compression speed.
  • each element in the attention matrix is an attention value
  • the attention value of the attention matrix can be calculated by the following formula:
  • the jth node is the jth node in the nodes of the same layer and is the current node to be compressed
  • f j is the context of the jth node information
  • f k is the context information of the kth node
  • the kth node is the preorder node of the jth node
  • denominator Refers to the sum of the similarity values between the jth node and the context of the first node to the jth node
  • MLP 2 (f j ) refers to inputting the context information of the jth node into the second multi-layer perception machine to obtain the second output matrix corresponding to the jth node
  • the kth node is located between the 1st node to the jth node.
  • the probability distribution of information to be compressed and the information to be compressed corresponding to all nodes to be compressed are input to the arithmetic encoder for entropy encoding to obtain a point cloud code stream, and the point cloud code stream is used as the compression result of the point cloud.
  • the point cloud code stream can be divided into geometric code stream and attribute code stream, that is, when geometric compression is performed, the compressed geometric code stream is obtained; when attribute compression is performed, the compressed object is attribute stream.
  • the arithmetic encoder converts the probability distribution corresponding to the input node to be compressed and the information to be compressed into a decimal less than 1, and the storage method of this decimal is binary, which is the generated point cloud code stream.
  • the point cloud code stream is a series of compressed binary bit streams. For example, a point cloud file with an original size of 1.94MB (2038480 bytes) can be compressed into a file with a size of 55.5KB (56890 bytes), saving 97.2% of storage space.
  • FIG. 2 shows a flow chart of a point cloud geometric compression method provided by an embodiment of the present disclosure.
  • the steps of a point cloud geometric compression method are as follows:
  • Geometric context information corresponding to the current node to be compressed can be acquired to obtain N 1 ⁇ K ⁇ 3-dimensional geometric context information.
  • N 1 nodes refer to the number of nodes on the same layer as the current node to be compressed in the geometry preset window
  • K refers to the height of the geometry preset window
  • 3 refers to the node occupancy code, node depth, and node index. That is to say, the N1 nodes include the current node to be compressed.
  • the range of the node occupancy code can be 1-255, and then the node occupancy code can be 255 dimensions after the one-hot code operation; the range of the node depth can be 1-16, and then the node index can be one-hot
  • the code operation can be 16-dimensional; the range of node index can be 0-7, and the node depth can be 8-dimensional after one-hot code operation.
  • the 255-dimensional node occupancy code is converted to 128-dimensional by embedding operation
  • the 16-dimensional node depth is converted to 6-dimensional by embedding operation
  • the 8-dimensional node index is converted to 4-dimensional by embedding operation. Therefore, after dimension expansion through one-hot encoding operation and embedding operation, the 3-dimensional data of geometric context information can be converted into CG- dimensional (138 dimensions in total, which is the sum of 128-, 6-, and 4-dimensional).
  • step S201 If the probability distribution of the node occupancy codes corresponding to all the nodes to be compressed has not been obtained, it can return to step S201; if the probability distribution of the node occupancy codes corresponding to all the nodes to be compressed is obtained, the node
  • the probability distribution of the occupancy code and the node occupancy code of the node to be compressed are input to the arithmetic encoder for entropy encoding to obtain the geometric code stream, which is used as the geometric compression result of the point cloud.
  • FIG. 3 shows a flow chart of a point cloud attribute compression method provided by an embodiment of the present disclosure.
  • the steps of a point cloud attribute compression method are as follows:
  • the node attribute context information corresponding to the current to-be-compressed node can be obtained, and N 2 ⁇ 8 ⁇ N A- dimensional attribute context information can be obtained.
  • N 2 nodes refer to the number of nodes in the same layer corresponding to the current node to be compressed in the attribute preset window
  • 8 refers to the number of digits of the completed attribute code included in each node (that is, the above mentioned
  • the node occupancy code is 73 and the corresponding attribute code is aabbbccc after completion)
  • N A refers to the number of node attributes (that is, 3-bit RGB value or 1-bit reflectance value).
  • the node attributes in the embodiments of the present disclosure can use 3-bit RGB values, and the N A dimension corresponds to red values, blue values, and green values.
  • the range of red value, blue value and green value can be 0-255. Therefore, the red value is converted into 256 dimensions after one-hot encoding operation, and the blue value is converted into 256 dimensions after one-hot encoding operation.
  • the green value is converted to 256 dimensions after one-hot encoding operation.
  • the 256-dimensional red value is converted to 128 dimensions through the embedding operation
  • the 256-dimensional blue value is converted to 128 dimensions through the embedding operation
  • the 256-dimensional green value is converted to 128 dimensions through the embedding operation. Therefore, after dimension expansion through one-hot encoding operation and embedding operation, the N A dimension data of attribute context information can be converted into C A dimension (384 dimensions in total, which are the sum of 128 dimensions, 128 dimensions, and 128 dimensions).
  • geometric context information is also required during attribute compression, and the geometric window corresponding to the geometric context information required during attribute compression may be different from the corresponding geometric window during geometry compression.
  • the probability distribution of the node attributes (node attribute residuals) corresponding to all the nodes to be compressed can return to step S301; if the probability distributions of the node attributes (node attribute residuals) corresponding to all the nodes to be compressed are obtained, Then the probability distribution of the node attributes (node attribute residuals) corresponding to all nodes to be compressed and the node attributes (node attribute residuals) of the nodes to be compressed can be input into the arithmetic encoder for entropy encoding to obtain the attribute code stream, and the attribute The code stream is the attribute compression result of the point cloud.
  • the embodiment of the present disclosure also provides a point cloud decompression method corresponding to the point cloud compression method provided in the above embodiment, because the point cloud decompression method in the embodiment of the present disclosure solves the problem
  • the principle is similar to the point cloud compression method in the above-mentioned embodiments of the present disclosure, so the implementation of the point cloud decompression can refer to the implementation of the point cloud compression method, and the repetition will not be repeated.
  • FIG. 10 shows a schematic diagram of point cloud compression and decompression provided by an embodiment of the present disclosure.
  • the geometry prediction network and attribute prediction network in FIG. 10 are the attention neural network in the embodiment of the present disclosure.
  • FIG. 4 shows a flow chart of a point cloud decompression method provided by an embodiment of the present disclosure.
  • the steps of a point cloud decompression method are as follows:
  • Point cloud decompression can be divided into geometry decompression and attribute decompression.
  • the multi-layer parent node of the same layer node corresponding to the current node to be decompressed, the node occupancy code and location information of the previous node at the same layer, and the location information of the current node to be decompressed can be used as the current Context information corresponding to the node to be decompressed.
  • the node occupancy code and location information of the multi-layer parent node corresponding to the current node to be compressed, the node occupancy code and location information of the node at the same layer, and the node corresponding to the previous node at the same layer Attributes and/or node attribute residuals are used as context information corresponding to the nodes to be decompressed.
  • the attention neural network for point cloud decompression is the same as the attention neural network for the point cloud compression method, and the specific generation method of the attention neural network will not be repeated here.
  • the probability distribution corresponding to the predicted node to be decompressed obtained during compression is the same as the predicted node to be decompressed obtained during decompression.
  • the probability distribution corresponding to the decompression node is the same.
  • the information to be decompressed refers to the node occupancy code
  • the point cloud code stream refers to the geometric code stream
  • the information to be decompressed refers to node attributes and/or node attributes
  • the residual refers to the attribute code stream.
  • the information to be decompressed can be gradually decompressed to construct a tree structure, and the point cloud can be obtained from the tree structure, and then decompressed to obtain the decompressed point cloud.
  • FIG. 5 shows a flow chart of a point cloud geometric decompression method provided by an embodiment of the present disclosure.
  • the steps of a geometric decompression method of a point cloud are as follows:
  • step S501 If the node occupancy codes of all the nodes to be decompressed have not been obtained, it may return to step S501.
  • a tree structure may be constructed from the node occupancy codes obtained by decoding step by step.
  • the quantized point cloud can be obtained from the complete tree structure constructed, and the quantized point cloud can be dequantized to obtain the coordinates of the decompressed point cloud.
  • FIG. 6 shows a flow chart of a method for decompressing attributes of a point cloud provided by an embodiment of the present disclosure.
  • the steps of a point cloud attribute decompression method are as follows:
  • node attributes (node attribute residuals) of all the nodes to be decompressed have not been obtained, it may return to step S601.
  • the node attributes (node attribute residuals) of the nodes to be decompressed that are gradually decompressed can be used to construct the node attributes (node attribute residuals) of the leaf nodes of the tree structure. residuals).
  • the node attributes (node attribute residuals) can be dequantized to reconstruct the point cloud attributes.
  • the attention neural network mentioned in this embodiment is a framework of deep learning, referring to the operation described in Figure 10 and formula (1). Similar networks named "Transformer” all belong to the category of attention neural network described in this disclosure.
  • the embodiment of the present disclosure also provides a point cloud compression device corresponding to the point cloud compression method provided in the above embodiment, because the principle of solving the problem of the point cloud compression device in the embodiment of the present disclosure is the same as that of the above embodiment of the present disclosure
  • the point cloud compression method is similar, so the implementation of the point cloud compression device can refer to the implementation of the point cloud compression method, and the repetition will not be repeated.
  • the point cloud compression device 100 may include a first quantization module 101 , a first determination module 102 , a first prediction module 103 and a first compression module 104 .
  • the first quantization module 101 can be configured to perform binary coding on the point coordinates of the point cloud through a tree structure, and convert the binary coding into decimal coding as the node occupancy code corresponding to each node in the tree structure;
  • the first determination Module 102 can be configured to move the preset window to the nodes in the tree structure, and determine the uncompressed node in the preset window as the current node to be compressed;
  • the first prediction module 103 can be configured to move the current node to be compressed Input the context information into the pre-trained attention neural network model to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed;
  • the first compression module 104 can be configured to use the information to be compressed corresponding to the node to be compressed
  • the probability distribution and the information to be compressed are input to the arithmetic encoder for entropy encoding to obtain the point cloud code stream, which is used as the point cloud compression result.
  • the embodiment of the present disclosure also provides a point cloud decompression device corresponding to the point cloud decompression method provided in the above embodiments, because the point cloud decompression device in the embodiment of the present disclosure has the same problem-solving principle as the present disclosure
  • the point cloud decompression method in the above embodiments is similar, so the implementation of the point cloud decompression device can refer to the implementation of the point cloud decompression method, and the repetition will not be repeated.
  • Fig. 12 shows a schematic diagram of an apparatus for decompressing a point cloud provided by an embodiment of the present disclosure. See Figure 12.
  • the point cloud decompression device 200 may include a second determination module 201 , a second prediction module 202 , a first decompression module 203 and a second quantization module 204 .
  • the second determination module 201 can be configured to move the preset window for the tree structure, and determine the uncompressed node in the preset window for each movement as the current node to be decompressed;
  • the second prediction module 202 can be configured by It is configured to input the context information of the current node to be decompressed into the pre-trained attention neural network model, and predict the probability distribution of the information to be decompressed corresponding to the current node to be decompressed;
  • the first decompression module 203 can be It is configured to input the probability distribution and point cloud code stream of the information to be decompressed corresponding to the current node to be decompressed to the arithmetic decoder for entropy decoding, and obtain the information to be decompressed corresponding to the current node to be decompressed;
  • the second quantization module 204 can be configured to construct a tree structure for the information to be decompressed, obtain the point cloud from the tree structure, and then obtain the decompressed point cloud through dequantization.
  • FIG. 13 shows a schematic structural diagram of an electronic device 300 provided by an embodiment of the present disclosure, which may include: a processor 310, a memory 320, and a bus 330.
  • the memory 320 may be configured to store information that the processor 310 may
  • the executed machine-readable instructions when the electronic device 300 is running, the processor 310 and the memory 320 can communicate through the bus 330, and when the machine-readable instructions are executed by the processor 310, the point cloud in the above-mentioned embodiments can be executed.
  • the steps of the compression method, and/or, the steps of the point cloud decompression method are executed.
  • embodiments of the present disclosure also provide a computer-readable storage medium, which can be configured to store a computer program, and when the computer program is run by a processor, it can execute the points provided by the above-mentioned embodiments.
  • the steps of the cloud compression method, and/or, the steps of the point cloud decompression method can be configured to store a computer program, and when the computer program is run by a processor, it can execute the points provided by the above-mentioned embodiments.
  • the storage medium can be a general storage medium, such as a removable disk, a hard disk, etc., and when the computer program on the storage medium is run, it can be configured to perform the steps of the above-mentioned point cloud compression method, and/or, the point cloud
  • the steps of the decompression method by using the node occupancy code and location information of the same-level node and the parent node corresponding to the node to be compressed, as the context information of the node to be compressed, considering the same-level node and the parent node of the node to be compressed, solves the problem of The technical problems of large amount of calculation and low compression efficiency in the related art achieve the technical effect of improving the compression effect and reducing the amount of calculation.
  • the optional working process of the above-described system and device can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical function division.
  • multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • a unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor.
  • the essence of the technical solution of the present disclosure or the part that contributes to the related technology or the part of the technical solution can be embodied in the form of software products, and the computer software products can be stored in a storage medium, including several
  • the instructions are configured to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods of the various embodiments of the present disclosure.
  • the aforementioned storage medium can include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc, etc., which can store program codes. medium.
  • the present disclosure provides a point cloud compression and decompression method, which can perform compression and decompression processing through the node occupancy code and attribute information of the node to be compressed, and when performing compression and decompression, the same layer node corresponding to the node to be compressed and
  • the node occupancy code and location information of the parent node are used as the context information of the node to be compressed, which solves the technical problems of large amount of calculation and low compression efficiency in related technologies, and achieves the technical effect of improving the compression effect and reducing the amount of calculation.
  • the point cloud compression and decompression method of the present disclosure is reproducible and can be used in various industrial applications, for example, the point cloud compression and decompression method of the present disclosure can be used in 3D laser mapping and other scenarios.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Multimedia (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

A point cloud compression method and a point cloud decompression method. The point cloud compression method may comprise: performing binary coding on the coordinates of each point of a point cloud by means of a tree structure, converting a binary code into a decimal code, and taking the decimal code as a node occupation code which corresponds to each node in the tree structure; moving a preset window for the nodes in the tree structure, and determining an uncompressed node in the preset window as the current node to be compressed; inputting context information of said current node into a pre-trained attention neural network model, and predicting a probability distribution of information to be compressed that corresponds to said current node; and inputting, into an arithmetic coder for entropy coding, said information and the probability distribution of said information that corresponds to said current node, so as to obtain a point cloud code stream, and taking the point cloud code stream as a compression result of the point cloud. Thus, the technical problems in the relevant art of a large calculation amount and a low compression efficiency are solved, and the technical effects of improving the compression effect and reducing the calculation amount are achieved.

Description

一种点云的压缩和解压缩方法A Point Cloud Compression and Decompression Method

相关申请的交叉引用Cross References to Related Applications

本公开要求于2022年02月11日提交中国国家知识产权局的申请号为202210127272.2、名称为“一种点云的压缩和解压缩方法”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This disclosure claims the priority of the Chinese patent application with application number 202210127272.2 and titled "A Method for Compressing and Decompressing Point Clouds" filed with the State Intellectual Property Office of China on February 11, 2022, the entire contents of which are hereby incorporated by reference In this disclosure.

技术领域technical field

本公开涉及点云数据压缩与解压缩技术领域,尤其涉及一种点云的压缩和解压缩方法。The present disclosure relates to the technical field of point cloud data compression and decompression, in particular to a point cloud compression and decompression method.

背景技术Background technique

点云数据是三维表示的重要数据结构,因此有效的压缩技术对3D点云的存储和传输是十分必要的。目前,先将点云体素化并建立八叉树结构,并对每个八叉树结构的节点对应的体素结构的上下文信息,再利用3D卷积神经网络对二进制编码进行特征学习,进而得出该八叉树节点的八个子节点的占用状态,从而实现对八叉树无损压缩。Point cloud data is an important data structure for 3D representation, so effective compression technology is very necessary for the storage and transmission of 3D point cloud. At present, the point cloud is first voxelized and an octree structure is established, and the context information of the voxel structure corresponding to each node of the octree structure is used to learn the features of the binary code using a 3D convolutional neural network, and then The occupancy states of the eight child nodes of the octree node are obtained, thereby realizing lossless compression of the octree.

然而,使用体素结构的上下文信息,容易造成计算量过大的技术问题,为了减少计算量势必需要较少的体素结构的上下文信息,而使用较少的体素结构的上下文信息,容易产生预测不准确,压缩效果差的技术问题。However, using the context information of the voxel structure is likely to cause a technical problem of excessive calculation. In order to reduce the calculation amount, less context information of the voxel structure is necessary, and the use of less context information of the voxel structure is easy to produce Technical problems with inaccurate predictions and poor compression.

发明内容Contents of the invention

有鉴于此,本公开至少提供一种点云的压缩和解压缩方法,可以通过待压缩节点的节点占用码和属性信息进行压缩和解压缩处理,并且在进行压缩和解压缩时,可以将待压缩节点对应的同层节点和父亲节点的节点占用码和位置信息,作为待压缩节点的上下文信息,解决了相关技术中计算量大以及压缩效率低的技术问题,达到了提高压缩效果和减少计算量的技术效果。In view of this, the present disclosure at least provides a point cloud compression and decompression method, which can perform compression and decompression processing through the node occupancy code and attribute information of the node to be compressed, and when performing compression and decompression, the corresponding node to be compressed can be The node occupancy code and location information of the same layer node and parent node are used as the context information of the node to be compressed, which solves the technical problems of large amount of calculation and low compression efficiency in related technologies, and achieves the technology of improving the compression effect and reducing the amount of calculation Effect.

本公开的一些实施例提供一种点云的压缩方法,其中,该压缩方法可以包括:将点云通过树结构对点的坐标进行二进制编码,将二进制编码转化为十进制编码,作为树结构中每个节点对应的节点占用码;对树结构中的节点移动预置窗口,将预置窗口内的未压缩的节点确定为当前待压缩节点;将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布;根据待压缩节点对应的待压缩信息的概率分布和待压缩信息,输入至算数编码器进行熵编码,得到点云码流,将点云码流作为点云的压缩结果。Some embodiments of the present disclosure provide a method for compressing a point cloud, wherein the compression method may include: performing binary encoding on point coordinates of the point cloud through a tree structure, converting the binary encoding into decimal encoding, as each point in the tree structure The node occupancy code corresponding to each node; move the preset window to the nodes in the tree structure, and determine the uncompressed node in the preset window as the current node to be compressed; input the context information of the current node to be compressed into the pre-trained In the attention neural network model, the probability distribution of the information to be compressed corresponding to the current node to be compressed is predicted; according to the probability distribution of the information to be compressed corresponding to the node to be compressed and the information to be compressed, input to the arithmetic encoder for entropy encoding to obtain a point cloud Code stream, the point cloud code stream is used as the compression result of the point cloud.

可选地,树结构可以为八叉树结构。Optionally, the tree structure may be an octree structure.

可选地,预置窗口可以被配置成根据广度优先原则进行移动;移动预置窗口时,依据广度优先原则将树结构的节点排成广度优先序列,将广度优先序列中前面的节点作为待压缩节点对应的同层节点,直到预置窗口的同层节点数量满足预设的数量;当预置窗口的同层节点的数量和/或同层节点的多层父亲节点的数量不能满足时,可以用默认节点补充预置窗口内的节点。Optionally, the preset window can be configured to move according to the breadth-first principle; when moving the preset window, arrange the nodes of the tree structure into a breadth-first sequence according to the breadth-first principle, and use the front nodes in the breadth-first sequence as the nodes to be compressed Nodes corresponding to nodes at the same level until the number of nodes at the same level in the preset window meets the preset number; when the number of nodes at the same level in the preset window and/or the number of multi-layer parent nodes of nodes at the same level cannot meet, you can Supplement the nodes in the preset window with default nodes.

可选地,注意力神经网络模型的训练步骤可以包括:从样本点云中构建树结构,并确定样本节点的上下文信息和节点的待压缩信息,其中,样本点云被配置成与测试点云是不同的但是相似的;将样本节 点的上下文信息输入至注意力神经网络模型的第一层注意力操作网络中,得到样本节点的第一加权上下文矩阵;将第一加权上下文矩阵与上下文信息相加,将相加的结果输入至第一层多层感知机网络中,得到第二加权上下文矩阵;将第二加权上下文矩阵输入至第二层注意力操作网络中,得到第三加权上下文矩阵;将第三加权上下文矩阵与第二加权上下文矩阵相加,将相加的结果输入至第二层多层感知机网络中,得出预测待压缩节点对应的待压缩信息的概率分布;将多个样本节点对应的待压缩信息的概率分布和待压缩信息带入到损失函数中,计算损失值;使用基于深度学习的优化算法进行反向传播,来优化损失值,更新注意力神经网络模型的权重;多次执行以上步骤,在损失函数输出的损失值的变化率达到预置阈值时,则得到训练好的注意力神经网络模型。Optionally, the training step of the attention neural network model may include: building a tree structure from the sample point cloud, and determining the context information of the sample node and the information to be compressed of the node, wherein the sample point cloud is configured to be consistent with the test point cloud are different but similar; the context information of the sample node is input into the first layer of attention operation network of the attention neural network model, and the first weighted context matrix of the sample node is obtained; the first weighted context matrix is compared with the context information Adding, inputting the result of addition into the first layer of multi-layer perceptron network to obtain the second weighted context matrix; inputting the second weighted context matrix into the second layer of attention operation network to obtain the third weighted context matrix; Adding the third weighted context matrix to the second weighted context matrix, inputting the result of the addition into the second layer of multi-layer perceptron network, and obtaining the probability distribution of the information to be compressed corresponding to the predicted node to be compressed; multiple The probability distribution of the information to be compressed corresponding to the sample node and the information to be compressed are brought into the loss function to calculate the loss value; the optimization algorithm based on deep learning is used for backpropagation to optimize the loss value and update the weight of the attention neural network model ; Execute the above steps multiple times, and when the rate of change of the loss value output by the loss function reaches a preset threshold, a trained attention neural network model is obtained.

可选地,当前待压缩节点的上下文信息,可以包括:当前待压缩节点对应的同层节点的多层父亲节点、前序同层节点的节点占用码和位置信息,以及待压缩节点的位置信息;将当前待压缩节点对应的同层节点的多层父亲节点、前序同层节点的节点占用码和位置信息,以及当前待压缩节点的位置信息,作为待压缩节点对应的上下文信息,可以包括:将当前待压缩节点的前序同层节点和前序同层节点对应的多层父亲节点的节点占用码和位置信息,作为当前待压缩节点对应的第一上下文信息;将当前待压缩节点的位置信息、当前待压缩节点的前一个已压缩的同层节点的节点占用码,以及当前待压缩节点对应的多层父亲节点的节点占用码和位置信息,作为当前待压缩节点对应的第二上下文信息,将第一上下文信息和第二上下文信息,作为当前待压缩节点对应的上下文信息;当前待压缩节点对应的待压缩信息,可以包括:当前待压缩节点的节点占用码。Optionally, the context information of the current node to be compressed may include: the multi-layer parent node of the same layer node corresponding to the current node to be compressed, the node occupancy code and location information of the previous node at the same layer, and the location information of the node to be compressed ;Using the multi-layer parent node of the same layer node corresponding to the current node to be compressed, the node occupancy code and location information of the previous node of the same layer, and the current location information of the node to be compressed, as the context information corresponding to the node to be compressed, which can include : Use the node occupancy code and location information of the previous node of the current node to be compressed and the multi-layer parent node corresponding to the previous node of the same layer as the first context information corresponding to the current node to be compressed; the current node to be compressed The location information, the node occupancy code of the previous compressed node at the same layer of the current node to be compressed, and the node occupancy code and location information of the multi-layer parent node corresponding to the current node to be compressed are used as the second context corresponding to the current node to be compressed Information, the first context information and the second context information are used as the context information corresponding to the current node to be compressed; the to-be-compressed information corresponding to the current node to be compressed may include: the node occupation code of the current node to be compressed.

可选地,当前待压缩节点的上下文信息,还可以包括:当前待压缩节点对应的同层节点的多层父亲节点的节点占用码和位置信息、同层节点的节点占用码和位置信息、前序同层节点对应的节点属性和/或节点属性残差;当前待压缩节点对应的待压缩信息,还可以包括:当前待压缩节点的节点属性和/或节点属性残差。Optionally, the context information of the current node to be compressed may also include: the node occupancy code and location information of the multi-layer parent node of the node at the same layer corresponding to the current node to be compressed, the node occupancy code and location information of the node at the same layer, the previous The node attributes and/or node attribute residuals corresponding to nodes of the same order; the to-be-compressed information corresponding to the current to-be-compressed node may also include: the node attributes and/or node attribute residuals of the current to-be-compressed node.

可选地,位置信息可以包括:节点索引,和/或节点深度,和/或节点的包围盒坐标。Optionally, the location information may include: node index, and/or node depth, and/or bounding box coordinates of the node.

可选地,将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布,可以包括:将当前待压缩节点的上下文信息输入至注意力神经网络模型的第一层注意力操作网络中,得到当前待压缩节点的第一加权上下文矩阵;将第一加权上下文矩阵和上下文信息相加,将相加的结果输入至第一层多层感知机网络中,得到第二加权上下文矩阵;将第二加权上下文矩阵输入至第二层注意力操作网络中,得到第三加权上下文矩阵;将第三加权上下文矩阵与第二加权上下文矩阵相加,将相加的结果输入至第二层多层感知机网络中,得出第四加权上下文矩阵;将第四加权上下文矩阵输入至第三层多层感知机网络中,得出第五加权上下文矩阵;将第五加权上下文矩阵通过softmax函数,预测出当前待压缩节点对应的待压缩信息的概率分布。Optionally, inputting the context information of the current node to be compressed into the pre-trained attention neural network model to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed may include: inputting the context information of the current node to be compressed Input to the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the current node to be compressed; add the first weighted context matrix and context information, and input the result of the addition to the first In the layer multi-layer perceptron network, the second weighted context matrix is obtained; the second weighted context matrix is input into the second layer of attention operation network to obtain the third weighted context matrix; the third weighted context matrix is combined with the second weighted context Matrix addition, the result of the addition is input into the second-layer multi-layer perceptron network to obtain the fourth weighted context matrix; the fourth weighted context matrix is input into the third-layer multi-layer perceptron network to obtain the fourth Five weighted context matrices; the fifth weighted context matrix is passed through the softmax function to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed.

可选地,将当前待压缩节点的上下文信息输入至注意力神经网络模型的第一层注意力操作网络中,得到当前待压缩节点的第一加权上下文矩阵,可以包括:将当前待压缩节点的上下文信息输入至第一多层感知机,得出第一输出矩阵;将当前待压缩节点的上下文信息输入至第二多层感知机,得出第二输出 矩阵;将当前待压缩节点的上下文信息输入至第三多层感知机,得出第三输出矩阵;将第二输出矩阵的转置矩阵与第一输出矩阵相乘,得出矩阵内积;将矩阵内积与遮罩矩阵相加,将相加后的结果输入至softmax函数,得出注意力矩阵;将注意力矩阵与第三输出矩阵相乘,得到当前待压缩节点的第一加权上下文矩阵。Optionally, the context information of the current node to be compressed is input into the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the current node to be compressed, which may include: the current node to be compressed The context information is input to the first multi-layer perceptron to obtain the first output matrix; the context information of the current node to be compressed is input to the second multi-layer perceptron to obtain the second output matrix; the context information of the current node to be compressed is obtained Input to the third multilayer perceptron to obtain the third output matrix; multiply the transpose matrix of the second output matrix with the first output matrix to obtain the inner product of the matrix; add the inner product of the matrix to the mask matrix, The added result is input to the softmax function to obtain the attention matrix; the attention matrix is multiplied by the third output matrix to obtain the first weighted context matrix of the current node to be compressed.

可选地,注意力矩阵中的每一个元素可以为注意力值;可以通过以下公式计算注意力矩阵的注意力值:Optionally, each element in the attention matrix can be an attention value; the attention value of the attention matrix can be calculated by the following formula:

Figure PCTCN2022085657-appb-000001
Figure PCTCN2022085657-appb-000001

公式(1)中,

Figure PCTCN2022085657-appb-000002
指的是第j个节点与第k个节点上下文之间的注意力值,第j个节点是同层节点中的第j个节点并且是当前待压缩节点,f j是第j个节点的上下文信息,f k是第k个节点的上下文信息,第k个节点是第j个节点的前序同层节点;分子
Figure PCTCN2022085657-appb-000003
代表第j个节点与第k个节点上下文之间的相似值,分母
Figure PCTCN2022085657-appb-000004
指的是第j个节点与第1个节点至第j个节点上下文之间的相似值的和;MLP 2(f j)指的是将第j个节点的上下文信息输入至第二多层感知机,得出第j个节点对应的第二输出矩阵;
Figure PCTCN2022085657-appb-000005
指的是将第k个节点的上下文信息输入至第一多层感知机,得出第k个节点对应的第一输出矩阵的转置矩阵。 In formula (1),
Figure PCTCN2022085657-appb-000002
Refers to the attention value between the jth node and the kth node context, the jth node is the jth node in the nodes of the same layer and is the current node to be compressed, f j is the context of the jth node information, f k is the context information of the kth node, and the kth node is the preorder node of the jth node;
Figure PCTCN2022085657-appb-000003
Represents the similarity value between the jth node and the kth node context, denominator
Figure PCTCN2022085657-appb-000004
Refers to the sum of the similarity values between the jth node and the context of the first node to the jth node; MLP 2 (f j ) refers to inputting the context information of the jth node into the second multi-layer perception machine to obtain the second output matrix corresponding to the jth node;
Figure PCTCN2022085657-appb-000005
Refers to inputting the context information of the kth node into the first multi-layer perceptron to obtain the transpose matrix of the first output matrix corresponding to the kth node.

可选地,将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布,可以包括:将当前待压缩节点的上下文信息进行扩维,生成扩维上下文信息;将扩维上下文信息输入至预先训练好的注意力神经网络模型中,预测出当前待压缩节点对应的待压缩信息的概率分布。Optionally, inputting the context information of the current node to be compressed into the pre-trained attention neural network model to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed may include: inputting the context information of the current node to be compressed Carry out dimension expansion to generate expanded dimension context information; input the expanded dimension context information into the pre-trained attention neural network model, and predict the probability distribution of the information to be compressed corresponding to the current node to be compressed.

可选地,将当前待压缩节点的上下文信息进行扩维,生成扩维上下文信息,可以包括:先将当前待压缩节点的上下文信息通过独热码操作进行扩维,生成上下文信息的独热码,以及将上下文信息的独热码通过嵌入操作生成扩维上下文信息。Optionally, expanding the context information of the current node to be compressed to generate the expanded context information may include: first expanding the dimension of the context information of the current node to be compressed through a one-hot code operation to generate a one-hot code of the context information , and the one-hot code of the context information is generated through the embedding operation to expand the dimension context information.

可选地,点云的压缩方法可以包括提供一种点云的压缩装置,该压缩装置可以包括第一量化模块、第一确定模块、第一预测模块和第一压缩模块,其中:第一量化模块可被配置成将点云通过树结构对点的坐标进行二进制编码,将二进制编码转化为十进制编码,作为树结构中每个节点对应的节点占用码;第一确定模块可被配置成对树结构中的节点移动预置窗口,将预置窗口内的未压缩的节点确定为当前待压缩节点;第一预测模块可被配置成将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布;以及第一压缩模块可被配置成将待压缩节点对应的待压缩信息的概率分布和待压缩信息,输入至算数编码器进行熵编码,得到点云码流,将点云码流作为点云的压缩结果。Optionally, the point cloud compression method may include providing a point cloud compression device, which may include a first quantization module, a first determination module, a first prediction module, and a first compression module, wherein: the first quantization The module can be configured to binary code the coordinates of the point cloud through the tree structure, and convert the binary code into a decimal code as the node occupation code corresponding to each node in the tree structure; the first determination module can be configured as a tree structure The nodes in the structure move the preset window, and determine the uncompressed node in the preset window as the current node to be compressed; the first prediction module can be configured to input the context information of the current node to be compressed into the pre-trained attention In the neural network model, the probability distribution of the information to be compressed corresponding to the current node to be compressed is predicted; and the first compression module may be configured to input the probability distribution of the information to be compressed corresponding to the node to be compressed and the information to be compressed to the arithmetic encoder Entropy encoding is performed to obtain the point cloud code stream, and the point cloud code stream is used as the compression result of the point cloud.

本公开的另一些实施例还提供一种点云的解压缩方法,该方法可以包括:对树结构移动预置窗口,将每次移动预置窗口内的未解压缩的节点确定为当前待解压缩节点;将当前待解压缩节点的上下文信息,输入至预先训练好的注意力神经网络模型中,预测当前待解压缩节点对应的待压缩信息的概率分布;将 当前待解压缩节点对应的待解压缩信息的概率分布和点云码流,输入至算数解码器进行熵解码,得到待解压缩节点对应的待解压缩信息;将待解压缩信息构建树结构,从树结构中获取点云,通过反量化,得到解压缩点云。Other embodiments of the present disclosure also provide a method for decompressing a point cloud, which may include: moving a preset window for the tree structure, and determining the undecompressed nodes in the preset window each time as being currently to be decompressed Compress the node; input the context information of the current node to be decompressed into the pre-trained attention neural network model, predict the probability distribution of the information to be compressed corresponding to the current node to be decompressed; The probability distribution of the decompressed information and the point cloud code stream are input to the arithmetic decoder for entropy decoding, and the information to be decompressed corresponding to the node to be decompressed is obtained; the information to be decompressed is constructed into a tree structure, and the point cloud is obtained from the tree structure. Through inverse quantization, the decompressed point cloud is obtained.

可选地,点云的解压缩方法可以包括提供一种点云的解压缩装置,该解压缩装置可以包括:第二确定模块、第二预测模块、第一解压缩模块和第二量化模块,其中:第二确定模块可被配置成对树结构移动预置窗口,将每次移动预置窗口内的未解压缩的节点确定为当前待解压缩节点;第二预测模块可被配置成将当前待解压缩节点的上下文信息,输入至预先训练好的注意力神经网络模型中,预测当前待解压缩节点对应的待解压缩信息的概率分布;第一解压缩模块可被配置成将当前待解压缩节点对应的待解压缩信息的概率分布和点云码流,输入至算数解码器进行熵解码,得到当前待解压缩节点对应的待解压缩信息;第二量化模块可被配置成将待解压缩信息构建树结构,从树结构中获取点云,通过反量化,得到解压缩点云。Optionally, the point cloud decompression method may include providing a point cloud decompression device, the decompression device may include: a second determination module, a second prediction module, a first decompression module and a second quantization module, Wherein: the second determination module can be configured to move the preset window to the tree structure, and determine the uncompressed node in the preset window of each movement as the current node to be decompressed; the second prediction module can be configured to use the current The context information of the node to be decompressed is input into the pre-trained attention neural network model to predict the probability distribution of the information to be decompressed corresponding to the current node to be decompressed; the first decompression module can be configured to The probability distribution of the information to be decompressed corresponding to the compressed node and the point cloud code stream are input to the arithmetic decoder for entropy decoding to obtain the information to be decompressed corresponding to the current node to be decompressed; the second quantization module can be configured to convert the information to be decompressed The compressed information builds a tree structure, obtains the point cloud from the tree structure, and obtains the decompressed point cloud through dequantization.

本公开的又一些实施例还提供一种电子设备,可以包括:处理器、存储器和总线,存储器存储有处理器可执行的机器可读指令,当电子设备运行时,处理器与存储器之间通过总线进行通信,机器可读指令被处理器运行时执行上述任一种可能的实施方式中的点云的压缩方法的步骤,和/或,点云的解压缩方法的步骤。Some other embodiments of the present disclosure also provide an electronic device, which may include: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory pass through The bus communicates, and the machine-readable instructions are executed by the processor to execute the steps of the point cloud compression method in any one of the above possible implementations, and/or the steps of the point cloud decompression method.

本公开的再一些实施例还提供了一种计算机可读存储介质,计算机可读存储介质上可以存储有计算机程序,计算机程序被处理器运行时可以执行上述任一种可能的实施方式中的点云的压缩方法的步骤,和/或,点云的解压缩方法的步骤。Some other embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program can be stored, and when the computer program is run by a processor, it can perform the points in any of the above possible implementation manners. The steps of the cloud compression method, and/or, the steps of the point cloud decompression method.

可选地,计算机可读存储介质可以为U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等能够存储程序代码的通用存储介质。Optionally, the computer-readable storage medium may be a general-purpose storage medium capable of storing program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

本公开的再又一些实施例提供了一种点云的压缩和解压缩方法,点云的压缩方法可以为:将点云通过树结构对点的坐标进行二进制编码,将二进制编码转化为十进制编码,作为树结构中每个节点对应的节点占用码;对树结构中的节点移动预置窗口,将预置窗口内的未压缩的节点确定为当前待压缩节点;将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布;根据待压缩节点对应的待压缩信息的概率分布和待压缩信息,输入至算数编码器进行熵编码,得到点云码流,将点云码流作为点云的压缩结果。本公开舍弃了体素结构的上下文信息,通过将当前待压缩节点对应的同层节点和父亲节点的节点占用码和位置信息,作为当前待压缩节点的上下文信息,在对待压缩节点进行压缩和解压缩时,考虑了当前待压缩节点的同层节点和父亲节点,解决了相关技术中计算量大以及压缩效率低的技术问题,达到了提高压缩效果和减少计算量的技术效果。Still other embodiments of the present disclosure provide a point cloud compression and decompression method. The point cloud compression method may be: binary code the point cloud through a tree structure to point coordinates, convert the binary code into a decimal code, As the node occupancy code corresponding to each node in the tree structure; move the preset window for the nodes in the tree structure, and determine the uncompressed node in the preset window as the current node to be compressed; input the context information of the current node to be compressed To the pre-trained attention neural network model, predict the probability distribution of the information to be compressed corresponding to the current node to be compressed; according to the probability distribution of the information to be compressed corresponding to the node to be compressed and the information to be compressed, input to the arithmetic encoder for entropy Encode to get the point cloud code stream, and use the point cloud code stream as the compression result of the point cloud. This disclosure abandons the context information of the voxel structure, and compresses and decompresses the node to be compressed by using the node occupancy code and location information of the same layer node and the parent node corresponding to the current node to be compressed as the context information of the current node to be compressed At the same time, the peer nodes and parent nodes of the current node to be compressed are considered, which solves the technical problems of large calculation and low compression efficiency in related technologies, and achieves the technical effect of improving the compression effect and reducing the calculation.

为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍, 应当理解,以下附图仅示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present disclosure more clearly, the accompanying drawings used in the embodiments will be briefly introduced below. It should be regarded as a limitation on the scope, and those skilled in the art can also obtain other related drawings based on these drawings without creative work.

图1示出了本公开实施例所提供的一种点云的压缩方法的流程图。Fig. 1 shows a flowchart of a point cloud compression method provided by an embodiment of the present disclosure.

图2示出了本公开实施例所提供的一种点云的几何压缩方法的流程图。Fig. 2 shows a flowchart of a point cloud geometric compression method provided by an embodiment of the present disclosure.

图3示出了本公开实施例所提供的一种点云的属性压缩方法的流程图。Fig. 3 shows a flowchart of a point cloud attribute compression method provided by an embodiment of the present disclosure.

图4示出了本公开实施例所提供的一种点云的解压缩方法的流程图。Fig. 4 shows a flow chart of a point cloud decompression method provided by an embodiment of the present disclosure.

图5示出了本公开实施例所提供的一种点云的几何解压缩方法的流程图。Fig. 5 shows a flowchart of a method for geometrically decompressing a point cloud provided by an embodiment of the present disclosure.

图6示出了本公开实施例所提供的一种点云的属性解压缩方法的流程图。Fig. 6 shows a flowchart of a point cloud attribute decompression method provided by an embodiment of the present disclosure.

图7示出了本公开实施例所提供的属性补全的示意图。FIG. 7 shows a schematic diagram of attribute completion provided by an embodiment of the present disclosure.

图8示出了本公开实施例所提供的预置窗口的示意图。Fig. 8 shows a schematic diagram of a preset window provided by an embodiment of the present disclosure.

图9示出了本公开实施例所提供的注意力神经网络模型的示意图。FIG. 9 shows a schematic diagram of an attention neural network model provided by an embodiment of the present disclosure.

图10示出了本公开实施例所提供的一种点云的压缩和解压缩的示意图。Fig. 10 shows a schematic diagram of point cloud compression and decompression provided by an embodiment of the present disclosure.

图11示出了本公开实施例所提供的一种点云的压缩装置的示意图。Fig. 11 shows a schematic diagram of a point cloud compression device provided by an embodiment of the present disclosure.

图12示出了本公开实施例所提供的一种点云的解压缩装置的示意图。Fig. 12 shows a schematic diagram of an apparatus for decompressing a point cloud provided by an embodiment of the present disclosure.

图13示出了本公开实施例所提供的一种电子设备的结构示意图。Fig. 13 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,应当理解,本公开中的附图仅起到说明和描述的目的,并不用于限定本公开的保护范围。另外,应当理解,示意性的附图并未按实物比例绘制。本公开中使用的流程图示出了根据本公开的一些实施例实现的操作。应当理解,流程图的操作可以不按顺序实现,没有逻辑的上下文关系的步骤可以反转顺序或者同时实施。此外,本领域技术人员在本公开内容的指引下,可以向流程图添加一个或多个其他操作,也可以从流程图中移除一个或多个操作。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present disclosure. It should be understood that the technical solutions in the embodiments of the present disclosure The accompanying drawings are for illustration and description purposes only, and are not intended to limit the protection scope of the present disclosure. Additionally, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this disclosure illustrate operations implemented in accordance with some embodiments of the disclosure. It should be understood that the operations of the flowcharts may be performed out of order, and steps that do not have a logical context may be performed in reverse order or simultaneously. In addition, those skilled in the art may add one or more other operations to the flowchart, or remove one or more operations from the flowchart under the guidance of the present disclosure.

另外,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的全部其他实施例,都属于本公开保护的范围。In addition, the described embodiments are only some of the embodiments of the present disclosure, not all of them. The components of the disclosed embodiments generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present disclosure.

相关技术中,对点云数据进行压缩和解压缩时,将待压缩节点对应的体素结构作为上下文信息,造成计算量过大且预测结果不准确的技术问题,或者,没有将待压缩节点的同层节点作为待压缩节点的上下文信息,造成预测结果不准确,进而导致压缩效果差的技术问题。In related technologies, when compressing and decompressing point cloud data, the voxel structure corresponding to the node to be compressed is used as context information, resulting in technical problems such as excessive calculation and inaccurate prediction results, or, the same voxel structure of the node to be compressed is not Layer nodes are used as the context information of the nodes to be compressed, resulting in inaccurate prediction results, which in turn leads to technical problems of poor compression effect.

基于此,本公开实施例提供了一种点云的压缩和解压缩方法,对待压缩节点进行压缩和解压缩处理时,将待压缩节点对应的同层节点和父亲节点的节点占用码和位置信息,作为待压缩节点的上下文信息,解决了相关技术中计算量大以及压缩效率低的技术问题,达到了提高压缩效果和减少计算量的技术效果, 可选的方式如下:Based on this, an embodiment of the present disclosure provides a method for compressing and decompressing a point cloud. When compressing and decompressing a node to be compressed, the node occupancy code and location information of the node at the same layer and the parent node corresponding to the node to be compressed are used as The context information of the node to be compressed solves the technical problems of large amount of calculation and low compression efficiency in related technologies, and achieves the technical effect of improving the compression effect and reducing the amount of calculation. The optional methods are as follows:

请参阅图1,图1为本公开实施例所提供的一种点云的压缩方法的流程图。如图1所示,本公开实施例提供的一种点云的压缩方法,可以包括以下步骤:Please refer to FIG. 1 . FIG. 1 is a flow chart of a point cloud compression method provided by an embodiment of the present disclosure. As shown in Figure 1, a method for compressing a point cloud provided by an embodiment of the present disclosure may include the following steps:

S101、将点云通过树结构对点的坐标进行二进制编码,将二进制编码转化为十进制编码,作为树结构中每个节点对应的节点占用码。S101. Perform binary encoding on the point coordinates of the point cloud through the tree structure, convert the binary encoding into decimal encoding, and use it as a node occupation code corresponding to each node in the tree structure.

示例性地,在将点云通过树结构对点的坐标进行二进制编码,将二进制编码转化为十进制编码,作为树结构中每个节点对应的节点占用码之前,方法可以包括,对点云进行量化。将点云进行量化可以理解为,将点云大量可能的坐标或者属性的离散取值近似为较少的离散值。以便后续将量化后的点云构建树结构。在无损压缩的实施例中,可以不进行量化。本公开提供的一种实施例中,树结构可以为八叉树结构。Exemplarily, before the point cloud is binary-coded on the coordinates of the point through the tree structure, and the binary code is converted into a decimal code as the node occupancy code corresponding to each node in the tree structure, the method may include quantifying the point cloud . Quantifying the point cloud can be understood as approximating the discrete values of a large number of possible coordinates or attributes of the point cloud to fewer discrete values. In order to build a tree structure for the quantized point cloud in the future. In lossless compressed embodiments, quantization may not be performed. In an embodiment provided by the present disclosure, the tree structure may be an octree structure.

对点云进行量化时,需要对点云进行几何量化和属性量化。在进行几何量化(即,坐标量化)时,可以确定点云中的最小三维坐标值(即,右下角的点的三维坐标值,参考附图7),将点云中的所有点的三维坐标值与最小三维坐标值作差(即,将点云数据平移,使得平移后的点云数据中右下角的点位于原点处),再将差值与量化步长作比后取整,将取整后的比值作为几何量化后的点云数据中各点的三维坐标值。在进行属性量化(即,颜色(RGB值或YUV值)和/或反射率量化)时,可以将原始的点云属性与量化步长做比后取整,将取整后的比值作为属性量化后的点云的各点的节点属性。When quantifying the point cloud, it is necessary to perform geometric quantization and attribute quantization on the point cloud. When performing geometric quantization (that is, coordinate quantization), the minimum three-dimensional coordinate value (that is, the three-dimensional coordinate value of the point in the lower right corner, referring to accompanying drawing 7) in the point cloud can be determined, and the three-dimensional coordinates of all points in the point cloud The difference between the value and the minimum three-dimensional coordinate value (that is, the point cloud data is shifted so that the point in the lower right corner of the shifted point cloud data is at the origin), and then the difference is compared with the quantization step and rounded, and the rounded The adjusted ratio is used as the three-dimensional coordinate value of each point in the geometrically quantized point cloud data. When performing attribute quantization (that is, color (RGB value or YUV value) and/or reflectance quantization), the original point cloud attribute can be compared with the quantization step size and then rounded, and the rounded ratio can be used as attribute quantization The node attributes of each point of the point cloud.

其中,量化步长(qs)是用户可调的参数,其取值取决于想要压缩的程度和能接受的失真。量化步长越大,点云数据的失真越大,但是码率越小。这也表示了我们的模型可以适用于变码率(同一个模型,实现不同的压缩大小和失真)的压缩。其中,几何量化与属性量化的量化步长可以是不同的。Among them, the quantization step size (qs) is a user-adjustable parameter, and its value depends on the desired compression degree and acceptable distortion. The larger the quantization step size, the larger the distortion of the point cloud data, but the smaller the bit rate. This also means that our model can be applied to the compression of variable bit rates (the same model, achieving different compression sizes and distortions). Wherein, the quantization step size of geometric quantization and attribute quantization may be different.

节点占用码指的是点云中各点的排列位置,并将各点的排列位置情况的八位二进制编码转换为十进制编码,将十进制编码作为此节点的节点占用码。The node occupancy code refers to the arrangement position of each point in the point cloud, and the eight-bit binary code of the arrangement position of each point is converted into a decimal code, and the decimal code is used as the node occupancy code of this node.

示例性地,请参阅图7,图7示出了本公开实施例所提供的属性补全的示意图。图7中节点占用码为73对应的节点指代的体素包括八个子体素,并将子体素进行编号,编号的范围为编号0-编号7。其中,编号1、编号4和编号7所在的子体素存在点,其对应的二进制编码为01001001(对应图7中的0a00b00c),转换为十进制为73,则73为此节点的节点占用码。For example, please refer to FIG. 7 , which shows a schematic diagram of attribute completion provided by an embodiment of the present disclosure. In FIG. 7 , the voxel indicated by the node corresponding to the node occupancy code of 73 includes eight sub-voxels, and the sub-voxels are numbered, and the number ranges from number 0 to number 7. Among them, the sub-voxel existence points where No. 1, No. 4 and No. 7 are located have a corresponding binary code of 01001001 (corresponding to 0a00b00c in Figure 7), which is converted to 73 in decimal, and 73 is the node occupancy code of this node.

S102、对树结构中的节点移动预置窗口,将预置窗口内的未压缩的节点确定为当前待压缩节点。S102. Move the preset window to the nodes in the tree structure, and determine the uncompressed node in the preset window as the current node to be compressed.

对点云的压缩可以分为几何压缩和属性压缩,当进行几何压缩时,对应的是几何预置窗口。The compression of point clouds can be divided into geometry compression and attribute compression. When performing geometry compression, it corresponds to the geometry preset window.

示例性地,请参阅图8,图8示出了本公开实施例所提供的预置窗口的示意图。图8中,“x i”节点指的是当前待压缩节点,N 1指的是几何预置窗口中的待压缩节点对应的同层节点数量;N 2指的是属性预置窗口中的待压缩节点对应的同层节点数量;W1指的是当前待压缩节点的同层节点数量(N 1)为8,层高为4的几何预置窗口;W2指的是当前待压缩节点的同层节点数量(N 2)为7,层高为1的属性预置窗口。 For example, please refer to FIG. 8 , which shows a schematic diagram of a preset window provided by an embodiment of the present disclosure. In Figure 8, the " xi " node refers to the current node to be compressed, N 1 refers to the number of nodes in the same layer corresponding to the node to be compressed in the geometry preset window; N 2 refers to the number of nodes to be compressed in the attribute preset window The number of nodes on the same layer corresponding to the compressed node; W1 refers to the geometric preset window with the number of nodes on the same layer (N 1 ) of the current node to be compressed is 8 and the layer height is 4; W2 refers to the same layer of the node to be compressed currently The attribute preset window with the number of nodes (N 2 ) being 7 and the layer height being 1.

S103、将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压 缩节点对应的待压缩信息的概率分布。S103. Input the context information of the current node to be compressed into the pre-trained attention neural network model, and predict the probability distribution of the information to be compressed corresponding to the current node to be compressed.

其中,预置窗口被配置成根据广度优先原则进行移动。Wherein, the preset window is configured to move according to the breadth-first principle.

移动预置窗口时,可以依据广度优先原则将树结构的节点排成广度优先序列,将广度优先序列中前面的节点作为待压缩节点对应的同层节点,直到预置窗口的同层节点数量满足预设的数量(N1或者N2)。当预置窗口的同层节点的数量和/或同层节点的多层父亲节点的数量不能满足时(即树结构中不存在更多的节点了),可以用默认节点补充预置窗口内的节点,这种情况出现在树结构靠近根部的一些层中。When moving the preset window, the nodes of the tree structure can be arranged in a breadth-first sequence according to the breadth-first principle, and the nodes in the front of the breadth-first sequence are used as the same-layer nodes corresponding to the nodes to be compressed until the number of same-layer nodes in the preset window satisfies Preset quantity (N1 or N2). When the number of same-level nodes in the preset window and/or the number of multi-layer parent nodes of the same-level nodes cannot be satisfied (that is, there are no more nodes in the tree structure), default nodes can be used to supplement the preset window node, which occurs in some layers of the tree structure near the root.

当前待压缩节点对应的同层节点可以包括当前待压缩节点、当前待压缩节点的前序同层节点,和/或,当前待压缩节点的后序同层节点。The peer nodes corresponding to the current node to be compressed may include the current node to be compressed, the previous peer node of the current node to be compressed, and/or the subsequent peer node of the current node to be compressed.

一优选实施例,当进行几何压缩时,当前待压缩节点的上下文信息(即,当前压缩节点的几何上下文信息),可以包括:当前待压缩节点对应的同层节点的多层父亲节点、前序同层节点的节点占用码和位置信息,以及待压缩节点的位置信息。In a preferred embodiment, when performing geometric compression, the context information of the current node to be compressed (that is, the geometric context information of the current compressed node) may include: the multi-layer parent node of the same layer node corresponding to the current node to be compressed, the preamble The node occupancy code and location information of nodes in the same layer, and the location information of the node to be compressed.

当前待压缩节点对应的上下文信息中并不包括当前待压缩节点的节点占用码,是由于解压缩的目的是解码当前待压缩节点的节点占用码,也即解压缩时当前待压缩节点的节点占用码是未知的,因此在压缩时,也不考虑自身的节点占用码。The context information corresponding to the current node to be compressed does not include the node occupancy code of the current node to be compressed, because the purpose of decompression is to decode the node occupancy code of the current node to be compressed, that is, the node occupancy of the current node to be compressed during decompression The code is unknown, so it does not consider its own node occupation code when compressing.

可以将当前待压缩节点的前序同层节点和前序同层节点对应的多层父亲节点的节点占用码和位置信息,作为待压缩节点对应的第一上下文信息;将待压缩节点的位置信息、待压缩节点的前一个已压缩的同层节点的节点占用码,以及待压缩节点对应的多层父亲节点的节点占用码和位置信息,作为待压缩节点对应的第二上下文信息,将第一上下文信息和第二上下文信息,作为待压缩节点对应的上下文信息。The node occupancy code and location information of the multi-layer parent node corresponding to the previous node of the current node to be compressed and the corresponding multi-layer parent node can be used as the first context information corresponding to the node to be compressed; the location information of the node to be compressed , the node occupancy code of the previous compressed node at the same layer of the node to be compressed, and the node occupancy code and location information of the multi-layer parent node corresponding to the node to be compressed, as the second context information corresponding to the node to be compressed, the first The context information and the second context information serve as context information corresponding to the node to be compressed.

其中,位置信息可以包括:节点索引,和/或节点深度,和/或节点的包围盒坐标。节点索引指的是此节点在其同父节点的兄弟节点中的位置,节点索引的范围为0至7;节点深度指的是节点在的八叉树结构的深度,八叉树结构中根节点的深度为1。包围盒指的是节点对应的体素的立方体空间,包围盒坐标指的是立方体空间的斜对角线的两个顶点的坐标,同一点云对应的多个包围盒的斜对角线方向相同,如图8所示,(x 0,y 0,z 0,x 1,y 1,z 1)为节点占用码73对应的体素的包围盒坐标。 Wherein, the location information may include: node index, and/or node depth, and/or bounding box coordinates of the node. The node index refers to the position of the node in the sibling nodes of the same parent node, and the range of the node index is 0 to 7; the node depth refers to the depth of the octree structure of the node, and the root node in the octree structure The depth is 1. The bounding box refers to the cubic space of the voxel corresponding to the node, and the bounding box coordinates refer to the coordinates of the two vertices of the diagonal diagonal of the cubic space. The diagonal directions of multiple bounding boxes corresponding to the same point cloud are the same , as shown in FIG. 8 , (x 0 , y 0 , z 0 , x 1 , y 1 , z 1 ) are the bounding box coordinates of the voxel corresponding to the node occupation code 73.

示例性地,返回图8,图8中节点占用码为9的节点,其节点深度为1,节点索引为7,节点包围盒坐标为(0,0,0,7,7,7)。Exemplarily, returning to FIG. 8 , in FIG. 8 , a node whose node occupation code is 9 has a node depth of 1, a node index of 7, and node bounding box coordinates of (0,0,0,7,7,7).

当进行属性压缩时,当前待压缩节点的上下文信息,还可以包括:当前待压缩节点对应的同层节点的多层父亲节点的节点占用码和位置信息、同层节点的节点占用码和位置信息、前序同层节点对应的节点属性和/或节点属性残差。When performing attribute compression, the context information of the current node to be compressed can also include: the node occupancy code and location information of the multi-layer parent node of the same layer node corresponding to the current node to be compressed, and the node occupancy code and location information of the same layer node , the node attribute and/or the node attribute residual corresponding to the previous node at the same layer.

一优选实施例,当进行属性压缩时,当前待压缩节点的上下文信息(即,当前压缩节点的节点属性(节点属性残差)上下文信息),可以包括:当前待压缩节点对应的同层节点的多层父亲节点、前序同层节点、后序同层节点、待压缩节点的节点占用码和位置信息,以及前序同层节点对应的节点属性和/或节点属性残差。In a preferred embodiment, when attribute compression is performed, the context information of the current node to be compressed (that is, the node attribute (node attribute residual) context information of the current compressed node) may include: the node at the same layer corresponding to the current node to be compressed Node occupancy codes and location information of multi-layer parent nodes, previous nodes of the same layer, subsequent nodes of the same layer, nodes to be compressed, and node attributes and/or node attribute residuals corresponding to the previous nodes of the same layer.

可选地,将当前待压缩节点的前序同层节点和前序同层节点对应的多层父亲节点的节点占用码和位 置信息,作为待压缩节点对应的第一上下文信息;将当前待压缩节点的后序同层节点和后序同层节点对应的多层父亲节点的节点占用码和位置信息,作为待压缩节点对应的第二上下文信息;将待压缩节点的节点占用码和位置信息,以及待压缩节点对应的多层父亲节点的节点占用码和位置信息,作为待压缩节点对应的第三上下文信息;将当前待压缩节点的前序同层节点对应的节点属性和/或节点属性残差,作为待压缩节点对应的第四上下文信息;将第一上下文信息、第二上下文信息、第三上下文信息和第四上下文信息,作为待压缩节点对应的上下文信息。Optionally, the node occupancy code and location information of the previous node of the current node to be compressed and the multi-layer parent node corresponding to the previous node of the same layer are used as the first context information corresponding to the node to be compressed; the current node to be compressed The node occupancy code and location information of the multi-layer parent node corresponding to the subsequent node of the same layer and the subsequent node of the same layer are used as the second context information corresponding to the node to be compressed; the node occupancy code and location information of the node to be compressed, And the node occupancy code and location information of the multi-layer parent node corresponding to the node to be compressed, as the third context information corresponding to the node to be compressed; The difference is used as the fourth context information corresponding to the node to be compressed; the first context information, the second context information, the third context information and the fourth context information are used as the context information corresponding to the node to be compressed.

其中,进行属性压缩时,当前待压缩节点对应的同层节点,可以为树结构的最深层的叶节点,即,树结构中没有子节点的节点。只有叶节点才有节点属性和/或节点属性残差。Wherein, when attribute compression is performed, the node at the same layer corresponding to the current node to be compressed may be the deepest leaf node in the tree structure, that is, a node without child nodes in the tree structure. Only leaf nodes have node attributes and/or node attribute residuals.

节点属性可以是节点的3位RGB值或者YUV值或者反射率或其他属性,节点属性残差可以是将节点的属性补全后,此节点与前序节点的属性编码差。其中,3位RGB值的三原色通道的取值范围可以为0-255,即,节点属性可以为3位RGB值。属性补全可以是为了便于构造上下文和便于神经网络的计算,补充的属性值(属性值残差)并不进入熵编码。The node attribute can be the 3-bit RGB value or YUV value or reflectivity or other attributes of the node, and the node attribute residual can be the attribute coding difference between this node and the previous node after the attributes of the node are completed. Wherein, the value range of the three primary color channels of the 3-bit RGB value can be 0-255, that is, the node attribute can be a 3-bit RGB value. Attribute completion can be for the convenience of constructing context and calculation of neural network, and the supplementary attribute value (residual value of attribute value) does not enter into entropy coding.

示例性地,节点的属性补全方式,请参阅图7,图7示出了本公开实施例所提供的属性补全的示意图。如图7所示,例如就颜色中的R属性来说,节点占用码为73对应的节点中,编号1的子体素对应的节点属性值为a,编号4的子体素对应的节点属性值为b,编号7的子体素对应的节点属性值为c,则节点占用码为73对应的节点对应的属性编码为0a00b00c,0代表子体素中不存在点云点。将属性编码循环左移补全,第一次循环左移补全为aa0bb0cc,第一次属性补全后的属性编码依然存在属性为零的编码,则进行第二次循环左移补全为aabbbccc,第二次属性补全后的属性编码无零编码,则属性补全完成,属性补全后的属性编码为aabbbccc。若前序节点属性补全后的属性编码为dddeeedd,则节点占用码为73的节点,对应的节点属性残差为:(d-a)(d-a)(d-b)(e-b)(e-b)(e-c)(d-c)(d-c)。For example, the attribute completion method of a node, please refer to FIG. 7 , and FIG. 7 shows a schematic diagram of attribute completion provided by an embodiment of the present disclosure. As shown in Figure 7, for example, in terms of the R attribute in the color, among the nodes corresponding to the node occupancy code 73, the node attribute value corresponding to the sub-voxel numbered 1 is a, and the node attribute value corresponding to the sub-voxel numbered 4 The value is b, the attribute value of the node corresponding to the sub-voxel numbered 7 is c, then the attribute code corresponding to the node corresponding to the node occupancy code 73 is 0a00b00c, and 0 means that there is no point cloud point in the sub-voxel. Circular left-shift completion of the attribute code, the first circular left-shift completion is aa0bb0cc, the attribute code after the first attribute completion still has an attribute code of zero, then the second circular left-shift completion is aabbbccc , the attribute code after the second attribute completion has no zero code, then the attribute completion is completed, and the attribute code after attribute completion is aabbbccc. If the attribute code of the preceding node attribute completion is dddeeedd, the node occupation code is 73, and the corresponding node attribute residual is: (d-a)(d-a)(d-b)(e-b)(e-b)(e-c)( d-c)(d-c).

当进行几何压缩时,当前待压缩节点对应的待压缩信息,可以包括:当前待压缩节点的节点占用码;当进行属性压缩时,当前待压缩节点对应的待压缩信息,可以包括:当前待压缩节点的节点属性和/或节点属性残差。When performing geometric compression, the information to be compressed corresponding to the current node to be compressed may include: the node occupancy code of the current node to be compressed; when performing attribute compression, the information to be compressed corresponding to the current node to be compressed may include: the current node to be compressed Node attributes and/or node attribute residuals for nodes.

当进行几何压缩时,可以将第i个待压缩节点确定为当前待压缩节点,将第i个待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测出第i个待压缩节点对应的节点占用码的概率分布q i(x),即,q i(x)为第i个待压缩节点的节点占用码为1-255的概率分布。例如,当前待压缩节点对应的概率分布为(0.01,0.2,0.056,…,0.36),指的是当前待压缩节点的节点占用码为1的概率是0.01,为2的概率是0.2,为3的概率是0.056,…,为255的概率是0.36),概率分布之和为1。 When performing geometric compression, the i-th node to be compressed can be determined as the current node to be compressed, and the context information of the i-th node to be compressed is input into the pre-trained attention neural network model to predict the i-th node to be compressed Probability distribution q i (x) of node occupancy codes corresponding to compressed nodes, that is, q i (x) is the probability distribution of node occupancy codes of the i-th node to be compressed being 1-255. For example, the probability distribution corresponding to the current node to be compressed is (0.01, 0.2, 0.056, ..., 0.36), which means that the probability of the node occupancy code of the current node to be compressed is 1 is 0.01, and the probability of being 2 is 0.2, which is 3 The probability of is 0.056, ..., the probability of being 255 is 0.36), and the sum of the probability distributions is 1.

当进行属性压缩时,可以预测当前待压缩节点对应的节点属性和/或节点属性残差概率分布

Figure PCTCN2022085657-appb-000006
即,
Figure PCTCN2022085657-appb-000007
为第i个待压缩节点的第n A个节点属性和/或节点属性残差的概率分布。 When attribute compression is performed, the node attribute and/or node attribute residual probability distribution corresponding to the current node to be compressed can be predicted
Figure PCTCN2022085657-appb-000006
Right now,
Figure PCTCN2022085657-appb-000007
is the probability distribution of the nth node attribute and/or node attribute residual of the i- th node to be compressed.

训练注意力神经网络模型的步骤可以为:步骤一,从样本点云中构建树结构,并确定样本节点的上下文信息和节点的待压缩信息(其中,样本点云与测试的点云是不同的,但是样本点云与测试的点云是相似的,例如,为同一个序列点云的不同帧或者类似的点云);步骤二,将样本节点的上下文信息输入 至注意力神经网络模型的第一层注意力操作网络中,得到样本节点的第一加权上下文矩阵;步骤三,将第一加权上下文矩阵与上下文信息相加,将相加的结果输入至第一层多层感知机网络中,得到第二加权上下文矩阵;步骤四,再将第二加权上下文矩阵输入至第二层注意力操作网络中,得到第三加权上下文矩阵;步骤五,将第三加权上下文矩阵与第二加权上下文矩阵相加,将相加的结果输入至第二层多层感知机网络中,得出预测待压缩节点对应的待压缩信息的概率分布;步骤六:将多个样本节点对应的待压缩信息的概率分布和待压缩信息带入到损失函数中,计算损失值;其中,几何压缩的损失函数可以为:The steps of training the attention neural network model can be: Step 1, construct a tree structure from the sample point cloud, and determine the context information of the sample node and the information to be compressed of the node (wherein, the sample point cloud is different from the point cloud of the test , but the sample point cloud is similar to the test point cloud, for example, it is a different frame of the same sequence point cloud or a similar point cloud); Step 2, input the context information of the sample node into the first node of the attention neural network model In the one-layer attention operation network, the first weighted context matrix of the sample node is obtained; Step 3, the first weighted context matrix is added to the context information, and the result of the addition is input into the first layer of multi-layer perceptron network, Obtain the second weighted context matrix; Step 4, input the second weighted context matrix into the second layer attention operation network to obtain the third weighted context matrix; Step 5, combine the third weighted context matrix with the second weighted context matrix Add, input the result of addition to the second layer of multi-layer perceptron network, and obtain the probability distribution of the information to be compressed corresponding to the predicted node to be compressed; Step 6: the probability of the information to be compressed corresponding to the multiple sample nodes The distribution and information to be compressed are brought into the loss function to calculate the loss value; among them, the loss function of geometric compression can be:

loss 1=-∑ ilog 2q i(x i|f;w 1)  (2) loss 1 =-∑ i log 2 q i (x i |f; w 1 ) (2)

公式(2)中,loss 1指的是几何压缩的损失函数,x i指的是当前待压缩节点(第i个待压缩节点),f指的是进行扩维之后的第i个待压缩节点的上下文信息,w 1指的是几何压缩注意力神经网络的权重,q i指的是第i个待压缩节点对应的节点占用码的概率分布,i指代的范围是全部的待压缩节点,∑ ilog 2q i(x i|f;w 1)指的是全部待压缩节点对应的估计码率的求和;属性压缩的损失函数设计为只计算属性存在的点云点

Figure PCTCN2022085657-appb-000008
的属性残差(即,本公开实施中属性补全之前的属性0a00b00c的J={1,4,7}),属性压缩的损失函数为: In formula (2), loss 1 refers to the loss function of geometric compression, x i refers to the current node to be compressed (i-th node to be compressed), and f refers to the i-th node to be compressed after dimension expansion context information, w 1 refers to the weight of the geometric compression attention neural network, q i refers to the probability distribution of the node occupancy code corresponding to the ith node to be compressed, i refers to the range of all nodes to be compressed, ∑ i log 2 q i (xi | f ; w 1 ) refers to the sum of the estimated code rates corresponding to all nodes to be compressed; the loss function of attribute compression is designed to only calculate point cloud points where attributes exist
Figure PCTCN2022085657-appb-000008
Attribute residual (that is, J={1,4,7} of attribute 0a00b00c before attribute completion in the implementation of the present disclosure), the loss function of attribute compression is:

Figure PCTCN2022085657-appb-000009
Figure PCTCN2022085657-appb-000009

其中,公式(3)中,loss 2指的是属性压缩的损失函数,w 2指的是属性压缩注意力神经网络的权重,

Figure PCTCN2022085657-appb-000010
是每个属性在属性码流中的权重,n A指的是第n A个属性(即,RGB值中的第几个属性,例如R是RGB值中的第1个属性),N A指的是节点属性的总个数(例如RGB值为3个属性),i指代的范围是全部的待压缩节点(即,属性压缩时,是全部的叶节点)。步骤七:使用基于深度学习的优化算法进行反向传播,来优化损失值,更新注意力神经网络模型的权重w 1和/或w 2。可以多次执行步骤一至步骤七,当损失函数输出的损失值的变化率达到预置阈值时(即,损失函数的输出值收敛),则得到训练好的注意力神经网络模型。 Among them, in formula (3), loss 2 refers to the loss function of attribute compression, w 2 refers to the weight of attribute compression attention neural network,
Figure PCTCN2022085657-appb-000010
is the weight of each attribute in the attribute code stream, n A refers to the n Ath attribute (that is, which attribute in the RGB value, for example, R is the first attribute in the RGB value), N A refers to is the total number of node attributes (for example, the RGB value is 3 attributes), and the range referred to by i is all the nodes to be compressed (that is, when the attribute is compressed, it is all the leaf nodes). Step 7: Use an optimization algorithm based on deep learning to perform backpropagation to optimize the loss value and update the weight w 1 and/or w 2 of the attention neural network model. Steps 1 to 7 can be performed multiple times. When the rate of change of the loss value output by the loss function reaches a preset threshold (that is, the output value of the loss function converges), a trained attention neural network model is obtained.

将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布,可以包括:将当前待压缩节点的上下文信息进行扩维,生成扩维上下文信息;将扩维上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布。Input the context information of the current node to be compressed into the pre-trained attention neural network model, and predict the probability distribution of the information to be compressed corresponding to the current node to be compressed, which may include: expanding the context information of the current node to be compressed, Generate the expanded dimension context information; input the expanded dimension context information into the pre-trained attention neural network model, and predict the probability distribution of the information to be compressed corresponding to the current node to be compressed.

本公开中,可以先将当前待压缩节点的上下文信息通过独热码操作进行扩维,生成上下文信息的独热码,再将上下文信息的独热码通过嵌入操作生成扩维上下文信息。In the present disclosure, the context information of the current node to be compressed can be expanded through one-hot code operation to generate the one-hot code of the context information, and then the one-hot code of the context information can be embedded to generate the expanded context information.

独热码操作(one-hot code),是有多少个状态就有多少比特,而且只有一个比特为1,其他全为0的一种码制。例如,某个节点的节点索引是1,则其独热码是(0,1,0,0,0,0,0,0),将一维的数据扩维成8维。嵌入操作(Embedding)是将独热码操作后的结果线性映射到预置维度。One-hot code operation (one-hot code) is a code system in which there are as many bits as there are states, and only one bit is 1, and the others are all 0. For example, if the node index of a certain node is 1, its one-hot code is (0,1,0,0,0,0,0,0), which expands the one-dimensional data into eight dimensions. The embedding operation (Embedding) is to linearly map the result of the one-hot encoding operation to a preset dimension.

可选地,将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布,可以包括:Optionally, inputting the context information of the current node to be compressed into the pre-trained attention neural network model to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed may include:

将当前待压缩节点的上下文信息输入至注意力神经网络模型的第一层注意力操作网络中,得到当前待压缩节点的第一加权上下文矩阵;将第一加权上下文矩阵和上下文信息相加,将相加的结果输入至第一层多层感知机网络中,得到第二加权上下文矩阵;再将第二加权上下文矩阵输入至第二层注意力操作网络中,得到第三加权上下文矩阵;将第三加权上下文矩阵与第二加权上下文矩阵相加,将相加的结果输入至第二层多层感知机网络中,得出第三加权上下文矩阵;将第三加权上下文矩阵输入至第三层多层感知机网络中,得出第四加权上下文矩阵;将第四加权上下文矩阵输入至第三层多层感知机网络中,得出第五加权上下文矩阵;将第五加权上下文矩阵通过softmax函数,预测出当前待压缩节点对应的待压缩信息的概率分布。Input the context information of the current node to be compressed into the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the current node to be compressed; add the first weighted context matrix and the context information, and The result of the addition is input to the first layer of multi-layer perceptron network to obtain the second weighted context matrix; then the second weighted context matrix is input to the second layer of attention operation network to obtain the third weighted context matrix; the second weighted context matrix is obtained The three-weighted context matrix is added to the second weighted context matrix, and the result of the addition is input into the second layer multi-layer perceptron network to obtain the third weighted context matrix; the third weighted context matrix is input to the third layer multi-layer perceptron network In the layer perceptron network, the fourth weighted context matrix is obtained; the fourth weighted context matrix is input into the third layer multi-layer perceptron network, and the fifth weighted context matrix is obtained; the fifth weighted context matrix is passed through the softmax function, The probability distribution of the information to be compressed corresponding to the current node to be compressed is predicted.

一优选实施例,请参阅图9示出了本公开实施例所提供的注意力神经网络模型的示意图。图9中,N指的是当前待压缩节点对应的同层节点的数量(几何预置窗口为N 1,属性预置窗口为N 2,默认在执行属性压缩时N 1=N 2=N);H指的是预置窗口的层高(几何预置窗口的层高为K,属性预置窗口的层高为1),C指的是上下文信息的维度(几何压缩对应的维度为C G,属性压缩对应的维度为C A+K×C G);H×C指的是预置窗口内上下文信息的维度;N 0指的是待压缩节点的数量;C 0指的是待压缩节点对应的概率分布的维度(几何压缩对应的维度是255,属性压缩例如RGB的维度是3×256×8维(每个叶节点的属性编码有8位))。 For a preferred embodiment, please refer to FIG. 9 which shows a schematic diagram of an attention neural network model provided by an embodiment of the present disclosure. In Figure 9, N refers to the number of nodes on the same layer corresponding to the current node to be compressed (the geometry preset window is N 1 , the attribute preset window is N 2 , and N 1 =N 2 =N by default when performing attribute compression) ; H refers to the layer height of the preset window (the layer height of the geometry preset window is K, and the layer height of the attribute preset window is 1), and C refers to the dimension of the context information (the dimension corresponding to the geometry compression is C G , the dimension corresponding to attribute compression is C A +K×C G ); H×C refers to the dimension of the context information in the preset window; N 0 refers to the number of nodes to be compressed; C 0 refers to the nodes to be compressed The dimension of the corresponding probability distribution (the dimension corresponding to geometric compression is 255, and the dimension of attribute compression such as RGB is 3×256×8 (the attribute code of each leaf node has 8 bits)).

可选地,将当前待压缩节点的上下文信息(N,H,C),输入至第一层注意力操作网络中,得出第一加权上下文矩阵(N,H×C);再将第一加权上下文矩阵与上下文信息相加,将相加后的结果输入至第一层多层感知机中,得到第二加权上下文矩阵(N,H×C);再将第二加权上下文矩阵输入至第二层注意力操作网络中,得到第三加权上下文矩阵(N,H×C);将第三加权上下文矩阵与第二加权上下文矩阵相加,将相加的结果输入至第二层多层感知机网络中,得到第四加权上下文矩阵(N,H×C),将第四加权上下文矩阵输入至第三层多层感知机网络中,得出第五加权上下文矩阵(N,C 0);将第五加权上下文矩阵通过softmax函数,预测出当前待压缩节点对应的待压缩信息的概率分布(N 0,C 0)。 Optionally, input the context information (N, H, C) of the current node to be compressed into the first layer of attention operation network to obtain the first weighted context matrix (N, H×C); then the first The weighted context matrix is added to the context information, and the added result is input to the first layer of multi-layer perceptron to obtain the second weighted context matrix (N, H×C); then the second weighted context matrix is input to the second In the two-layer attention operation network, the third weighted context matrix (N, H×C) is obtained; the third weighted context matrix is added to the second weighted context matrix, and the result of the addition is input to the second layer of multi-layer perception In the computer network, the fourth weighted context matrix (N, H×C) is obtained, and the fourth weighted context matrix is input into the third layer multi-layer perceptron network, and the fifth weighted context matrix (N, C 0 ) is obtained; The fifth weighted context matrix is passed through the softmax function to predict the probability distribution (N 0 , C 0 ) of the information to be compressed corresponding to the current node to be compressed.

将当前待压缩节点的上下文信息输入至注意力神经网络模型的第一层注意力操作网络中,得到当前待压缩节点的第一加权上下文矩阵,可以包括:Input the context information of the current node to be compressed into the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the current node to be compressed, which may include:

将当前待压缩节点的上下文信息输入至第一多层感知机,得出第一输出矩阵;将当前待压缩节点的上下文信息输入至第二多层感知机,得出第二输出矩阵;将当前待压缩节点的上下文信息输入至第三多层感知机,得出第三输出矩阵;将第二输出矩阵的转置矩阵与第一输出矩阵相乘,得出矩阵内积;将矩阵内积与遮罩矩阵相加,将相加后的结果输入至softmax函数,得出注意力矩阵;将注意力矩阵与第三输出矩阵相乘,得到当前待压缩节点的第一加权上下文矩阵。Input the context information of the current node to be compressed to the first multi-layer perceptron to obtain the first output matrix; input the context information of the current node to be compressed to the second multi-layer perceptron to obtain the second output matrix; the current The context information of the node to be compressed is input to the third multi-layer perceptron to obtain the third output matrix; the transpose matrix of the second output matrix is multiplied by the first output matrix to obtain the inner product of the matrix; the inner product of the matrix and The mask matrix is added, and the result of the addition is input to the softmax function to obtain the attention matrix; the attention matrix is multiplied by the third output matrix to obtain the first weighted context matrix of the current node to be compressed.

其中,可以通过遮罩矩阵(右上角为-∞,左下角为0的矩阵)使得预测当前待压缩节点对应的概率分布时,只考虑当前待压缩节点前面的已压缩节点,进而导致注意力值分母

Figure PCTCN2022085657-appb-000011
Figure PCTCN2022085657-appb-000012
求和的长度不同。例如,当第j个节点为当前待压缩节点时,第j+1以后的节点的上下文信息 将不存在于第j个节点的结果中。因此,在一次计算中便可以根据输出的N个结果,通过截断得出后N 0个结果,作为后N 0个待压缩节点的概率分布,以减少网络传播次数,加快压缩速度。 Among them, the mask matrix (matrix with -∞ in the upper right corner and 0 in the lower left corner) can be used to predict the probability distribution corresponding to the current node to be compressed, only consider the compressed nodes in front of the current node to be compressed, and then lead to the attention value denominator
Figure PCTCN2022085657-appb-000011
Figure PCTCN2022085657-appb-000012
The sums are of different lengths. For example, when the jth node is the current node to be compressed, the context information of the j+1th node will not exist in the result of the jth node. Therefore, in one calculation, according to the output N results, the last N 0 results can be obtained by truncation as the probability distribution of the last N 0 nodes to be compressed, so as to reduce the number of network propagation and speed up the compression speed.

其中,注意力矩阵中的每一个元素为注意力值,可以通过以下公式计算注意力矩阵的注意力值:Among them, each element in the attention matrix is an attention value, and the attention value of the attention matrix can be calculated by the following formula:

Figure PCTCN2022085657-appb-000013
Figure PCTCN2022085657-appb-000013

公式(1)中,

Figure PCTCN2022085657-appb-000014
指的是第j个节点与第k个节点上下文之间的注意力值,第j个节点是同层节点中的第j个节点并且是当前待压缩节点,f j是第j个节点的上下文信息,f k是第k个节点的上下文信息,第k个节点是第j个节点的前序同层节点;分子
Figure PCTCN2022085657-appb-000015
代表第j个节点与第k个节点上下文之间的相似值,分母
Figure PCTCN2022085657-appb-000016
指的是第j个节点与第1个节点至第j个节点上下文之间的相似值的和;MLP 2(f j)指的是将第j个节点的上下文信息输入至第二多层感知机,得出第j个节点对应的第二输出矩阵;
Figure PCTCN2022085657-appb-000017
指的是将第k个节点的上下文信息输入至第一多层感知机,得出第k个节点对应的第一输出矩阵的转置矩阵。 In formula (1),
Figure PCTCN2022085657-appb-000014
Refers to the attention value between the jth node and the kth node context, the jth node is the jth node in the nodes of the same layer and is the current node to be compressed, f j is the context of the jth node information, f k is the context information of the kth node, and the kth node is the preorder node of the jth node;
Figure PCTCN2022085657-appb-000015
Represents the similarity value between the jth node and the kth node context, denominator
Figure PCTCN2022085657-appb-000016
Refers to the sum of the similarity values between the jth node and the context of the first node to the jth node; MLP 2 (f j ) refers to inputting the context information of the jth node into the second multi-layer perception machine to obtain the second output matrix corresponding to the jth node;
Figure PCTCN2022085657-appb-000017
Refers to inputting the context information of the kth node into the first multi-layer perceptron to obtain the transpose matrix of the first output matrix corresponding to the kth node.

也就是说,第k个节点位于第1个节点至第j个节点之间。That is, the kth node is located between the 1st node to the jth node.

S104、根据待压缩节点对应的待压缩信息的概率分布和待压缩信息,输入至算数编码器进行熵编码,得到点云码流,将点云码流作为点云的压缩结果。S104. According to the probability distribution of the information to be compressed corresponding to the node to be compressed and the information to be compressed, input to an arithmetic encoder for entropy encoding to obtain a point cloud code stream, and use the point cloud code stream as a point cloud compression result.

即,将全部待压缩节点对应的待压缩信息的概率分布和待压缩信息,输入至算数编码器进行熵编码,得到点云码流,将点云码流作为点云的压缩结果。其中,根据点云压缩的对象,点云码流可以被分为几何码流和属性码流,即,进行几何压缩时,压缩得到的是几何码流;进行属性压缩时,压缩得到的是属性码流。That is, the probability distribution of information to be compressed and the information to be compressed corresponding to all nodes to be compressed are input to the arithmetic encoder for entropy encoding to obtain a point cloud code stream, and the point cloud code stream is used as the compression result of the point cloud. Among them, according to the object of point cloud compression, the point cloud code stream can be divided into geometric code stream and attribute code stream, that is, when geometric compression is performed, the compressed geometric code stream is obtained; when attribute compression is performed, the compressed object is attribute stream.

算数编码器将输入的待压缩节点对应的概率分布和待压缩信息,转换为一个小于1的小数,此小数的保存方式为二进制,也即为生成的点云码流。点云码流是压缩后的一串二进制的比特流。例如,可以将原本大小为1.94MB(2038480字节)的点云文件压缩为大小55.5KB(56890字节)的文件,节省了97.2%的存储空间。The arithmetic encoder converts the probability distribution corresponding to the input node to be compressed and the information to be compressed into a decimal less than 1, and the storage method of this decimal is binary, which is the generated point cloud code stream. The point cloud code stream is a series of compressed binary bit streams. For example, a point cloud file with an original size of 1.94MB (2038480 bytes) can be compressed into a file with a size of 55.5KB (56890 bytes), saving 97.2% of storage space.

一优选实施例,请参阅图2,图2示出了本公开实施例所提供的一种点云的几何压缩方法的流程图。可选地,一种点云的几何压缩方法的步骤如下:For a preferred embodiment, please refer to FIG. 2 . FIG. 2 shows a flow chart of a point cloud geometric compression method provided by an embodiment of the present disclosure. Optionally, the steps of a point cloud geometric compression method are as follows:

S201、获取当前待压缩节点对应的几何上下文信息,得出N 1×K×3维的几何上下文信息。 S201. Obtain geometric context information corresponding to the current node to be compressed, and obtain N 1 ×K×3-dimensional geometric context information.

可以获取当前待压缩节点对应的几何上下文信息,得出N 1×K×3维的几何上下文信息。其中,N 1个节点指的是几何预置窗口中,当前待压缩节点的同层节点数量,K指的是几何预置窗口的高度,3指的是节点占用码、节点深度、节点索引。也就是说,N 1个节点是包括当前待压缩节点的。 Geometric context information corresponding to the current node to be compressed can be acquired to obtain N 1 ×K×3-dimensional geometric context information. Among them, N 1 nodes refer to the number of nodes on the same layer as the current node to be compressed in the geometry preset window, K refers to the height of the geometry preset window, and 3 refers to the node occupancy code, node depth, and node index. That is to say, the N1 nodes include the current node to be compressed.

S202、将N 1×K×3维的几何上下文信息,通过独热码操作和嵌入操作进行扩维,生成扩维几何上下文信息,为N 1×K×C G维的扩维几何上下文信息。 S202. Dimensionally expand the N 1 ×K×3 dimensional geometric context information through one-hot encoding and embedding operations to generate expanded dimension geometric context information, which is N 1 ×K×C G dimensional expanded geometric context information.

本公开实施例中,节点占用码的范围可以是1-255,进而节点占用码的进行独热码操作后可以是255维;节点深度的范围可以是1-16,进而节点索引的进行独热码操作后可以是16维;节点索引的范围可以是0-7,进而节点深度的进行独热码操作后可以是8维。再将255维的节点占用码通过嵌入操作转换为128维,将16维的节点深度通过嵌入操作转换为6维,将8维的节点索引通过嵌入操作转换为4维。 因此,通过独热码操作和嵌入操作进行扩维后,几何上下文信息的3维数据可以被转换成C G维(共138维,为128维、6维、4维的和值)。 In the embodiment of the present disclosure, the range of the node occupancy code can be 1-255, and then the node occupancy code can be 255 dimensions after the one-hot code operation; the range of the node depth can be 1-16, and then the node index can be one-hot The code operation can be 16-dimensional; the range of node index can be 0-7, and the node depth can be 8-dimensional after one-hot code operation. Then the 255-dimensional node occupancy code is converted to 128-dimensional by embedding operation, the 16-dimensional node depth is converted to 6-dimensional by embedding operation, and the 8-dimensional node index is converted to 4-dimensional by embedding operation. Therefore, after dimension expansion through one-hot encoding operation and embedding operation, the 3-dimensional data of geometric context information can be converted into CG- dimensional (138 dimensions in total, which is the sum of 128-, 6-, and 4-dimensional).

S203、将N 1×K×C G维的扩维几何上下文信息输入至训练好的注意力神经网络模型中,预测当前待压缩节点对应的节点占用码的概率分布。 S203. Input the N 1 ×K×C G dimension expanded geometric context information into the trained attention neural network model, and predict the probability distribution of the node occupancy code corresponding to the current node to be compressed.

S204、判断是否全部待压缩节点对应的节点占用码的概率分布都获取完成。S204 , judging whether the probability distributions of node occupation codes corresponding to all the nodes to be compressed have been obtained.

若全部待压缩节点对应的节点占用码的概率分布没有获取完成,则可以返回步骤S201;若全部待压缩节点对应的节点占用码的概率分布均获取完成,则可以将全部待压缩节点对应的节点占用码的概率分布和待压缩节点的节点占用码输入至算数编码器中进行熵编码,得到几何码流,将几何码流作为点云的几何压缩结果。If the probability distribution of the node occupancy codes corresponding to all the nodes to be compressed has not been obtained, it can return to step S201; if the probability distribution of the node occupancy codes corresponding to all the nodes to be compressed is obtained, the node The probability distribution of the occupancy code and the node occupancy code of the node to be compressed are input to the arithmetic encoder for entropy encoding to obtain the geometric code stream, which is used as the geometric compression result of the point cloud.

一优选实施例,请参阅图3,图3示出了本公开实施例所提供的一种点云的属性压缩方法的流程图。可选地,一种点云的属性压缩方法的步骤如下:For a preferred embodiment, please refer to FIG. 3 . FIG. 3 shows a flow chart of a point cloud attribute compression method provided by an embodiment of the present disclosure. Optionally, the steps of a point cloud attribute compression method are as follows:

S301、获取当前待压缩节点对应的节点属性(节点属性残差)上下文信息,得出N 2×8×N A维的节点属性(节点属性残差)上下文信息。 S301. Obtain context information of node attributes (node attribute residuals) corresponding to the current node to be compressed, and obtain N 2 ×8×N A- dimensional node attribute (node attribute residuals) context information.

可以获取当前待压缩节点对应的节点属性上下文信息,得出N 2×8×N A维的属性上下文信息。其中,N 2个节点指的是属性预置窗口中,当前待压缩节点对应的同层节点数量,8指的是每个节点包括的补全后的属性编码的位数(即,上述中提出的节点占用码为73对应的属性编码补全后为aabbbccc),N A指的是节点属性个数(即,3位RGB值或者1位反射率值)。 The node attribute context information corresponding to the current to-be-compressed node can be obtained, and N 2 ×8×N A- dimensional attribute context information can be obtained. Among them, N 2 nodes refer to the number of nodes in the same layer corresponding to the current node to be compressed in the attribute preset window, and 8 refers to the number of digits of the completed attribute code included in each node (that is, the above mentioned The node occupancy code is 73 and the corresponding attribute code is aabbbccc after completion), N A refers to the number of node attributes (that is, 3-bit RGB value or 1-bit reflectance value).

S302、将N 2×8×N A维的节点属性(节点属性残差)上下文信息,通过独热码操作和嵌入操作进行扩维,生成扩维节点属性(节点属性残差)上下文信息,为N 2×C A维的扩维节点属性(节点属性残差)上下文信息。 S302. Expand the dimensionality of the N2 ×8×N A- dimensional node attribute (node attribute residual) context information through one-hot code operation and embedding operation, and generate the expanded dimension node attribute (node attribute residual) context information, which is N 2 ×C A -dimensional expanded dimension node attribute (node attribute residual) context information.

本公开实施例中的节点属性可以采用3位RGB值,则N A维对应的是红色值、蓝色值和绿色值。红色值、蓝色值和绿色值的取值范围均可为0-255,因此,将红色值进行独热码操作后转换为256维,蓝色值进行独热码操作后转换为256维,绿色值进行独热码操作后转换为256维。再将256维的红色值通过嵌入操作转换为128维,将256维的蓝色值通过嵌入操作转换为128维,将256维的绿色值通过嵌入操作转换为128维。因此,通过独热码操作和嵌入操作进行扩维后,属性上下文信息的N A维数据可以被转换成C A维(共384维,为128维、128维、128维的和值)。 The node attributes in the embodiments of the present disclosure can use 3-bit RGB values, and the N A dimension corresponds to red values, blue values, and green values. The range of red value, blue value and green value can be 0-255. Therefore, the red value is converted into 256 dimensions after one-hot encoding operation, and the blue value is converted into 256 dimensions after one-hot encoding operation. The green value is converted to 256 dimensions after one-hot encoding operation. Then the 256-dimensional red value is converted to 128 dimensions through the embedding operation, the 256-dimensional blue value is converted to 128 dimensions through the embedding operation, and the 256-dimensional green value is converted to 128 dimensions through the embedding operation. Therefore, after dimension expansion through one-hot encoding operation and embedding operation, the N A dimension data of attribute context information can be converted into C A dimension (384 dimensions in total, which are the sum of 128 dimensions, 128 dimensions, and 128 dimensions).

S303、将N 2×C A维的扩维节点属性(节点属性残差)上下文信息和N 2×K×C G维的扩维几何上下文信息,输入至训练好的注意力神经网络模型中,预测当前待压缩节点对应的节点属性(节点属性残差)的概率分布。 S303. Input the N 2 ×C A dimension expanded dimension node attribute (node attribute residual) context information and the N 2 ×K×C G dimension expanded dimension geometric context information into the trained attention neural network model, Predict the probability distribution of the node attributes (node attribute residuals) corresponding to the current node to be compressed.

也就是说,在属性压缩时也需要几何上下文信息,当进行属性压缩时需要的几何上下文信息对应的几何窗口,与进行几何压缩时对应的几何窗口可以是不同的。That is to say, geometric context information is also required during attribute compression, and the geometric window corresponding to the geometric context information required during attribute compression may be different from the corresponding geometric window during geometry compression.

S304、判断是否全部待压缩节点对应的节点属性(节点属性残差)的概率分布都获取完成。S304. Judging whether the probability distributions of node attributes (node attribute residuals) corresponding to all the nodes to be compressed are obtained.

若全部待压缩节点对应的节点属性(节点属性残差)的概率分布没有获取完成,则可以返回步骤S301;若全部待压缩节点对应的节点属性(节点属性残差)的概率分布均获取完成,则可以将全部待压缩节点 对应的节点属性(节点属性残差)的概率分布和待压缩节点的节点属性(节点属性残差)输入至算数编码器中进行熵编码,得到属性码流,将属性码流作为点云的属性压缩结果。If the probability distribution of the node attributes (node attribute residuals) corresponding to all the nodes to be compressed has not been obtained, it can return to step S301; if the probability distributions of the node attributes (node attribute residuals) corresponding to all the nodes to be compressed are obtained, Then the probability distribution of the node attributes (node attribute residuals) corresponding to all nodes to be compressed and the node attributes (node attribute residuals) of the nodes to be compressed can be input into the arithmetic encoder for entropy encoding to obtain the attribute code stream, and the attribute The code stream is the attribute compression result of the point cloud.

基于同一申请构思,本公开实施例中还提供了与上述实施例提供的点云的压缩方法对应的点云的解压缩方法,由于本公开实施例中的点云的解压缩方法其解决问题的原理与本公开上述实施例的点云的压缩方法相似,因此点云的解压缩的实施可以参见点云的压缩方法的实施,重复之处不再赘述。请参阅图10,图10示出了本公开实施例所提供的一种点云的压缩和解压缩的示意图。图10中的几何预测网络与属性预测网络,为本公开实施例中的注意力神经网络。Based on the same application idea, the embodiment of the present disclosure also provides a point cloud decompression method corresponding to the point cloud compression method provided in the above embodiment, because the point cloud decompression method in the embodiment of the present disclosure solves the problem The principle is similar to the point cloud compression method in the above-mentioned embodiments of the present disclosure, so the implementation of the point cloud decompression can refer to the implementation of the point cloud compression method, and the repetition will not be repeated. Please refer to FIG. 10 , which shows a schematic diagram of point cloud compression and decompression provided by an embodiment of the present disclosure. The geometry prediction network and attribute prediction network in FIG. 10 are the attention neural network in the embodiment of the present disclosure.

请参阅图4,图4示出了本公开实施例所提供的一种点云的解压缩方法的流程图。一种点云的解压缩方法的步骤如下:Referring to FIG. 4 , FIG. 4 shows a flow chart of a point cloud decompression method provided by an embodiment of the present disclosure. The steps of a point cloud decompression method are as follows:

S401、对树结构移动预置窗口,将每次移动预置窗口内的未解压缩的节点确定为当前待解压缩节点。S401. Move the preset window for the tree structure, and determine the uncompressed node in each moved preset window as the current node to be decompressed.

点云解压缩可以分为几何解压缩和属性解压缩。Point cloud decompression can be divided into geometry decompression and attribute decompression.

S402、将当前待解压缩节点的上下文信息,输入至预先训练好的注意力神经网络模型中,预测当前待解压缩节点对应的待解压缩信息的概率分布。S402. Input the context information of the current node to be decompressed into the pre-trained attention neural network model, and predict the probability distribution of the information to be decompressed corresponding to the current node to be decompressed.

当进行几何解压缩时,可以将当前待解压缩节点对应的同层节点的多层父亲节点、前序同层节点的节点占用码和位置信息,以及当前待解压缩节点的位置信息,作为当前待解压缩节点对应的上下文信息。When performing geometric decompression, the multi-layer parent node of the same layer node corresponding to the current node to be decompressed, the node occupancy code and location information of the previous node at the same layer, and the location information of the current node to be decompressed can be used as the current Context information corresponding to the node to be decompressed.

当进行属性解压缩时,可以将当前待压缩节点对应的同层节点的多层父亲节点的节点占用码和位置信息、同层节点的节点占用码和位置信息、前序同层节点对应的节点属性和/或节点属性残差,作为待解压缩节点对应的上下文信息。When performing attribute decompression, the node occupancy code and location information of the multi-layer parent node corresponding to the current node to be compressed, the node occupancy code and location information of the node at the same layer, and the node corresponding to the previous node at the same layer Attributes and/or node attribute residuals are used as context information corresponding to the nodes to be decompressed.

进行点云的解压缩的注意力神经网络与点云的压缩方法的注意力神经网络相同,具体的注意力神经网络的产生方式在此不在赘述。The attention neural network for point cloud decompression is the same as the attention neural network for the point cloud compression method, and the specific generation method of the attention neural network will not be repeated here.

可选地,由于压缩和解压缩的注意力神经网络模型是相同的,输入的上下文信息也相同,进而压缩时得出的预测待解压缩节点对应的概率分布,与解压缩时得出的预测待解压缩节点对应的概率分布相同。Optionally, since the compressed and decompressed attention neural network models are the same, and the input context information is also the same, the probability distribution corresponding to the predicted node to be decompressed obtained during compression is the same as the predicted node to be decompressed obtained during decompression. The probability distribution corresponding to the decompression node is the same.

S403、将当前待解压缩节点对应的待解压缩信息的概率分布和点云码流,输入至算数解码器进行熵解码,得到当前待解压缩节点对应的待解压缩信息。S403. Input the probability distribution of the information to be decompressed corresponding to the current node to be decompressed and the point cloud code stream to the arithmetic decoder for entropy decoding, and obtain the information to be decompressed corresponding to the current node to be decompressed.

当进行几何解压缩时,待解压缩信息指的是节点占用码,点云码流指的是几何码流;当进行属性解压缩时,待解压缩信息指的是节点属性和/或节点属性残差,属性码流指的是属性码流。When performing geometric decompression, the information to be decompressed refers to the node occupancy code, and the point cloud code stream refers to the geometric code stream; when performing attribute decompression, the information to be decompressed refers to node attributes and/or node attributes The residual, the attribute code stream refers to the attribute code stream.

S404、将待解压缩信息构建树结构,从树结构中获取点云,再通过反量化,得到解压缩点云。S404. Build a tree structure for the information to be decompressed, obtain a point cloud from the tree structure, and then obtain a decompressed point cloud through dequantization.

可以将逐步解压缩得到的待解压缩信息构建树结构,从树结构中获取点云,再通过反量化,得到解压缩点云。The information to be decompressed can be gradually decompressed to construct a tree structure, and the point cloud can be obtained from the tree structure, and then decompressed to obtain the decompressed point cloud.

一优选实施例,请参阅图5,图5示出了本公开实施例所提供的一种点云的几何解压缩方法的流程图。可选地,一种点云的几何解压缩方法的步骤如下:For a preferred embodiment, please refer to FIG. 5 . FIG. 5 shows a flow chart of a point cloud geometric decompression method provided by an embodiment of the present disclosure. Optionally, the steps of a geometric decompression method of a point cloud are as follows:

S501、获取当前待解压缩节点对应的几何上下文信息,得出N 1×K×3维的几何上下文信息。 S501. Obtain geometric context information corresponding to the current node to be decompressed, and obtain N 1 ×K×3-dimensional geometric context information.

S502、将N 1×K×3维的几何上下文信息,通过独热码操作和嵌入操作进行扩维,生成扩维几何上下文信息,为N 1×K×C G维的扩维几何上下文信息。 S502. Dimensionally expand the N 1 ×K×3-dimensional geometric context information through a one-hot encoding operation and an embedding operation to generate expanded geometric context information, which is N 1 ×K×C G -dimensional expanded geometric context information.

S503、将N 1×K×C G维的扩维几何上下文信息输入至训练好的注意力神经网络模型中,预测当前待解压缩节点的节点占用码的概率分布。 S503. Input the expanded geometric context information of N 1 ×K×C G dimensions into the trained attention neural network model, and predict the probability distribution of the node occupancy code of the current node to be decompressed.

S504、将当前待解压缩节点的节点占用码的概率分布和几何码流,输入至算数解码器进行熵解码,解码出当前待解压缩节点的节点占用码。S504. Input the probability distribution and the geometric code stream of the node occupancy code of the current node to be decompressed to the arithmetic decoder for entropy decoding, and decode the node occupancy code of the current node to be decompressed.

S505、判断是否全部待解压缩节点的节点占用码都获取完成。S505. Determine whether the node occupation codes of all nodes to be decompressed have been obtained.

若全部待解压缩节点的节点占用码没有获取完成,则可以返回步骤S501。If the node occupancy codes of all the nodes to be decompressed have not been obtained, it may return to step S501.

若全部待解压缩节点的节点占用码获取完成(即,全部待解压缩节点均解压缩完成),可以将逐步解码得到的节点占用码构建树结构。可以从构建的完整的树结构中获得量化后的点云,将量化后的点云进行反量化,获得解压缩点云的坐标。If the node occupancy codes of all the nodes to be decompressed are obtained (that is, all the nodes to be decompressed are decompressed), a tree structure may be constructed from the node occupancy codes obtained by decoding step by step. The quantized point cloud can be obtained from the complete tree structure constructed, and the quantized point cloud can be dequantized to obtain the coordinates of the decompressed point cloud.

一优选实施例,请参阅图6,图6示出了本公开实施例所提供的一种点云的属性解压缩方法的流程图。可选地,一种点云的属性解压缩方法的步骤如下:For a preferred embodiment, please refer to FIG. 6 . FIG. 6 shows a flow chart of a method for decompressing attributes of a point cloud provided by an embodiment of the present disclosure. Optionally, the steps of a point cloud attribute decompression method are as follows:

S601、获取当前待解压缩节点对应的节点属性(节点属性残差)上下文信息,得出N 2×8×N A维的节点属性(节点属性残差)上下文信息。 S601. Obtain context information of node attributes (node attribute residuals) corresponding to the current node to be decompressed, and obtain N 2 ×8×N A- dimensional node attribute (node attribute residuals) context information.

S602、将N 2×8×N A维的节点属性(节点属性残差)上下文信息,通过独热码操作和嵌入操作进行扩维,生成扩维节点属性(节点属性残差)上下文信息,为N 2×C A维的扩维节点属性(节点属性残差)上下文信息。 S602. Dimensionally expand the N 2 × 8 × N A -dimensional node attribute (node attribute residual) context information through one-hot code operation and embedding operation, and generate the expanded dimension node attribute (node attribute residual) context information, which is N 2 ×C A -dimensional expanded dimension node attribute (node attribute residual) context information.

S603、将N 2×C A维的扩维节点属性(节点属性残差)上下文信息和N 2×K×C G维的扩维几何上下文信息,输入至训练好的注意力神经网络模型中,预测当前待解压缩节点对应的节点属性(节点属性残差)的概率分布。 S603. Input the N 2 ×C A -dimensional expanded dimension node attribute (node attribute residual) context information and the N 2 ×K×C G- dimensional expanded dimension geometric context information into the trained attention neural network model, Predict the probability distribution of the node attributes (node attribute residuals) corresponding to the current node to be decompressed.

S604、将当前待解压缩节点的节点属性(节点属性残差)的概率分布和属性码流,输入至算数解码器进行熵解码,解码出待解压缩节点的节点属性(节点属性残差)。S604. Input the probability distribution and attribute code stream of the node attribute (node attribute residual) of the node to be decompressed to the arithmetic decoder for entropy decoding, and decode the node attribute (node attribute residual) of the node to be decompressed.

S605、判断是否全部待解压缩节点的节点属性(节点属性残差)都获取完成。S605. Determine whether the node attributes (node attribute residuals) of all nodes to be decompressed have been acquired.

若全部待解压缩节点的节点属性(节点属性残差)没有获取完成,则可以返回步骤S601。If the node attributes (node attribute residuals) of all the nodes to be decompressed have not been obtained, it may return to step S601.

若全部待解压缩节点的节点属性(节点属性残差)获取完成,可以将逐步解压缩得到的待解压缩节点的节点属性(节点属性残差)构建树结构的叶节点的节点属性(节点属性残差)。可以将节点属性(节点属性残差)进行反量化,重构点云属性。If the acquisition of the node attributes (node attribute residuals) of all nodes to be decompressed is completed, the node attributes (node attribute residuals) of the nodes to be decompressed that are gradually decompressed can be used to construct the node attributes (node attribute residuals) of the leaf nodes of the tree structure. residuals). The node attributes (node attribute residuals) can be dequantized to reconstruct the point cloud attributes.

本实施例中提到注意力神经网络是深度学习的一种框架,指附图10中和公式(1)说明的操作。类似名为“Transformer”的网络均属于本公开所述的注意力神经网络范畴。The attention neural network mentioned in this embodiment is a framework of deep learning, referring to the operation described in Figure 10 and formula (1). Similar networks named "Transformer" all belong to the category of attention neural network described in this disclosure.

本公开实施例中还提供了与上述实施例提供的点云的压缩方法对应的点云的压缩装置,由于本公开实施例中的点云的压缩装置其解决问题的原理与本公开上述实施例的点云的压缩方法相似,因此点云的压缩装置的实施可以参见点云的压缩方法的实施,重复之处不再赘述。The embodiment of the present disclosure also provides a point cloud compression device corresponding to the point cloud compression method provided in the above embodiment, because the principle of solving the problem of the point cloud compression device in the embodiment of the present disclosure is the same as that of the above embodiment of the present disclosure The point cloud compression method is similar, so the implementation of the point cloud compression device can refer to the implementation of the point cloud compression method, and the repetition will not be repeated.

请参见图11,图11示出了本公开实施例所提供的一种点云的压缩装置的示意图。点云的压缩装置100,可以包括第一量化模块101、第一确定模块102、第一预测模块103和第一压缩模块104。其中,第一量化模块101,可被配置成将点云通过树结构对点的坐标进行二进制编码,将二进制编码转化为十进制编码,作为树结构中每个节点对应的节点占用码;第一确定模块102,可被配置成对树结构中的节点移动预置窗口,将预置窗口内的未压缩的节点确定为当前待压缩节点;第一预测模块103,可被配置成将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对 应的待压缩信息的概率分布;第一压缩模块104,可被配置成将待压缩节点对应的待压缩信息的概率分布和待压缩信息,输入至算数编码器进行熵编码,得到点云码流,将点云码流作为点云的压缩结果。Please refer to FIG. 11 , which shows a schematic diagram of a point cloud compression device provided by an embodiment of the present disclosure. The point cloud compression device 100 may include a first quantization module 101 , a first determination module 102 , a first prediction module 103 and a first compression module 104 . Wherein, the first quantization module 101 can be configured to perform binary coding on the point coordinates of the point cloud through a tree structure, and convert the binary coding into decimal coding as the node occupancy code corresponding to each node in the tree structure; the first determination Module 102 can be configured to move the preset window to the nodes in the tree structure, and determine the uncompressed node in the preset window as the current node to be compressed; the first prediction module 103 can be configured to move the current node to be compressed Input the context information into the pre-trained attention neural network model to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed; the first compression module 104 can be configured to use the information to be compressed corresponding to the node to be compressed The probability distribution and the information to be compressed are input to the arithmetic encoder for entropy encoding to obtain the point cloud code stream, which is used as the point cloud compression result.

本公开实施例中还提供了与上述实施例提供的点云的解压缩方法对应的点云的解压缩装置,由于本公开实施例中的点云的解压缩装置其解决问题的原理与本公开上述实施例的点云的解压缩方法相似,因此点云的解压缩装置的实施可以参见点云的解压缩方法的实施,重复之处不再赘述。The embodiment of the present disclosure also provides a point cloud decompression device corresponding to the point cloud decompression method provided in the above embodiments, because the point cloud decompression device in the embodiment of the present disclosure has the same problem-solving principle as the present disclosure The point cloud decompression method in the above embodiments is similar, so the implementation of the point cloud decompression device can refer to the implementation of the point cloud decompression method, and the repetition will not be repeated.

图12示出了本公开实施例所提供的一种点云的解压缩装置的示意图。请参见图12。点云的解压缩装置200,可以包括第二确定模块201、第二预测模块202、第一解压缩模块203和第二量化模块204。其中,第二确定模块201,可被配置成对树结构移动预置窗口,将每次移动预置窗口内的未解压缩的节点确定为当前待解压缩节点;第二预测模块202,可被配置成将当前待解压缩节点的上下文信息,输入至预先训练好的注意力神经网络模型中,预测当前待解压缩节点对应的待解压缩信息的概率分布;第一解压缩模块203,可被配置成将当前待解压缩节点对应的待解压缩信息的概率分布和点云码流,输入至算数解码器进行熵解码,得到当前待解压缩节点对应的待解压缩信息;第二量化模块204,可被配置成将待解压缩信息构建树结构,从树结构中获取点云,再通过反量化,得到解压缩点云。Fig. 12 shows a schematic diagram of an apparatus for decompressing a point cloud provided by an embodiment of the present disclosure. See Figure 12. The point cloud decompression device 200 may include a second determination module 201 , a second prediction module 202 , a first decompression module 203 and a second quantization module 204 . Wherein, the second determination module 201 can be configured to move the preset window for the tree structure, and determine the uncompressed node in the preset window for each movement as the current node to be decompressed; the second prediction module 202 can be configured by It is configured to input the context information of the current node to be decompressed into the pre-trained attention neural network model, and predict the probability distribution of the information to be decompressed corresponding to the current node to be decompressed; the first decompression module 203 can be It is configured to input the probability distribution and point cloud code stream of the information to be decompressed corresponding to the current node to be decompressed to the arithmetic decoder for entropy decoding, and obtain the information to be decompressed corresponding to the current node to be decompressed; the second quantization module 204 , can be configured to construct a tree structure for the information to be decompressed, obtain the point cloud from the tree structure, and then obtain the decompressed point cloud through dequantization.

请参见图13,图13示出了本公开实施例提供的一种电子设备300的结构示意图,可以包括:处理器310、存储器320和总线330,存储器320可被配置成存储有处理器310可执行的机器可读指令,当电子设备300运行时,处理器310与存储器320之间可以通过总线330进行通信,机器可读指令被处理器310运行时可以执行如上述实施例中的点云的压缩方法的步骤,和/或,点云的解压缩方法的步骤。Please refer to FIG. 13. FIG. 13 shows a schematic structural diagram of an electronic device 300 provided by an embodiment of the present disclosure, which may include: a processor 310, a memory 320, and a bus 330. The memory 320 may be configured to store information that the processor 310 may The executed machine-readable instructions, when the electronic device 300 is running, the processor 310 and the memory 320 can communicate through the bus 330, and when the machine-readable instructions are executed by the processor 310, the point cloud in the above-mentioned embodiments can be executed. The steps of the compression method, and/or, the steps of the point cloud decompression method.

基于同一申请构思,本公开实施例还提供了一种计算机可读存储介质,计算机可读存储介质上可被配置成存储有计算机程序,计算机程序被处理器运行时可以执行上述实施例提供的点云的压缩方法的步骤,和/或,点云的解压缩方法的步骤。可选地,存储介质可以为通用的存储介质,如移动磁盘、硬盘等,存储介质上的计算机程序被运行时,可被配置成执行上述点云的压缩方法的步骤,和/或,点云的解压缩方法的步骤,通过将待压缩节点对应的同层节点和父亲节点的节点占用码和位置信息,作为待压缩节点的上下文信息,考虑待压缩节点的同层节点和父亲节点,解决了相关技术中计算量大以及压缩效率低的技术问题,达到了提高压缩效果和减少计算量的技术效果。Based on the same application idea, embodiments of the present disclosure also provide a computer-readable storage medium, which can be configured to store a computer program, and when the computer program is run by a processor, it can execute the points provided by the above-mentioned embodiments. The steps of the cloud compression method, and/or, the steps of the point cloud decompression method. Optionally, the storage medium can be a general storage medium, such as a removable disk, a hard disk, etc., and when the computer program on the storage medium is run, it can be configured to perform the steps of the above-mentioned point cloud compression method, and/or, the point cloud The steps of the decompression method, by using the node occupancy code and location information of the same-level node and the parent node corresponding to the node to be compressed, as the context information of the node to be compressed, considering the same-level node and the parent node of the node to be compressed, solves the problem of The technical problems of large amount of calculation and low compression efficiency in the related art achieve the technical effect of improving the compression effect and reducing the amount of calculation.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的可选的工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the optional working process of the above-described system and device can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated. to another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分或者技术方案的部分可以以软件产品的形式体现出来,计算机软件产品可以被存储在一个存储介质中,包括若干指令被配置成使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例方法的全部或部分步骤。而前述的存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on this understanding, the essence of the technical solution of the present disclosure or the part that contributes to the related technology or the part of the technical solution can be embodied in the form of software products, and the computer software products can be stored in a storage medium, including several The instructions are configured to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods of the various embodiments of the present disclosure. The aforementioned storage medium can include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc, etc., which can store program codes. medium.

以上仅为本公开的可选实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。The above are only optional implementations of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope of the present disclosure, and should cover all within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be determined by the protection scope of the claims.

工业实用性Industrial Applicability

本公开提供一种点云的压缩和解压缩方法,可以通过待压缩节点的节点占用码和属性信息进行压缩和解压缩处理,并且在进行压缩和解压缩时,可以将待压缩节点对应的同层节点和父亲节点的节点占用码和位置信息,作为待压缩节点的上下文信息,解决了相关技术中计算量大以及压缩效率低的技术问题,达到了提高压缩效果和减少计算量的技术效果。The present disclosure provides a point cloud compression and decompression method, which can perform compression and decompression processing through the node occupancy code and attribute information of the node to be compressed, and when performing compression and decompression, the same layer node corresponding to the node to be compressed and The node occupancy code and location information of the parent node are used as the context information of the node to be compressed, which solves the technical problems of large amount of calculation and low compression efficiency in related technologies, and achieves the technical effect of improving the compression effect and reducing the amount of calculation.

此外,可以理解的是,本公开的点云的压缩和解压缩方法是可以重现的,并且可以用在多种工业应用中,例如,本公开的点云的压缩和解压缩方法可以在三维激光测绘等场景中应用。In addition, it can be understood that the point cloud compression and decompression method of the present disclosure is reproducible and can be used in various industrial applications, for example, the point cloud compression and decompression method of the present disclosure can be used in 3D laser mapping and other scenarios.

Claims (18)

一种点云的压缩方法,其特征在于,所述压缩方法包括:A method for compressing point clouds, characterized in that the method for compressing comprises: 将点云通过树结构对点的坐标进行二进制编码,将所述二进制编码转化为十进制编码,作为所述树结构中每个节点对应的节点占用码;Carrying out binary encoding to the point coordinates of the point cloud through the tree structure, converting the binary encoding into decimal encoding, as the node occupancy code corresponding to each node in the tree structure; 对所述树结构中的节点移动预置窗口,将所述预置窗口内的未压缩的节点确定为当前待压缩节点;moving the preset window to the nodes in the tree structure, and determining the uncompressed node in the preset window as the current node to be compressed; 将所述当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布;The context information of the current node to be compressed is input into the pre-trained attention neural network model, and the probability distribution of the information to be compressed corresponding to the current node to be compressed is predicted; 根据待压缩节点对应的待压缩信息的概率分布和待压缩信息,输入至算数编码器进行熵编码,得到点云码流,将所述点云码流作为点云的压缩结果。According to the probability distribution of the information to be compressed corresponding to the node to be compressed and the information to be compressed, input to an arithmetic encoder for entropy encoding to obtain a point cloud code stream, and use the point cloud code stream as a point cloud compression result. 根据权利要求1所述的压缩方法,其特征在于,所述树结构为八叉树结构。The compression method according to claim 1, wherein the tree structure is an octree structure. 根据权利要求1或2所述的压缩方法,其特征在于,所述预置窗口被配置成根据广度优先原则进行移动;The compression method according to claim 1 or 2, wherein the preset window is configured to move according to the breadth-first principle; 移动所述预置窗口时,依据所述广度优先原则将所述树结构的节点排成广度优先序列,将所述广度优先序列中前面的节点作为待压缩节点对应的同层节点,直到所述预置窗口的同层节点数量满足预设的数量;When moving the preset window, the nodes of the tree structure are arranged into a breadth-first sequence according to the breadth-first principle, and the previous nodes in the breadth-first sequence are used as the same layer nodes corresponding to the nodes to be compressed until the The number of peer nodes in the preset window meets the preset number; 在所述预置窗口的同层节点的数量和/或同层节点的多层父亲节点的数量不能满足时,用默认节点补充所述预置窗口内的节点。When the number of nodes at the same level in the preset window and/or the number of multi-layer parent nodes of nodes at the same level cannot meet the requirements, default nodes are used to supplement the nodes in the preset window. 根据前述权利要求任一项所述的压缩方法,其特征在于,所述注意力神经网络模型的训练步骤包括:The compression method according to any one of the preceding claims, wherein the training step of the attention neural network model comprises: 从样本点云中构建树结构,并确定样本节点的上下文信息和节点的待压缩信息,其中,所述样本点云与测试点云是不同的但是相似的;Construct a tree structure from the sample point cloud, and determine the context information of the sample node and the information to be compressed of the node, wherein the sample point cloud is different but similar to the test point cloud; 将所述样本节点的上下文信息输入至所述注意力神经网络模型的第一层注意力操作网络中,得到所述样本节点的第一加权上下文矩阵;The context information of the sample node is input into the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the sample node; 将所述第一加权上下文矩阵与所述上下文信息相加,将相加的结果输入至所述第一层多层感知机网络中,得到第二加权上下文矩阵;adding the first weighted context matrix to the context information, and inputting the result of the addition into the first layer of multi-layer perceptron network to obtain a second weighted context matrix; 将所述第二加权上下文矩阵输入至所述第二层注意力操作网络中,得到第三加权上下文矩阵;Inputting the second weighted context matrix into the second layer of attention operation network to obtain a third weighted context matrix; 将所述第三加权上下文矩阵与所述第二加权上下文矩阵相加,将相加的结果输入至所述第二层多层感知机网络中,得出预测待压缩节点对应的待压缩信息的概率分布;adding the third weighted context matrix to the second weighted context matrix, and inputting the result of the addition into the second-layer multi-layer perceptron network to obtain the information to be compressed corresponding to the predicted node to be compressed Probability distributions; 将多个样本节点对应的待压缩信息的概率分布和待压缩信息带入到损失函数中,计算损失值;Bring the probability distribution of the information to be compressed corresponding to multiple sample nodes and the information to be compressed into the loss function, and calculate the loss value; 使用基于深度学习的优化算法进行反向传播,来优化损失值,更新所述注意力神经网络模 型的权重;Use an optimization algorithm based on deep learning to carry out backpropagation to optimize the loss value and update the weight of the attention neural network model; 多次执行以上步骤,在所述损失函数输出的损失值的变化率达到预置阈值时,则得到训练好的注意力神经网络模型。The above steps are executed multiple times, and when the rate of change of the loss value output by the loss function reaches a preset threshold, a trained attention neural network model is obtained. 根据权利要求1至4中任一项所述的压缩方法,其特征在于,所述当前待压缩节点的上下文信息,包括:当前待压缩节点对应的同层节点的多层父亲节点、前序同层节点的节点占用码和位置信息,以及当前待压缩节点的位置信息;The compression method according to any one of claims 1 to 4, wherein the context information of the current node to be compressed includes: the multi-layer parent node of the same layer node corresponding to the current node to be compressed, the preorder same The node occupancy code and location information of the layer node, as well as the location information of the current node to be compressed; 将所述当前待压缩节点对应的同层节点的多层父亲节点、所述前序同层节点的节点占用码和位置信息,以及所述当前待压缩节点的位置信息,作为待压缩节点对应的上下文信息,包括:Use the multi-layer parent node of the same layer node corresponding to the current node to be compressed, the node occupancy code and location information of the previous node at the same layer, and the location information of the current node to be compressed as the node corresponding to the node to be compressed Contextual information, including: 将所述当前待压缩节点的前序同层节点和所述前序同层节点对应的多层父亲节点的节点占用码和位置信息,作为当前待压缩节点对应的第一上下文信息;Using the node occupancy code and location information of the preceding peer node of the current node to be compressed and the multi-layer parent node corresponding to the preceding peer node as the first context information corresponding to the current node to be compressed; 将所述当前待压缩节点的位置信息、所述当前待压缩节点的前一个已压缩的同层节点的节点占用码,以及所述当前待压缩节点对应的多层父亲节点的节点占用码和位置信息,作为当前待压缩节点对应的第二上下文信息,The location information of the current node to be compressed, the node occupancy code of the previous compressed node at the same layer of the current node to be compressed, and the node occupancy code and position of the multi-layer parent node corresponding to the current node to be compressed information, as the second context information corresponding to the current node to be compressed, 将所述第一上下文信息和所述第二上下文信息,作为当前待压缩节点对应的上下文信息;Using the first context information and the second context information as context information corresponding to the current node to be compressed; 所述当前待压缩节点对应的待压缩信息,包括:当前待压缩节点的节点占用码。The to-be-compressed information corresponding to the current to-be-compressed node includes: a node occupation code of the current to-be-compressed node. 根据权利要求1至4中任一项所述的压缩方法,其特征在于,所述当前待压缩节点的上下文信息,还包括:当前待压缩节点对应的同层节点的多层父亲节点的节点占用码和位置信息、同层节点的节点占用码和位置信息、前序同层节点对应的节点属性和/或节点属性残差;The compression method according to any one of claims 1 to 4, wherein the context information of the current node to be compressed further includes: the node occupancy of the multi-layer parent node of the same layer node corresponding to the current node to be compressed Code and location information, node occupancy code and location information of nodes at the same layer, node attributes and/or node attribute residuals corresponding to nodes at the same layer in the preceding sequence; 所述当前待压缩节点对应的待压缩信息,还包括:当前待压缩节点的节点属性和/或节点属性残差。The to-be-compressed information corresponding to the current to-be-compressed node further includes: node attributes and/or node attribute residuals of the current to-be-compressed node. 根据权利要求5或6所述的压缩方法,其特征在于,所述位置信息包括:节点索引,和/或节点深度,和/或节点的包围盒坐标。The compression method according to claim 5 or 6, wherein the location information includes: node index, and/or node depth, and/or node bounding box coordinates. 根据权利要求1至4中任一项所述的压缩方法,其特征在于,所述将所述当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布,包括:The compression method according to any one of claims 1 to 4, wherein the context information of the current node to be compressed is input into a pre-trained attention neural network model to predict the current node to be compressed The probability distribution of the corresponding information to be compressed includes: 将所述当前待压缩节点的上下文信息输入至所述注意力神经网络模型的第一层注意力操作网络中,得到当前待压缩节点的第一加权上下文矩阵;The context information of the current node to be compressed is input into the first layer of attention operation network of the attention neural network model to obtain the first weighted context matrix of the current node to be compressed; 将所述第一加权上下文矩阵和所述上下文信息相加,将相加的结果输入至所述第一层多层感知机网络中,得到第二加权上下文矩阵;adding the first weighted context matrix and the context information, and inputting the result of the addition into the first layer of multi-layer perceptron network to obtain a second weighted context matrix; 将所述第二加权上下文矩阵输入至所述第二层注意力操作网络中,得到第三加权上下文矩阵;Inputting the second weighted context matrix into the second layer of attention operation network to obtain a third weighted context matrix; 将所述第三加权上下文矩阵与所述第二加权上下文矩阵相加,将相加的结果输入至所述第二层多层感知机网络中,得出第四加权上下文矩阵;adding the third weighted context matrix to the second weighted context matrix, and inputting the result of the addition into the second-layer multilayer perceptron network to obtain a fourth weighted context matrix; 将所述第四加权上下文矩阵输入至第三层多层感知机网络中,得出第五加权上下文矩阵;The fourth weighted context matrix is input into the third layer multi-layer perceptron network to obtain the fifth weighted context matrix; 将所述第五加权上下文矩阵通过softmax函数,预测出所述当前待压缩节点对应的待压缩信息的概率分布。Pass the fifth weighted context matrix through a softmax function to predict the probability distribution of the information to be compressed corresponding to the current node to be compressed. 根据权利要求8所述的压缩方法,其特征在于,将所述当前待压缩节点的上下文信息输入至所述注意力神经网络模型的第一层注意力操作网络中,得到当前待压缩节点的第一加权上下文矩阵,包括:The compression method according to claim 8, wherein the context information of the current node to be compressed is input into the first layer of attention operation network of the attention neural network model to obtain the first layer of the current node to be compressed A weighted context matrix comprising: 将所述当前待压缩节点的上下文信息输入至所述第一多层感知机,得出第一输出矩阵;Inputting the context information of the current node to be compressed into the first multi-layer perceptron to obtain a first output matrix; 将所述当前待压缩节点的上下文信息输入至所述第二多层感知机,得出第二输出矩阵;Inputting the context information of the current node to be compressed into the second multi-layer perceptron to obtain a second output matrix; 将所述当前待压缩节点的上下文信息输入至所述第三多层感知机,得出第三输出矩阵;Inputting the context information of the current node to be compressed into the third multi-layer perceptron to obtain a third output matrix; 将所述第二输出矩阵的转置矩阵与所述第一输出矩阵相乘,得出矩阵内积;multiplying the transpose matrix of the second output matrix by the first output matrix to obtain a matrix inner product; 将所述矩阵内积与遮罩矩阵相加,将相加后的结果输入至softmax函数,得出注意力矩阵;Add the inner product of the matrix to the mask matrix, and input the added result to the softmax function to obtain the attention matrix; 将所述注意力矩阵与所述第三输出矩阵相乘,得到所述当前待压缩节点的第一加权上下文矩阵。multiplying the attention matrix by the third output matrix to obtain the first weighted context matrix of the current node to be compressed. 根据权利要求9所述的压缩方法,其特征在于,所述注意力矩阵中的每一个元素为注意力值;The compression method according to claim 9, wherein each element in the attention matrix is an attention value; 通过以下公式计算所述注意力矩阵的注意力值:Calculate the attention value of the attention matrix by the following formula:
Figure PCTCN2022085657-appb-100001
Figure PCTCN2022085657-appb-100001
公式(1)中,所述
Figure PCTCN2022085657-appb-100002
指的是第j个节点与第k个节点上下文之间的注意力值,第j个节点是同层节点中的第j个节点并且是当前待压缩节点,f j是第j个节点的上下文信息,f k是第k个节点的上下文信息,第k个节点是第j个节点的前序同层节点;
In formula (1), the
Figure PCTCN2022085657-appb-100002
Refers to the attention value between the jth node and the kth node context, the jth node is the jth node in the nodes of the same layer and is the current node to be compressed, f j is the context of the jth node information, f k is the context information of the kth node, and the kth node is the preorder node of the jth node;
分子
Figure PCTCN2022085657-appb-100003
代表第j个节点与第k个节点上下文之间的相似值,分母
Figure PCTCN2022085657-appb-100004
指的是第j个节点与第1个节点至第j个节点上下文之间的相似值的和;MLP 2(f j)指的是将所述第j个节点的上下文信息输入至第二多层感知机,得出第j个节点对应的第二输出矩阵;
Figure PCTCN2022085657-appb-100005
指的是将所述第k个节点的上下文信息输入至第一多层感知机,得出第k个节点对应的第一输出矩阵的转置矩阵。
molecular
Figure PCTCN2022085657-appb-100003
Represents the similarity value between the jth node and the kth node context, denominator
Figure PCTCN2022085657-appb-100004
refers to the sum of the similarity values between the jth node and the context of the first node to the jth node; MLP 2 (f j ) refers to inputting the context information of the jth node into the second most A layer perceptron to obtain a second output matrix corresponding to the jth node;
Figure PCTCN2022085657-appb-100005
It refers to inputting the context information of the kth node into the first multi-layer perceptron to obtain the transpose matrix of the first output matrix corresponding to the kth node.
根据权利要求1至4中任一项所述的压缩方法,其特征在于,所述将所述当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布,包括:The compression method according to any one of claims 1 to 4, wherein the context information of the current node to be compressed is input into a pre-trained attention neural network model to predict the current node to be compressed The probability distribution of the corresponding information to be compressed includes: 将所述当前待压缩节点的上下文信息进行扩维,生成扩维上下文信息;Dimensional expansion of the context information of the current node to be compressed to generate dimension expansion context information; 将所述扩维上下文信息输入至预先训练好的注意力神经网络模型中,预测出当前待压缩节点对应的待压缩信息的概率分布。The dimension expansion context information is input into the pre-trained attention neural network model, and the probability distribution of the information to be compressed corresponding to the current node to be compressed is predicted. 根据权利要求11所述的压缩方法,其特征在于,将所述当前待压缩节点的上下文信息进行扩维,生成扩维上下文信息,包括:The compression method according to claim 11, wherein the context information of the current node to be compressed is expanded to generate the expanded context information, including: 先将所述当前待压缩节点的上下文信息通过独热码操作进行扩维,生成上下文信息的独热码,以及将所述上下文信息的独热码通过嵌入操作生成所述扩维上下文信息。Firstly, the context information of the current node to be compressed is expanded through a one-hot code operation to generate a one-hot code of the context information, and the one-hot code of the context information is generated through an embedding operation to generate the dimension-expanded context information. 根据前述权利要求任一项所述的压缩方法,其特征在于,所述压缩方法包括提供一种点云的压缩装置,所述压缩装置包括第一量化模块、第一确定模块、第一预测模块和第一压缩模块,其中:The compression method according to any one of the preceding claims, wherein the compression method includes providing a point cloud compression device, the compression device includes a first quantization module, a first determination module, a first prediction module and the first compression module, where: 所述第一量化模块被配置成将所述点云通过所述树结构对点的坐标进行二进制编码,将所述二进制编码转化为十进制编码,作为所述树结构中每个节点对应的节点占用码;The first quantization module is configured to perform binary encoding on the point coordinates of the point cloud through the tree structure, and convert the binary encoding into decimal encoding as the node occupancy corresponding to each node in the tree structure. code; 所述第一确定模块被配置成对所述树结构中的节点移动预置窗口,将所述预置窗口内的未压缩的节点确定为当前待压缩节点;The first determining module is configured to move a preset window to the nodes in the tree structure, and determine an uncompressed node in the preset window as the current node to be compressed; 所述第一预测模块被配置成将当前待压缩节点的上下文信息输入至预先训练好的注意力神经网络模型中,预测当前待压缩节点对应的待压缩信息的概率分布;以及The first prediction module is configured to input the context information of the current node to be compressed into the pre-trained attention neural network model, and predict the probability distribution of the information to be compressed corresponding to the current node to be compressed; and 所述第一压缩模块被配置成将所述待压缩节点对应的待压缩信息的概率分布和待压缩信息,输入至算数编码器进行熵编码,得到点云码流,将所述点云码流作为所述点云的压缩结果。The first compression module is configured to input the probability distribution of the information to be compressed and the information to be compressed corresponding to the node to be compressed to an arithmetic encoder for entropy encoding to obtain a point cloud code stream, and convert the point cloud code stream As a result of the compression of the point cloud. 一种点云的解压缩方法,其特征在于,所述解压缩方法包括:A method for decompressing point clouds, characterized in that the method for decompressing comprises: 对树结构移动预置窗口,将每次移动所述预置窗口内的未解压缩的节点确定为当前待解压缩节点;Move the preset window to the tree structure, and determine the uncompressed node in the preset window as the current node to be decompressed each time; 将所述当前待解压缩节点的上下文信息,输入至预先训练好的注意力神经网络模型中,预测当前待解压缩节点对应的待解压缩信息的概率分布;The context information of the current node to be decompressed is input into the pre-trained attention neural network model, and the probability distribution of the information to be decompressed corresponding to the current node to be decompressed is predicted; 将所述当前待解压缩节点对应的待解压缩信息的概率分布和点云码流,输入至算数解码器进行熵解码,得到当前待解压缩节点对应的待解压缩信息;Inputting the probability distribution of the information to be decompressed corresponding to the current node to be decompressed and the point cloud code stream to an arithmetic decoder for entropy decoding to obtain the information to be decompressed corresponding to the current node to be decompressed; 将所述待解压缩信息构建树结构,从所述树结构中获取点云,通过反量化,得到解压缩点云。Constructing a tree structure for the information to be decompressed, obtaining a point cloud from the tree structure, and obtaining the decompressed point cloud through dequantization. 根据权利要求14所述的解压缩方法,其特征在于,所述解压缩方法包括提供一种点云的解压缩装置,所述解压缩装置包括:第二确定模块、第二预测模块、第一解压缩模块和第二量化模块,其中:The decompression method according to claim 14, characterized in that, the decompression method includes providing a point cloud decompression device, and the decompression device includes: a second determination module, a second prediction module, a first Decompression module and second quantization module, wherein: 所述第二确定模块被配置成对所述树结构移动所述预置窗口,将每次移动所述预置窗口内的未解压缩的节点确定为当前待解压缩节点;The second determination module is configured to move the preset window to the tree structure, and determine the uncompressed node within the preset window each time as the current node to be decompressed; 所述第二预测模块被配置成将所述当前待解压缩节点的上下文信息,输入至预先训练好的注意力神经网络模型中,预测当前待解压缩节点对应的待解压缩信息的概率分布;The second prediction module is configured to input the context information of the current node to be decompressed into the pre-trained attention neural network model, and predict the probability distribution of the information to be decompressed corresponding to the current node to be decompressed; 所述第一解压缩模块被配置成将所述当前待解压缩节点对应的待解压缩信息的概率分布和点云码流,输入至算数解码器进行熵解码,得到当前待解压缩节点对应的待解压缩信息;The first decompression module is configured to input the probability distribution of the information to be decompressed and the point cloud code stream corresponding to the current node to be decompressed to the arithmetic decoder for entropy decoding, and obtain the information corresponding to the current node to be decompressed. information to be decompressed; 所述第二量化模块被配置成将所述待解压缩信息构建树结构,从所述树结构中获取点云,通过反量化,得到解压缩点云。The second quantization module is configured to construct a tree structure for the information to be decompressed, obtain a point cloud from the tree structure, and obtain a decompressed point cloud through dequantization. 一种电子设备,其特征在于,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,在电子设备运行时,所述处理器与所述存储器之间通过所述总线进行通信,所述机器可读指令被所述处理器运行时执行如权利要求1至13中任一所述的点云的压缩方法的步骤,和/或,如权利要求14或15所述的点云的解压缩方法的步骤。An electronic device, characterized in that it includes: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the connection between the processor and the memory communicate with each other through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the point cloud compression method according to any one of claims 1 to 13, and/or, according to claim 14 Or the step of the decompression method of the point cloud described in 15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行如权利要求1至13中任一所述的点云的压缩方法的步骤,和/或,如权利要求14或15所述的点云的解压缩方法的步骤。A computer-readable storage medium, characterized in that, a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the point cloud according to any one of claims 1 to 13 is executed. The steps of the compression method, and/or, the steps of the point cloud decompression method as claimed in claim 14 or 15. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述计算机可读存储介质为U盘、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等能够存储程序代码的通用存储介质。The computer-readable storage medium according to claim 17, wherein the computer-readable storage medium is a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., which can store program codes. Universal storage medium.
PCT/CN2022/085657 2022-02-11 2022-04-07 Point cloud compression method and point cloud decompression method Ceased WO2023151170A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210127272.2A CN114972551B (en) 2022-02-11 2022-02-11 Compression and decompression method for point cloud
CN202210127272.2 2022-02-11

Publications (1)

Publication Number Publication Date
WO2023151170A1 true WO2023151170A1 (en) 2023-08-17

Family

ID=82975288

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/085657 Ceased WO2023151170A1 (en) 2022-02-11 2022-04-07 Point cloud compression method and point cloud decompression method

Country Status (2)

Country Link
CN (1) CN114972551B (en)
WO (1) WO2023151170A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118283276A (en) * 2024-03-29 2024-07-02 中钢集团马鞍山矿山研究总院股份有限公司 Point cloud Web visualization method based on adaptive point cloud compression algorithm
CN118981021A (en) * 2024-08-21 2024-11-19 浙江大学 Multi-beam forward-looking 3D sonar data compression method and system based on deep learning

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120303932A (en) * 2022-12-09 2025-07-11 Oppo广东移动通信有限公司 Coding and decoding method, decoder, encoder, code stream and storage medium
CN120419178A (en) * 2023-01-23 2025-08-01 索尼集团公司 Information processing apparatus and method
CN116546219B (en) * 2023-04-07 2025-11-11 中山大学 Point cloud geometric color joint compression method based on learning
WO2024221458A1 (en) * 2023-04-28 2024-10-31 Oppo广东移动通信有限公司 Point cloud encoding/decoding method and apparatus, device, and storage medium
CN118379373B (en) * 2024-06-21 2024-08-20 深圳市家鸿口腔医疗股份有限公司 Denture three-dimensional imaging data processing method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3514966A1 (en) * 2018-01-18 2019-07-24 BlackBerry Limited Methods and devices for binary entropy coding of points clouds
WO2021055225A1 (en) * 2019-09-16 2021-03-25 Tencent America LLC Method and apparatus for point cloud compression
CN113284203A (en) * 2021-05-04 2021-08-20 北京航空航天大学 Point cloud compression and decompression method based on octree coding and voxel context
CN113613010A (en) * 2021-07-07 2021-11-05 南京大学 Point cloud geometric lossless compression method based on sparse convolutional neural network
CN113766228A (en) * 2020-06-05 2021-12-07 Oppo广东移动通信有限公司 Point cloud compression method, encoder, decoder and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473127B (en) * 2020-03-30 2022-09-23 鹏城实验室 Point cloud geometric coding method, point cloud geometric decoding method, point cloud geometric coding equipment and point cloud geometric decoding equipment
US11615557B2 (en) * 2020-06-24 2023-03-28 Apple Inc. Point cloud compression using octrees with slicing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3514966A1 (en) * 2018-01-18 2019-07-24 BlackBerry Limited Methods and devices for binary entropy coding of points clouds
WO2021055225A1 (en) * 2019-09-16 2021-03-25 Tencent America LLC Method and apparatus for point cloud compression
CN113766228A (en) * 2020-06-05 2021-12-07 Oppo广东移动通信有限公司 Point cloud compression method, encoder, decoder and storage medium
CN113284203A (en) * 2021-05-04 2021-08-20 北京航空航天大学 Point cloud compression and decompression method based on octree coding and voxel context
CN113613010A (en) * 2021-07-07 2021-11-05 南京大学 Point cloud geometric lossless compression method based on sparse convolutional neural network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118283276A (en) * 2024-03-29 2024-07-02 中钢集团马鞍山矿山研究总院股份有限公司 Point cloud Web visualization method based on adaptive point cloud compression algorithm
NL2039106A (en) * 2024-03-29 2025-10-06 Sinosteel Maanshan General Institute Of Mining Res Co Ltd Point Cloud Web Visualization Method Based on Adaptive Point Cloud Compression Algorithm
CN118981021A (en) * 2024-08-21 2024-11-19 浙江大学 Multi-beam forward-looking 3D sonar data compression method and system based on deep learning

Also Published As

Publication number Publication date
CN114972551B (en) 2024-12-17
CN114972551A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
WO2023151170A1 (en) Point cloud compression method and point cloud decompression method
JP7408799B2 (en) Neural network model compression
CN111405281A (en) An encoding method, decoding method, storage medium and terminal device for point cloud attribute information
EP4307663A1 (en) Decoding method/encoding method based on point cloud attribute prediction, decoder, and encoder
CN113632142B (en) Point cloud encoding and decoding method and device
WO2024037091A1 (en) Point cloud processing method and apparatus, computer device, and storage medium
CN115379191B (en) Point cloud decoding method, point cloud encoding method and related equipment
US11900525B2 (en) Learned volumetric attribute compression using coordinate-based networks
WO2022028197A1 (en) Image processing method and device thereof
WO2023205969A1 (en) Point cloud geometric information compression method and apparatus, point cloud geometric information decompression method and apparatus, point cloud video encoding method and apparatus, and point cloud video decoding method and apparatus
US20250148652A1 (en) Method, apparatus, and medium for point cloud coding
CN120493983A (en) Method for decoding neural network, method for encoding neural network, method for processing visual media data, device and storage medium
WO2023103564A1 (en) Point cloud decoding method and apparatus, point cloud encoding method and apparatus, computer device, computer readable storage medium, and computer program product
TW202406344A (en) Point cloud geometry data augmentation method and apparatus, encoding method and apparatus, decoding method and apparatus, and encoding and decoding system
CN121037545A (en) Point cloud coding and decoding methods, devices and communication equipment
CN116843774A (en) Point cloud data compression method, device, equipment and storage medium
CN120956878A (en) Decoding methods, encoding methods, devices, storage media and equipment for point cloud data
CN117581549A (en) Intra-frame prediction, coding and decoding methods and devices, codecs, equipment, media
CN116546219A (en) Point cloud geometric color joint compression method based on learning
CN116634179A (en) Point cloud data processing method, device, electronic device and storage medium
WO2024082101A1 (en) Encoding method, decoding method, decoder, encoder, code stream, and storage medium
WO2024011417A1 (en) Encoding method, decoding method, decoder, encoder and computer readable storage medium
Hieu et al. Point Cloud Compression with Bits-back Coding
JP2023053827A (en) Point group decoding device, point group decoding method and program
CN116781927A (en) Point cloud processing method and related equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22925531

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22925531

Country of ref document: EP

Kind code of ref document: A1