Pose estimation method, pose estimation apparatus, electronic device and storage medium
The pose estimation method that combines target detection and graph attention mechanism solves the problem of robots lacking accurate pose information in object interaction, achieves fast and accurate pose estimation, and improves interaction stability.
Patent Information
- Application Number
- PCT/CN2023/140836
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-19
- Filing Date
- 2023-12-22
- Publication Date
- 2024-10-24
AI Technical Summary
During the robot's interaction with objects, the lack of accurate pose information may lead to misalignment of the interaction. Especially when the object is tilted or placed sideways, it is difficult to accurately identify the object's pose.
Through target detection, extraction of 2D features and pre-trained point cloud models, combined with the graph attention mechanism, rapid and accurate estimation of object poses is achieved.
It improves the accuracy and generalization ability of pose estimation, enables real-time reasoning on embedded devices such as robots, reduces interaction errors, and enhances the stability of the interaction between the robot and the environment.
Smart Images

Figure CN2023140836_24102024_PF_FP_ABST
Abstract
Description
A posture estimation method, posture estimation device, electronic device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 19, 2023, with application number 202310466166.1 and invention name “A posture estimation method, posture estimation device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application belongs to the field of image processing technology, and in particular relates to a posture estimation method, a posture estimation device, an electronic device, and a computer-readable storage medium. Background Art
[0003] Object grasping and augmented reality are already common robotic tasks. In these scenarios, robots need to interact with various objects in the real world. To achieve this interaction, robots typically use 2D object detection technology and depth information collected by RGB-D cameras to obtain the object's 3D position relative to the robot's camera.
[0004] However, when only the 3D position information of an object is available, since the object's posture information is unknown, when the object is tilted or placed sideways, the robot may assume that the object is in a forward and horizontal posture for interactive operations, resulting in interaction misalignment. Technical issues
[0005] The present application provides a posture estimation method, a posture estimation device, an electronic device, and a computer-readable storage medium, which can quickly and accurately estimate the posture of an object. Technical Solutions
[0006] In a first aspect, the present application provides a pose estimation method, comprising:
[0007] Perform target detection on the image to be processed to determine the location information and category information of the target object contained in the image to be processed;
[0008] extracting a first target two-dimensional feature of the target object according to the position information;
[0009] Determine a target point cloud model corresponding to the target object according to category information among multiple object point cloud models obtained through offline training;
[0010] The pose of the target object is estimated based on the first target two-dimensional features and the target point cloud model to obtain the pose information of the target object.
[0011] In a second aspect, the present application provides a posture estimation device, comprising:
[0012] A detection module is used to perform target detection on the image to be processed and determine the location information and category information of the target object contained in the image to be processed;
[0013] an extraction module, configured to extract a first target two-dimensional feature of the target object according to the position information;
[0014] A determination module is used to determine a target point cloud model corresponding to a target object according to category information from a plurality of object point cloud models obtained through offline training;
[0015] The estimation module is used to estimate the position and pose of the target object based on the first target two-dimensional features and the target point cloud model to obtain the position and pose information of the target object.
[0016] In a third aspect, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method according to the first aspect are implemented.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect are implemented.
[0018] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is executed by one or more processors, it implements the steps of the method of the first aspect. Beneficial effects
[0019] Compared with the existing technology, the beneficial effects of this application are as follows: this solution first uses a simple target detection algorithm to determine the position information and category information of the target object; then, based on the position information, the first target two-dimensional feature of the target object is extracted, and based on the category information, the target point cloud model corresponding to the target object is called; finally, based on the first target two-dimensional feature and the target point cloud model, the pose of the target object can be estimated. Based on the above process, it can be seen that this solution obtains object point cloud models corresponding to multiple different categories of objects through pre-offline training. When pose estimation is required, it only needs to be called according to the category information of the target object, thereby improving the generalization ability and processing speed of pose estimation, and can realize real-time reasoning of pose estimation on embedded devices such as robots.
[0020] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] FIG1 is a schematic diagram of an implementation flow of a posture estimation method provided in an embodiment of the present application;
[0023] FIG2 is a schematic diagram of an aggregate attention layer provided in an embodiment of the present application;
[0024] FIG3 is a schematic diagram of a self-attention layer provided in an embodiment of the present application;
[0025] FIG4 is a schematic diagram of a cross-attention layer provided in an embodiment of the present application;
[0026] FIG5 is a multi-input network infrastructure provided by an embodiment of the present application;
[0027] FIG6 is a flowchart illustrating an implementation of a posture estimation method according to an embodiment of the present application;
[0028] FIG7 is a flowchart illustrating an implementation of an offline training process according to an embodiment of the present application;
[0029] FIG8 is a block diagram of a posture estimation apparatus according to an embodiment of the present application;
[0030] FIG9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. Modes for Carrying Out the Invention
[0031] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0032] The following describes a posture estimation method provided in an embodiment of the present application. The posture estimation method can be applied to an electronic device. Specifically, the electronic device can be a robot; of course, the electronic device can also be other devices that have a communication connection with the robot and can control the robot, such as a user terminal or a server, etc., which is not limited in the embodiment of the present application. For ease of description, the posture estimation method is explained and illustrated below by taking the application of the posture estimation method to a robot as an example. Please refer to Figure 1. The posture estimation method in the embodiment of the present application includes:
[0033] Step 101 : performing target detection on the image to be processed to determine the position information and category information of the target object contained in the image to be processed.
[0034] The robot is equipped with a camera that can be kept running synchronously after the robot is started. When the robot needs to interact, it can use the camera to obtain an image of its environment, which can be determined as the image to be processed. Of course, the robot can also obtain the image to be processed based on the camera in a simulation platform such as Webots. The embodiments of this application do not limit the method for obtaining the image to be processed.
[0035] The robot can perform target detection on the image to be processed. The target detection algorithm used by the robot is not limited here. Through target detection, the location information and category information of the target object contained in the image to be processed can be determined.
[0036] The position information specifically refers to the coordinates of a specified vertex (e.g., the upper left vertex) of the bounding box of the target object in the image to be processed, as well as the size of the bounding box. For example, the position information can be expressed in the following form: (x, y, w, h), where x is the horizontal coordinate of the specified vertex of the bounding box of the target object in the image to be processed, y is the vertical coordinate of the specified vertex of the bounding box of the target object in the image to be processed, w is the width of the bounding box of the target object, and h is the height of the bounding box of the target object.
[0037] The category information specifically refers to the category ID of the object category to which the target object belongs. It should be noted that in the embodiments of this application, objects are classified in detail. For example, brand A beverages are one category of objects, brand B beverages are another, and so on. Each object category actually contains only one type of object, and the shape and other characteristics of that object remain essentially fixed.
[0038] It is understood that the embodiments of this application do not limit the number of target objects. When there are multiple objects placed in the environment captured by the camera, target detection can be used to determine the multiple objects contained in the corresponding image to be processed. The robot can then determine some or all of these multiple objects as target objects based on its own interaction needs, and can execute subsequent steps for each target object to obtain the position and posture information of each target object.
[0039] Step 102: extract a first target two-dimensional feature of the target object according to the position information.
[0040] The robot's primary purpose is to interact with a target object. In addition to the target object, the image being processed often contains other information, such as background information and information about other targets. To prevent this information from interfering with or affecting the pose estimation of the target object, the robot can extract a targeted 2D feature of the target object based on the acquired position information. For ease of distinction, this 2D feature is referred to here as the first target 2D feature.
[0041] Step 103 : Determine a target point cloud model corresponding to the target object from among the multiple object point cloud models obtained through offline training according to the category information.
[0042] The robot has previously obtained point cloud models corresponding to multiple objects through offline training. These objects belong to different object categories, that is, their category information is different. Based on this, the robot can find the object point cloud model corresponding to the target object currently being considered within these multiple point cloud models obtained through offline training, based on the category information of the target object. For ease of distinction, this object point cloud model is referred to here as the target point cloud model.
[0043] Step 104 : Estimate the position and posture of the target object based on the first target two-dimensional features and the target point cloud model to obtain position and posture information of the target object.
[0044] The target point cloud model contains information about the target object in three dimensions, while the first target two-dimensional feature contains information about the target object in two dimensions. The robot can combine these two and perform pose estimation by matching them, thereby obtaining the target object's pose information. This pose information actually includes the target object's three-dimensional position and three-dimensional pose information; in other words, this pose information is specifically 6D pose information.
[0045] In some embodiments, to improve the accuracy of pose estimation and obtain more accurate pose estimation results, each object point cloud model is associated with the corresponding object's two-dimensional features; that is, when the object point cloud model of each type of object is trained offline, the object's two-dimensional features are also associated with its object point cloud model and saved. Based on this optimization, step 104 may specifically include:
[0046] A1. Determine the target 3D features of the target object based on the target point cloud model.
[0047] As previously mentioned, the target point cloud model contains information about the target object in three dimensions. Therefore, the robot can extract the target object's three-dimensional features from this target point cloud model. For ease of distinction, these three-dimensional features are referred to here as target three-dimensional features.
[0048] A2. Based on the first target two-dimensional features, the target three-dimensional features and the second target two-dimensional features, call the pose estimation model using the graph attention mechanism to obtain the pose information of the target object output by the pose estimation model.
[0049] The embodiment of the present application optimizes a pose estimation model that uses a common pose estimation algorithm and applies a graph attention mechanism to the pose estimation model. Through the graph attention mechanism, each layer of the pose estimation model can focus on nodes that can better highlight the importance of features during its processing. The input of the optimized pose estimation model includes: a first target two-dimensional feature, a target three-dimensional feature, and a second target two-dimensional feature. Among them, the second target two-dimensional feature is a two-dimensional feature associated with the target point cloud model, which will not be repeated here.
[0050] As an example only, the pose estimation algorithm adopted by the pose estimation model may be a PnP (Perspective-n-Point) algorithm, etc., which is not limited in the embodiments of the present application.
[0051] As an example only, in an embodiment of the present application, the two-dimensional features that the robot is concerned about may include: color features and texture features, etc.; the three-dimensional features that the robot is concerned about may include: features of the point cloud in three-dimensional space.
[0052] In some embodiments, a pose estimation model using a graph attention mechanism includes: an aggregate attention layer, a self-attention layer, and a cross-attention layer; wherein the aggregate attention layer is used to strengthen the relationship between the second target two-dimensional features and the target three-dimensional features; the self-attention layer is used to strengthen the relationship between each target three-dimensional feature and the relationship between each first target two-dimensional feature, that is, to strengthen the relationship between features of the same dimension; the cross-attention layer is used to strengthen the relationship between the target three-dimensional features and the first target two-dimensional features.
[0053] The second target two-dimensional feature is recorded as The target three-dimensional feature is F 3D , the weight layer corresponding to the second target two-dimensional feature is w 2d , the weight layer corresponding to the target three-dimensional feature is w 3d , then the aggregate attention layer can be defined as follows:
[0054] The first target two-dimensional feature is recorded as Then the aggregate attention layer, self-attention layer and cross-attention layer can be defined as:
[0055] Please refer to Figures 2, 3, and 4. Figure 2 shows an example of the aggregate attention layer, Figure 3 shows an example of the self-attention layer, and Figure 4 shows an example of the cross-attention layer. As can be seen from the figures, the aggregate attention layer leverages the existing connections between nodes in the graph to enhance the effective information in the graph and retain more discriminative features; the self-attention layer uses the features of adjacent nodes to assign weights to the correlations between different nodes in the same class.
[0056] Please refer to Figure 5, which shows the multi-input network infrastructure of any attention layer of the graph attention mechanism. Among them, the Conv layer performs convolution operations; the MatMul layer performs matrix multiplication operations; the Concat layer performs concatenation operations; value and x represent the input features, which vary depending on the current attention layer. Specifically, for the aggregate attention layer, value or x is the second target two-dimensional feature One is the target three-dimensional feature F 3D ; For the three-dimensional self-attention layer, value and x are both target three-dimensional features F 3D ; For the two-dimensional self-attention layer, value and x are both the first target two-dimensional features For the cross attention layer, value and x are the first target two-dimensional features One is the target three-dimensional feature F 3D .
[0057] In some embodiments, by performing target detection on the image to be processed in step 101, the robot can also obtain the full-image 2D features of the image to be processed; that is, the input of the target detection also includes the full-image 2D features of the image to be processed. Considering that the target object does not actually occupy the entire frame of the image to be processed, step 102 may include:
[0058] B1. Determine the object area corresponding to the target object in the image to be processed based on the position information.
[0059] As we've already seen from the definition of position information, it actually describes the location of the bounding box of the target object within the image being processed. Therefore, using this position information, the robot can determine the area within the image being processed that is enclosed by the bounding box. This area is the object region corresponding to the target object within the image being processed.
[0060] B2. Extract the first target two-dimensional feature of the target object from the two-dimensional features of the entire image according to the object area.
[0061] Obviously, the full-image 2D feature contains the 2D features of the entire image being processed, which results in some feature information irrelevant to the target object. Based on this, the robot can extract the corresponding 2D features from the full-image 2D feature based on the determined object area. These 2D features become the first target 2D features of the target object.
[0062] To account for the possibility that the edges of the target object may not be fully encompassed by the bounding box, the robot can first expand the object region based on a preset expansion ratio to obtain a target region. It is understood that this target region must be larger than the object region, ensuring that the object region is completely contained within the target region. The robot then simply identifies the 2D feature corresponding to the target region among the full-image 2D features as the first target 2D feature of the target object.
[0063] It can be understood that through the above operations, the data processing volume of the robot can be reduced, and the position estimation of multiple target objects in the processed image can be realized, reducing the interference caused by the features of different target objects.
[0064] Based on the various steps described above, please refer to Figure 6, which shows an example of the process of the pose estimation method proposed in an embodiment of the present application.
[0065] In some embodiments, a robot or other type of electronic device may obtain a point cloud model of each object through offline training in advance. The offline training process includes:
[0066] C1. Acquire multiple images of the object. The multiple images are obtained by continuously shooting the camera around the object.
[0067] The user can control the camera to face the object and circle around the object. During the process of the camera circling the object, the camera can continuously shoot, thereby obtaining multiple images around the object.
[0068] C2. Perform three-dimensional reconstruction on multiple images to obtain a point cloud model of the object.
[0069] A robot or other electronic device can perform 3D reconstruction on the resulting multiple images. For example, the SFM (Structure from Motion) 3D reconstruction method or other 3D reconstruction methods can be used, but are not limited here. Through 3D reconstruction, a point cloud model of the object can be obtained.
[0070] C3. Name the object point cloud model according to the object category information.
[0071] To associate an object's category information with its point cloud model, the object point cloud model can be named according to its category. For example, if the category ID of an object is 00001, the object point cloud model can be named 00001. This allows the robot to find the target point cloud model corresponding to the target object in a timely manner based on the target object's category information.
[0072] In some embodiments, the above offline training process may further include:
[0073] D1. Perform image enhancement on multiple images to obtain multiple enhanced images.
[0074] As an example only, image enhancement includes but is not limited to mixup and mosaic, etc., which are not limited here.
[0075] D2. Extract the two-dimensional features of objects in the enhanced multiple images.
[0076] The two-dimensional features of objects in the enhanced images can be extracted using any lightweight object detection algorithm. As an example, this lightweight object detection algorithm can be mobileNetv3 or Yolo, but is not limited here. Robots or other electronic devices can use a publicly available pre-trained model for this object detection algorithm, or they can use commonly available publicly available training data for model training.
[0077] In practical applications, if a pre-trained model of a publicly available object detection algorithm is used, the model can be fine-tuned based on multiple enhanced images. With just a few rounds of training, a model capable of recognizing the current object and exhibiting enhanced generalization capabilities can be quickly obtained. Because this model is lightweight, fine-tuning the model requires only a small number of images (i.e., multiple images taken around the object), allowing for direct fine-tuning on robots equipped with graphics processing units (GPUs).
[0078] D3. Save the association between the object point cloud model and the two-dimensional features of the object.
[0079] During the offline training process, the robot or other types of electronic devices can save the association between the object point cloud model and the two-dimensional features of the object for use in subsequent object point cloud model applications.
[0080] It can be understood that during offline training, for any object, the three-dimensional features of the object can be obtained through the obtained object point cloud model; the two-dimensional features of the object can be obtained through target detection algorithms or other methods. The above two types of data can be used as input to the pose estimation model to be trained. The pose estimation model performs feature matching of the two-dimensional features and the three-dimensional features to generate a correspondence graph, thereby achieving the training of the pose estimation model. Please refer to Figure 7, which shows an example of the process of the offline training process proposed in the embodiment of the present application.
[0081] As can be seen from the above, in the embodiment of the present application, a simple target detection algorithm is first used to determine the position information and category information of the target object; then, the first target two-dimensional feature of the target object is extracted based on the position information, and based on the category information, the target point cloud model corresponding to the target object is called; finally, the pose of the target object can be estimated based on the first target two-dimensional feature and the target point cloud model. Based on the above process, it can be seen that the embodiment of the present application has obtained object point cloud models corresponding to multiple different categories of objects through pre-offline training. When pose estimation is required, it is only necessary to call the corresponding model based on the category information of the target object, thereby improving the generalization ability and processing speed of pose estimation, and can realize real-time reasoning of pose estimation on embedded devices such as robots.
[0082] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0083] Corresponding to the pose estimation method provided above, embodiments of the present application further provide a pose estimation device, which can be integrated into an electronic device. Specifically, the electronic device can be a robot; of course, the electronic device can also be other devices that establish a communication connection with the robot and can control the robot, which is not limited in the embodiments of the present application. Referring to Figure 8, the pose estimation device 8 in the embodiment of the present application includes:
[0084] The detection module 801 is used to perform target detection on the image to be processed and determine the location information and category information of the target object contained in the image to be processed;
[0085] An extraction module 802 is configured to extract a first target two-dimensional feature of the target object according to the position information;
[0086] A determination module 803 is configured to determine a target point cloud model corresponding to a target object according to category information from a plurality of object point cloud models obtained through offline training;
[0087] The estimation module 804 is used to estimate the position and pose of the target object based on the first target two-dimensional features and the target point cloud model to obtain the position and pose information of the target object.
[0088] In some embodiments, each object point cloud model is associated with a two-dimensional feature of the corresponding object; the estimation module 804 includes:
[0089] A first determining unit is used to determine a target three-dimensional feature of the target object based on the target point cloud model;
[0090] The calling unit is used to call a pose estimation model using a graph attention mechanism based on the first target two-dimensional feature, the target three-dimensional feature and the second target two-dimensional feature to obtain the pose information of the target object output by the pose estimation model, wherein the second target two-dimensional feature is a two-dimensional feature associated with the target point cloud model.
[0091] In some embodiments, a pose estimation model using a graph attention mechanism includes: an aggregate attention layer, a self-attention layer, and a cross-attention layer;
[0092] Among them, the aggregation attention layer is used to strengthen the relationship between the second target 2D features and the target 3D features;
[0093] The self-attention layer is used to strengthen the relationship between the three-dimensional features of each target and the relationship between the two-dimensional features of each first target;
[0094] The cross attention layer is used to strengthen the relationship between the target 3D features and the first target 2D features.
[0095] In some embodiments, the object detection further determines the full-image two-dimensional features of the image to be processed; the extraction module 802 includes:
[0096] A second determining unit is used to determine an object area corresponding to the target object in the image to be processed according to the position information;
[0097] The first extraction unit is used to extract a first target two-dimensional feature of the target object from the two-dimensional features of the entire image according to the object area.
[0098] In some embodiments, the extraction unit comprises:
[0099] The region expansion subunit is used to expand the object region based on a preset expansion ratio to obtain a target region;
[0100] The feature determination subunit is used to determine the two-dimensional feature corresponding to the target area as the first target two-dimensional feature of the target object among the two-dimensional features of the entire image.
[0101] In some embodiments, the pose estimation device 8 further includes: a training module for obtaining an object point cloud model corresponding to each object through offline training;
[0102] The training modules include:
[0103] An acquisition unit, configured to acquire multiple images of an object, wherein the multiple images are obtained by continuously shooting a camera around the object;
[0104] A reconstruction unit, used for performing three-dimensional reconstruction on multiple images to obtain an object point cloud model of the object;
[0105] The naming unit is used to name the object point cloud model according to the object category information.
[0106] In some embodiments, the training module further comprises:
[0107] An enhancement unit, configured to perform image enhancement on the plurality of images to obtain the plurality of enhanced images;
[0108] a second extraction unit, configured to extract two-dimensional features of objects in the enhanced plurality of images;
[0109] The storage unit is used to store the association relationship between the object point cloud model and the two-dimensional features of the object.
[0110] As can be seen from the above, in the embodiment of the present application, a simple target detection algorithm is first used to determine the position information and category information of the target object; then, the first target two-dimensional feature of the target object is extracted based on the position information, and based on the category information, the target point cloud model corresponding to the target object is called; finally, based on the first target two-dimensional feature and the target point cloud model, the pose of the target object can be estimated. Based on the above process, it can be seen that the embodiment of the present application has obtained object point cloud models corresponding to multiple different categories of objects through pre-offline training. When pose estimation is required, it is only necessary to call the corresponding model based on the category information of the target object, thereby improving the generalization ability and processing speed of pose estimation, and can realize real-time reasoning of pose estimation on embedded devices such as robots.
[0111] Corresponding to the pose estimation method provided above, an embodiment of the present application further provides an electronic device. Referring to Figure 9, the electronic device 9 in the embodiment of the present application includes: a memory 901, one or more processors 902 (only one is shown in Figure 9) and a computer program stored in the memory 901 and executable on the processor. Among them: the memory 901 is used to store software programs and modules, and the processor 902 executes various functional applications and data processing by running the software programs and units stored in the memory 901 to obtain the resources corresponding to the above-mentioned preset events. Specifically, the processor 902 implements the following steps when running the above-mentioned computer program stored in the memory 901:
[0112] Perform target detection on the image to be processed to determine the location information and category information of the target object contained in the image to be processed;
[0113] extracting a first target two-dimensional feature of the target object according to the position information;
[0114] Determine a target point cloud model corresponding to the target object according to category information among multiple object point cloud models obtained through offline training;
[0115] The pose of the target object is estimated based on the first target two-dimensional features and the target point cloud model to obtain the pose information of the target object.
[0116] Assuming that the above is the first possible implementation, in a second possible implementation provided based on the first possible implementation, each object point cloud model is associated with a two-dimensional feature of the corresponding object; the pose of the target object is estimated based on the first target two-dimensional feature and the target point cloud model to obtain the pose information of the target object, including:
[0117] Determine the target three-dimensional features of the target object based on the target point cloud model;
[0118] According to the first target two-dimensional features, the target three-dimensional features and the second target two-dimensional features, a pose estimation model using a graph attention mechanism is called to obtain the pose information of the target object output by the pose estimation model, wherein the second target two-dimensional features are the two-dimensional features associated with the target point cloud model.
[0119] In a third possible implementation provided on the basis of the second possible implementation, a pose estimation model using a graph attention mechanism includes: an aggregate attention layer, a self-attention layer, and a cross-attention layer;
[0120] Among them, the aggregation attention layer is used to strengthen the relationship between the second target 2D features and the target 3D features;
[0121] The self-attention layer is used to strengthen the relationship between the three-dimensional features of each target and the relationship between the two-dimensional features of each first target;
[0122] The cross attention layer is used to strengthen the relationship between the target 3D features and the first target 2D features.
[0123] In a fourth possible implementation provided based on the first possible implementation, target detection further determines the full-image two-dimensional features of the image to be processed; extracting the first target two-dimensional features of the target object based on the position information includes:
[0124] Determine the object area corresponding to the target object in the image to be processed according to the position information;
[0125] According to the object area, the first target two-dimensional feature of the target object is extracted from the two-dimensional features of the whole image.
[0126] In a fifth possible implementation provided on the basis of the fourth possible implementation, extracting a first target two-dimensional feature of the target object from the full-image two-dimensional features according to the object region includes:
[0127] Expand the object area based on a preset expansion ratio to obtain the target area;
[0128] Among the full-image two-dimensional features, the two-dimensional feature corresponding to the target area is determined as the first target two-dimensional feature of the target object.
[0129] In a sixth possible implementation provided on the basis of the first possible implementation, or the second possible implementation, or the third possible implementation, or the fourth possible implementation, or the fifth possible implementation, for each object, an offline training process of an object point cloud model corresponding to the object includes:
[0130] Acquire multiple images of the object, where the multiple images are continuously captured by a camera surrounding the object;
[0131] Perform three-dimensional reconstruction on multiple images to obtain a point cloud model of the object;
[0132] Name the object point cloud model according to the object category information.
[0133] In a seventh possible implementation provided based on the sixth possible implementation, the offline training process of the object point cloud model corresponding to the object further includes:
[0134] Performing image enhancement on multiple images to obtain multiple enhanced images;
[0135] Extracting two-dimensional features of objects in multiple enhanced images;
[0136] Save the association between the object point cloud model and the two-dimensional features of the object.
[0137] It should be understood that in the embodiment of the present application, the processor 902 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0138] The memory 901 may include a read-only memory and a random access memory, and provides instructions and data to the processor 902. A portion or all of the memory 901 may also include a non-volatile random access memory. For example, the memory 901 may also store device type information.
[0139] As can be seen from the above, in the embodiment of the present application, a simple target detection algorithm is first used to determine the position information and category information of the target object; then, the first target two-dimensional feature of the target object is extracted based on the position information, and based on the category information, the target point cloud model corresponding to the target object is called; finally, the pose of the target object can be estimated based on the first target two-dimensional feature and the target point cloud model. Based on the above process, it can be seen that the embodiment of the present application has obtained object point cloud models corresponding to multiple different categories of objects through pre-offline training. When pose estimation is required, it is only necessary to call the corresponding model based on the category information of the target object, thereby improving the generalization ability and processing speed of pose estimation, and can realize real-time reasoning of pose estimation on embedded devices such as robots.
[0140] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0141] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0142] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of external device software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0143] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0144] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the associated hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The above-mentioned computer-readable storage medium may include: any entity or device that can carry the above-mentioned computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer-readable memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media does not include electrical carrier signals and telecommunication signals.
[0146] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A pose estimation method, characterized in that: include: Performing target detection on the image to be processed to determine the location information and category information of the target object contained in the image to be processed; Extracting a first target two-dimensional feature of the target object according to the position information; Determining a target point cloud model corresponding to the target object according to the category information among a plurality of object point cloud models obtained through offline training; The position and posture of the target object is estimated according to the first target two-dimensional features and the target point cloud model to obtain the position and posture information of the target object.
2. The method for posture estimation according to claim 1, wherein: Each of the object point cloud models is associated with a two-dimensional feature of a corresponding object; and performing pose estimation on the target object according to the first target two-dimensional feature and the target point cloud model to obtain pose information of the target object includes: Determining target three-dimensional features of the target object according to the target point cloud model; According to the first target two-dimensional feature, the target three-dimensional feature and the second target two-dimensional feature, a pose estimation model using a graph attention mechanism is called to obtain the pose information of the target object output by the pose estimation model, wherein the second target two-dimensional feature is the two-dimensional feature associated with the target point cloud model.
3. The method for posture estimation according to claim 2, characterized in that: The pose estimation model using the graph attention mechanism includes: an aggregate attention layer, a self-attention layer and a cross-attention layer; The aggregate attention layer is used to strengthen the relationship between the second target two-dimensional feature and the target three-dimensional feature; The self-attention layer is used to strengthen the relationship between the three-dimensional features of each target and the relationship between the two-dimensional features of each first target; The cross attention layer is used to strengthen the relationship between the target three-dimensional feature and the first target two-dimensional feature.
4. The method for posture estimation according to claim 1, wherein: The target detection further determines the full-image two-dimensional features of the image to be processed; The step of extracting a first target two-dimensional feature of the target object according to the position information includes: Determining, according to the position information, an object area corresponding to the target object in the image to be processed; According to the object area, a first target two-dimensional feature of the target object is extracted from the full-image two-dimensional feature.
5. The method for posture estimation according to claim 4, characterized in that: The step of extracting the first target two-dimensional feature of the target object from the full-image two-dimensional feature according to the object region includes: Expanding the object region based on a preset expansion ratio to obtain a target region; Among the full-image two-dimensional features, the two-dimensional features corresponding to the target area are determined as the first target two-dimensional features of the target object.
6. The method for posture estimation according to any one of claims 1 to 5, characterized in that: For each object, the offline training process of the object point cloud model corresponding to the object includes: Acquire multiple images of the object, where the multiple images are obtained by continuously shooting a camera around the object; Performing three-dimensional reconstruction on the multiple images to obtain an object point cloud model of the object; The object point cloud model is named according to the category information of the object.
7. The method for posture estimation according to claim 6, wherein: The offline training process of the object point cloud model corresponding to the object further includes: Performing image enhancement on the multiple images to obtain multiple enhanced images; Extracting two-dimensional features of the object in the enhanced multiple images; The association relationship between the object point cloud model of the object and the two-dimensional features of the object is saved.
8. A posture estimation device, characterized in that: include: A detection module, used to perform target detection on the image to be processed, and determine the position information and category information of the target object contained in the image to be processed; An extraction module, used for extracting a first target two-dimensional feature of the target object according to the position information; A determination module, configured to determine a target point cloud model corresponding to the target object according to the category information from among a plurality of object point cloud models obtained through offline training; An estimation module is used to estimate the position and posture of the target object according to the first target two-dimensional features and the target point cloud model to obtain the position and posture information of the target object.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Target detection method and target detection device
CN111127551A
Industrial part pose estimation method and system
CN113128610A
Class level 6D attitude estimation method based on monocular RGB-D image
CN114863573A
6D attitude estimation method and system based on deep learning
CN115457128A
Pose estimation method, pose estimation device, electronic equipment and storage medium
CN116580080A
