Perceptual prediction method and device based on three-dimensional space, medium and equipment
By acquiring multi-view images and conducting multiple samplings in 3D perception and scene understanding technology, combined with two-dimensional image features and sampling point vectors, the flexibility problem of fixed-size space recognition and prediction is solved, and the perception prediction in the three-dimensional space area is improved. Efficiency and accuracy.
Patent Information
- Application Number
- CN202410711572.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-30
AI Technical Summary
Existing technologies based on 3D perception and scene understanding can only identify and predict a fixed-size space and lack flexibility, resulting in low recognition efficiency.
By acquiring multi-view images of the target scene, extracting two-dimensional image features and performing multiple samplings in a preset three-dimensional space area to generate a sampling point vector, the two-dimensional image features and sampling point vectors are combined to determine the perception prediction within the three-dimensional space area. As a result, perceptual prediction of the user's area of concern is achieved.
It improves the flexibility and efficiency of perception prediction within the three-dimensional space area and enhances the recognition accuracy of the target area.
Smart Images

Figure CN118570384A
Abstract
Description
Technical Field
[0001] The present disclosure relates to computer vision technology, and in particular to a three-dimensional space-based perception prediction method, device, computer-readable storage medium, and electronic device. Background Art
[0002] 3D perception and scene understanding refers to the computer system's ability to accurately identify and understand the scene by perceiving and understanding the three-dimensional information in the environment. With the development of computer vision and deep learning, 3D perception and scene understanding have been widely used in image processing, intelligent transportation, robotics and other fields. In the field of computer vision, 3D perception and scene understanding refers to understanding and inferring the geometric structure and semantic information in the scene by extracting three-dimensional information from images or videos.
[0003] However, when currently processing images based on 3D perception and scene understanding, only recognition prediction can be performed on spaces of fixed sizes, which lacks flexibility in recognition prediction reasoning, thereby reducing recognition efficiency. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide a three-dimensional space-based perception prediction method, device, medium and equipment.
[0005] According to one aspect of an embodiment of the present disclosure, a three-dimensional space-based perception prediction method is provided, including:
[0006] Acquire multiple images corresponding to multiple perspectives of the target scene, and obtain two-dimensional image features based on the multiple images corresponding to the multiple perspectives;
[0007] Based on a preset dimension, a first sampling and at least one second sampling are performed on a three-dimensional space area of a preset size in the target scene to obtain a first sampling point vector and at least one second sampling point vector; wherein the dimension of the first sampling point vector and at least one second sampling point vector is the preset dimension;
[0008] Based on the two-dimensional image features, the first sampling point vector and at least one of the second sampling point vectors, a perception prediction result in a three-dimensional space area in the target scene is determined.
[0009] According to another aspect of an embodiment of the present disclosure, a three-dimensional space-based perception prediction device is provided, including:
[0010] An image feature extraction module is used to obtain multiple images corresponding to multiple perspectives of a target scene, and obtain two-dimensional image features based on the multiple images corresponding to the multiple perspectives;
[0011] A region sampling module, configured to perform a first sampling and at least one second sampling on a three-dimensional space region of a preset size in the target scene based on a preset dimension, to obtain a first sampling point vector and at least one second sampling point vector; wherein the dimension of the first sampling point vector and at least one second sampling point vector is the preset dimension;
[0012] A grid prediction module is used to determine a perception prediction result in a three-dimensional space area in the target scene based on the two-dimensional image features, the first sampling point vector and at least one of the second sampling point vectors.
[0013] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the three-dimensional space-based perception prediction method described in any of the above embodiments.
[0014] According to another aspect of the embodiments of the present disclosure, an electronic device is provided, the electronic device comprising:
[0015] processor;
[0016] a memory for storing instructions executable by the processor;
[0017] The processor is used to read the executable instructions from the memory and execute the instructions to implement the three-dimensional space-based perception prediction method described in any of the above embodiments.
[0018] Based on the perceptual prediction method, device, medium and equipment based on three-dimensional space provided by the embodiments of the present disclosure. The embodiments of the present disclosure obtain corresponding two-dimensional image features by collecting images corresponding to multiple perspectives of the target scene, perform multiple sampling on a three-dimensional space area of a preset size in the target scene to obtain corresponding sampling vectors, and determine the prediction information of the three-dimensional space area of a preset size in the target scene based on the two-dimensional image features and the sampling vectors, wherein the size of the three-dimensional space area can be set according to the area of interest. Therefore, in the present disclosure, perceptual prediction of the corresponding area is performed based on the area of interest of the user, thereby increasing the flexibility of information perception prediction and improving the efficiency of perceptual prediction in the three-dimensional space area.
[0019] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic diagram of a model structure involved in a three-dimensional space-based perception prediction method provided by an exemplary embodiment of the present disclosure;
[0021] Figure 2is a flowchart of a three-dimensional space-based perception prediction method provided by an exemplary embodiment of the present disclosure;
[0022] Figure 3 is a schematic diagram of a flow chart of determining a sampling point vector in a three-dimensional space-based perception prediction method provided by another exemplary embodiment of the present disclosure;
[0023] Figure 4 is a schematic diagram of a flow chart of determining a prediction result in a three-dimensional space-based perception prediction method provided by another exemplary embodiment of the present disclosure;
[0024] Figure 5 is a schematic diagram of a process of determining a target query vector in a three-dimensional space-based perception prediction method provided by another exemplary embodiment of the present disclosure;
[0025] Figure 6 is a schematic structural diagram of a perception prediction device based on three-dimensional space provided by an exemplary embodiment of the present disclosure;
[0026] Figure 7 is a schematic structural diagram of a perception prediction device based on three-dimensional space provided by another exemplary embodiment of the present disclosure;
[0027] Figure 8 is a structural diagram of a region sampling module in a perception prediction device provided by another exemplary embodiment of the present disclosure;
[0028] Fig. 9 is a schematic structural diagram of a perception prediction device based on three-dimensional space provided by another exemplary embodiment of the present disclosure;
[0029] Fig.10 is a schematic structural diagram of a perception prediction device based on three-dimensional space provided by another exemplary embodiment of the present disclosure;
[0030] Fig.11 is a schematic structural diagram of a perception prediction device based on three-dimensional space provided by yet another exemplary embodiment of the present disclosure;
[0031] Fig.12 is a structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] In order to explain the present disclosure, the exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0033] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0034] The disclosed embodiments can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0035] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0036] Application Overview
[0037] In the process of implementing the present disclosure, the inventors found that the existing object recognition scheme based on BEV features is to collect multi-frame and multi-perspective images around the vehicle, extract image features through an image feature extraction network to obtain 2D image features, and project the 2D image features into the BEV space to obtain BEV features. Among them, BEV features refer to the feature representation method used in three-dimensional object detection tasks of autonomous driving and robots. They are top-view features obtained by projecting three-dimensional point cloud data onto a two-dimensional plane. BEV features are usually represented in the form of a pixel matrix, where each pixel value represents the point cloud density or other feature information in the area. The obtained BEV features are extended to the 3D space to obtain a 3D space feature (3D volume feature), and the prediction results in the 3D space are determined based on the 3D volume feature.
[0038] The above technical solution has at least the following problems: it can only perform recognition and prediction on a 3D space of fixed size, cannot change the recognition and prediction area according to demand, and lacks flexibility in recognition and prediction reasoning.
[0039] Example Network Model
[0040] Figure 1 FIG. 1 is a schematic diagram of a network model involved in a three-dimensional space-based perception prediction method provided by an exemplary embodiment of the present disclosure. Figure 1 As shown, the network model for implementing the perceptual prediction method based on three-dimensional space includes: a preset network model 11, a decoder 12 (for example, a Transformer decoder) and a multi-layer perceptron 13 (MLP).
[0041] The preset network model 11 is used to extract features from images corresponding to multiple perspectives of the target scene to obtain multi-scale two-dimensional image features. Optionally, the preset network model can be a multi-layer feature extraction layer in any deep neural network model, for example, a multi-layer feature extraction layer in a deep residual network (ResNet) outputs multi-scale two-dimensional image features, and each feature extraction layer corresponds to a scale of two-dimensional image features; for example, a multi-layer feature extraction layer in a feature pyramid network (FPN) outputs multi-scale two-dimensional image features, and each feature extraction layer corresponds to a scale of two-dimensional image features.
[0042] The decoder 12 includes a two-layer spatial cross-attention module, which processes the two-dimensional image features and the sampling point vector (point query) obtained by sampling the three-dimensional spatial area in the target scene to obtain an updated sampling point vector.
[0043] The multi-layer perceptron 13 is used to decode the updated sampling point vector to obtain the perceptual prediction result in the three-dimensional space area of the target scene.
[0044] Exemplary Methods
[0045] Figure 2 FIG. 1 is a flow chart of a perception prediction method based on three-dimensional space provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic devices, such as Figure 2 As shown, the following steps are included:
[0046] Step 202: Acquire images corresponding to multiple perspectives of the target scene, and obtain two-dimensional image features based on the multiple images corresponding to the multiple perspectives.
[0047] The target scene may be a vehicle-mounted surround view scene, and the multi-perspective images may be acquired by collecting multiple camera devices installed on the vehicle. For example, the multi-perspective images captured by the vehicle-mounted surround view camera are used to obtain images corresponding to the multiple perspectives. Optionally, a preset network model is used to extract features from each image to obtain encoded two-dimensional image features, and multiple feature extraction layers in the preset network model are used to output two-dimensional image features of multiple scales, and each feature extraction layer corresponds to a two-dimensional image feature of one scale.
[0048] Step 204 , based on a preset dimension, perform a first sampling and at least one second sampling on a three-dimensional space region of a preset size in the target scene to obtain a first sampling point vector and at least one second sampling point vector.
[0049] The dimensions of the first sampling point vector and the at least one second sampling point vector are preset dimensions.
[0050] Optionally, a three-dimensional space area (Points of Interest) of any size can be determined based on the target scene, for example, a three-dimensional space area of a preset size, which is in the target scene. For example, when the target scene is a vehicle-mounted surround view scene, the vehicle-mounted surround view scene can obtain a three-dimensional space of a certain size centered on the vehicle (e.g., a three-dimensional space of 10 meters long, 10 meters wide, and 5 meters high), and an area of any size in the three-dimensional space (e.g., a three-dimensional space area of 3 meters × 3 meters × 3 meters) can be determined as the three-dimensional space area of the present disclosure. In this embodiment, the three-dimensional space area refers to the area of interest each time the model is forward inferred, and the size of the area can be determined according to the specific application scenario. It is only necessary to keep the size of the three-dimensional space area consistent during training and reasoning. This embodiment ensures the flexibility of the model by allowing the size of the three-dimensional space area to be customized. In addition, sampling information is increased by sampling the three-dimensional space area twice.
[0051] Step 206: Determine a perception prediction result in a three-dimensional space region in the target scene based on the two-dimensional image feature, the first sampling point vector, and at least one second sampling point vector.
[0052] In this embodiment, the perception prediction result includes the occupancy state and semantic information of each grid in the three-dimensional space area; this embodiment focuses the prediction on the three-dimensional space area rather than the entire space corresponding to the target scene, thereby improving the prediction accuracy. For example, the perception prediction result is that the target information in the three-dimensional space area is a pedestrian, or a vehicle, etc.
[0053] The above-mentioned embodiment of the present disclosure provides a perceptual prediction method based on three-dimensional space. The embodiment of the present disclosure acquires images corresponding to multiple perspectives of the target scene to obtain corresponding two-dimensional image features, performs multiple samplings on a three-dimensional space region of a preset size in the target scene to obtain corresponding sampling vectors, and determines prediction information of a three-dimensional space region of a preset size in the target scene based on the two-dimensional image features and the sampling vectors, wherein the size of the three-dimensional space region can be set according to the regional point of interest. Therefore, in the present disclosure, perceptual prediction of the corresponding region is performed based on the region of interest to the user, thereby increasing the flexibility of information perceptual prediction and improving the efficiency of perceptual prediction in the three-dimensional space region.
[0054] like Figure 3 As shown in the above Figure 2 Based on the illustrated embodiment, step 204 may include the following steps:
[0055] Step 2041, determining a preset dimension according to the number of channels corresponding to the two-dimensional image feature.
[0056] In this embodiment, in order to realize that the first sampling point group obtained by sampling can interact with the two-dimensional image features, the number of channels of the two-dimensional image features is determined before obtaining the sampling points of the first sampling point group, and the sampling is performed using the number of channels as the number of samples corresponding to the sampling points, so as to facilitate the calculation between the two-dimensional image features and the sampling points obtained by sampling; and the number of sampling points can reflect the description information of the three-dimensional space area. For example, a set of point query (sampling points) is initialized, the dimension is NxD, N is the number of sampling points, D is the number of feature channels, and the number of sampling points is consistent with the number of channels of the two-dimensional image features, for example, set to 256, etc.
[0057] Step 2042: Perform a first sampling and at least one second sampling on the three-dimensional space area in the target scene based on a preset dimension to obtain a first sampling point group and at least one second sampling point group.
[0058] After determining that the number of sampling points corresponds to the preset dimension, the first sampling and the second sampling are performed on the three-dimensional space area in the BEV feature corresponding to the target scene, wherein the number of sampling points in the second sampling is determined based on the sampling points of the first sampling.
[0059] Optionally, a first sampling number is determined based on a preset dimension, and a first sampling is performed on the three-dimensional space region based on the first sampling number to obtain a first sampling point group. For example, a plurality of sampling points for the first sampling are uniformly determined in the three-dimensional space region. The preset dimension is determined as the first sampling number, and sampling is performed based on the first sampling number in a three-dimensional space region of a known size to obtain the first sampling number of sampling points to form a first sampling point group.
[0060] At least one second sampling number is determined based on the first sampling number, and at least one second sampling is performed on the three-dimensional space region based on the at least one second sampling number to obtain at least one second sampling point group.
[0061] Optionally, since the number of first sampling points is relatively sparse relative to the three-dimensional space area, this embodiment increases the number of sampling points through at least one second sampling to increase the amount of information represented in the first sampling point vector and at least one second sampling point vector corresponding to the first sampling point group and at least one second sampling point group; that is, the more times the second sampling is performed, the denser the sampling points are, the greater the amount of information combined with the target object recognition, and the more accurate the recognition result. However, the more times the second sampling is performed, the greater the amount of calculation will be, which will cause the calculation speed to slow down. Therefore, in order to ensure accuracy and efficiency, one first sampling and one second sampling are usually performed.
[0062] In this embodiment, after determining the first sampling quantity, the second sampling can be achieved by performing oversampling based on the first sampling. In some optional embodiments, multiple oversamplings can be performed directly on the first sampling to achieve multiple second samplings; in other optional embodiments, when performing multiple second samplings, oversampling is performed based on the previous second sampling to achieve the next second sampling. In this embodiment, more dense points can be collected in the three-dimensional space area through multiple second samplings, thereby obtaining more features, so that the recognition prediction results are more accurate. Optionally, when only one second sampling is included, the second sampling quantity is determined by training according to the first sampling quantity; for example, during the training process, multiple points around each sampling point of the first sampling are determined as the sampling point position of the second sampling. In addition, in this embodiment, both samplings are performed in the three-dimensional space area (Points of Interest), which represents the area of interest when performing target prediction. The three-dimensional space area can be customized in position and size according to the specific application scenario, and it is only necessary to ensure that the three-dimensional space area is consistent during training and reasoning, so as to ensure the flexibility of the model.
[0063] When the second sampling is performed multiple times, the last second sampling can be oversampled to achieve the next second sampling; that is, the last second sampling is regarded as the first sampling, and the next second sampling is regarded as the second sampling, and the number of the next second sampling is determined according to the sampling number determination method provided in the above embodiment. At this time, the sampling number of the next second sampling is determined according to the sampling number of the last second sampling.
[0064] Step 2043: Encode the first sampling point group and the at least one second sampling point group respectively to obtain a first sampling point vector and at least one second sampling point vector.
[0065] In this embodiment, before the first sampling point group and the at least one second sampling point group are input into the decoder, the first sampling point group and the at least one second sampling point group are respectively encoded to obtain higher-dimensional query embeddings. Optionally, the encoding method may include but is not limited to trigonometric functions (sine cosine), etc., and any encoding method that can achieve encoding of data to a higher dimension is applicable to this embodiment. For example, a position encoder may be used to encode the first sampling point group and the at least one second sampling point group. Optionally, at least two position encoders that encode the first sampling point group and the at least one second sampling point group, respectively, may share weight parameters. In this embodiment, by encoding, a first sampling point vector and at least one second sampling point vector in vector form may be obtained, and information in vector form is more convenient for subsequent calculations.
[0066] In some optional embodiments, the process of obtaining the first sampling point vector and the second sampling point vector by encoding may include:
[0067] The three-dimensional coordinate information of the plurality of sampling points included in the first sampling point group and the at least one second sampling point group in the target coordinate system is determined respectively, wherein the target coordinate system is a coordinate system corresponding to the target scene.
[0068] Optionally, the target coordinate system is determined according to the target scene. For example, in a vehicle scene, the target coordinate system is a vehicle coordinate system, which is a coordinate system with the center of the vehicle as the origin.
[0069] The three-dimensional coordinate information of a plurality of sampling points in the first sampling point group is encoded using a first encoder to obtain a first sampling point vector.
[0070] The three-dimensional coordinate information of a plurality of sampling points in at least one second sampling point group is encoded using a second encoder to obtain at least one second sampling point vector.
[0071] In this embodiment, encoding the sampling points can be achieved by encoding the three-dimensional coordinate information of the sampling points, and the three-dimensional coordinate information of the sampling points and the encoder are used to encode the three-dimensional coordinate information to a higher dimension and generate query embeddings. Optionally, the structures of the first encoder and the second encoder for encoding the first sampling point group and at least one second sampling point group can be the same or different. For example, when the first encoder and the second encoder have the same structure, the two can share network parameters. In this way, two different numbers of samples are sampled in the same three-dimensional space area, and the sampling results are encoded to be applied to the encoder, which greatly increases the amount of sampling information and thus improves the accuracy of the prediction results.
[0072] like Figure 4 As shown in the above Figure 2 Based on the illustrated embodiment, step 206 may include the following steps:
[0073] Step 2061: Based on the decoder, the initialization point query vector, the first sampling point vector, at least one second sampling point vector and the two-dimensional image feature are processed to obtain a target query vector.
[0074] In this embodiment, the initialization point query vector (Point query) may be an initialized point query vector, for example, all values in the point query vector are initialized to 0, and the obtained initialization point query vector is an all-0 vector. Optionally, before being processed by the decoder, the initialization point query vector is updated by the first sampling point vector and at least one second sampling point vector; for example, the first sampling point vector and at least one second sampling point vector may be bitwise added to the initialization point query vector to obtain an accumulated point query vector; the accumulated point query vector and the two-dimensional image feature are then input into the decoder, and the point query vector and the two-dimensional image feature are processed by the decoder to obtain a target query vector for determining a prediction result.
[0075] Step 2062: decode the target query vector based on a multi-layer perceptron to obtain a perceptual recognition result in the three-dimensional space area of the target scene.
[0076] In this embodiment, the process of decoding the target query vector using a multi-layer perceptron can refer to the multi-layer perceptron processing in the existing BEV perception. The multi-layer perceptron (MLP) is generally considered to be a complex mapping function. Simply put, it directly ignores any geometric information and directly transforms from the image perspective to the BEV space. In this embodiment, the target query vector obtained by the decoder is input into the multi-layer perceptron. Through the mapping operation of the multi-layer perceptron, it can be obtained whether each grid in the three-dimensional space area includes an object and the type of the object.
[0077] like Figure 5 As shown in the above Figure 4 Based on the illustrated embodiment, step 2061 includes:
[0078] Step 501, using a first spatial cross-attention module, based on an initialization point query vector, a first sampling point vector and two-dimensional image features, determines an update point query vector.
[0079] The input of the spatial cross attention module includes query, key and value. In this embodiment, the query of the first spatial cross attention module is determined by the initialization point query vector and the first sampling point vector, while the key and value are determined by the two-dimensional image features. Optionally,
[0080] Based on the initialization point query vector and the first sampling point vector, a first point query vector is determined. For example, the initialization point query vector and the first sampling point vector are added according to the dimension to obtain a first point query vector with unchanged dimension, and the first point query vector is used as the query of the first spatial cross attention module.
[0081] An update point query vector is determined according to the first point query vector, the two-dimensional image feature and the first spatial cross-attention module.
[0082] The input first point query vector and two-dimensional image features (key and value are provided) are processed by the first spatial cross attention module to obtain an updated point query vector; the updated point query vector has the same dimension as the initialization point query vector, and the only difference is that the value of each dimension is different. Due to the combination of the first sampling point vector and the two-dimensional image features, and the processing of the first spatial cross attention module, the first point query vector only interacts with the two-dimensional image features that can be projected onto the sampling point set obtained by the first sampling, so that the obtained updated point query vector mainly reflects the features in the three-dimensional space area.
[0083] Step 502: Using at least one second spatial cross-attention module, the update point query vector, at least one second sampling point vector and the two-dimensional image feature are processed to obtain a target query vector.
[0084] The decoder provided by the embodiment of the present disclosure includes at least two spatial cross-attention modules: a first spatial cross-attention module and at least one second spatial cross-attention module. Taking two spatial cross-attention modules as an example, the output of the first spatial cross-attention module and the second sampling point vector obtained by the second sampling are processed (for example, by dimension addition, etc.) as the query of the second spatial cross-attention module, and the key and value in the input of the second spatial cross-attention module are still determined based on the two-dimensional image features. Taking three spatial cross-attention modules as an example (the second spatial cross-attention module a and the second spatial cross-attention module b), the output of the first spatial cross-attention module and the second sampling point vector obtained by the second sampling are processed (for example, by dimension addition, etc.) as the query of the second spatial cross-attention module a, and the key and value in the input of the second spatial cross-attention module a are still determined based on the two-dimensional image features. The output of the second spatial cross-attention module a and the second sampling point vector obtained by another second sampling are processed (for example, by dimension addition, etc.) as the query of the second spatial cross-attention module b, and the key and value in the input of the second spatial cross-attention module b are still determined based on the two-dimensional image features.
[0085] Optionally, a second point query vector is determined based on the update point query vector and the second sampling point vector. In this embodiment, the update point query vector output by the first spatial cross-attention module has the same dimension as the initialization point query vector. At this time, the update point query vector and the second sampling point vector can be added according to the dimension to obtain a second point query vector, and the second point query vector is used as the query of the second spatial cross-attention module.
[0086] A third query vector is determined according to the second point query vector, the two-dimensional image feature, and the second spatial cross-attention module.
[0087] In response to the fact that the unprocessed second sampling point vector is also included, the third point query vector is used as the update point query vector; the second point query vector is continued to be determined based on the update point query vector and the second sampling point vector; the third query vector is determined based on the second point query vector, the two-dimensional image features and the second spatial cross-attention module; in response to the second sampling point vectors having been processed, the third point query vector is determined as the target query vector.
[0088] In this embodiment, the output of the previous spatial cross-attention module and the sampling point vector obtained by oversampling are sequentially used as the processing objects of the next spatial attention module. For example, the processing object of the second spatial cross-attention module includes the output of the previous spatial cross-attention module (the first spatial cross-attention module or the second spatial cross-attention module) and the second sampling point vector obtained by oversampling, so that the sampling features obtained by at least two samplings are applied to the grid prediction. In addition, through the second spatial cross-attention module, the second point query vector only interacts with the two-dimensional image features that can be projected to the sampling point set obtained by the second sampling, so that the grid prediction focuses on the three-dimensional space area. And because the three-dimensional space area can be set according to the scene, it is possible to flexibly realize grid prediction for any area. In addition, when the scene increases, by adjusting the resolution of the occupied network, the increase in the scene will not bring greater consumption of computing resources, and the mIOU index (the average value of IOU of each prediction type) of the grid prediction result is higher than the existing solution based on BEV dense representation.
[0089] Any of the three-dimensional space-based perception prediction methods provided in the embodiments of the present disclosure may be executed by any appropriate device with data processing capabilities, including but not limited to: a terminal device and a server, etc. Alternatively, any of the three-dimensional space-based perception prediction methods provided in the embodiments of the present disclosure may be executed by a processor, such as the processor executing any of the three-dimensional space-based perception prediction methods mentioned in the embodiments of the present disclosure by calling corresponding instructions stored in a memory. This will not be described in detail below.
[0090] Exemplary Devices
[0091] Figure 6 FIG. 1 is a schematic diagram of a structure of a perception prediction device based on three-dimensional space provided by an exemplary embodiment of the present disclosure. Figure 6 As shown, the device provided by the embodiment of the present disclosure includes:
[0092] The image feature extraction module 61 is used to obtain multiple images corresponding to multiple perspectives of the target scene, and obtain two-dimensional image features based on the multiple images corresponding to the multiple perspectives.
[0093] The area sampling module 62 is used to perform a first sampling and at least one second sampling on a three-dimensional space area of a preset size in the target scene based on a preset dimension to obtain a first sampling point vector and at least one second sampling point vector.
[0094] The dimensions of the first sampling point vector and the at least one second sampling point vector are preset dimensions.
[0095] The grid prediction module 63 is used to determine the perception prediction result in the three-dimensional space area of the target scene based on the two-dimensional image features, the first sampling point vector and at least one second sampling point vector.
[0096] The above-mentioned embodiment of the present disclosure provides a perception prediction device based on three-dimensional space. The embodiment of the present disclosure acquires images corresponding to multiple perspectives of the target scene to obtain corresponding two-dimensional image features, performs multiple samplings on a three-dimensional space area of a preset size in the target scene to obtain corresponding sampling vectors, and determines prediction information of a three-dimensional space area of a preset size in the target scene based on the two-dimensional image features and the sampling vectors, wherein the size of the three-dimensional space area can be set according to the area of interest. Therefore, the present disclosure performs perception prediction of the corresponding area based on the area of interest to the user, thereby increasing the flexibility of information perception prediction and improving the efficiency of perception prediction within the three-dimensional space area.
[0097] Figure 7 FIG. 1 is a schematic diagram of a three-dimensional space-based perception prediction device provided by another exemplary embodiment of the present disclosure. Figure 7 As shown, the regional sampling module 62 in the device provided in this embodiment includes:
[0098] The dimension determination unit 621 is used to determine the preset dimension according to the number of channels corresponding to the two-dimensional image feature.
[0099] The multiple sampling unit 622 is used to perform a first sampling and at least one second sampling on the three-dimensional space area in the target scene based on a preset dimension to obtain a first sampling point group and at least one second sampling point group.
[0100] The sampling point encoding unit 623 is used to encode the first sampling point group and the at least one second sampling point group respectively to obtain a first sampling point vector and at least one second sampling point vector.
[0101] Optionally, the sampling point encoding unit 623 may implement encoding of the first sampling point group and at least one second sampling point group by using at least two built-in trigonometric function encoders. In some optional examples, the at least two trigonometric function encoders may share weight parameters.
[0102] Figure 8 FIG. 1 is a schematic diagram of the structure of a region sampling module in a recognition device provided by another exemplary embodiment of the present disclosure. Figure 8 As shown, in this embodiment, the multiple sampling unit 622 in the area sampling module 62 includes:
[0103] The first sampling unit 801 is used to determine a first sampling quantity based on a preset dimension, and perform a first sampling on the three-dimensional space area based on the first sampling quantity to obtain a first sampling point group.
[0104] At least one second sampling unit 802, each second sampling unit 802 is used to determine a second sampling number based on the first sampling number, and perform a second sampling on the three-dimensional space area based on the second sampling number to obtain a second sampling point group.
[0105] like Figure 8 As shown, the sampling point encoding unit 623 in the area sampling module 62 includes:
[0106] The coordinate determination unit 803 is used to respectively determine the three-dimensional coordinate information of the plurality of sampling points included in the first sampling point group and the at least one second sampling point group in the target coordinate system; wherein the target coordinate system is a coordinate system corresponding to the target scene.
[0107] The first encoding unit 804 is configured to encode the three-dimensional coordinate information of multiple sampling points in the first sampling point group by using a 3D encoder to obtain a first sampling point vector.
[0108] At least one second encoding unit 905, each second encoding unit 905 is used to encode the three-dimensional coordinate information of multiple sampling points in the second sampling point group by using a 3D encoder to obtain the second sampling point vector.
[0109] Fig. 9 FIG. 1 is a schematic diagram of a structure of a perception prediction device based on three-dimensional space provided by another exemplary embodiment of the present disclosure. Fig. 9 As shown, the grid prediction module 63 in the device provided in this embodiment includes:
[0110] The decoding processing unit 631 is used to process the initialization point query vector, the first sampling point vector, the at least one second sampling point vector and the two-dimensional image feature based on the decoder to obtain a target query vector.
[0111] The result prediction unit 632 is used to decode the target query vector based on a multi-layer perceptron to obtain a perception result in a three-dimensional space area in the target scene.
[0112] Fig.10 is a schematic diagram of the structure of a perceptual prediction device based on three-dimensional space provided by another exemplary embodiment of the present disclosure. In this embodiment, the decoder includes two spatial cross-attention modules: a first spatial cross-attention module and a second spatial cross-attention module; Fig.10 As shown, the decoding processing unit 631 in the grid prediction module 63 provided in this embodiment includes:
[0113] The first attention unit 101 is used to determine the update point query vector based on the initialization point query vector, the first sampling point vector and the two-dimensional image feature by using the first spatial cross attention module.
[0114] In some optional embodiments, the first attention unit 101 is specifically used to determine the first point query vector based on the initialization point query vector and the first sampling point vector; and determine the update point query vector according to the first point query vector, the two-dimensional image features and the first spatial cross-attention module.
[0115] The second attention unit 102 is used to process the update point query vector, at least one second sampling point vector and the two-dimensional image feature using at least one second spatial cross attention module to obtain a target query vector.
[0116] In some optional embodiments, the second attention unit 102 is specifically used to determine the second point query vector based on the update point query vector and the second sampling point vector; determine the third point query vector based on the second point query vector, the two-dimensional image features and the second spatial cross-attention module; in response to also including the unprocessed second sampling point vector, use the third point query vector as the update point query vector; determine the second point query vector based on the update point query vector and the second sampling point vector; determine the third point query vector based on the second point query vector, the two-dimensional image features and the second spatial cross-attention module; in response to the second sampling point vectors having been processed, determine the third point query vector as the target query vector.
[0117] Fig.11 FIG. 1 is a schematic diagram of a structure of a perception prediction device based on three-dimensional space provided by yet another exemplary embodiment of the present disclosure. Fig.11As shown, the perception prediction device based on three-dimensional space can be applied to the field of vehicle automatic driving. Figure 1 The network structure shown in FIG. 1 , the identification device includes:
[0118] The image acquisition module 111 is used to capture multi-view images (Multi-View Images) through the vehicle-mounted surround view camera and input the multi-view images into the convolutional neural network 11. For example, images of 6 viewpoints can be captured.
[0119] The image feature extraction module 61 is used to perform encoding processing using a preset network model (Image Backbone) to obtain multi-scale two-dimensional image features (Multi-Scale Image features), and input the two-dimensional image features into the decoder 12.
[0120] The two sampling units 622 are used to perform the first sampling and the second sampling on the three-dimensional space area (Points of Interest) of the preset size in the target scene to obtain the first sampling point set (Original Points) and the second sampling point set (Oversampled Points), wherein the second sampling is the oversampling (Oversample) realized based on the sampling points of the first sampling. This embodiment improves the flexibility of prediction by flexibly setting the size and range of the three-dimensional space area.
[0121] The sampling point encoding unit 723 is used to encode the first sampling point set and the second sampling point set respectively by using two encoders to obtain a first sampling point vector and a second sampling point vector. The encoder may be a 3D position encoder (3D PositionEncoder), the encoding object is the position information of each sampling point in the sampling point set, the encoding method may be trigonometric function (sine cosine encoding), etc., and the two 3D position encoders may share weight parameters (Share Weight); the first sampling point set and the second sampling point set are encoded to a higher dimension by the encoder to obtain the first sampling point vector and the second sampling point vector (query embeddings).
[0122] The first attention unit 101 is used to initialize a set of query vectors to obtain an initialization point query vector (PointQuery), and its dimension is determined to be N×D, where N is the number of sampling points and D is the number of feature channels, wherein the number of sampling points is consistent with the number of channels of the two-dimensional image features, for example, it can be set to 256. The initialization point query vector is added to the first sampling point vector to obtain a first point query vector, and the first point query vector is used as the query of the first spatial cross-attention module (Spatial Cross-Attention) in the decoder (corresponding to Q in the figure); the key and value of the first spatial cross-attention module (corresponding to KV in the figure) are determined based on the two-dimensional image features, and the updated point query vector is obtained through processing by the first spatial cross-attention module.
[0123] The second attention unit 102 is used to add the update point query vector to the second sampling point vector to obtain a second point query vector, use the second point query vector as the query of the second spatial cross-attention module (Spatial Cross-Attention) (corresponding to Q in the figure), determine the key and value of the first spatial cross-attention module (corresponding to KV in the figure) based on the two-dimensional image features, and obtain the target query vector through processing by the second spatial cross-attention module.
[0124] The result prediction unit 732 is used to input the target query vector into a multi-layer perceptron (MLP), decode the target query vector through the multi-layer perceptron, and obtain a final occupancy grid prediction result (3D Occupancy Prediction).
[0125] Exemplary Electronic Devices
[0126] Fig.12 A structural diagram of an electronic device provided in an embodiment of the present disclosure includes at least one processor 121 and a memory 122.
[0127] The processor 121 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 120 to perform desired functions.
[0128] The memory 122 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 121 may execute one or more computer program instructions to implement the perceptual prediction method based on three-dimensional space and / or other desired functions of the various embodiments of the present disclosure described above.
[0129] In one example, the electronic device 12 may further include: an input device 123 and an output device 124 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0130] The input device 123 may also include, for example, a keyboard, a mouse, etc.
[0131] The output device 124 can output various information to the outside, and may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0132] Of course, to simplify, Fig.12 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.
[0133] Exemplary computer program products and computer-readable storage media
[0134] In addition to the above-mentioned methods and devices, embodiments of the present disclosure may also provide a computer program product, including computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the three-dimensional space-based perception prediction method of various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section.
[0135] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0136] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the three-dimensional space-based perception prediction method of various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section.
[0137] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium is, for example, but not limited to, a system, device or device including electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0138] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and cannot be considered as necessary for each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, rather than limitation, and the above details do not limit the present disclosure to being implemented by adopting the above specific details.
[0139] Those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present disclosure claims and their equivalents, the present disclosure is also intended to include these modifications and variations.
Claims
1. A perception prediction method based on three-dimensional space, comprising: Acquire multiple images corresponding to multiple perspectives of the target scene, and obtain two-dimensional image features based on the multiple images corresponding to the multiple perspectives; Based on a preset dimension, a first sampling and at least one second sampling are performed on a three-dimensional space area of a preset size in the target scene to obtain a first sampling point vector and at least one second sampling point vector; wherein the dimension of the first sampling point vector and at least one second sampling point vector is the preset dimension; Based on the two-dimensional image features, the first sampling point vector and at least one of the second sampling point vectors, a perception prediction result in a three-dimensional space area in the target scene is determined.
2. The method according to claim 1, wherein based on a preset dimension, performing a first sampling and at least one second sampling on a three-dimensional space area of a preset size in the target scene to obtain a first sampling point vector and at least one second sampling point vector comprises: Determining the preset dimension according to the number of channels corresponding to the two-dimensional image feature; Based on the preset dimension, a first sampling and at least one second sampling are performed on the three-dimensional space area in the target scene to obtain a first sampling point group and at least one second sampling point group; The first sampling point group and at least one of the second sampling point groups are encoded respectively to obtain the first sampling point vector and at least one of the second sampling point vectors.
3. The method according to claim 2, wherein: The first sampling and at least one second sampling of the three-dimensional space area in the target scene based on the preset dimension to obtain a first sampling point group and at least one second sampling point group includes: Determine a first sampling number based on the preset dimension, and perform a first sampling on the three-dimensional space area based on the first sampling number to obtain the first sampling point group; At least one second sampling number is determined based on the first sampling number, and at least one second sampling is performed on the three-dimensional space area based on the at least one second sampling number to obtain at least one second sampling point group.
4. The method according to claim 2, wherein: The encoding of the first sampling point group and at least one of the second sampling point groups respectively to obtain the first sampling point vector and at least one of the second sampling point vectors includes: Respectively determine the three-dimensional coordinate information of a plurality of sampling points included in the first sampling point group and at least one of the second sampling point groups in a target coordinate system; wherein the target coordinate system is a coordinate system corresponding to the target scene; Encoding the three-dimensional coordinate information of a plurality of sampling points in the first sampling point group by using a first encoder to obtain the first sampling point vector; The three-dimensional coordinate information of multiple sampling points in at least one of the second sampling point groups is encoded using a second encoder to obtain at least one second sampling point vector.
5. The method according to any one of claims 1 to 4, wherein: The determining, based on the two-dimensional image feature, the first sampling point vector and at least one of the second sampling point vectors, a perception prediction result in a three-dimensional space region in the target scene includes: Based on the decoder, the initialization point query vector, the first sampling point vector, at least one of the second sampling point vectors and the two-dimensional image feature are processed to obtain a target query vector; The target query vector is decoded based on a multi-layer perceptron to obtain a perceptual prediction result in a three-dimensional space area in the target scene.
6. The method according to claim 5, wherein: The decoder comprises a first spatial criss-cross attention module and at least one second spatial criss-cross attention module; The process of processing the initialization point query vector, the first sampling point vector, at least one of the second sampling point vectors, and the two-dimensional image feature based on the decoder to obtain a target query vector includes: Determine, using the first spatial cross-attention module, an update point query vector based on the initialization point query vector, the first sampling point vector, and the two-dimensional image features; The update point query vector, at least one of the second sampling point vectors, and the two-dimensional image features are processed using at least one of the second spatial cross-attention modules to obtain a target query vector.
7. The method according to claim 6, wherein: The using the first spatial cross attention module to determine the update point query vector based on the initialization point query vector, the first sampling point vector and the two-dimensional image feature includes: Determine a first point query vector based on the initialization point query vector and the first sampling point vector; Determining the update point query vector according to the first point query vector, the two-dimensional image feature and the first spatial cross-attention module; The using at least one of the second spatial cross attention modules to process the update point query vector, at least one of the second sampling point vectors, and the two-dimensional image features to obtain a target query vector includes: Determine a second point query vector according to the update point query vector and the second sampling point vector; Determining a third point query vector according to the second point query vector, the two-dimensional image feature, and the second spatial cross-attention module; In response to the second sampling point vector being further processed, the third point query vector is used as the update point query vector; a second point query vector is determined according to the update point query vector and the second sampling point vector; a third point query vector is determined according to the second point query vector, the two-dimensional image feature and the second spatial cross attention module; In response to the second sampling point vectors being processed, the third point query vector is determined as the target query vector.
8. A perception prediction device based on three-dimensional space, comprising: An image feature extraction module is used to obtain multiple images corresponding to multiple perspectives of a target scene, and obtain two-dimensional image features based on the multiple images corresponding to the multiple perspectives; A region sampling module, configured to perform a first sampling and at least one second sampling on a three-dimensional space region of a preset size in the target scene based on a preset dimension, to obtain a first sampling point vector and at least one second sampling point vector; wherein the dimension of the first sampling point vector and at least one second sampling point vector is the preset dimension; A grid prediction module is used to determine a perception prediction result in a three-dimensional space area in the target scene based on the two-dimensional image features, the first sampling point vector and at least one of the second sampling point vectors.
9. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the three-dimensional space-based perception prediction method described in any one of claims 1 to 7.
10. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the three-dimensional space-based perception prediction method described in any one of claims 1-7.
