An image BEV perspective conversion method based on negation probability and depth estimation
By introducing negative probability transformation and depth estimation methods in BEV perspective transformation, the feature loss problem caused by inaccurate depth estimation in the prior art is solved, and the accuracy of BEV perspective transformation and the efficiency of environmental perception tasks are improved.
Patent Information
- Application Number
- CN202411213350.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The existing BEV perspective conversion method relies on the accuracy of depth estimation. If the depth estimation is inaccurate, it will lead to features loss, affecting the efficiency of subsequent environmental perception tasks.
The image BEV view angle conversion method based on negative probability and depth estimation is adopted. By obtaining the forward-view image from multiple perspectives, semantic feature maps are extracted, depth estimation and probability mapping are performed, and feature fusion and cone feature mapping are performed in combination with negative probability transformation. Get the BEV perspective feature map.
It improves the accuracy of BEV perspective transformation, reduces feature loss caused by inaccurate depth estimation, and improves the efficiency of environmental perception tasks.
Smart Images

Figure CN119067839B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to an image BEV perspective conversion method based on negation probability and depth estimation. Background Art
[0002] In the study of image-based environmental perception methods, BEV perception aims to project the environmental information around the sensor onto a bird's-eye view, thereby achieving a perceptual understanding of the surrounding environment. For image data, perspective transformation is a key research topic. The BEV perspective transformation of an image requires first extracting features from the original image, and then using calibrated camera parameters to project the features of the pixels into the BEV space to form a BEV feature map, thereby completing subsequent environmental perception tasks. With the development of deep learning technology, the popular BEV perspective conversion method is implemented using deep learning, which can be divided into forward projection method and backward projection method according to the way pixels are projected from a 2D plane to a 3D space.
[0003] The prior art usually constructs a BEV feature space, and then uses the Transformer structure to design a temporal self-attention module and a spatial cross-attention module to learn the position correspondence between the BEV space and the image features from the temporal and spatial levels, thereby realizing the mapping of the original feature map to the BEV feature. However, this method lacks depth information as a reference, and the projection process contains many 2D and 3D mismatches, resulting in inaccurate conversion results. In addition, the prior art also proposes to use a convolutional neural network to estimate the depth of the image and model the uncertainty of the depth. The original semantic features of the image are combined with the depth information and projected into the 3D space, which is converted into a pseudo point cloud and compressed to obtain the BEV feature. In addition, the patent document with patent application number CN202410082104.5 proposes a monocular BEV perception method through self-supervised depth estimation. The patent inputs the image into the backbone network for encoding to obtain two sets of high-order features of the image, and then extracts context information and predicts depth distribution of the two sets of high-order features respectively, and uses the self-supervised depth estimation module to convert the depth distribution features into 3D information, and at the same time combines the depth information with the context feature information to construct the BEV features of the image.
[0004] Patent document CN202210774661.4 proposes presetting a set of scene points parallel to the ground in the training scene, and representing them with polar coordinates under the BEV perspective, confirming the positions of the scene points in the 2D feature map after feature extraction, and then training the neural network model to obtain the polar coordinate information of the entire image under the BEV perspective, so as to convert the 2D image to the BEV perspective.
[0005] However, the above-mentioned BEV perspective conversion method is more dependent on the accuracy of the model's depth estimation. When the depth estimation is inaccurate, it will lead to feature loss, thereby affecting the efficiency of subsequent processing perception tasks. Summary of the invention
[0006] The present invention provides an image BEV perspective conversion method based on negation probability and depth estimation, which can improve the accuracy of image BEV perspective conversion based on negation probability and depth estimation.
[0007] To achieve the above object, the present invention provides an image BEV perspective conversion method based on negation probability and depth estimation, comprising:
[0008] Acquire a front view image under multiple viewing angles, and use an image feature extraction network to extract a semantic feature map of the front view image under each viewing angle, and summarize the semantic feature maps to obtain a semantic feature atlas of the front view image;
[0009] Using a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images, using a preset activation function to perform probability mapping on the channel depth value to obtain an initial probability distribution, and summarizing the initial probability distribution of each of the front view images to obtain an initial probability distribution matrix of the multiple front view images;
[0010] Performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix;
[0011] The negative probability distribution matrix and the initial probability distribution matrix are respectively subjected to feature fusion with the semantic feature atlas of the front view image to obtain a plane feature;
[0012] The plane features are converted into cone features and mapped to three-dimensional space to obtain a BEV viewing angle feature map.
[0013] Optionally, the using a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images includes:
[0014] Obtaining the channel dimension of the convolutional layer and obtaining the coordinates of the pixels in the front view image;
[0015] The associated pixel points in the semantic feature atlas of the front view image are extracted according to the pixel point coordinates, and the channel depth value of each of the front view images is calculated using the channel dimension according to the associated pixel points.
[0016] Optionally, the using a preset activation function to perform probability mapping on the channel depth value to obtain an initial probability distribution includes:
[0017] Mapping the channel depth value into a probability distribution using a preset activation function, and creating a pseudo point cloud expression of each front view image according to the probability distribution;
[0018] The pseudo point cloud expressions are summarized to obtain the initial probability distribution.
[0019] Optionally, performing a negative probability transformation on the initial probability distribution matrix in a channel dimension to obtain a negative probability distribution matrix includes:
[0020] Taking the initial probability distribution of the initial probability distribution matrix as eigenvalues, and performing probability transformation on the eigenvalues in the channel dimension to obtain probability transformation results;
[0021] The probability transformation result is subjected to iterative adjustment of negative probability, and after the iteration is completed, the negative probability distribution matrix is obtained.
[0022] Optionally, the iteratively adjusting the probability of negation of the probability transformation result includes:
[0023] The following formula is used to iteratively adjust the negation probability:
[0024]
[0025] Where T represents the number of negation iterations, (-1) T Used to adjust the negative probability, N is the number of images, D is the channel dimension, H is the image height, and W is the image width. is the result of probability transformation.
[0026] Optionally, the step of fusing the negation probability distribution matrix and the initial probability distribution matrix with the front view image semantic feature atlas to obtain the plane features comprises:
[0027] Extracting semantic feature vectors of pixels in the front view image semantic feature atlas, and using the semantic feature vectors of the pixels and the negation probability distribution matrix to expand the dimension of the front view image semantic feature map in the front view image semantic feature atlas to obtain a negation probability depth distribution feature map;
[0028] Expanding the dimension of the front view image semantic feature map in the front view image semantic feature map set by using the semantic feature vector of the pixel point and the initial probability distribution matrix to obtain an initial probability depth distribution feature map;
[0029] The negative probability depth distribution feature map and the initial probability depth distribution feature map are fused to obtain the plane feature.
[0030] Optionally, converting the plane feature into a cone feature and mapping it to a three-dimensional space to obtain a BEV viewing angle feature map includes:
[0031] Convert the plane feature into a cone feature and determine the position of the plane pixel in the three-dimensional space;
[0032] constructing the cone feature into a frustum-like feature according to the position, and dividing the frustum-like feature into a plurality of voxels;
[0033] According to the plane position and depth value of the voxel, the voxel is converted into a world coordinate system using camera parameters to obtain the BEV viewing angle feature map.
[0034] In order to solve the above problems, the present invention also provides an image BEV perspective conversion device based on negation probability and depth estimation, the device comprising:
[0035] A feature extraction module is used to obtain a front view image under multiple viewing angles, and to extract a semantic feature map of the front view image under each viewing angle by using an image feature extraction network, and to aggregate the semantic feature maps to obtain a semantic feature map set of the front view image;
[0036] A feature fusion module is used to perform depth estimation on the semantic feature atlas of the forward-view image using a convolution layer to obtain a channel depth value of each of the forward-view images, perform probability mapping on the channel depth value using a preset activation function to obtain an initial probability distribution, summarize the initial probability distribution of each of the forward-view images to obtain an initial probability distribution matrix of the multiple forward-view images; perform a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix; and perform feature fusion on the negative probability distribution matrix and the initial probability distribution matrix with the semantic feature atlas of the forward-view image to obtain a plane feature.
[0037] The viewing angle conversion module is used to convert the plane features into cone features and map them to three-dimensional space to obtain a BEV viewing angle feature map.
[0038] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0039] at least one processor; and,
[0040] a memory communicatively connected to the at least one processor; wherein,
[0041] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the above-mentioned image BEV perspective conversion method based on negation probability and depth estimation.
[0042] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned image BEV perspective conversion method based on negation probability and depth estimation.
[0043] The present invention acquires forward-looking images from multiple perspectives and uses an image feature extraction network to extract semantic feature maps of the forward-looking images from each perspective, thereby taking into account information from multiple perspectives and obtaining a more comprehensive semantic feature map. In addition, by using a convolutional layer to perform depth estimation on the forward-looking image semantic feature atlas and obtaining a channel depth value for each of the forward-looking images, the depth information in the forward-looking image from each perspective can be extracted, thereby facilitating the accuracy of subsequent BEV perspective feature map conversion in three-dimensional space. In addition, by introducing a negative probability transformation of the initial probability distribution matrix in the channel dimension, the accuracy of the depth estimation can be adjusted, thereby ensuring the accuracy of the BEV perspective feature map conversion. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic flow chart of a method for converting an image BEV perspective based on negation probability and depth estimation provided by an embodiment of the present invention;
[0045] Figure 2 A flowchart of a specific implementation of a method for converting an image BEV perspective based on negation probability and depth estimation provided by an embodiment of the present invention;
[0046] Figure 3 A flowchart of depth estimation calculation in a method for image BEV perspective conversion based on negation probability and depth estimation provided by an embodiment of the present invention;
[0047] Figure 4 A functional module diagram of an image BEV perspective conversion device based on negation probability and depth estimation provided by one embodiment of the present invention;
[0048] Figure 5 A schematic diagram of the structure of an electronic device for implementing the method for converting an image BEV perspective based on negation probability and depth estimation provided by an embodiment of the present invention.
[0049] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0051] The embodiment of the present application provides an image BEV perspective conversion method based on negation probability and depth estimation. The execution subject of the image BEV perspective conversion method based on negation probability and depth estimation includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the image BEV perspective conversion method based on negation probability and depth estimation can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0052] Reference Figure 1 FIG. 1 is a flow chart of a method for converting an image BEV perspective based on negation probability and depth estimation according to an embodiment of the present invention. In this embodiment, the method for converting an image BEV perspective based on negation probability and depth estimation includes:
[0053] S1. Acquire a front view image from multiple perspectives, and use an image feature extraction network to extract a semantic feature map of the front view image from each perspective, and summarize the semantic feature maps to obtain a semantic feature atlas of the front view image.
[0054] In the embodiment of the present invention, the front view image under multiple viewing angles refers to an image obtained after being photographed using cameras at multiple positions as shooting viewing angles.
[0055] Exemplarily, the following steps can be used to obtain the semantic feature map of the front view image: use the image feature extraction network to extract the feature map of each front view image. Take a group of front view images as an example. Assume that the number of images is N, then the input tensor size is: N×3×H×W. After feature extraction by the image feature extraction network, a feature map is obtained, and its size is N×C×H×W, which is used as the semantic feature map F of the image. C , where N is the number of images, C is the number of feature channels, H is the image height, and W is the image width.
[0056] In the embodiment of the present invention, the image feature extraction network may adopt a network such as VGG or ResNet.
[0057] S2. Use a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images, use a preset activation function to perform probability mapping on the channel depth value to obtain an initial probability distribution, and summarize the initial probability distribution of each of the front view images to obtain an initial probability distribution matrix of the multiple front view images.
[0058] In the embodiment of the present invention, the convolution layer refers to a network structure that performs convolution processing on image features.
[0059] As an embodiment of the present invention, the method of using a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images includes:
[0060] Obtaining the channel dimension of the convolutional layer and obtaining the coordinates of the pixels in the front view image;
[0061] The associated pixel points in the semantic feature atlas of the front view image are extracted according to the pixel point coordinates, and the channel depth value of each of the front view images is calculated using the channel dimension according to the associated pixel points.
[0062] Exemplarily, the depth estimation of the semantic feature atlas of the front-view image is performed using a convolutional layer to obtain a channel depth value of each of the front-view images, using the following steps:
[0063] For the semantic feature map F C Use a convolutional layer to achieve depth estimation, adjust the channel dimension to D, D is the set of depth values, let p be a pixel point on the front view image, with coordinates (h, w). Each pixel point is associated with |D| points {(h, w, d)∈R 3 | d∈D} represents different depth values, and the feature map is softmaxed along the channel dimension to map the channel value into a probability distribution, indicating the possibility of the pixel at each depth value. Therefore, a pseudo point cloud of size D×H×W is created for each front view image, and a tensor F of size N×D×H×W is obtained. D .
[0064] Furthermore, the method of performing probability mapping on the channel depth value by using a preset activation function to obtain an initial probability distribution includes:
[0065] Mapping the channel depth value into a probability distribution using a preset activation function, and creating a pseudo point cloud expression of each front view image according to the probability distribution;
[0066] The pseudo point cloud expressions are summarized to obtain the initial probability distribution.
[0067] S3. Perform a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix.
[0068] In the embodiment of the present invention, the negation probability transformation refers to redistributing the probability based on the original probability distribution from a negation perspective to describe the probability of an event not occurring, which can express more information to a certain extent.
[0069] Exemplarily, the basic steps of the negation probability transformation are as follows:
[0070] Assume that m = {m(A1), m(A2), …, m(A n )} is a set of probability distributions, then the negation probability of m is:
[0071]
[0072] Where n represents the number of focal elements in m, m(A i ) is the original probability, m(A i ) meets the following conditions:
[0073]
[0074] The redistributed negation probability can be regarded as the initial probability distribution, and then it is redistributed and negated, and multiple iterations are performed in this way. Where t represents the number of iterations, and the probability distribution of the t-1th iteration is used as the initial probability distribution in the tth iteration.
[0075]
[0076] As an embodiment of the present invention, performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix includes:
[0077] Taking the initial probability distribution of the initial probability distribution matrix as eigenvalues, and performing probability transformation on the eigenvalues in the channel dimension to obtain probability transformation results;
[0078] The probability transformation result is subjected to iterative adjustment of negative probability, and after the iteration is completed, the negative probability distribution matrix is obtained.
[0079] Exemplarily, performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix is implemented by the following steps:
[0080] F D The eigenvalues of are transformed along the channel dimension D for negation probability. Although the input tensor size is four-dimensional, considering that the probability distribution is only represented in the channel dimension, and the negation probability transformation process is only related to the number of elements in the probability distribution, for FD The negation probability transformation can be transformed according to the following formula:
[0081]
[0082] Since the negation probability describes the probability of occurrence from the opposite side of things, the negation probability cannot be directly applied. It needs to be further adjusted, as shown in the following formula:
[0083]
[0084] Where T represents the number of negation iterations, (-1) T Used to adjust the negative probability, N is the number of images, D is the channel dimension, H is the image height, and W is the image width. is the result of probability transformation.
[0085] In the embodiment of the present invention, the (-1) T It is used to adjust the negation probability, so that the negation probability transformation can maintain the same distribution as the initial probability, avoiding inconsistency with the original probability distribution. The exponent adjusts the negation probability to a positive value, thus avoiding the error when the probability is 0.
[0086] S4. Fusing the negative probability distribution matrix and the initial probability distribution matrix with the front view image semantic feature atlas to obtain plane features.
[0087] As an embodiment of the present invention, the step of fusing the negation probability distribution matrix and the initial probability distribution matrix with the front view image semantic feature atlas to obtain the plane feature includes:
[0088] Extracting semantic feature vectors of pixels in the front view image semantic feature atlas, and using the semantic feature vectors of the pixels and the negation probability distribution matrix to expand the dimension of the front view image semantic feature map in the front view image semantic feature atlas to obtain a negation probability depth distribution feature map;
[0089] Expanding the dimension of the front view image semantic feature map in the front view image semantic feature map set by using the semantic feature vector of the pixel point and the initial probability distribution matrix to obtain an initial probability depth distribution feature map;
[0090] The negative probability depth distribution feature map and the initial probability depth distribution feature map are fused to obtain the plane feature.
[0091] Exemplarily, the steps of fusing the negative probability distribution matrix and the initial probability distribution matrix with the front view image semantic feature atlas to obtain the plane features may be as follows:
[0092] Suppose the semantic feature vector of a pixel point p is c, and the original probability distribution is a d , the adjusted negative probability distribution is a n , and do outer products with the semantic feature vector c to expand the dimension of the semantic feature, as shown in the following feature dimension expansion formula:
[0093]
[0094] Among them, the × operator represents the outer product operator.
[0095] In the embodiment of the present invention, the negative probability depth distribution feature map and the initial probability depth distribution feature map can be calculated by the above-mentioned feature dimension expansion formula.
[0096] In the embodiment of the present invention, the plane feature F is obtained by fusing the negative probability depth distribution feature map and the initial probability depth distribution feature map. C+DN , using the following formula:
[0097] FC +DN =FC D +FC N
[0098] Among them, F CD is the initial probability depth distribution feature map, F CN It is the negative probability depth distribution feature map.
[0099] S5. Convert the plane features into cone features and map them to three-dimensional space to obtain a BEV viewing angle feature map.
[0100] In the embodiment of the present invention, the cone feature is a cone feature constructed based on the pinhole imaging principle, and the cone is formed by extending the points on the image plane to the three-dimensional space through the line of sight.
[0101] As an embodiment of the present invention, the converting the plane feature into a cone feature and mapping it to a three-dimensional space to obtain a BEV viewing angle feature map includes:
[0102] Convert the plane feature into a cone feature and determine the position of the plane pixel in the three-dimensional space;
[0103] constructing the cone feature into a frustum-like feature according to the position, and dividing the frustum-like feature into a plurality of voxels;
[0104] According to the plane position and depth value of the voxel, the voxel is converted into a world coordinate system using camera parameters to obtain the BEV viewing angle feature map.
[0105] In the embodiment of the present invention, the camera parameters refer to the camera parameters for coordinate system conversion, which usually include intrinsic parameters and extrinsic parameters. The intrinsic parameters describe the internal characteristics of the camera, such as focal length, optical center, etc.; the extrinsic parameters describe the position and orientation of the camera in the world coordinate system. The conversion of voxels to the world coordinate system requires the use of the camera's intrinsic and extrinsic parameters and the position information of the voxels on the image.
[0106] Exemplarily, the voxels are converted into a world coordinate system using camera parameters according to the plane position and depth value of the voxels to obtain the BEV viewing angle feature map, and the following steps may be adopted:
[0107] Step 1: In the process of combining image features with the view cone, all dimensions of the image features are expanded into flat strips, and the image features are combined according to the index of the view cone voxel, while filtering out points outside the view cone boundary.
[0108] Step 2: Since the N images of multiple perspectives use the same visual cone in space, the fusion of the multi-perspective images can be directly realized in this process, which can eliminate the influence of the channel dimension N;
[0109] Step 3: In the frustum feature, the voxel index is calculated by subtracting the position of the voxel origin and dividing by the voxel size and flattening it to ((N×H×W×D), 3) size, and the plane feature F C+DN Flatten to ((N×H×W×D), C) size;
[0110] Step 4: Accumulate the pixel features belonging to the same voxel according to the index.
[0111] Step 5. Create a zero tensor of size (C, Z, H, W) to represent the size of the final generated three-dimensional feature map;
[0112] Step 6: Fill the features into the tensor in index order to obtain a three-dimensional feature map of size (C, Z, H, W);
[0113] Step 7: Superimpose along the Z-axis dimension to obtain a 3D feature map (C×H×W×Z), and fold it along the Z-axis to obtain the BEV viewing angle feature map ((C×Z)×H×W).
[0114] The embodiment of the present invention acquires forward-looking images from multiple perspectives, and uses an image feature extraction network to extract semantic feature maps of the forward-looking images from each perspective, so as to take into account information from multiple perspectives and obtain a more comprehensive semantic feature map. In addition, by using a convolutional layer to perform depth estimation on the forward-looking image semantic feature map set, a channel depth value of each of the forward-looking images is obtained, so as to achieve extraction of depth information in the forward-looking image from each perspective, thereby facilitating the accuracy of subsequent conversion of the BEV perspective feature map in three-dimensional space. In addition, by introducing a negative probability transformation of the initial probability distribution matrix in the channel dimension, the accuracy of the depth estimation can be adjusted, thereby ensuring the accuracy of the conversion of the BEV perspective feature map.
[0115] like Figure 2 As shown, it is a flowchart of a specific implementation of an image BEV perspective conversion method based on negation probability and depth estimation provided by an embodiment of the present invention.
[0116] like Figure 3 As shown, a flowchart of depth estimation calculation in an image BEV perspective conversion method based on negation probability and depth estimation is provided in one embodiment of the present invention.
[0117] like Figure 4 , is a functional module diagram of an image BEV perspective conversion device based on negation probability and depth estimation provided by an embodiment of the present invention.
[0118] The image BEV perspective conversion device 100 based on negation probability and depth estimation of the present invention can be installed in an electronic device. According to the implemented functions, the image BEV perspective conversion device 100 based on negation probability and depth estimation can include a feature extraction module 101, a feature fusion module 102 and a perspective conversion module 103.
[0119] The module described in the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by a processor of an electronic device and can complete fixed functions, and is stored in a memory of the electronic device.
[0120] In this embodiment, the functions of each module / unit are as follows:
[0121] The feature extraction module 101 is used to obtain a front view image under multiple viewing angles, and use an image feature extraction network to extract a semantic feature map of the front view image under each viewing angle, and summarize the semantic feature maps to obtain a front view image semantic feature atlas.
[0122] In the embodiment of the present invention, the front view image under multiple viewing angles refers to an image obtained after being photographed using cameras at multiple positions as shooting viewing angles.
[0123] Exemplarily, the following steps can be used to obtain the semantic feature map of the front view image: use the image feature extraction network to extract the feature map of each front view image. Take a group of front view images as an example. Assume that the number of images is N, then the input tensor size is: N×3×H×W. After feature extraction by the image feature extraction network, a feature map is obtained, and its size is N×C×H×W, which is used as the semantic feature map F of the image. C , where N is the number of images, C is the number of feature channels, H is the image height, and W is the image width.
[0124] In the embodiment of the present invention, the image feature extraction network may adopt a network such as VGG or ResNet.
[0125] The duplicate defect report detection module 102 is used to use a convolution layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images, use a preset activation function to probability map the channel depth value to obtain an initial probability distribution, summarize the initial probability distribution of each of the front view images to obtain an initial probability distribution matrix of the multiple front view images; perform a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix; and perform feature fusion on the negative probability distribution matrix and the initial probability distribution matrix with the semantic feature atlas of the front view image to obtain a plane feature.
[0126] In the embodiment of the present invention, the convolution layer refers to a network structure that performs convolution processing on image features.
[0127] As an embodiment of the present invention, the method of using a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images includes:
[0128] Obtaining the channel dimension of the convolutional layer and obtaining the coordinates of the pixels in the front view image;
[0129] The associated pixel points in the semantic feature atlas of the front view image are extracted according to the pixel point coordinates, and the channel depth value of each of the front view images is calculated using the channel dimension according to the associated pixel points.
[0130] Exemplarily, the depth estimation of the semantic feature atlas of the front-view image is performed using a convolutional layer to obtain a channel depth value of each of the front-view images, using the following steps:
[0131] For the semantic feature map F C Use a convolutional layer to achieve depth estimation, adjust the channel dimension to D, D is the set of depth values, let p be a pixel point on the front view image, with coordinates (h, w). Each pixel point is associated with |D| points {(h, w, d)∈R 3| d∈D} represents different depth values, and the feature map is softmaxed along the channel dimension to map the channel value into a probability distribution, indicating the possibility of the pixel at each depth value. Therefore, a pseudo point cloud of size D×H×W is created for each front view image, and a tensor F of size N×D×H×W is obtained. D .
[0132] Furthermore, the method of performing probability mapping on the channel depth value by using a preset activation function to obtain an initial probability distribution includes:
[0133] Mapping the channel depth value into a probability distribution using a preset activation function, and creating a pseudo point cloud expression of each front view image according to the probability distribution;
[0134] The pseudo point cloud expressions are summarized to obtain the initial probability distribution.
[0135] In the embodiment of the present invention, the negation probability transformation refers to redistributing the probability based on the original probability distribution from a negation perspective to describe the probability of an event not occurring, which can express more information to a certain extent.
[0136] Exemplarily, the basic steps of the negation probability transformation are as follows:
[0137] Assume that m = {m(A1), m(A2), ..., m(A n )} is a set of probability distributions, then the negation probability of m is:
[0138]
[0139] Where n represents the number of focal elements in m, m(A i ) is the original probability, m(A i ) meets the following conditions:
[0140]
[0141] The redistributed negation probability can be regarded as the initial probability distribution, and then it is redistributed and negated, and multiple iterations are performed in this way. Where t represents the number of iterations, and the probability distribution of the t-1th iteration is used as the initial probability distribution in the tth iteration.
[0142]
[0143] As an embodiment of the present invention, performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix includes:
[0144] Taking the initial probability distribution of the initial probability distribution matrix as eigenvalues, and performing probability transformation on the eigenvalues in the channel dimension to obtain probability transformation results;
[0145] The probability transformation result is subjected to iterative adjustment of negative probability, and after the iteration is completed, the negative probability distribution matrix is obtained.
[0146] Exemplarily, performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix is implemented by the following steps:
[0147] F D The eigenvalues of are transformed along the channel dimension D for negation probability. Although the input tensor size is four-dimensional, considering that the probability distribution is only represented in the channel dimension, and the negation probability transformation process is only related to the number of elements in the probability distribution, for F D The negation probability transformation can be transformed according to the following formula:
[0148]
[0149] Since the negation probability describes the probability of occurrence from the opposite side of things, the negation probability cannot be directly applied. It needs to be further adjusted, as shown in the following formula:
[0150]
[0151] Where T represents the number of negation iterations, (-1) T Used to adjust the negative probability, N is the number of images, D is the channel dimension, H is the image height, and W is the image width. is the result of probability transformation.
[0152] In the embodiment of the present invention, the (-1) T It is used to adjust the negation probability, so that the negation probability transformation can maintain the same distribution as the initial probability, avoiding inconsistency with the original probability distribution. The exponent adjusts the negation probability to a positive value, thus avoiding the error when the probability is 0.
[0153] As an embodiment of the present invention, the step of fusing the negation probability distribution matrix and the initial probability distribution matrix with the front view image semantic feature atlas to obtain the plane feature includes:
[0154] Extracting semantic feature vectors of pixels in the front view image semantic feature atlas, and using the semantic feature vectors of the pixels and the negation probability distribution matrix to expand the dimension of the front view image semantic feature map in the front view image semantic feature atlas to obtain a negation probability depth distribution feature map;
[0155] Expanding the dimension of the front view image semantic feature map in the front view image semantic feature map set by using the semantic feature vector of the pixel point and the initial probability distribution matrix to obtain an initial probability depth distribution feature map;
[0156] The negative probability depth distribution feature map and the initial probability depth distribution feature map are fused to obtain the plane feature.
[0157] Exemplarily, the steps of fusing the negative probability distribution matrix and the initial probability distribution matrix with the front view image semantic feature atlas to obtain the plane features may be as follows:
[0158] Suppose the semantic feature vector of a pixel point p is c, and the original probability distribution is a d , the adjusted negative probability distribution is a n , and do outer products with the semantic feature vector c to expand the dimension of the semantic feature, as shown in the following feature dimension expansion formula:
[0159]
[0160] Among them, the × operator represents the outer product operator.
[0161] In the embodiment of the present invention, the negative probability depth distribution feature map and the initial probability depth distribution feature map can be calculated by the above-mentioned feature dimension expansion formula.
[0162] In the embodiment of the present invention, the plane feature F is obtained by fusing the negative probability depth distribution feature map and the initial probability depth distribution feature map. C+DN , using the following formula:
[0163] F C+DN =F CD +F CN
[0164] Among them, F CD is the initial probability depth distribution feature map, F CN It is the negative probability depth distribution feature map.
[0165] The defect report classification module 103 is used to convert the plane features into cone features and map them to three-dimensional space to obtain a BEV viewing angle feature map.
[0166] In the embodiment of the present invention, the cone feature is a cone feature constructed based on the pinhole imaging principle, and the cone is formed by extending the points on the image plane to the three-dimensional space through the line of sight.
[0167] As an embodiment of the present invention, the converting the plane feature into a cone feature and mapping it to a three-dimensional space to obtain a BEV viewing angle feature map includes:
[0168] Convert the plane feature into a cone feature and determine the position of the plane pixel in the three-dimensional space;
[0169] constructing the cone feature into a frustum-like feature according to the position, and dividing the frustum-like feature into a plurality of voxels;
[0170] According to the plane position and depth value of the voxel, the voxel is converted into a world coordinate system using camera parameters to obtain the BEV viewing angle feature map.
[0171] In the embodiment of the present invention, the camera parameters refer to the camera parameters for coordinate system conversion, which usually include intrinsic parameters and extrinsic parameters. The intrinsic parameters describe the internal characteristics of the camera, such as focal length, optical center, etc.; the extrinsic parameters describe the position and orientation of the camera in the world coordinate system. The conversion of voxels to the world coordinate system requires the use of the camera's intrinsic and extrinsic parameters and the position information of the voxels on the image.
[0172] Exemplarily, the voxels are converted into a world coordinate system using camera parameters according to the plane position and depth value of the voxels to obtain the BEV viewing angle feature map, and the following steps may be adopted:
[0173] Step 1: In the process of combining image features with the view cone, all dimensions of the image features are expanded into flat strips, and the image features are combined according to the index of the view cone voxel, while filtering out points outside the view cone boundary.
[0174] Step 2: Since the N images of multiple perspectives use the same visual cone in space, the fusion of the multi-perspective images can be directly realized in this process, which can eliminate the influence of the channel dimension N;
[0175] Step 3: In the frustum feature, the voxel index is calculated by subtracting the position of the voxel origin and dividing by the voxel size and flattening it to ((N×H×W×D), 3) size, and the plane feature F C+DN Flatten to ((N×H×W×D), C) size;
[0176] Step 4: Accumulate the pixel features belonging to the same voxel according to the index.
[0177] Step 5. Create a zero tensor of size (C, Z, H, W) to represent the size of the final generated three-dimensional feature map;
[0178] Step 6: Fill the features into the tensor in index order to obtain a three-dimensional feature map of size (C, Z, H, W);
[0179] Step 7: Superimpose along the Z-axis dimension to obtain a 3D feature map (C×H×W×Z), and fold it along the Z-axis to obtain the BEV viewing angle feature map ((C×Z)×H×W).
[0180] like Figure 4 , is a schematic diagram of the structure of an electronic device for implementing an image BEV perspective conversion method based on negation probability and depth estimation provided by an embodiment of the present invention.
[0181] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an image BEV perspective conversion method program based on negative probability and depth estimation.
[0182] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a method program for image BEV perspective conversion based on negation probability and depth estimation, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.
[0183] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as a code of an image BEV perspective conversion method program based on negation probability and depth estimation, but also can be used to temporarily store data that has been output or is to be output.
[0184] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0185] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0186] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0187] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0188] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0189] The memory 11 in the electronic device stores a method program for image BEV perspective conversion based on negation probability and depth estimation, which is a combination of multiple instructions. When running in the processor 10, the following can be achieved:
[0190] Acquire a front view image under multiple viewing angles, and use an image feature extraction network to extract a semantic feature map of the front view image under each viewing angle, and summarize the semantic feature maps to obtain a semantic feature atlas of the front view image;
[0191] Using a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images, using a preset activation function to perform probability mapping on the channel depth value to obtain an initial probability distribution, and summarizing the initial probability distribution of each of the front view images to obtain an initial probability distribution matrix of the multiple front view images;
[0192] Performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix;
[0193] The negative probability distribution matrix and the initial probability distribution matrix are respectively subjected to feature fusion with the semantic feature atlas of the front view image to obtain a plane feature;
[0194] The plane features are converted into cone features and mapped to three-dimensional space to obtain a BEV viewing angle feature map.
[0195] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0196] Furthermore, if the module / unit integrated in the electronic device 1 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. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0197] The present invention further 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 of an electronic device, the computer program can implement:
[0198] Acquire a front view image under multiple viewing angles, and use an image feature extraction network to extract a semantic feature map of the front view image under each viewing angle, and summarize the semantic feature maps to obtain a semantic feature atlas of the front view image;
[0199] Using a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images, using a preset activation function to perform probability mapping on the channel depth value to obtain an initial probability distribution, and summarizing the initial probability distribution of each of the front view images to obtain an initial probability distribution matrix of the multiple front view images;
[0200] Performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix;
[0201] The negative probability distribution matrix and the initial probability distribution matrix are respectively subjected to feature fusion with the semantic feature atlas of the front view image to obtain a plane feature;
[0202] The plane features are converted into cone features and mapped to three-dimensional space to obtain a BEV viewing angle feature map.
[0203] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0204] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0205] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0206] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0207] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0208] The blockchain referred to in the present invention is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.
[0209] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0210] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0211] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for image BEV perspective conversion based on negation probability and depth estimation, characterized in that: The method comprises: Acquire a front view image under multiple viewing angles, and use an image feature extraction network to extract a semantic feature map of the front view image under each viewing angle, and summarize the semantic feature maps to obtain a semantic feature atlas of the front view image; Using a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each of the front view images, using a preset activation function to perform probability mapping on the channel depth value to obtain an initial probability distribution, and summarizing the initial probability distribution of each of the front view images to obtain an initial probability distribution matrix of multiple front view images; Performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix; The negative probability distribution matrix and the initial probability distribution matrix are respectively subjected to feature fusion with the semantic feature atlas of the front view image to obtain a plane feature; The plane features are converted into cone features and mapped to three-dimensional space to obtain a BEV viewing angle feature map.
2. The method for converting image BEV perspective based on negation probability and depth estimation according to claim 1, characterized in that: The method of using a convolutional layer to perform depth estimation on the semantic feature atlas of the front view image to obtain a channel depth value of each front view image includes: Obtaining the channel dimension of the convolutional layer and obtaining the coordinates of the pixels in the front view image; The associated pixel points in the semantic feature atlas of the front view image are extracted according to the pixel point coordinates, and the channel depth value of each of the front view images is calculated using the channel dimension according to the associated pixel points.
3. The method for image BEV perspective conversion based on negation probability and depth estimation according to claim 1, characterized in that: The method of performing probability mapping on the channel depth value by using a preset activation function to obtain an initial probability distribution includes: Mapping the channel depth value into a probability distribution using a preset activation function, and creating a pseudo point cloud expression of each front view image according to the probability distribution; The pseudo point cloud expressions are summarized to obtain the initial probability distribution.
4. The method for image BEV perspective conversion based on negation probability and depth estimation according to any one of claims 1 to 3, characterized in that: The performing a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix includes: Taking the initial probability distribution of the initial probability distribution matrix as eigenvalues, and performing probability transformation on the eigenvalues in the channel dimension to obtain probability transformation results; The probability transformation result is subjected to iterative adjustment of negative probability, and after the iteration is completed, the negative probability distribution matrix is obtained.
5. The method for converting image BEV perspective based on negation probability and depth estimation according to claim 4, characterized in that: The iterative adjustment of the probability transformation result to a negative probability comprises: The following formula is used to iteratively adjust the negation probability: Where T represents the number of negation iterations, (-1) T Used to adjust the negative probability, N is the number of images, D is the channel dimension, H is the image height, and W is the image width. is the result of probability transformation.
6. The method for image BEV perspective conversion based on negation probability and depth estimation as claimed in claim 1, 2, 3 or 5, characterized in that: The step of fusing the negation probability distribution matrix and the initial probability distribution matrix with the front view image semantic feature atlas to obtain plane features includes: Extracting semantic feature vectors of pixels in the front view image semantic feature atlas, and using the semantic feature vectors of the pixels and the negation probability distribution matrix to expand the dimension of the front view image semantic feature map in the front view image semantic feature atlas to obtain a negation probability depth distribution feature map; Expanding the dimension of the front view image semantic feature map in the front view image semantic feature map set by using the semantic feature vector of the pixel point and the initial probability distribution matrix to obtain an initial probability depth distribution feature map; The negative probability depth distribution feature map and the initial probability depth distribution feature map are fused to obtain the plane feature.
7. The method for image BEV perspective conversion based on negation probability and depth estimation as claimed in claim 1, 2, 3 or 5, characterized in that: The process of converting the plane feature into a cone feature and mapping it into a three-dimensional space to obtain a BEV viewing angle feature map includes: Convert the plane feature into a cone feature and determine the position of the plane pixel in the three-dimensional space; constructing the cone feature into a frustum-like feature according to the position, and dividing the frustum-like feature into a plurality of voxels; According to the plane position and depth value of the voxel, the voxel is converted into a world coordinate system using camera parameters to obtain the BEV viewing angle feature map.
8. An image BEV perspective conversion device based on negation probability and depth estimation, characterized in that: The device can implement the image BEV perspective conversion method based on negation probability and depth estimation as described in any one of claims 1 to 7, and the device includes: A feature extraction module is used to obtain a front view image under multiple viewing angles, and to extract a semantic feature map of the front view image under each viewing angle by using an image feature extraction network, and to aggregate the semantic feature maps to obtain a semantic feature map set of the front view image; A feature fusion module is used to perform depth estimation on the semantic feature atlas of the forward-view image using a convolution layer to obtain a channel depth value of each of the forward-view images, perform probability mapping on the channel depth value using a preset activation function to obtain an initial probability distribution, summarize the initial probability distribution of each of the forward-view images to obtain an initial probability distribution matrix of the multiple forward-view images; perform a negative probability transformation on the initial probability distribution matrix in the channel dimension to obtain a negative probability distribution matrix; and perform feature fusion on the negative probability distribution matrix and the initial probability distribution matrix with the semantic feature atlas of the forward-view image to obtain a plane feature. The viewing angle conversion module is used to convert the plane features into cone features and map them to three-dimensional space to obtain a BEV viewing angle feature map.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the image BEV perspective conversion method based on negative probability and depth estimation as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image BEV perspective conversion method based on negation probability and depth estimation is implemented as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method and device, storage medium and computer program product
CN115273002A
Monocular BEV perception method through self-supervised depth estimation
CN117911484A
Image category determination method and device and storage medium
CN107145904A
BEV space target detection method and device for multi-view perspective image
CN116895059A