A dynamic point cloud encoding method based on local feature matching

Through local feature matching and dynamic point cloud coding methods, using cross attention and spatiotemporal attention modules, the problems of time cost and information loss in octree coding are solved, and efficient compression and accurate restoration of point cloud data are achieved.

CN119011838BActive Publication Date: 2025-10-10SUN YAT SEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411150378.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2025-10-10
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

Existing octree encoding methods are difficult to efficiently mine the geometric features of point cloud data under limited time costs, especially the neighborhood geometric relationships between sibling nodes, resulting in information loss or waste of storage space.

Method used

A dynamic point cloud encoding method based on local feature matching is adopted. Through multiple adaptive sampling and point cluster correlation calculation, combined with cross attention and spatiotemporal attention modules, dynamic node features are aggregated, the placeholder probability of octree nodes is predicted, and arithmetic coding is used to compress it into a binary floating-point number sequence.

Benefits of technology

It improves the efficiency and accuracy of point cloud coding, reduces redundant information, enhances the expression ability of key nodes, and achieves better bit rate savings and efficient compression of point cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119011838B_ABST
    Figure CN119011838B_ABST
Patent Text Reader

Abstract

The application provides a dynamic point cloud coding method based on local feature matching, comprising: constructing an octree structure by using point cloud data; constructing an entropy coding model based on space-time attention; using a cross attention module to aggregate dynamic node features; extracting dynamic octree correlation based on reference frame point cluster aggregation coding of correlation degree; fusing features of the dynamic octree based on a space-time attention module; predicting an octree node placeholder symbol probability based on the entropy coding model of the space-time attention; and converting the binary floating point number sequence into a bit stream after compressing the placeholder symbol sequence into the binary floating point number sequence. The application adopts local aggregation sampling coding, selects points with the highest correlation degree between the current octree sequence from reference frames through multiple adaptive sampling and point cluster correlation degree calculation, and ensures the effectiveness and stability of the introduced nodes through overall matching of the point clusters. An octree is constructed from the point cloud data, and reference octree nodes are used as auxiliary information to help predict the placeholder symbol probability distribution of the current octree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of point cloud data encoding, and in particular to a dynamic point cloud encoding method based on local feature matching. Background Art

[0002] In recent years, point clouds have seen rapid development in robotics and autonomous vehicles due to their high precision and resolution, enabling them to capture the 3D geometry of a scene. However, point cloud data is large and complex, making efficient point cloud compression and transmission a key challenge. Furthermore, the disordered and sparse nature of point clouds makes it difficult to directly apply image and video compression methods to point cloud compression.

[0003] Currently, point cloud compression methods are primarily categorized into lossless and lossy compression. Lossless compression methods primarily employ strategies based on Huffman coding or arithmetic coding. These methods ensure that the compressed point cloud data is identical to the original data, but due to their low compression rates, they cannot meet the requirements of practical applications.

[0004] Therefore, lossy compression methods have gradually become the primary means of processing point cloud data. Point cloud lossy compression methods mainly include structured and unstructured encoding. Structured data formats intuitively represent point cloud data and are suitable for convolution operations. These methods are mainly divided into depth map-based methods and voxel-based methods. Depth map-based methods project point cloud data onto a depth map and then compress the depth map to achieve point cloud data compression. The advantage of this method is its fast compression speed, but it may cause information loss when processing non-planar point cloud data. Voxel-based methods convert point cloud data into mesh data and compress the mesh data to achieve point cloud data compression. The advantage of voxel representation is that it uses spatially consistent data storage and indexing. Users can choose the appropriate voxel resolution according to their needs, flexibly processing point cloud data of different scales in different application scenarios. However, when processing sparse point cloud data, this method may result in a large number of empty voxels, which take up storage space but do not contain actual data.

[0005] Unstructured point cloud coding methods typically use a hierarchical representation to encode point clouds, achieving high coding efficiency. These methods are primarily based on tree structures, such as KD trees, prediction trees, quadtrees, and octrees. Octrees-based methods, compared to other methods, offer advantages such as high compression ratios, fast compression speeds, and good spatial adaptability to sparse data. Therefore, they are widely used for point cloud data compression. However, octree-based methods face the challenge of efficiently utilizing node context for entropy coding. In these methods, the octree requires traversing and segmenting the point cloud data, as well as generating and connecting nodes. A sufficiently deep octree can provide a wealth of fine-grained information, but this can result in significant time overhead. Shallow octree depth, however, can lead to the loss of much fine-grained information. Furthermore, in octree coding, spatial context, particularly the neighborhood geometric relationships between sibling nodes, must be deeply extracted. Unlike ancestral nodes, the neighborhood geometric relationships of sibling nodes provide lower-level local geometric features that are difficult to obtain through direct octree traversal.

[0006] Therefore, under the condition of limited time cost, how to effectively enrich the node granularity of the octree structure while fully mining the geometric features remains a technical problem to be solved. Summary of the Invention

[0007] In response to the shortcomings of the existing technology, the present invention provides a dynamic point cloud coding method based on local feature matching. The present invention adopts local aggregate sampling coding, and selects the point with the highest correlation with the current octree sequence in the reference frame through multiple adaptive sampling and point cluster correlation calculation. The overall matching of the point cluster ensures the effectiveness and stability of the introduced node.

[0008] The technical solution of the present invention is: a dynamic point cloud encoding method based on local feature matching, comprising the following steps:

[0009] S1), using point cloud data to construct an octree structure;

[0010] S2), construct an entropy coding model based on spatiotemporal attention;

[0011] S3), use the cross attention module to aggregate dynamic node features and calculate node similarity;

[0012] S4), extracting dynamic octree correlation by clustering coding of reference frame points based on correlation degree;

[0013] S5), features of dynamic octree are integrated based on spatiotemporal attention module;

[0014] S6), predicting the probability of octree node placeholder symbols based on the spatiotemporal attention entropy coding model;

[0015] S7), compressing the placeholder symbol sequence of the octree node into a binary floating point number sequence based on arithmetic coding;

[0016] S8), converting the binary floating point number sequence into a bit stream;

[0017] S9), decoding the compressed bit stream data and restoring it to the encoded point cloud data.

[0018] Preferably, in step S1), during the construction of the octree, the coordinates of the cube center are used to represent the point set contained in each node; and the coordinate value of the cube center is The corresponding point p in the point cloud P i There is a quantization error e expressed as:

[0019]

[0020] Where L is the length of the initial bounding box, h represents the maximum depth in the octree structure; p i Represents the original point cloud coordinates.

[0021] Preferably, in step S2), the entropy coding model based on spatiotemporal attention constructed includes a cross-attention module, an aggregate embedding module, a spatiotemporal attention module and multiple fully connected layers; wherein, the spatiotemporal attention module includes a spatial attention module and a temporal attention module, as well as multiple fully connected layers, the spatial attention module is used to perceive the dependency between nodes at each spatial position in the context window, and the temporal attention module is used to learn the dynamic dependency relationship between the reference context and the current context.

[0022] Preferably, in step S3), a cross-attention module is used to aggregate dynamic node features and calculate node similarity, which specifically includes the following steps:

[0023] S31), each node f in the sequence is embedded through the embedding layer i The feature dimension increased from 6 to 1024;

[0024] S32), extracting all non-empty nodes at the same depth from the octree of the previous frame that has been encoded as a reference context, and then randomly shuffling the nodes in the reference context; and dividing it into multiple sub-reference contexts of length T;

[0025] S33), extract sub-reference context c through the fully connected layer j =[f′ j ,f′ j+1 ,…,f′ j+T-1 ] and the current context c i =[f i ,fi+1 ,…,f i+E-1 ]’s hidden features μ j =δ(c j ;ρ) and μ i =δ(c i ; ρ); where δ(.;ρ) represents a fully connected layer with learnable parameter ρ;

[0026] S34), sub-reference context c j The hidden features μ j and the current context c i The hidden features μ i Obtain the relevance score matrix S of each group of sub-reference contexts and the current context through a cross-multiplication operation;

[0027]

[0028] Where s ij Indicates the current context c i and subreference context c j The relevance score of .

[0029] Preferably, in step S4), the aggregation embedding module is used to adaptively cluster dynamic nodes with similar features, specifically comprising the following steps:

[0030] S41), the aggregation embedding module uses the TopK algorithm for each row of the correlation matrix S according to the index sorted by the correlation score; selects K high-correlation nodes corresponding to each prediction node from the sub-reference context, and splices their features into the current context window.

[0031] Preferably, in step S5), the features of the dynamic octree are fused based on the spatiotemporal attention module; specifically:

[0032] S51) In the spatial attention module, the aggregated context window features are first organized through one-dimensional channel convolution to change the feature dimension and enhance the dependency representation between local point features; after obtaining the attention score by multiplying the query vector Q and the key vector K, the spatial attention uses two fully connected layers to map the node features and strengthen the representation of the key nodes; then it is cross-multiplied with the value vector V to obtain the feature sequence c out ;

[0033] Among them, spatial attention SA (c a ) is defined as follows:

[0034] Q,K,V=Conv(c a )

[0035] Attn = MLP(Swish(MLP(Q×K)))

[0036] c out =Attn×V

[0037] Where Q, K, V are the query, key, and value vectors in the attention mechanism; Conv represents a one-dimensional channel convolution operation; c a represents the aggregate sequence features, MLP and Swish represent the fully connected layer and Swish activation function respectively, c out Represents the output feature sequence.

[0038] S52), the time attention module first performs a time domain segmentation operation to obtain the aggregated features c a Separate the reference node context and the current node context;

[0039] The temporal attention module then uses an average pooling operation to generate a key vector K and a query vector Q from the reference features and the current sequence features, respectively, and uses a fully connected layer to generate a value vector V from the current sequence features; to discover the mutual dependence of the time point features; then the query vector Q and the key vector K are cross-multiplied and processed by a softmax activation function; finally, the output of the softmax activation function is cross-multiplied with the value vector V to obtain the output feature sequence.

[0040] Among them, the time attention module TA (c a ) is defined as follows:

[0041] c t ,c r =Dv(c a );

[0042] Q=AvgPool(c t );

[0043] K=AvgPool(c r );

[0044] V=MLP(c t );

[0045] Attn = Softmax(Q×K);

[0046] c out =Attn×V;

[0047] Where Dv and AvgPool represent time domain segmentation and average pooling operations; c t 、c r They are the current node context and the reference node context respectively.

[0048] The feature sequences output by the temporal attention module and the spatial attention module are then concatenated and fused, and the number of channels is mapped through two consecutive fully connected layers.

[0049] Preferably, in step S6), the coding entropy model maps the node features mined by spatiotemporal attention into probabilities of different occupancy categories through a 256-dimensional fully connected layer, thereby realizing the prediction of node placeholder symbols; the placeholder symbol probability of each node symbol is calculated by the spatiotemporal attention-based entropy coding model. Make a prediction, that is:

[0050]

[0051] Where n a is the occupancy of the coding node; f a and f′ a Represents the embedded current features and reference features; ω represents the context window length, and W represents the weight of the entropy coding model; Indicates the occupancy of the node n a Corresponding estimated distribution; the spatiotemporal attention-based entropy coding model utilizes the current sequence and selected reference sequences All features of t are used to predict the distribution, where t is the time step.

[0052] Preferably, in step S7), the placeholder symbol sequence of the octree node is compressed into a binary floating point number sequence based on arithmetic coding; specifically, the steps include:

[0053] S71) Establish a frequency table; specifically comprising the following steps:

[0054] S711), collect and count the placeholder symbol x of each node i The frequency of occurrence, since there may be 256 symbols in the octree node, count the number of occurrences of each symbol;

[0055] S712) Divide the number of occurrences of each symbol by the total number of symbols to obtain the probability p(s) of each symbol. k ), indicating the symbol s k relative frequency of occurrence in the node symbol set;

[0056] S713) Sort the symbols in order of appearance from the lowest probability to the highest probability, and calculate the cumulative probability c(s) of each symbol one by one. k ); Cumulative probability symbol s k The position in the frequency table forms an interval from 0 to 1, and its calculation formula is:

[0057]

[0058] S714) Based on the frequency table, associate the interval size with the probability of symbol occurrence.

[0059] S72) with Φ k (x i )=(b,v) form to create a series of nested intervals, where Φ k (x i ) represents the number axis mapping interval; b represents the starting point of the nested interval, v represents the length of the nested interval, x i The placeholder symbol for node i; the initial interval Φ0(x i ) is [0,1), and in each step, the interval is further divided;

[0060] Φ0(x i )=(b0,v0)=(0,1);

[0061] Φ k (x i )=(b k ,v k )=(b k-1 +c(s k )l k-1 ,p(s k )l k-1 ); l=1,2,…,256;

[0062] Where s k The placeholder x representing node i i The kth format of p(s k ) indicates the format s k The probability of c(s k ) represents the cumulative probability; b k-1 is the starting point of the previous interval, l k-1 is the length of the previous interval;

[0063] S73), the placeholder symbol x of node i i Map to a value Y on the real number interval [0,1), and use the binary expansion of Y as the compression coding result; the number axis mapping interval Φ corresponding to the node placeholder v to be encoded k (x i ), select a floating point number to represent the placeholder x of node i i After traversing all symbols, the target interval is finally obtained to have a larger range, the floating point number has a lower precision, and the code length is shorter.

[0064] Preferably, in step S8), converting the binary floating-point number sequence into a bit stream specifically comprises the following steps:

[0065] S81), selecting a finite floating point number within a specified range to represent a placeholder symbol of a node, and converting each floating point number into binary form, and then converting it into a byte stream;

[0066] S82), according to the interval length v k ,dynamically select the floating point number with the least number of binary digits to represent each node;

[0067] S83), storing the dynamic floating point binary bits of each node and converting them into a bit stream;

[0068] S84), using breadth-first search to connect the bit streams of all nodes in the octree into a bit stream of a certain length;

[0069] S85) A predicted probability frequency table of the node placeholder symbol is established through arithmetic decoding, and is mapped to the real number interval [0,1), and the sequence number mapped to the interval is converted into binary form, thereby obtaining the decoded node placeholder symbol.

[0070] Preferably, in step S9), the compressed bit stream data is decoded and restored to the encoded point cloud data; specifically, the steps include:

[0071] S91) Obtaining information required for decoding and reconstructing the octree, including bitstream data and the coordinates and side lengths of the root node;

[0072] S92) Construct the root node of the octree and input the root node feature into the entropy coding model based on spatiotemporal attention to obtain the symbol probability distribution Then it is used as the frequency table for arithmetic decoding;

[0073] S93), intercepting the portion of the layer where the root node is located from the bit stream and parsing it into a floating point number using a frequency table,

[0074] Get an 8-bit placeholder symbol, which represents the distribution of child nodes of the root node;

[0075] S94) Reconstruct the next layer of nodes based on the child node distribution of the root node obtained in step S93), specifically creating an octree node for each child node with an occupied symbol of 1 for the current root node, generating node features; and inputting it into the entropy coding model to obtain the probability distribution of the placeholder symbols of the new layer generating a plurality of frequency tables for arithmetic decoding;

[0076] S95), intercepting a new layer of part from the bit stream, and parsing it into a new layer of symbol sequence using the new decoded frequency table, and then continuing to reconstruct the next layer of the octree, repeating the above process until the reconstruction of the octree is completed;

[0077] S96) By traversing the reconstructed octree structure, extracting the center points of all sub-leaf nodes, and completing the restoration of the octree-encoded point cloud data.

[0078] The beneficial effects of the present invention are:

[0079] 1. This invention uses local aggregate sampling coding. It selects the point in the reference frame with the highest correlation with the current octree sequence through multiple adaptive sampling and point cluster correlation calculations. The overall matching of point clusters ensures the effectiveness and stability of the introduced nodes. This invention uses a structure that focuses more on local dependencies and perceives global changes to capture the spatial and temporal features of nodes within the window, thereby improving feature extraction capabilities. This invention also designs symmetric full connectivity to reduce redundant contextual information and enhance the expressiveness of key nodes.

[0080] 2. The entropy coding model of the present invention consists of alternating connections between aggregate embedding and attention modules. The aggregate embedding module matches the encoded highly correlated nodes with the node clusters to be encoded by dynamic point introduction, avoiding the situation where the previous order information cannot be used in the dynamic point cloud encoding and decoding task; the spatiotemporal attention module avoids computationally intensive operations such as convolution when performing octree node occupancy prediction by extracting dynamic features;

[0081] 3. The present invention adopts an aggregate embedding module to introduce more dynamic feature spaces, which can effectively enhance the features of the current frame and the reference frame, thereby achieving better compression performance for dynamic point clouds;

[0082] 4. The present invention shares context dependencies through cross and spatiotemporal attention modules, learns long-range correlations and global dependencies of receptive fields, and thus achieves better bitrate savings. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] Figure 1 It is a flow chart of the encoding method of the present invention;

[0084] Figure 2 This is a flow chart of the cross attention module of the present invention;

[0085] Figure 3 A flowchart of the reference frame node aggregation coding process based on correlation of the present invention;

[0086] Figure 4 Flow chart of the temporal attention and spatial attention modules of the present invention;

[0087] Figure 5 This is a diagram showing the effect of point cloud compression using the encoding method of the present invention in an embodiment. DETAILED DESCRIPTION

[0088] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:

[0089] like Figure 1 As shown, this embodiment provides a dynamic point cloud encoding method based on local feature matching, including the following steps:

[0090] S1) Use point cloud data to construct an octree structure, which specifically includes the following steps:

[0091] S11), placing the entire point cloud in a cubic bounding box; dividing the three-dimensional space of the point cloud data into 8 sub-cubes, each of which is called a node; the maximum side length of the initial cubic bounding box is used to divide the point cloud, and the point cloud is assigned to each sub-cube;

[0092] S12) Each non-empty sub-cube is recursively divided in the same way until the set maximum depth h is reached; the sub-cube containing the point cloud is marked as 1 and further subdivided; each non-leaf node uses an 8-bit placeholder to represent the distribution of child nodes, and each bit in the placeholder corresponds to a specific child node; the sub-cube that does not contain a point cloud is marked as 0 and the division stops. Each non-leaf node uses an 8-bit placeholder to represent the distribution of child nodes, and each bit in the placeholder corresponds to a specific child node; for each point in the three-dimensional point cloud, after multiple divisions of the octree structure, its position will be marked in an encodable very small cube area; multiple points may exist in the same cube area at the same time, constituting the point set contained in this node.

[0093] In the process of constructing the octree, this embodiment uses the coordinates of the center of the cube to represent the point set contained in each node; and the coordinate value of the center of the cube is The corresponding point in point cloud P There is a quantization error e, which is expressed as:

[0094]

[0095] Where L is the length of the initial bounding box, h represents the maximum depth in the octree structure; p i Represents the original point cloud coordinates; in order to obtain high-precision compression quality, this embodiment sets the maximum depth h to 12.

[0096] S2) construct an entropy coding model based on spatiotemporal attention; the entropy coding model based on spatiotemporal attention constructed in this embodiment includes a cross-attention module, an aggregation embedding module, a spatiotemporal attention module and multiple fully connected layers; wherein, the spatiotemporal attention module includes a spatial attention module and a temporal attention module, as well as multiple fully connected layers, the spatial attention module is used to perceive the dependency between nodes at each spatial position in the context window, and the temporal attention module is used to learn the dynamic dependency relationship between the reference context and the current context.

[0097] S3), use the cross attention module to aggregate dynamic node features and calculate node similarity, such as Figure 2 As shown, the specific steps include:

[0098] S31), each node f in the sequence is embedded through the embedding layer i The feature dimension increased from 6 to 1024;

[0099] S32), extracting all non-empty nodes at the same depth from the octree of the previous frame that has been encoded as a reference context, and then randomly shuffling the nodes in the reference context; and dividing it into multiple sub-reference contexts of length T;

[0100] S33), extract sub-reference context c through the fully connected layer j =[f′ j ,f′ j+1 ,…,f′ j+T-1 ] and the current context c i =[f i ,f i+1 ,…,f i+E-1 ]’s hidden features μ j =δ(c j ;ρ) and μ i =δ(c i ; ρ); where δ(.;ρ) represents a fully connected layer with learnable parameter ρ;

[0101] S34), the sub-reference context c j The hidden features μ j and the current context c i The hidden features μ i Obtain the relevance score matrix S of each group of sub-reference contexts and the current context through a cross-multiplication operation;

[0102]

[0103] Where s ij Indicates the current context c i and subreference context cj The relevance score of .

[0104] S4), extracting dynamic octree correlation by clustering coding of reference frame points based on correlation degree;

[0105] In this embodiment, an aggregation embedding module is used to adaptively cluster dynamic nodes with similar features, such as Figure 3 As shown, the specific steps include:

[0106] S41), the aggregation embedding module uses the TopK algorithm for each row of the correlation matrix S according to the index sorted by the correlation score; selects K high-correlation nodes corresponding to each prediction node from the sub-reference context, and splices their features into the current context window to obtain aggregated features; nodes with low scores are considered to have low correlation with the current node and are therefore discarded.

[0107] And in this embodiment, due to the context hidden feature μ j and μ i The latent feature dimension of each frame is 1024. After the current frame node feature is concatenated with the K related reference node features with the highest correlation scores, its latent feature dimension will increase to 1024+1024×k. In order to maintain the consistency of input and output dimensions, this embodiment uses a fully connected layer with a parameter dimension of (d+d×k,d) to process the aggregated context window features.

[0108] S5) Fusion of dynamic octree features based on spatiotemporal attention module; details are as follows:

[0109] In this embodiment, the features of the octree nodes are passed to the temporal attention module and the spatial attention module respectively to learn the correlation between local sibling nodes of the same depth. The spatial attention module is used to perceive the dependencies between nodes at each spatial position in the context window, while the temporal attention module is used to learn the dynamic dependencies between the reference context and the current context. A symmetric fully connected layer is used in each spatiotemporal attention to enhance the expression of key features, which helps to calculate the probability distribution of placeholders. Subsequently, the coding entropy model maps the node features discovered by the spatiotemporal attention to the probabilities of different occupancy categories through a 256-dimensional fully connected layer, thereby realizing the prediction of node placeholders.

[0110] In the spatial attention module, the aggregated context window features are first organized through one-dimensional channel convolution to change the feature dimension and enhance the dependency representation between local point features. After obtaining the attention score by multiplying the query vector Q and the key vector K, the spatial attention uses two fully connected layers to map the node features and strengthen the representation of the key nodes. It is then cross-multiplied with the value vector V to obtain the feature sequence c. out;

[0111] wherein the spatial attention module SA(c a ) is defined as follows:

[0112] Q, K, V = Conv(c a )

[0113] Attn = MLP(Swish(MLP(Q x K)))

[0114] c out = Attn x V

[0115] wherein Q, K, V are query, key and value vectors in the attention mechanism; Conv denotes a one-dimensional channel convolution operation; c a denotes aggregated sequence features; MLP and Swish denote a fully connected layer and a Swish activation function respectively; c out denotes an output feature sequence.

[0116] The time attention module first separates the reference node context and the current node context from the aggregated features c a through a time domain segmentation operation; then the time attention module generates a key vector K and a query vector Q from the reference features and the current sequence features respectively using an average pooling operation, and generates a value vector V from the current sequence features using a fully connected layer; to discover the mutual dependence of the time point features; then the query vector Q and the key vector K are cross-multiplied and then processed by a softmax activation function; finally, the output of the softmax activation function is cross-multiplied with the value vector V to obtain the output feature sequence.

[0117] For a known sequence size E, the window output size E0 after the average pooling layer is E0, and the feature dimension is d; according to the cross-attention mechanism, the computational complexity is reduced from O(E 2 x d) to Thus, the encoding and decoding processes are accelerated.

[0118] wherein the time attention module TA(c a ) is defined as follows:

[0119] c t , c r = Dv(c a );

[0120] Q = AvgPool(c t );

[0121] K = AvgPool(c r );

[0122] V = MLP(c t);

[0123] Attn = Softmax(Q×K);

[0124] c out =Attn×V;

[0125] Where Dv and AvgPool represent time domain segmentation and average pooling operations; c t 、c r They are the current node context and the reference node context respectively.

[0126] The feature sequences output by the temporal attention module and the spatial attention module are then concatenated and fused, and the number of channels is mapped through two consecutive fully connected layers. The first fully connected layer reduces the dimensionality of the feature space and removes redundant parameters. The second fully connected layer is used to increase the dimension of the reduced feature space to the same as the original one.

[0127] S6), predicting the probability of octree node placeholder symbols based on the entropy coding model;

[0128] In this embodiment, the placeholder symbol probability of each node symbol is calculated by the entropy coding model based on spatiotemporal attention. Make a prediction, that is:

[0129]

[0130] Where n a is the occupancy of the coding node; f a and f′ a Represents the embedded current features and reference features; ω represents the context window length, and W represents the weight of the entropy coding model; Indicates the occupancy of the node n a Corresponding estimated distribution; the spatiotemporal attention-based entropy coding model utilizes the current sequence and selected reference sequences All features of t are used to predict the distribution, where t is the time step.

[0131] In this embodiment, the goal of the spatiotemporal attention-based entropy coding model is to reduce the estimated distribution The cross entropy between the actual distribution Q is:

[0132] E n~Q [-log2Q(n)];

[0133] Where, E n~Q Represents the mathematical expectation of the actual distribution of all node occupancy in the sequence.

[0134] S7), compressing the placeholder symbol sequence of the octree node into a binary floating-point number sequence based on arithmetic coding;

[0135] The entropy coding model based on space-time attention calculates the placeholder symbol probability of each node symbol After prediction, the 8-bit placeholder symbol is compressed into a floating-point number sequence using arithmetic coding, and then converted into a binary stream. In order to shorten the code length, this embodiment uses entropy coding to achieve smaller code length by reducing the information entropy of the placeholder symbol; specifically including the following steps:

[0136] S71), establishing a frequency table; specifically including the following steps:

[0137] S711), collecting and counting the frequency of each node placeholder symbol x i Since there are 256 possible symbols in the octree node, the number of occurrences of each symbol is counted;

[0138] S712), dividing the number of occurrences of each symbol by the total number of symbols to obtain the probability p(s k ) of each symbol, representing the relative frequency of symbol s k in the node symbol set;

[0139] S713), according to the order of symbol occurrence, from lowest to highest probability, calculate the cumulative probability c(s k ) of each symbol one by one; the cumulative probability represents the position of symbol s k in the frequency table, forming an interval from 0 to 1, and its calculation formula is:

[0140]

[0141] S714), based on the frequency table, associate the interval size with the symbol occurrence probability.

[0142] S72), create a series of nested intervals in the form of Φ k (x i )=(b,v), where Φ k (x i ) represents the number axis mapping interval; b represents the start point of the nested interval, v represents the length of the nested interval, and x i represents the placeholder symbol of node i; the initial interval Φ0(x i ) is [0,1), and in each step, the interval is further divided;

[0143] Φ0(x i )=(b0,v0)=(0,1);

[0144] Φ k (x i )=(bk ,v k )=(b k-1 +c(s k )l k-1 ,p(s k )l k-1 ); k = 1, 2, ..., 256;

[0145] Where s k The placeholder x representing node i i The kth format of p(s k ) indicates the format s k The probability of c(s k ) represents the cumulative probability; b k-1 is the starting point of the previous interval, l k-1 is the length of the previous interval;

[0146] S73), the placeholder symbol x of node i i Map to a value Y on the real number interval [0,1), and use the binary expansion of Y as the compression coding result; in the node placeholder symbol x to be encoded i The corresponding number axis mapping interval Φ k (x i ), select a floating point number to represent the placeholder x of node i i After traversing all symbols, the target interval is finally obtained to have a larger range, the floating point number has a lower precision, and the code length is shorter.

[0147] S8), converting the binary floating point number sequence into a bit stream, specifically comprising the following steps:

[0148] S81), selecting a finite floating point number within a specified range to represent a placeholder symbol of a node, and converting each floating point number into binary form, and then converting it into a byte stream;

[0149] S82), according to the interval length v k , dynamically select the floating point number with the least number of binary digits to represent each node; for example, for the interval length v k , if v k ∈[0.25,0.5), the potential selection set of floating-point numbers is expressed as:

[0150] {0,0.25,0.5,0.75}={0.002,0.012,0.102,0.112};

[0151] Even if a 2-bit code length is used to represent a floating point number, the interval Φ k (x i ) The minimum number of digits required is B min =ceil(-log2vk ), wherein ceil(x) represents the smallest integer greater than or equal to x;

[0152] S83), storing the dynamic floating-point binary of each node and converting it into a bit stream;

[0153] S84), using breadth-first search to concatenate the bit streams of all the octree internal nodes into a bit stream with a certain length;

[0154] S85), establishing the prediction probability frequency table of the node placeholder symbol through arithmetic decoding and mapping it to the real number interval [0, 1), and the serial number of the interval is converted into binary form, thereby obtaining the decoded node placeholder symbol.

[0155] S9), decoding the compressed bit stream data and restoring it to the encoded point cloud data; specifically including the following steps:

[0156] S91), obtaining the information required for decoding and reconstructing the octree, including the bit stream data and the coordinates and edge length of the root node;

[0157] S92), constructing the root node of the octree and inputting the root node features into the entropy coding model based on spatiotemporal attention to obtain the symbol probability distribution as the frequency table of arithmetic decoding;

[0158] S93), intercepting the part of the root node layer from the bit stream and parsing it into a floating-point number using the frequency table to obtain an 8-bit placeholder symbol representing the distribution of the child nodes of the root node;

[0159] S94), reconstructing the next layer of nodes according to the child node distribution of the root node obtained in step S93), specifically creating an octree node for each child node with a placeholder symbol of 1 for the current root node and generating node features; and inputting them into the entropy coding model to obtain the probability distribution of the placeholder symbols of the new layer to generate multiple frequency tables for arithmetic decoding;

[0160] S95), intercepting the part of the new layer from the bit stream and parsing it into a symbol sequence of the new layer using the newly decoded frequency table, and then continuing to reconstruct the next layer of the octree, repeating the above process until the reconstruction of the octree is completed;

[0161] S96), by traversing the reconstructed octree structure, extracting the center points of all the child leaf nodes, and completing the restoration of the point cloud data encoded by the octree.

[0162] This example was tested using the SemanticKITTI dynamic point cloud dataset and the ScanNet indoor static point cloud dataset. SemanticKITTI is a widely used, large-scale outdoor dataset derived from the KITTI visual benchmark suite. This dataset consists of 22 sequences, totaling 43,504 lidar scans. The point cloud was captured at a rate of 10 Hz, with each scan containing 128,000 points. This example used sequences 00-10 for training, with sequence 08 serving as the validation set. Sequences 11-21 were used for testing, following a standard dataset split.

[0163] The indoor static point cloud dataset ScanNet contains scans of more than 1,500 static point cloud scenes. This example uses the same training / test split as the ScanNet benchmark task, which includes 1,045 samples as a training set, 156 samples as a validation set, and 312 samples as a test set.

[0164] For SemanticKITTI, set the quantization step size to D is the octree depth; we use a maximum depth of 14 and a sequence size of 1024 in training, and set the octree depth to 9 to 13 and the context length to 128 to 1024 in testing. For ScanNet, we set the quantization step size to Used to construct an octree from the normalized point cloud. The model was trained and evaluated using an octree with a maximum depth of 12, and tested at depths ranging from 6 to 10. The results are shown in Figure 5 As shown in the figure, PSNR is obtained by calculating the relative distance between each point in the reconstructed point cloud and the nearest point in the original point cloud. The higher the result, the smaller the error between the reconstructed point cloud and the original point cloud. While ensuring high-precision point cloud data, this embodiment significantly reduces the amount of data for both dynamic point cloud and static point cloud after compression, and Figure 5 It can be seen from the figure that this embodiment can effectively utilize dynamic point cloud features to achieve a higher compression rate.

[0165] The above embodiments and descriptions are only for explaining the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, which shall fall within the scope of the invention to be protected.

Claims

1. A dynamic point cloud encoding method based on local feature matching, characterized in that: The steps include: S1), using point cloud data to construct an octree structure; S2), constructing an entropy coding model based on spatiotemporal attention; the entropy coding model includes a cross attention module, an aggregate embedding module, a spatiotemporal attention module and multiple fully connected layers; S3) Use the cross-attention module to aggregate dynamic node features and calculate node similarity, which specifically includes the following steps: S31), increasing the feature dimension of each node in the sequence through the embedding layer; S32), extracting all non-empty nodes at the same depth from the octree of the previously encoded frame as reference context; And split it into multiple sub-reference contexts of length T; S33), extracting hidden features of the sub-reference context and the current context through a fully connected layer; S34), performing a cross-multiplication operation on the hidden features of the sub-reference contexts and the current context to obtain a correlation score matrix between each group of sub-reference contexts and the current context; S4), extracting dynamic octree correlation based on aggregation embedding module; The aggregation embedding module is used to adaptively cluster dynamic nodes with similar features. The specific steps include: S41), the aggregation embedding module uses the TopK algorithm for each row of the correlation matrix S according to the index sorted by the correlation score; selects K high-correlation nodes corresponding to each prediction node from the sub-reference context, and splices their features into the current context window; S5) Integrating the features of the dynamic octree based on the spatiotemporal attention module, the spatiotemporal attention module includes a spatial attention module and a temporal attention module, and multiple fully connected layers. The spatial attention module is used to perceive the dependencies between nodes at each spatial position in the context window, and the temporal attention module is used to learn the dynamic dependency relationship between the reference context and the current context; S6) An entropy coding model based on spatiotemporal attention predicts the probability of placeholder symbols at octree nodes; and compresses the placeholder symbol sequence into a binary floating-point number sequence and then converts it into a bit stream.

2. The dynamic point cloud encoding method based on local feature matching according to claim 1, characterized in that: In step S32), before dividing the reference context into multiple sub-reference contexts of length T, the nodes in the reference context are randomly shuffled.

3. The dynamic point cloud encoding method based on local feature matching according to claim 1, characterized in that: In step S5), in the spatial attention module, the aggregated context window features are first organized by one-dimensional channel convolution to change the feature dimension and enhance the dependency representation between local point features; after obtaining the attention score by multiplying the query vector Q and the key vector K, the spatial attention uses two fully connected layers to map the node features and strengthen the representation of the key nodes; then, the feature sequence c is obtained by cross-multiplication with the value vector V. out .

4. The dynamic point cloud encoding method based on local feature matching according to claim 3, characterized in that: In step S5), the spatial attention module SA (c a ) is defined as follows: Q,K,V=Conv(c a ) Attn = MLP(Swish(MLP(Q×K))) c out =Attn×V Where Q, K, V are the query, key, and value vectors in the attention mechanism; Conv represents a one-dimensional channel convolution operation; c a represents the aggregate sequence features, MLP and Swish represent the fully connected layer and Swish activation function respectively, c out Represents the output feature sequence.

5. The dynamic point cloud encoding method based on local feature matching according to claim 1, characterized in that: In step S5), the temporal attention module first performs a temporal segmentation operation from the aggregated feature c a The reference node context and the current node context are separated from each other; then the temporal attention module uses an average pooling operation to generate a key vector K and a query vector Q from the reference feature and the current sequence feature respectively, and uses a fully connected layer to generate a value vector V from the current sequence feature; To discover the mutual dependence of time point features; then the query vector Q and the key vector K are cross-multiplied and processed by the softmax activation function; finally, the output of the softmax activation function is cross-multiplied with the value vector V to obtain the output feature sequence.

6. The dynamic point cloud encoding method based on local feature matching according to claim 5, characterized in that: Then, the feature sequences output by the temporal attention module and the spatial attention module are concatenated and fused, and the number of channels is mapped through two consecutive fully connected layers; The temporal attention module TA(c a ) is defined as follows: c t ,c r =Dv(c a ); Q=AvgPool(c t ); K=AvgPool(c r ); V=MLP(c t ); Attn = Softmax(Q×K); c out =Attn×V; Where Dv and AvgPool represent time domain segmentation and average pooling operations; c t 、c r They are the current node context and the reference node context respectively.

Citation Information

Patent Citations

  • Point cloud coding and decoding method based on double octree structure

    CN117692662A

  • Dynamic target behavior prediction system based on 3D convolution and recurrent neural network

    CN118506252A