A point cloud encoding and decoding method based on a bi-octree structure
Patent Information
- Application Number
- CN202311666433.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2043-12-07
AI Technical Summary
[0005]有鉴于此,为了解决现有点云压缩编码方法中无法高效地挖掘八叉树节点全局的上下文特征,进而影响压缩效率和压缩精度的技术问题,本发明提出一种基于双八叉树结构的点云编码及解码方法方法,所述方法包括以下步骤:
[0039] Based on the above scheme, this invention provides a point cloud encoding method based on a bi-octree structure. First, a bi-octree structure is constructed from the point cloud data. Then, a deep entropy model based on a cross-attention mechanism is designed to predict the probability distribution of placeholder symbols for octree nodes. For the bi-octree structure, the original 3D point set is divided into inner and outer clusters based on differences in spatial features, and octrees are constructed for each cluster. Since the point sets with large spatial feature differences have been separated, the features within the two sub-point cloud clusters are more similar, the contextual features are more obvious, and the complexity of constructing the octree is reduced. Furthermore, considering that the two octrees in the bi-octree point cloud compression encoding model often have spatial correlation, this invention designs a cross-attention model to further capture the hierarchical geometric features between the octrees, expanding the receptive domain from local to global. This invention also introduces unbound cross-aware positional encoding to further extract the contextual information correlation between the two octrees. For the encoding of the octree structure, this invention utilizes a positional encoder and a multi-head self-attention module to learn the content information between local sibling nodes. Then, the features of the compensated octree are input into the multi-head cross-attention model to predict the probability of placeholder symbols for the octree. Finally, based on the placeholder symbol probability distribution of the two octrees, this invention compresses the octree nodes into the bitstream using an arithmetic coding method. In summary, the method of this invention improves the efficiency of point cloud encoding and decoding.
Smart Images

Figure CN117692662B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of point cloud data processing, and in particular to a point cloud encoding and decoding method based on a bi-octree structure. Background Technology
[0002] In recent years, with the continuous development of LiDAR technology, its applications in various fields have become increasingly widespread. The application of LiDAR in virtual reality, autonomous vehicles, and intelligent robots has become a growing research hotspot. In autonomous vehicles and intelligent robots, high-precision point cloud data is essential for ensuring safety and stability. However, due to the massive amount of point cloud data, processing this data requires significant time and computing resources. Therefore, how to achieve efficient point cloud compression has become a crucial issue.
[0003] Currently, point cloud compression methods mainly fall into two categories: lossless compression and lossy compression. Lossless compression methods primarily include those based on Huffman coding and arithmetic coding. These methods can ensure that the compressed point cloud data is completely identical to the original data, but their compression ratio is low and cannot meet the needs of practical applications. Therefore, lossy compression methods have become the main means of compressing point cloud data.
[0004] To date, widely used lossy compression methods include octree-based methods. The challenge of octree-based methods lies in how to efficiently utilize node context information for entropy encoding. Under time cost constraints, how to enrich the fine-grained nodes of the octree structure and fully exploit geometric features remains to be solved. Summary of the Invention
[0005] In view of this, in order to solve the technical problem that existing point cloud compression coding methods cannot efficiently mine the global contextual features of octree nodes, thus affecting compression efficiency and accuracy, this invention proposes a point cloud encoding and decoding method based on a dual octree structure, the method comprising the following steps:
[0006] Constructing a bi-octree structure based on point cloud data;
[0007] A deep entropy model based on the cross-attention mechanism is constructed to fuse the features of the bi-octree structure and predict the placeholder symbol probability distribution of the octree nodes.
[0008] Based on the placeholder sign probability distribution of the octree nodes, modeling and encoding are performed to obtain a floating-point number sequence;
[0009] The floating-point number sequence is converted into a bit stream to obtain bit stream data.
[0010] In this embodiment, an innovative dual-octree coding structure is designed, which, compared to a single octree, can provide more geometric priors and reduce coding time. Simultaneously, this coding structure can better handle multi-level point cloud data, improving the efficiency of point cloud encoding and decoding.
[0011] In some embodiments, the step of constructing a bi-octree structure based on point cloud data specifically includes:
[0012] The point cloud data is acquired and divided into external point cloud clusters and internal point cloud clusters.
[0013] An octree is constructed for the external point cloud cluster and the internal point cloud cluster respectively, resulting in an external octree and an internal octree.
[0014] This optimization step divides the point cloud into coarse-grained internal and external point clusters, and uses different partitioning scales to construct octrees. The similarity of the point cloud space within a cluster reduces the complexity of recursively building the octree.
[0015] In some embodiments, the deep entropy model based on the cross-attention mechanism includes a self-attention module and a cross-aware position encoding module.
[0016] In some embodiments, the step of fusing the features of the bi-octree structure to predict the placeholder symbol probability distribution of the octree nodes specifically includes:
[0017] Traverse the octree, extract features from each node of the octree based on the self-attention module, and aggregate nodes of the same depth to generate self-attention features.
[0018] Based on cross-aware position encoding, the correlation between features of octrees of different depths is learned, and attention scores are generated by combining the self-attention features.
[0019] Based on the attention score, the placeholder symbol probability distribution of the octree node is generated through convolutional layers and multilayer perceptrons.
[0020] In this embodiment, a self-attention model is used to aggregate node features at the same depth. This process does not rely on sibling node placeholder features that can only be obtained through the next depth, thereby improving the efficiency of model decoding. Based on unbound cross-aware position encoding, the correlation of the bi-octree is extracted, which helps to calculate the probability distribution of placeholder symbols.
[0021] Specifically, to further capture hierarchical geometric features, this invention employs cross-attention, fusing the self-attention features of the main octree extracted by the multi-head self-attention module with the self-attention features of the auxiliary octrees (corresponding to the outer and inner octrees). This model can better capture the spatial context information of point cloud data, thereby improving the efficiency of point cloud encoding and decoding.
[0022] In some embodiments, the loss function for placeholder symbol prediction in a deep entropy model based on cross-attention mechanism is:
[0023]
[0024] In the above formula, The placeholder symbol x for an octree node i The probability distribution, w represents the weights of the deep entropy model of the cross-attention mechanism, and f i Represents the characteristics of the node sequence. This represents the node sequence characteristics of the last layer of the compensated octree.
[0025] In some embodiments, arithmetic coding is used to construct the floating-point number sequence.
[0026] Through this optimized step, compression is achieved by mapping data to a segment of the real number interval [0, 1) using arithmetic coding. The characteristics of arithmetic coding make it an efficient entropy coding method, which can achieve a high compression ratio and approximate the entropy of the source.
[0027] In some embodiments, the step of converting the floating-point sequence into a bitstream to obtain bitstream data specifically includes:
[0028] Dynamically select the floating-point number with the fewest binary bits to represent each node;
[0029] For each node, store the binary bits of the selected floating-point number and convert the floating-point number into a bit stream;
[0030] Based on breadth-first search, bitstreams from nodes within the same octree are concatenated to obtain complete bitstream data.
[0031] In this embodiment, since the precision of computer floating-point numbers is limited, the present invention selects a finite number of floating-point numbers to represent node symbols within a specified range. Each floating-point number is first converted to binary form and then to a byte stream.
[0032] In some embodiments, it also includes:
[0033] The bitstream data corresponding to different cross trees are merged and transmitted.
[0034] In this embodiment, two relatively long bit streams are generated in the dual octree structure, which can be merged for transmission.
[0035] This invention also proposes a point cloud decoding method based on a bi-octree structure, the decoding method comprising:
[0036] Based on the bitstream data, a binary octree structure is reconstructed.
[0037] Point cloud data is obtained by reconstructing the bi-octree structure.
[0038] Through this optimized step, the two compressed bitstream data segments can be restored to a dual octree structure, and then the reconstructed point cloud data can be obtained, thereby realizing the decompression and recovery of the data.
[0039] Based on the above scheme, this invention provides a point cloud encoding method based on a bi-octree structure. First, a bi-octree structure is constructed from the point cloud data. Then, a deep entropy model based on a cross-attention mechanism is designed to predict the probability distribution of placeholder symbols for octree nodes. For the bi-octree structure, the original 3D point set is divided into inner and outer clusters based on differences in spatial features, and octrees are constructed for each cluster. Since the point sets with large spatial feature differences have been separated, the features within the two sub-point cloud clusters are more similar, the contextual features are more obvious, and the complexity of constructing the octree is reduced. Furthermore, considering that the two octrees in the bi-octree point cloud compression encoding model often have spatial correlation, this invention designs a cross-attention model to further capture the hierarchical geometric features between the octrees, expanding the receptive domain from local to global. This invention also introduces unbound cross-aware positional encoding to further extract the contextual information correlation between the two octrees. For the encoding of the octree structure, this invention utilizes a positional encoder and a multi-head self-attention module to learn the content information between local sibling nodes. Then, the features of the compensated octree are input into the multi-head cross-attention model to predict the probability of placeholder symbols for the octree. Finally, based on the placeholder symbol probability distribution of the two octrees, this invention compresses the octree nodes into the bitstream using an arithmetic coding method. In summary, the method of this invention improves the efficiency of point cloud encoding and decoding. Attached Figure Description
[0040] Figure 1 This is a flowchart of the steps of a point cloud encoding method based on a bi-octree structure according to the present invention;
[0041] Figure 2 This is a schematic diagram of the overall framework for encoding and decoding in a specific embodiment of the present invention;
[0042] Figure 3 This is a schematic diagram of the structure of the unbound cross-sensing position encoding in a specific embodiment of the present invention;
[0043] Figure 4 This is a partial structural diagram of the Transformer entropy model based on cross-attention in a specific embodiment of the present invention;
[0044] Figure 5 This is an error diagram of a specific embodiment of the present invention. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] It should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0047] It should be understood that the terms "system," "apparatus," "unit," and / or "module" used in this application are a method of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.
[0048] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "a," and / or "the" are not specifically singular and may include the plural. Generally, the terms "comprising" and "including" only indicate the inclusion of expressly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements. An element defined by the phrase "comprising an..." does not exclude the presence of other identical elements in the process, method, product, or apparatus that includes the element.
[0049] In the description of the embodiments of this application, "a plurality of" refers to two or more. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0050] Furthermore, flowcharts are used in this application to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed precisely in sequence. Instead, the steps can be processed in reverse order or simultaneously. Additionally, other operations can be added to these processes, or one or more steps can be removed from them.
[0051] Reference Figure 1 and Figure 2 This invention proposes a point cloud encoding method based on a dual octree structure. This method is applicable to computer devices. The imaging method proposed in this embodiment may include, but is not limited to, the following steps:
[0052] Step S1: Construct a bi-octree structure based on point cloud data;
[0053] Step S2: Construct a deep entropy model based on the cross-attention mechanism, fuse the features of the bi-octree structure, and predict the placeholder symbol probability distribution of the octree nodes.
[0054] Step S3: Based on the placeholder sign probability distribution of the octree nodes, perform modeling and encoding to obtain a floating-point number sequence;
[0055] Step S4: Convert the floating-point number sequence into a bit stream to obtain bit stream data.
[0056] Efficiently mining the global contextual features of octree nodes within a limited timeframe is a major challenge in current octree-based encoding and decoding methods. Due to the significant differences in spatial geometric features within point cloud data, this invention employs a dual octree structure, dividing the point cloud into an inner and outer cluster and constructing octrees for each cluster. The spatial similarity within the clusters reduces the complexity of recursively constructing octrees. This invention does not introduce sibling node placeholders as features; instead, it uses non-overlapping context windows to capture the features of all nodes within the window, thereby reducing computational complexity. Furthermore, this invention designs a cross-attention module and unbound cross-aware positional encoding to learn multi-level contextual information from the interaction between the two octrees, enhancing global perception capabilities. Compared to traditional single octree models, this invention achieves superior results and performance improvements.
[0057] In some feasible embodiments, step S1 specifically includes:
[0058] S1.1 Acquire point cloud data and divide the point cloud data to obtain external point cloud clusters and internal point cloud clusters;
[0059] S1.2. Establish octrees for the external point cloud cluster and the internal point cloud cluster respectively to obtain the external octree and the internal octree.
[0060] An octree divides the original point cloud's 3D space into 8 cubes along the maximum side length of the initial cube's bounding box. The original points are assigned to these cubes accordingly. This process is then recursively repeated for each non-empty cube until the set maximum depth is reached. Only sub-cubes containing 3D points are marked as 1 and further subdivided, while other sub-cubes without points are marked as 0, and subdivision stops. Each non-leaf node uses an 8-bit placeholder to represent the distribution of its child nodes, with each bit corresponding to a specific child node.
[0061] In the construction of an octree, the coordinates of the cube's center are used to represent the set of points contained in each node. However, the coordinates of the cube's center... Points corresponding to the original point cloud P There exists a quantization error e, which can be described as:
[0062]
[0063] Where L is the length of the initial bounding box, and h represents the maximum depth level in the octree structure. For octree-based methods, only geometric compression loss exists, stemming from the quantization error in the formula. Researchers typically increase the octree depth h to achieve high-precision compression quality. Due to encoding time constraints, single-tree-based methods usually set the maximum depth to 12.
[0064] This invention divides point clouds into coarse-grained internal and external point clusters and uses different partitioning scales to construct octrees. In fact, this invention explores the possibility of improving partitioning resolution by reducing the size of the bounding box (for internal point clusters), rather than simply increasing the depth of the octree. Bi-octrees can guarantee high reconstruction quality while saving construction costs on certain depth combinations. For example, a bi-octree structure with 12 and 10 layers for both the external and internal octrees achieves better time performance than a single octree with a depth of 12.
[0065] In some feasible embodiments, the deep entropy model based on the cross-attention mechanism includes a self-attention module and a cross-aware position encoding module, and step S2 specifically includes:
[0066] S2.1 Traverse the octree, extract features from each node of the octree based on the self-attention module, aggregate nodes of the same depth, and generate self-attention features.
[0067] This invention uses a self-attention model to aggregate node features of the same depth. By traversing an octree of size , the input to the self-attention model can be organized into several sequences. These sequences are then processed after the embedding layer. The feature dimension was increased from 6 to 512, and position encoding was added to the input sequence. This provides positional information within the sequence. It utilizes a multi-head self-attention mechanism, applying multiple Transformer blocks. [7] Feature extraction is performed on each node to generate self-attention features. s i This reflects the salient features of a node among its local sibling nodes at the same spatial partitioning scale. Under non-overlapping sequence input, the self-attention model infers the local attention features of nodes in parallel. This process does not rely on sibling node placeholder symbol features that can only be obtained through the next depth, thus improving the efficiency of model decoding.
[0068] S2.2. Based on cross-aware position encoding, learn the correlation of features between octrees of different depths, and generate attention scores by combining the self-attention features.
[0069] Considering that self-attention features typically lack description of geometric segmentation information across multiple levels of the entire octree, this invention proposes an unbound cross-aware position encoding module for learning the correlation of features between octrees of multiple depths. For example... Figure 3 As shown, this invention uses principal component analysis to compute eigenvectors, where the basis vectors correspond to the directions with the largest variance in the auxiliary geometric feature space. These eigenvectors are then used to project the initial features into the feature subspace of the auxiliary octree to generate significant cross-feature position encodings. The neural network introduces learnable parameters to learn the nonlinear correlations between features, enhancing generalization ability.
[0070] Unlike methods that combine cross-feature positional encoding and self-attention features to generate an attention score matrix, the positional encoding in this invention is unbound. Positional encoding and self-attention features are applied to different projection matrices to generate different query-key attention score matrices, which helps extract relevance and enhances generalization ability. Details of the unbound cross-aware positional encoding are as follows... Figure 2 As shown. This invention uses different weights W K W Q U K and To generate two matrices and add them together to form... The attention score matrix, where E represents the length of the sliding window node sequence.
[0071] S2.3 Based on the attention score, the placeholder symbol probability distribution of the octree node is generated through convolutional layers and multilayer perceptrons.
[0072] The Transformer entropy model based on cross-attention fuses features from a bi-octree and predicts the placeholder symbol distribution. In this invention, the features of octree nodes are passed to a self-attention-based Transformer to learn the correlation between local sibling nodes of the same depth. However, the receptive domain of the self-attention model is limited to a single octree, and it does not consider the different geometric segmentation information of the other octree in the encoding of the bi-octree structure. Since the outer octree and the inner octree in the bi-octree structure originate from the same point cloud, this invention designs a cross-attention-based Transformer to learn the correlation between the two octrees, thereby facilitating the calculation of the placeholder symbol probability distribution.
[0073] In this embodiment, a Transformer entropy model based on cross-attention is disclosed. The data processing procedure of this model can be understood as follows:
[0074] Details of the Transformer model based on cross-attention are as follows: Figure 4 As shown, the self-attention features of the main octree and the self-attention features of the auxiliary octree are distributed to generate the query vector, and an attention score is generated based on unbound cross-aware position encoding. The self-attention features of the main octree and the auxiliary octree are added together and converted into a value vector, which is then multiplied by the attention score matrix to generate cross-attention features. For example, in a single-head structure t of a multi-head attention mechanism, the attention score is calculated as follows:
[0075]
[0076] Among them W k W Q It is the weight matrix of the key vector and query vector, and the master-slave attention feature is represented by s. i This indicates that the auxiliary self-attention characteristics are used It means that pe cross PE aux H represents the positional encoding, and H represents the dimension of the key vector. Based on the attention mechanism, cross-attention context can be described as:
[0077] s' i =s i +pe cross (3)
[0078]
[0079] C (t) =AttentionScore (t) ·W V (pe cross +pe aux (5)
[0080] Among them, W V This is the value vector weight matrix. The cross-attention model extends the receptive domain from a single layer in the main octree to an auxiliary octree, establishing feature associations between single-scale local features and hierarchical multi-scale global features. Furthermore, after cross-attention computation, a placeholder symbol probability distribution for octree nodes is generated using convolutional layers with residual connections and a multilayer perceptron (MLP) with two linear layers. The output of the Transformer model based on cross-attention is as follows:
[0081]
[0082] F'=Linear(Linear(Norm(F)))+Norm(F) (7)
[0083]
[0084]
[0085] Among them, W M It is the weight matrix; Norm is the layer normalization, used for faster convergence.
[0086] Using X = [x1, x2, ..., x i ,…,x n ] represents a placeholder symbol sequence for an octree node, where x i is i th Placeholder symbols for octree nodes. Each placeholder symbol (1-255) is represented by an 8-bit binary code. This invention constructs a parametric probability distribution Q(X) for a bioctree to approximate the actual distribution P(X) of the sequence.
[0087] According to entropy coding theory, the smaller the distortion between the actual probability score P(X) and the predicted Q(X), the higher the actual compression bit rate E. X~P The smaller the distance between [-log2Q(X)] and its lower bound, the better. Therefore, the goal of the entropy model is to minimize the cross-entropy loss between P(X) and Q(X). Q(X) is decomposed into placeholder symbols x for each node. i The product of predicted probability distributions:
[0088]
[0089] In the formula Octree node placeholder x i The estimated probability distribution. w is the weight of the entropy model. Thanks to the biocttree structure, assuming the placeholder symbol x... i The predicted distribution depends on the local octree node sequence features f of the main octree. i and the node sequence features of the last layer of the compensating octree f i From the node feature sequence [f i-r ,…,f i ,…f i+k Composed of, where f i Indicate i th Characteristics of octree nodes. Specifically, f i It contains xyz coordinates, index (0-7), depth (0-12), and parent placeholder (1-255), where r+k-1 is the size of the local sequence.
[0090] This invention utilizes non-leaf nodes X = {x1, x2, ..., x} N' The cross-entropy between the actual and predicted placeholder symbols was used to optimize the proposed deep entropy model. The loss function for node placeholder symbol prediction is:
[0091]
[0092] For x i The estimated placeholder symbol distribution, where N' is the number of non-leaf nodes.
[0093] In some feasible embodiments, step S3 specifically involves constructing a floating-point number sequence using arithmetic encoding.
[0094] After the model predicts the placeholder symbol probability Q(X) for each node symbol, arithmetic coding compresses the 8-bit placeholder symbol into a floating-point sequence, which is then further converted into a binary stream. To shorten the code length, the information entropy of the placeholder symbol can be reduced, utilizing entropy coding to compress a smaller code length. Entropy-based arithmetic coding is a lossless data compression method widely used in information theory and data compression. Arithmetic coding achieves compression by mapping data to a segment of the real number interval [0, 1).
[0095] In the process of arithmetic encoding of octree node placeholder symbols in this invention, based on the known symbol of node i, 2 8 =256 prediction probabilities q i A frequency table is established, where the size of the interval assigned to placeholder symbols is related to their probability of occurrence. High-frequency symbols are assigned larger intervals, while low-frequency symbols are assigned smaller intervals, thus ensuring that high-frequency symbols occupy more space in the encoded result to improve overall compression efficiency. Arithmetic coding is implemented by maximizing the range of the target interval to Φ. k (x i A series of nested intervals are created in the form (b, v), where b represents the starting point of the nested interval, v represents the length of the nested interval, and x represents the length of the nested interval. i The placeholder symbol for node i.
[0096] Φ0(x i (b0,v0) = (0,1) (12)
[0097] Φ k (x i )=(b k ,v k )=(b k-1 +c(s k )l k-1 ,p(s k )l k-1 k = 1, 2, ..., 256 (13)
[0098] Where s k Represents the node symbol x i The kth format, p(s) k ) represents the probability of this format, c(s) k () represents the cumulative probability. The basic idea of arithmetic coding is to compress the data x to be compressed. i Map the value Y to a real number interval, and use the binary expansion of Y as the compressed encoding result. The number line mapping interval Φ corresponding to the placeholder symbol of the node to be encoded is... k (x i Within a given range, a floating-point number is selected to represent the placeholder symbol for that node. After traversing all symbols, the final target range is larger, and the floating-point number has lower precision and a shorter code length.
[0099] Arithmetic coding has many advantages. First, the coding result is unique; each coded symbol falls within a specific interval, eliminating ambiguity. Second, compared to traditional coding methods (such as Huffman coding), arithmetic coding typically achieves higher compression ratios and more closely approximates the information entropy of the data. Furthermore, the algorithm of arithmetic coding is independent of symbol probability statistics, making it easier to implement adaptive coding. High-frequency symbols correspond to larger intervals, offering more opportunities to choose shorter codewords, further improving compression. However, arithmetic coding also has some limitations. Theoretically, it requires almost infinite precision real number operations, while real computers can only provide finite precision integer operations. This means that in practical applications, rounding or approximation is necessary, potentially introducing some errors. Despite these limitations, in the research scenario of this invention, these drawbacks have a relatively small impact on the results. The characteristics of arithmetic coding make it an efficient entropy coding method, achieving high compression ratios and approximating the entropy of the source. Therefore, this invention chooses arithmetic coding as the entropy coding method to compress octree node symbols.
[0100] By modeling and encoding the placeholder sign probabilities of octree nodes, the placeholder sign representation can be compressed into a more compact floating-point sequence. For a bi-octree structure, arithmetic encoding generates compact floating-point sequences corresponding to the two octrees respectively.
[0101] In some feasible embodiments, step S4 specifically includes:
[0102] S4.1 Dynamically select the floating-point number with the fewest binary bits to represent each node;
[0103] S4.2 For each node, store the binary bits of the selected floating-point number and convert the floating-point number into a bit stream;
[0104] S4.3 Based on breadth-first search, connect the bitstreams from nodes within the same octree to obtain the complete bitstream data.
[0105] The precision of computer floating-point numbers is finite. This invention selects a finite number of floating-point numbers to represent node symbols within a specified range. Each floating-point number is first converted to binary form, and then to a byte stream. To save storage space, this invention dynamically selects the floating-point number with the fewest binary bits to represent each node. The main idea is that for larger intervals, the optimal value can be found by testing several binary sequences, and as the interval length is halved, the number of sequences to be converted must double, and the number of bits increases by one. For example, for an interval interval length v... k If v k For any integer ∈ [0.25, 0.5), the potential choice set for floating-point numbers can be:
[0106] {0, 0.25, 0.5, 0.75} = {0.002, 0.012, 0.102, 0.112} (14)
[0107] Even if a 2-bit code length is used to represent a floating-point number, the interval Φ k (x i The minimum number of bits required is B. min =ceil(-log2v) k ), where ceil(x) represents the smallest integer greater than or equal to x. For each node, the binary bits of the selected dynamic floating-point number are stored, and the floating-point number is converted into a bit stream. Finally, the bit streams from all nodes within an octree are concatenated into a longer bit stream using a breadth-first search. In a bi-octree structure, two longer bit streams are generated, which can be merged for transmission.
[0108] In arithmetic decoding, the process is the reverse of encoding. First, a predicted probability frequency table for node placeholder symbols is established and mapped to the real number interval [0,1). For the short bit stream of encoded node placeholder symbols, it is first converted into a decimal fraction. This decimal fraction corresponds to the region where the node symbol is located and is mapped to the corresponding region's index. Then, this index is converted into binary form to obtain the decoded node placeholder symbol.
[0109] This invention also discloses a point cloud decoding method based on a dual octree structure, the specific process of which is as follows:
[0110] By decoding the two compressed bitstream data segments separately and reconstructing them into a dual octree structure, it is possible to further restore them to encoded point cloud data.
[0111] First, the information needed to decode and reconstruct the octree needs to be obtained, including the bitstream data, the coordinates of the root node, and the side lengths. The bitstream is decoded and reconstructed using the attention-based deep entropy model used during encoding. Initially, the root node of the octree is constructed, and its features are input into the attention-based deep entropy model to obtain the symbol probability distribution Q(X), which is then used as the frequency table for arithmetic decoding. Next, the portion belonging to the first layer (the layer containing the root node) is extracted from the bitstream and parsed into floating-point numbers. Using the newly obtained frequency table, the floating-point numbers are decoded to obtain an 8-bit placeholder symbol. This placeholder symbol represents the distribution of the node's child nodes, thus allowing the reconstruction of the next layer of nodes in the octree.
[0112] After reconstructing a new layer, the nodes in the new layer can generate node features, which are then input again into the attention deep entropy model to obtain the symbol probability distribution Q(X) belonging to these nodes. Multiple frequency tables for arithmetic decoding are generated, and the new layer's portion is extracted from the bitstream and parsed into a floating-point sequence. Using the corresponding frequency tables, the floating-point sequence is decoded into a symbol sequence for the new layer, allowing the octree to continue constructing the next layer. This process is repeated until the octree is reconstructed back to its original layer number. After obtaining the reconstructed octree structure, it is traversed to extract the center points of all leaf nodes, thus reconstructing the point cloud data encoded by the octree. Figure 2 As shown, in the bi-octree structure, the point cloud reconstructed from the octree and the point cloud reconstructed from the compensated octree are combined to obtain the complete reconstructed point cloud.
[0113] Through the above decoding and reconstruction process, the two compressed bitstream data segments can be restored to a dual octree structure, and then the reconstructed point cloud data can be obtained, thereby realizing the decompression and recovery of the data.
[0114] This invention also provides a specific simulation example:
[0115] The open-source datasets used in this invention are the 64-line SemanticKITTI
[11] and the 32-line NuScenes
[12] . SemanticKITTI is a widely used large outdoor dataset derived from the KITTI visual benchmark suite. The dataset consists of 22 sequences and a total of 43,504 LiDAR scans. The point cloud was captured at a rate of 10 Hz, with each scan containing 128,000 points. This invention uses sequences 00-10 for training, with 08 as the validation set, and sequences 11-21 for testing, following standard segmentation. NuScenes is also a commonly used large-scale dataset for autonomous driving collected by LiDAR. The dataset includes 1,000 scenes and a total of 390,000 LiDAR scan frames. The point cloud was captured at a rate of 2 Hz, with each scan frame containing 34,700 points. This invention randomly selects 1200 frames per batch (6000 frames in total) from the first five batches of the dataset for training, and then randomly selects 100 frames per batch (500 frames in total) from the last five batches of the dataset for testing.
[0116] Experiments were implemented in PyTorch and trained / tested on a machine with a Xeon Gold 6234 CPU and a single NVIDIA RTX 8000 GPU (48GB RAM). During training, the entropy model used the Adam optimizer with a learning rate of 1e-4. Training on SemanticKITTI took 4 days. The embedding size and feedforward dimension in the Transformer block were set to 512, and the output dimension was set to 256, with the default Transformer context window size N set to 1024. We used 14, 2, and 2 attention layers with 8 heads per layer in the MSA model, respectively; and 8 attention layers with 8 heads per layer in the multi-head cross-attention model. The maximum depth of the single octree was set to 12, and the maximum depth combination of the outer and inner layers of the bi-octree structure was set to 12 and 10, respectively.
[0117] Experimental results are as follows Figure 5 As shown, the reconstructed 3D points are very close to the original points. The compressed data is smaller, and it can be seen that the reconstructed point cloud data can maintain high accuracy because the bi-octree structure encodes the 3D point cloud data more efficiently.
[0118] A point cloud encoding device based on a bi-octree structure:
[0119] At least one processor;
[0120] At least one memory for storing at least one program;
[0121] When the at least one program is executed by the at least one processor, the at least one processor implements a point cloud encoding method based on a bi-octree structure as described above.
[0122] The content of the above method embodiments is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0123] A storage medium storing processor-executable instructions, which, when executed by a processor, are used to implement a point cloud encoding method based on a bi-octree structure as described above.
[0124] The content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0125] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A point cloud encoding method based on a biocttree structure, characterized in that, Includes the following steps: Constructing a bi-octree structure based on point cloud data; A deep entropy model based on the cross-attention mechanism is constructed to fuse the features of the bi-octree structure and predict the placeholder symbol probability distribution of the octree nodes. Based on the placeholder sign probability distribution of the octree nodes, modeling and encoding are performed to obtain a floating-point number sequence; The floating-point number sequence is converted into a bit stream to obtain bit stream data; The step of constructing a bi-octree structure based on point cloud data specifically includes: The point cloud data is acquired and divided into external point cloud clusters and internal point cloud clusters. An octree is constructed for the external point cloud cluster and the internal point cloud cluster respectively to obtain the external octree and the internal octree; The step of fusing the features of the bi-octree structure and predicting the placeholder symbol probability distribution of the octree nodes specifically includes: Traverse the octree, extract features from each node of the octree based on the self-attention module, and aggregate nodes of the same depth to generate self-attention features. Based on cross-aware position encoding, the correlation between features of octrees of different depths is learned, and attention scores are generated by combining the self-attention features. Based on the attention score, the placeholder symbol probability distribution of the octree node is generated through convolutional layers and multilayer perceptrons.
2. The point cloud encoding method based on a bi-octree structure according to claim 1, characterized in that, The deep entropy model based on the cross-attention mechanism includes a self-attention module and a cross-aware position encoding module.
3. The point cloud encoding method based on a bi-octree structure according to claim 1, characterized in that, The loss function for placeholder prediction in the deep entropy model based on the cross-attention mechanism is: In the above formula, Placeholder symbol for octree node The probability distribution, where w represents the weights of the deep entropy model of the cross-attention mechanism. Represents the characteristics of the node sequence. This represents the node sequence characteristics of the last layer of the compensated octree.
4. The point cloud encoding method based on a biocttree structure according to claim 3, characterized in that, Arithmetic coding is used to construct a sequence of floating-point numbers.
5. The point cloud encoding method based on a bi-octree structure according to claim 4, characterized in that, The step of converting the floating-point number sequence into a bitstream to obtain bitstream data specifically includes: Dynamically select the floating-point number with the fewest binary bits to represent each node; For each node, store the binary bits of the selected floating-point number and convert the floating-point number into a bit stream; Based on breadth-first search, bitstreams from nodes within the same octree are concatenated to obtain complete bitstream data.
6. The point cloud encoding method based on a biocttree structure according to claim 5, characterized in that, Also includes: The bitstream data corresponding to different cross trees are merged and transmitted.
7. A point cloud decoding method based on a bi-octree structure, characterized in that, Generating bitstream data by performing the point cloud encoding method based on a dual octree structure as described in claim 1 includes: Obtain the bitstream data and construct the root node of the octree; The node features are input into the deep entropy model used during encoding to obtain the symbol probability distribution; Based on the symbol probability distribution, the floating-point number is decoded to generate placeholder symbols, and the next layer node is constructed using the placeholder symbols. The symbol probability distribution step and node generation step are obtained in a loop until the octree is reconstructed back to the original level, and the reconstructed octree structure is obtained. The reconstructed octree structure is traversed to extract the center points of all leaf nodes, and the point cloud data is restored.