Bidirectional fusion 6D object pose estimation method
By using the two-way fusion method and adaptive MOE layer based on the Transformer architecture in object pose estimation, the robustness problem of the FFB6D network under noise interference and domain deviation is solved, and a more accurate and robust pose estimation effect is achieved. .
Patent Information
- Application Number
- CN202410801484.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-20
AI Technical Summary
Traditional object pose estimation methods have poor robustness in complex scenes. In particular, the performance of the FFB6D network is affected by noise interference, and it cannot effectively integrate domain deviations caused by dynamic changes in RGB and depth information.
A bidirectional fusion method based on the new Transformer architecture is used to perform bidirectional feature fusion by inputting RGB images and point cloud data into the feature extraction layer. The adaptive MOE layer is used to adjust feature weights, and the linear intermediary attention mechanism is combined to calculate the cross attention matrix. , improve the robustness and accuracy of feature fusion.
It improves the robustness and accuracy of object pose estimation, can effectively integrate RGB and depth information in complex multi-object scenes, reduces noise interference, and enhances the anti-interference ability of the network.
Smart Images

Figure CN118799393A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a 6D object pose estimation method with bidirectional fusion based on a novel transformer and MOE, belonging to the field of object pose estimation. Background Art
[0002] Object pose estimation has always been a very important and research-worthy branch in the field of computer vision. This method can be applied to many production and life fields, including augmented reality, autonomous driving, SLAM, and robotic arm grasping. Taking the robotic arm grasping task as an example, the network estimates the object pose through image and sensor information, and provides the robotic arm with accurate object position and direction information to facilitate the robotic arm to automatically grasp the object. This method is widely used in many manufacturing production activities.
[0003] Traditional object pose estimation algorithms rely on empirical knowledge and use manually annotated features, such as geometric shapes, edges, corners, and other features. Such methods can only be applied in specific scenarios and will not achieve good results in complex and unknown scenarios. With the rise of deep learning methods, some scholars have proposed a network Posecnn that estimates pose parameters directly based on RGB images, etc. This method shows better results than traditional methods. However, using two-dimensional RGB images alone for network training can only learn the appearance features of objects in the image and lose important geometric features, which is also the shortcoming of this method. In recent years, with the development of depth sensors, depth information has become increasingly easy to obtain, resulting in a new pose estimation network based on RGBD data. The most critical and core problem facing this method is how to perfectly integrate the appearance features in RGB and the geometric features of depth information, so that the network can fully learn the two features to achieve good estimation results. Some scholars have proposed the FFB6D network, which adopts a bidirectional full-flow feature fusion mode. This early fusion mode that integrates the bidirectional fusion module in each layer of the feature extraction network is one of the most scientific and effective pose estimation network paradigms in recent years. However, this method also has its flaws. First, the fusion module uses the KNN method, which means that it can only be limited to the local features of each modal data. Noise interference will seriously affect the network performance and the robustness is poor. Secondly, the fusion paradigm of the network is fixed, ignoring the domain deviation caused by the dynamic changes of the dominant modality of the data in different scenarios. For example, the lack of depth information of objects on the reflective surface causes the loss of geometric information, which will interfere with the original correct appearance features after fusion, and so on. Summary of the invention
[0004] Aiming at the problem that sensor noise interference affects network performance and has poor robustness during pose estimation of FFB6D network, the present invention provides a bidirectional fusion 6D object pose estimation method based on a novel transformer architecture.
[0005] A bidirectional fusion 6D object pose estimation method of the present invention comprises: preprocessing an RGB image and a depth image of a scene to be estimated, and converting the depth image into point cloud data; the scene image comprises one or more objects;
[0006] Input RGB image and point cloud data into the pose estimation network;
[0007] The pose estimation network includes a feature extraction layer, a bidirectional feature fusion layer, an adaptive MOE layer and a 6D object pose estimation layer;
[0008] The RGB image and point cloud data are input to the feature extraction layer, which extracts the appearance features in the input RGB image and the geometric features of the point cloud data respectively; the bidirectional feature fusion layer is integrated in each dimension of the feature extraction layer, and the appearance features of the corresponding dimensions are extracted. and geometric features Fusion is performed to obtain the point cloud data to RGB fusion feature p2r and the RGB to point cloud data fusion feature r2p. The fusion feature p2r is used as the input for the next dimension appearance feature extraction, and the fusion feature r2p is used as the input for the next dimension geometric feature extraction. The appearance features and geometric features finally output by the feature extraction layer are simultaneously input to the adaptive MOE layer. The adaptive MOE layer determines the dominant mode according to the input features, adjusts the weights of the appearance features and geometric features, and performs weighted summation to obtain the MOE features. The MOE features are spliced with the appearance features and geometric features finally output by the feature extraction layer, and the spliced feature image is output to the 6D object pose estimation layer.
[0009] The 6D object pose estimation layer predicts the 3D key points on each object in the spliced feature image, obtains the predicted key point set of each object, matches the predicted key point set with the key point set of each object in the configuration file, and thus regresses the 6D pose parameters of each object.
[0010] Preferably, the bidirectional feature fusion layer adopts a novel Transformer based on a linear intermediate attention mechanism to solve the cross attention matrix of the two modalities, and obtains the fusion feature p2r and the fusion feature r2p according to the cross attention matrix of the two modalities. The method for solving the cross attention matrix of the two modalities by the novel Transformer based on the linear intermediate attention mechanism includes:
[0011] Feature a is fed into a linear layer to obtain the matrix Q corresponding to feature a; feature b is fed into two linear layers to obtain the matrices K, V, and W corresponding to feature b. q , W k , W v They are the weight matrices corresponding to the query matrix Q, key matrix K, and value matrix V, respectively.
[0012] According to the query matrix Q, key matrix K, and value matrix V, the cross attention matrix A is obtained. W :
[0013]
[0014] in, Q′=AdAvPool(Q), AdAvPool represents adaptive average pooling, softmax represents the normalized exponential function, Pb 1 Indicates relative position offset 1, Pb 2 represents the relative position offset 2, and d represents the feature matrix dimension;
[0015] Feature a is the appearance feature Feature b is a geometric feature The attention weight matrix Aw is a cross attention matrix of one modality, namely: the cross attention matrix of point cloud data to RGB fusion;
[0016] Feature a is the appearance feature Feature b is a geometric feature The attention weight matrix Aw is a cross attention matrix of a modality, namely: the cross attention matrix of RGB to point cloud data fusion;
[0017] The cross attention matrices of the two modalities are input into the feedforward network respectively, and the feedforward network outputs the point cloud to RGB fusion feature p2r and the RGB to point cloud data fusion feature r2p.
[0018] Preferably, the feedforward network includes a linear layer, a multilayer perceptron and two layer normalization layers;
[0019] The attention weight matrix Aw is input to the linear layer, and the output of the linear layer is input to the first normalization layer. The output of the first normalization layer is added element by element with the feature a, and the result of the addition is input to the multilayer perceptron. The output of the multilayer perceptron is input to the second normalization layer, and the output of the second normalization layer is the fused feature.
[0020] Feature a is the appearance feature Feature b is a geometric feature The second layer normalizes the output point cloud data of the layer to RGB fusion feature p2r;
[0021] Feature a is a geometric feature Feature b is the appearance feature The second layer normalizes the output RGB of the layer to the point cloud data fusion feature r2p.
[0022] Preferably, the adaptive MOE layer determines the dominant mode according to the input features, adjusts the weights of the appearance features and the geometric features, and performs weighted summation to obtain the MOE features, including:
[0023] The appearance features and geometric features are each passed through a MOE module to obtain the MOE appearance features and MOE geometric features after the weights are redistributed. The MOE appearance features and MOE geometric features are weighted summed to obtain the MOE features. Each MOE module includes:
[0024] Feature c is simultaneously input to L expert modules. The outputs of the L expert modules are sequentially subjected to an average function and a gating function to obtain L weight values. The L weight values are each multiplied element-by-element with the outputs of the L expert modules to obtain L outputs. The L outputs are added element-by-element. The addition result is the MOE appearance feature / MOE geometric feature. Feature c is the appearance feature / geometric feature.
[0025] The weight values of the expert modules in the two MOE modules are shared.
[0026] Preferably, the expert module comprises a first 1d convolutional layer, an activation function layer and a second 1d convolutional layer;
[0027] Feature c is input into the first 1d convolution layer, activation function layer and second 1d convolution layer in sequence, and the output of the second 1d convolution layer is the output of the expert module;
[0028] The activation function layer is the RELU function.
[0029] Preferably, the method for regressing the 6D pose parameters of each object in the 6D object pose estimation layer includes:
[0030] Use the semantic segmentation layer to perform semantic segmentation on the spliced feature image;
[0031] Use the center point detection layer to detect the center points of objects in the segmented image, obtain the center point of each object, and complete the instance segmentation of all objects in the scene with the semantic segmentation mask;
[0032] Use the 3D key point detection layer to perform key point detection on each object after instance segmentation in the scene to obtain the predicted key point set for each object;
[0033] The least squares method is used to match the predicted key point set with the key point set of each object in the configuration file, and the 6D pose parameters of each object are regressed.
[0034] Preferably, the feature extraction layer includes a CNN feature extraction stream and a PCN feature extraction stream, which respectively extract appearance features in the input RGB image and geometric features of the point cloud data; the CNN feature extraction stream uses the pre-trained ResNet34 as the backbone network, and the PCN feature extraction stream uses the pre-trained RandLA as the backbone network.
[0035] Preferably, the loss function when training the pose estimation network is:
[0036] L total =α 1 L keypoints +α 2 L semantic +α 3 L center
[0037] where α 1 , α 2 , α 3 are the weights of the corresponding layers, L keypoints represents the loss function of the 3D keypoint detection layer, L semantic represents the loss function of the semantic segmentation layer, L center Represents the loss function of the center point detection layer.
[0038] The beneficial effect of the present invention is that the FFB6D network only focuses on the connection between local features during the feature fusion process, so it is easily affected by noise. In view of this problem, the present invention proposes a feature fusion module based on a new transformer architecture. Thanks to the characteristics of the transformer, the fusion module can well learn the global semantic relevance of the two modal data and improve the fusion quality. In view of the defects of the traditional Transformer architecture, the complexity and memory consumption during calculation are quadratic to the input data dimension, so it is inefficient when facing large-scale data. The present invention proposes a linear intermediate attention mechanism to replace the original self-attention mechanism. This method can significantly reduce the computational consumption while maintaining the accuracy of attention weight calculation. In unknown complex multi-object scenes, object pose estimation will encounter many limitations. For example, the surface of a reflective object will cause the loss of depth information. This missing geometric information will affect the original correct appearance features during the fusion process, and so on. In view of this problem, the present invention proposes an adaptive MOE layer, which can adaptively adjust the network parameters according to the input data, enhance the main modal features, and weaken the interference caused by the secondary modal features. Eliminate the influence of the dynamic changes of the dominant modal data and improve the robustness of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Schematic diagram of the principle of the pose estimation network of the present invention;
[0040] Figure 2 It is the common object scene pictures and their pose estimation results in the LineMOD dataset, the benchmark dataset of the present invention;
[0041] Figure 3 It is the common object scene pictures and their pose estimation results in the benchmark dataset YCB-Video dataset of the present invention;
[0042] Figure 4 Schematic diagram of the linear mediated attention mechanism of the present invention;
[0043] Figure 5 It is a schematic diagram of the structure of the hybrid expert layer of the present invention;
[0044] Figure 6 Schematic diagram of the expert module in the hybrid expert layer of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0047] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0048] Combination Figure 1 The bidirectional fusion 6D object pose estimation method of this embodiment uses RGBD data to estimate the position and direction matrix of the object coordinate system relative to the camera coordinate system. The method includes the following steps:
[0049] Step 1: Use the most commonly used and scientific standard datasets YCB-Video and LineMOD in the field of pose estimation;
[0050] Step 2: Preprocess the standard data set in step 1 to obtain the RGB image and depth image after data enhancement. Use the point cloud data as a bridge between depth information and geometric features, and convert the depth information into point cloud data according to the camera intrinsic parameters. Use the RGB and point cloud data as the input of the neural network. Perform data enhancement on the input data to obtain the training set;
[0051] Step 3: Build a pose estimation network, and input the RGB images in the training set and the aligned point cloud data images into the built pose estimation network for training. Define the number of epochs according to the size of the data. After each epoch, use the current model parameters to perform a test. If the error and accuracy of the test results are better than the saved optimal model, the current model parameters are saved as the optimal parameters. When the number of network training times reaches the set epoch value, stop training and obtain a trained pose estimation network.
[0052] Step 4: Input the RGB images and point cloud data images in the test set into the trained pose estimation network to obtain the pose parameters corresponding to each RGBD data.
[0053] Step 5: Evaluate the obtained posture parameters using the posture estimation evaluation index to obtain the ADD and ADDS of the network.
[0054] The processing process of the standard data set in this embodiment takes the LineMOD data set as an example, which contains objects such as Figure 2 As shown in the figure. In addition to the most basic LineMOD dataset, special data enhancement is also required to expand and enrich the dataset. They are rendered data and fused data. These data enhancements enhance the richness of dataset information by changing the lighting, environment, image size, and fused images. The trained network improves generalization and robustness.
[0055] In step 2 of this implementation, the process of preprocessing the standard data set includes:
[0056] Color Jittering: Randomly change the color, and set the parameters of brightness, contrast, saturation and hue to 0.2, 0.2, 0.2, 0.05 respectively. This can increase the robustness of the model to different lighting and color conditions;
[0057] Normalization normalizes the image data to a mean of [0.485, 0.456, 0.406] and a standard deviation of [0.229, 0.224, 0.224]. This is a common method for training deep learning models to help the model converge faster and more stably.
[0058] Adding Noise: Some noise may be added to the training data so that the final training results can have good robustness.
[0059] The process of step three of this implementation mode is:
[0060] Build a pose estimation network, the network structure is as follows Figure 1 As shown in the figure. The input is the point cloud data converted from the RGB image of the complex scene of daily objects in the dataset and the corresponding depth image, and the output is the pose parameters of all objects in the scene, including the position matrix and the direction matrix. When inputting the training set images into the pose estimation network, the size of the mini-batch is set to 3. The ADAM optimizer is used, and the hyperparameter is set to β 1 =0.9,β 2 =0.999. The cyclic learning rate strategy CyclicLR helps the pose estimation network explore the parameter space during training by periodically adjusting the learning rate between base_lr (0.00001) and max_lr (0.001), thereby avoiding falling into a poor local minimum and possibly accelerating convergence. Each cycle includes a learning rate increase phase and a decrease phase. This increase and decrease strategy can be regarded as adding a dynamic adjustment strategy to the optimization process, making the training process more flexible and efficient.
[0061] The pose estimation network of this embodiment includes four parts: the first part is a feature extraction layer, which uses a convolutional neural network (CNN) and a point cloud data neural network (PCN) to extract the appearance features of RGB data and the geometric features of point cloud data respectively; the second part is a bidirectional feature fusion layer, which is integrated in each dimension of the feature extraction layer, and extracts the appearance features of the corresponding dimension. and geometric features The fusion is performed to obtain the point cloud data to RGB fusion feature p2r and the RGB to point cloud data fusion feature r2p, realizing the function of fully integrating the two modalities. The fusion feature p2r is used as the input for the next dimension appearance feature extraction, and the fusion feature r2p is used as the input for the next dimension geometric feature extraction; the feature fusion module adopts the Transformer architecture, which can perform feature fusion based on the most semantically relevant parts of the two modalities.
[0062] The third part is the adaptive MOE layer, which determines the dominant mode according to the input features, adjusts the weights of the appearance features and geometric features, performs weighted summation, and obtains the MOE features. The MOE features are spliced with the appearance features and geometric features finally output by the feature extraction layer, and the spliced feature image is output to the 6D object pose estimation layer.
[0063] The fourth part is the 6D object pose estimation layer, which estimates the 3D key points on each object in the spliced feature image, obtains the predicted key point set of each object, matches the predicted key point set with the key point set of each object in the configuration file, and thus regresses the 6D pose parameters of each object.
[0064] The feature extraction layer of this embodiment includes an appearance feature extraction layer and a geometric feature extraction layer, and the structure is as follows:
[0065] The CNN feature extraction flow in the appearance feature extraction layer has an input tensor dimension of 3×480×640, where 3 represents the color value (R, G, B) of each pixel, and 480 and 640 represent the height and width of the image, respectively.
[0066] The appearance feature extraction layer consists of a series of convolutional layers, which are used to encode the features in the dataset images. Considering the dimension of the input tensor, the appearance feature extraction layer uses the pre-trained ResNet34 as the backbone network.
[0067] The CNN feature extraction flow is divided into two stages, namely the encoding layer (downsampling layer) and the decoding layer (upsampling layer). Both the downsampling and upsampling layers contain four convolutional layers. There is a feature fusion module on each feature extraction dimension. The RGB features and point cloud data features are sent to the bidirectional feature fusion module on the same dimension for cross-attention solution, so that fusion features with different expressive capabilities can be obtained. The reason for using the upsampling decoding layer is that the extracted data will be sent to the semantic segmentation and key point detection modules, and the image size needs to be the same as the input.
[0068] The PCN feature extraction flow in the geometric feature extraction layer has an input tensor dimension of 12800×9, where 12800 is the number of points and 9 represents 9 channels, namely the xyz coordinate channel, the RGB color channel, and the normal vector matrix channel.
[0069] The geometric feature extraction layer, which consists of a series of convolutional layers, pooling layers and point cloud data processing functions, is used to encode features in the image. Considering the dimension of the input tensor, the geometric feature extraction layer uses the pre-trained RandLA as the backbone network. Its structure is mainly divided into two parts, the encoding layer (downsampling layer) and the decoding layer (upsampling layer). The point cloud data feature extraction is implemented through the convolutional layer, the downsampling is implemented through the random sampling function, and the upsampling is implemented through the nearest point interpolation function. The BN layer and activation function are used after each convolution: the BN layer can smooth the surface of the loss function, which helps to increase the training speed of the network. The activation function helps to increase the nonlinearity of the network and improve the network's expression ability.
[0070] The structure of the bidirectional feature fusion module of this embodiment is as follows:
[0071] Considering that the traditional feature fusion method is to directly splice different features on the same channel, the fused feature expression ability is poor. In this embodiment, a bidirectional feature fusion layer based on a transformer structure is proposed, which can adaptively identify the parts with the highest semantic relevance in the two modalities and perform feature fusion accordingly. Unlike the KNN clustering method used in FFB6D, the transformer architecture method has good characteristics of extracting global features. The feature fusion mode proposed in this embodiment has good robustness and is not easily affected by noise. In addition, a different attention mechanism from the past is proposed in the bidirectional feature fusion layer of this embodiment: the linear intermediate attention mechanism (LMA). This bidirectional feature fusion layer fuses the RGB features with the point cloud data features, and generates p2r (point cloud data to RGB fusion features) and r2p (RGB to point cloud data fusion features) respectively. The two features are then sent to the next feature extraction layer respectively.
[0072] The structure of the linear mediating attention mechanism is as follows: Taking the fusion feature p2r as an example, the working principle of LMA is as follows Figure 4 As shown, the appearance features extracted from RGB data Geometric features extracted from point cloud data As input, it is fed into LMA. After flattening, both feature tensors are multiplied by the learnable weight matrix (linear layer) to obtain the query matrix Q, key matrix K, and value matrix V. The formula is expressed as: Where W q , W k , W v They are the weight matrices corresponding to Q, K, and V. LMA is divided into two layers of multi-head attention calculation.
[0073] In the internal multi-head attention calculation layer, the query matrix Q obtained by the appearance features is first subjected to a global average pooling to reduce the feature dimension. This is a key operation to reduce the computational complexity of the attention solution, which can be expressed as:
[0074] Q′=AdAvPool(Q),
[0075] Where Q′ is the query matrix after global average pooling. AdAvPool is global average pooling. Then the inner layer attention weight is solved The obtained cross attention matrix is used as a weight medium to solve the subsequent external attention layer. Because, although the calculation amount is very small when solving the attention matrix once in the inner layer, the Q matrix loses a lot of local detail information after a global average pooling, and the weight at this time is inaccurate.
[0076] The purpose of the external multi-head attention calculation layer is to reintroduce the detailed local features lost in the global average pooling into the calculation process, such as Figure 4 As shown. The external multi-head attention calculation layer uses Q′ as an intermediate replacement key matrix K to reduce the complexity, and introduces the query matrix Q to participate in the attention solution, and uses V′ as an intermediate weight to introduce the weight information obtained during the external attention solution. The formula is expressed as A W The cross attention matrix of point cloud data to RGB fusion. This inner and outer layer solution idea can not only reduce the computational complexity and memory overhead, but also retain the complete attention solution steps as much as possible, especially the softmax operation, which reduces the amount of calculation while retaining the calculation accuracy and the expression ability of the weight matrix. Finally, the cross attention matrix of point cloud data to RGB fusion is sent to the feedforward network (FFN) to increase the network depth and obtain the point cloud to RGB fusion feature p2r. The expression ability of the fusion feature is enhanced while the nonlinear ability of the network is also enhanced.
[0077] When fusing feature r2p, refer to Figure 4 As shown, the appearance features and geometric features The positions are swapped as input to obtain the cross attention matrix of RGB to point cloud data fusion, which is sent to the feedforward network (FFN), and the feedforward network (FFN) outputs the RGB to point cloud data fusion feature r2p;
[0078] The feed-forward network of this embodiment includes a linear layer, a multi-layer perceptron, and two layer normalization layers;
[0079] Cross-Attention Matrix A W Input to the linear layer, the output of the linear layer is then input to the first normalization layer, the output of the first normalization layer is then added element by element with feature a to achieve residual connection. This residual connection structure can prevent the gradient from disappearing, and the result after addition is input to the multi-layer perceptron (MLP), which can learn more abstract feature representations and improve the expressiveness of features. The output of the multi-layer perceptron is then input to the second normalization layer, making the network output more accurate and improving the convergence speed. The output of the second normalization layer is the fused feature;
[0080] Feature a is the appearance feature Feature b is a geometric feature The second layer normalizes the output point cloud data of the layer to RGB fusion feature p2r; feature a is the geometric feature Feature b is the appearance feature The second layer normalizes the output RGB of the layer to the point cloud data fusion feature r2p.
[0081] The structure of the adaptive MOE layer of this embodiment is as follows:
[0082] like Figure 1 As shown in the figure, the features of two different modes are respectively sent to two MOE modules with shared parameters. The adaptive MOE layer can adaptively identify the dominant mode features according to the two input data, and adjust the network parameters and weight distribution so that the final weighted summation result can highlight the main mode features and weaken the influence of the secondary mode features. For example, in the case of missing depth information on the surface of a reflective object, the correct appearance features may be affected after feature fusion. The MOE module can reduce the weight assigned to the geometric features and increase the weight of the appearance features, thereby reducing the impact of such low-quality data.
[0083] The appearance features and geometric features are each passed through a MOE module to obtain the MOE appearance features and MOE geometric features after the weights are redistributed, and the MOE appearance features and MOE geometric features are weightedly summed to obtain the MOE features;
[0084] like Figure 5 As shown, the MOE module includes:
[0085] Feature c is simultaneously input to L expert modules. The outputs of the L expert modules are sequentially subjected to an average function and a gating function to obtain L weight values. The L weight values are each multiplied element-by-element with the outputs of the L expert modules to obtain L outputs. The L outputs are added element-by-element. The addition result is the MOE appearance feature / MOE geometric feature. Feature c is the appearance feature / geometric feature.
[0086] The weight values of the expert modules in the two MOE modules are shared;
[0087] like Figure 6 As shown, the expert module in this embodiment includes a 1D convolution layer, an activation function layer and a 1D convolution layer. The 1D convolution layer is an identity mapping of the same dimension. The purpose of this structural setting is mainly to improve the expression ability of network features. In order to learn the dominant mode in the fusion feature, it is necessary to improve the depth of the network structure. The activation function is the RELU function, which can improve the nonlinear expression ability of the feature. The specific form of the RELU activation function is:
[0088]
[0089] Here, x represents the input and RELU(x) represents the output.
[0090] The structure of this embodiment is as follows:
[0091] It mainly includes three parts. The first part is the semantic segmentation layer, in which the semantic segmentation layer sends the aforementioned fusion feature map (integrating MOE features, appearance features, and geometric features) into the semantic segmentation network, segments different objects and obtains corresponding masks to complete semantic segmentation. This fusion feature enables the segmentation network to better identify the appearance and geometric shape of each object in a complex scene, and the segmentation is more accurate. The second part is the center point detection layer, which performs center point detection on each object with a mask segmented out, obtains the center point of each object, and completes the instance segmentation of all objects in the scene with the semantic segmentation mask. The third part is the 3D key point detection layer, which performs key point detection on each object after instance segmentation in the scene, generates an offset vector pointing to the key point for each point in the feature map instance, and obtains a key point cluster by adding the point coordinates to the offset vector, and obtains the predicted key point set of each object through the clustering algorithm. The key point selection method for each object in the configuration file is different from the key point selection method of the farthest point sampling used in the previous method, which only considers the Euclidean distance between different key points, faces the plane, and the key points obtained on the invisible surface will reduce the accuracy of the network estimation. The present invention adopts a method combining mean shift and farthest point sampling. First, through the offset algorithm, points with obvious texture features in each object on the visible surface are selected as the initial key point set, and then the remaining key points are selected through farthest point sampling. The key points obtained in this way are used as the key point set in the configuration file, which can help the network estimate the pose parameters of each object more accurately.
[0092] The least squares method is used to match the predicted key point set with the key point set of each object in the configuration file, and the 6D pose parameters of each object are regressed. The 6D pose parameters include the position matrix t and the direction matrix R of the object coordinate system relative to the camera coordinate system:
[0093]
[0094] L least-squares represents the least squares error, p i Represents the key point coordinates of each object in the configuration file, p i ′ represents the predicted key point coordinates of the object, and M represents the number of key points.
[0095] During training, the posture estimation network loss function structure of this embodiment is as follows:
[0096] There are semantic segmentation layers, center point detection layers and 3D key point detection layers in the pose estimation network. In order to more conveniently optimize the multi-task network proposed in the present invention, the loss function in this embodiment uses a weighted average method to combine all layer loss functions into an overall loss function, which can optimize the entire network in the back propagation process. The loss function can be expressed by the following formula:
[0097] L total =α 1 L keypoints +α 2 L semantic +α 3 L center
[0098] where α 1 , α 2 , α 3 are the weights of the corresponding layers, L keypoints represents the loss function of the 3D keypoint detection layer, L semantic represents the loss function of the semantic segmentation layer, L center Represents the loss function of the center point detection layer.
[0099] The specific process of step 4 in this implementation mode is as follows:
[0100] The aligned RGB data and depth data in the test set are sent to the pose estimation network together. During the input process, the mini-batch is set to 1 to obtain the pose parameters corresponding to each object in each pair of RGBD images. Then the pose estimation effect of the network is evaluated. For asymmetric objects, the average distance difference (ADD) is used as the evaluation index. The average Euclidean distance difference (ADD) between the corresponding points of the object in the predicted pose and the true pose is calculated. For symmetrical objects, the symmetric average distance difference is used as the evaluation index. The shortest distance between the predicted pose and the true pose of each point on the symmetrical object is calculated. The (ADD-S) calculation formula can be expressed as:
[0101]
[0102] Where v represents the vertex of object O, R, T represent the predicted values of pose parameters. * ,T * Represents the true value of the pose parameter.
[0103] Table 1: Comparative experimental data of different networks on the YCB-Veido dataset
[0104] Network structure ADDS average ADD(s) average value PoseCNN 75.8 59.9 PVN3D 95.5 91.8 FFB6D 96.6 92.7 RCVpose 96.6 95.2 DFTr 96.7 94.4 Method of the present invention 97.3 96.1
[0105] Table 2: Comparison of experimental data of different networks on LineMOD dataset
[0106]
[0107] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. It should therefore be understood that many modifications may be made to the exemplary embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in a manner different from that described in the original claims. It should also be understood that features described in conjunction with individual embodiments may be used in other described embodiments.
Claims
1. A bidirectional fusion 6D object pose estimation method, characterized in that: The method comprises: Preprocessing the RGB image and the depth image of the scene to be estimated, and converting the depth image into point cloud data; the scene image includes one or more objects; Input RGB image and point cloud data into the pose estimation network; The pose estimation network includes a feature extraction layer, a bidirectional feature fusion layer, an adaptive MOE layer and a 6D object pose estimation layer; The RGB image and point cloud data are input to the feature extraction layer, which extracts the appearance features in the input RGB image and the geometric features of the point cloud data respectively; the bidirectional feature fusion layer is integrated in each dimension of the feature extraction layer, and the appearance features of the corresponding dimensions are extracted. and geometric features Fusion is performed to obtain the point cloud data to RGB fusion feature p2r and the RGB to point cloud data fusion feature r2p. The fusion feature p2r is used as the input for the next dimension appearance feature extraction, and the fusion feature r2p is used as the input for the next dimension geometric feature extraction. The appearance features and geometric features finally output by the feature extraction layer are simultaneously input to the adaptive MOE layer. The adaptive MOE layer determines the dominant mode according to the input features, adjusts the weights of the appearance features and geometric features, and performs weighted summation to obtain the MOE features. The MOE features are spliced with the appearance features and geometric features finally output by the feature extraction layer, and the spliced feature image is output to the 6D object pose estimation layer. The 6D object pose estimation layer predicts the 3D key points on each object in the spliced feature image, obtains the predicted key point set of each object, matches the predicted key point set with the key point set of each object in the configuration file, and thus regresses the 6D pose parameters of each object.
2. The method for bidirectional fusion 6D object pose estimation according to claim 1, characterized in that: The bidirectional feature fusion layer adopts a novel Transformer based on a linear intermediate attention mechanism to solve the cross attention matrix of the two modalities, and obtains the fusion feature p2r and the fusion feature r2p according to the cross attention matrix of the two modalities. The method for solving the cross attention matrix of the two modalities by the novel Transformer based on the linear intermediate attention mechanism includes: Feature a is fed into a linear layer to obtain the matrix Q corresponding to feature a; feature b is fed into two linear layers to obtain the matrices K, V, and W corresponding to feature b. q , W k , W v They are the weight matrices corresponding to the query matrix Q, key matrix K, and value matrix V, respectively. According to the query matrix Q, key matrix K, and value matrix V, the cross attention matrix A is obtained. W : in, Q′=AdAvPool(Q), AdAvPool represents adaptive average pooling, softmax represents normalized exponential function, Pb1 represents relative position bias 1, Pb2 represents relative position bias 2, and d represents feature matrix dimension; Feature a is the appearance feature Feature b is a geometric feature Attention weight matrix A W is a cross attention matrix of one modality, i.e., the cross attention matrix of point cloud data to RGB fusion; Feature a is the appearance feature Feature b is a geometric feature Attention weight matrix A W is a cross attention matrix of one modality, namely: the cross attention matrix of RGB to point cloud data fusion; The cross attention matrices of the two modalities are input into the feedforward network respectively, and the feedforward network outputs the point cloud to RGB fusion feature p2r and the RGB to point cloud data fusion feature r2p.
3. The method for bidirectional fusion 6D object pose estimation according to claim 2, characterized in that: The feed-forward network consists of a linear layer, a multilayer perceptron, and two normalization layers; Attention weight matrix A W Input to the linear layer, the output of the linear layer is input to the first normalization layer, the output of the first normalization layer is added to the feature a element by element, the result of the addition is input to the multilayer perceptron, the output of the multilayer perceptron is input to the second normalization layer, the output of the second normalization layer is the fused feature; Feature a is the appearance feature Feature b is a geometric feature The second layer normalizes the output point cloud data of the layer to RGB fusion feature p2r; Feature a is a geometric feature Feature b is the appearance feature The second layer normalizes the output RGB of the layer to the point cloud data fusion feature r2p.
4. The method for bidirectional fusion 6D object pose estimation according to claim 1, characterized in that: The adaptive MOE layer determines the dominant mode according to the input features, adjusts the weights of the appearance features and geometric features, and performs weighted summation to obtain the MOE features. The method includes: The appearance features and geometric features are each passed through a MOE module to obtain the MOE appearance features and MOE geometric features after the weights are redistributed. The MOE appearance features and MOE geometric features are weighted summed to obtain the MOE features. Each MOE module includes: Feature c is simultaneously input to L expert modules. The outputs of the L expert modules are sequentially subjected to an average function and a gating function to obtain L weight values. The L weight values are each multiplied element-by-element with the outputs of the L expert modules to obtain L outputs. The L outputs are added element-by-element. The addition result is the MOE appearance feature / MOE geometric feature. Feature c is the appearance feature / geometric feature. The weight values of the expert modules in the two MOE modules are shared.
5. The method for bidirectional fusion 6D object pose estimation according to claim 4, characterized in that: The expert module includes a first 1d convolutional layer, an activation function layer, and a second 1d convolutional layer; Feature c is input into the first 1d convolution layer, activation function layer and second 1d convolution layer in sequence, and the output of the second 1d convolution layer is the output of the expert module; The activation function layer is the RELU function.
6. The method for bidirectional fusion 6D object pose estimation according to claim 1, characterized in that: The method of regressing the 6D pose parameters of each object in the 6D object pose estimation layer includes: Use the semantic segmentation layer to perform semantic segmentation on the spliced feature image; Use the center point detection layer to detect the center points of objects in the segmented image, obtain the center point of each object, and complete the instance segmentation of all objects in the scene with the semantic segmentation mask; Use the 3D key point detection layer to perform key point detection on each object after instance segmentation in the scene to obtain the predicted key point set for each object; The least squares method is used to match the predicted key point set with the key point set of each object in the configuration file, and the 6D pose parameters of each object are regressed.
7. The method for bidirectional fusion 6D object pose estimation according to claim 1, characterized in that: The feature extraction layer includes CNN feature extraction flow and PCN feature extraction flow, which respectively extract the appearance features in the input RGB image and the geometric features of the point cloud data; The CNN feature extraction stream uses the pre-trained ResNet34 as the backbone network, and the PCN feature extraction stream uses the pre-trained RandLA as the backbone network.
8. The method for bidirectional fusion 6D object pose estimation according to claim 1, characterized in that: The loss function when training the pose estimation network is: L total =α1L keypoints +α2L semantic +α3L center Among them, α1, α2, α3 are the weights of the corresponding layers, L keypoints represents the loss function of the 3D keypoint detection layer, L semantic represents the loss function of the semantic segmentation layer, L center Represents the loss function of the center point detection layer.
9. A computer-readable storage device storing a computer program, characterized in that: When the computer program is executed by a processor, the method for estimating the position and pose of a 6D object by bidirectional fusion is implemented as claimed in any one of claims 1 to 8.
10. A bidirectional fusion 6D object pose estimation device, comprising a storage device, a processor, and a computer program stored in the storage device and executable on the processor, characterized in that: The processor executes the computer program to implement the bidirectional fusion 6D object pose estimation method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Object six-degree-of-freedom pose estimation method for multi-geometric feature learning of occlusion and truncation scenes
CN115147599A
Semantic component attitude estimation method based on deep learning
CN117218343A
Class-level object 6D pose estimation method and system based on dynamic key point detection
CN117456003A
6D pose estimation method based on iterative attention fusion network
CN117593368A
Method and apparatus with multi-modal feature fusion
EP4181079A1
Cited By
Object positioning and posture recognition method based on 3D vision
CN119625068A
A method for object positioning and attitude recognition based on 3D vision
CN119625068B
Intelligent teaching auxiliary system based on augmented reality
CN119832189A
Cross-domain target attitude estimation adaptive method from virtual domain to real domain
CN119941849A
Complex workpiece 6D pose estimation method and device, electronic equipment and storage medium
CN120411245A
