Three-dimensional target detection method, device and system based on binocular vision

Through a method based on binocular vision, disparity maps and image features are used to construct three-dimensional grid coordinates for three-dimensional target detection, which solves the problems of complex detection processes and high costs in the existing technology, and achieves efficient three-dimensional target detection.

CN112287824BActive Publication Date: 2024-08-27BEIJING ZHONGKE HUASHU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011176663.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-28
Publication Date
2024-08-27
Estimated Expiration
2040-10-28

AI Technical Summary

Technical Problem

The detection process of existing three-dimensional target detection solutions is complex, computationally intensive, time-consuming, and relies on lidar point cloud data, resulting in high detection costs.

Method used

Using a method based on binocular vision, by obtaining the disparity map and image features of the binocular image, the camera coordinate system coordinates of each pixel in the disparity map are determined and fixed-point operations are performed to obtain the three-dimensional grid coordinates, and then the bird's-eye view data is constructed for three-dimensional Target detection cleverly integrates image features and three-dimensional topology to achieve efficient detection.

Benefits of technology

It simplifies the detection process, reduces the amount of calculation and time-consuming, reduces the detection cost, and improves the performance of three-dimensional target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112287824B
    Figure CN112287824B
Patent Text Reader

Abstract

The present application provides a method, device and system for three-dimensional target detection based on binocular vision, the method comprising: obtaining a disparity map of a binocular image, and obtaining image features of the binocular image; determining the camera coordinate system coordinates of each pixel in the disparity map, and performing a fixed-point operation on the camera coordinate system coordinates of each pixel to obtain the three-dimensional grid coordinates of each pixel; determining bird's-eye view data based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image; and performing three-dimensional target detection on the bird's-eye view data. The method can efficiently realize three-dimensional target detection based on binocular vision and improve the performance of three-dimensional target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent perception technology, and in particular to a three-dimensional target detection method, device and system based on binocular vision. Background Art

[0002] Traditional 3D object detection schemes extract 3D point clouds and generate a bird's-eye view (BEV) as input using a specified encoding method. A network structure containing an encoder and decoder is then used to generate an RGB (Red, Green, Blue) image and a full-resolution feature map of the BEV. Anchor boxes are then generated by predicting anchor points and their offsets. These anchor boxes are then projected back onto the corresponding regions of interest (ROIs) in the RGB image and the BEV feature map. The ROI features are then extracted and interpolated to a 3x3 size. Finally, a 1x1 convolution is used to reduce the feature dimensionality and generate the 3D detection results.

[0003] However, practice has found that the above solution has at least the following problems:

[0004] 1. Complex detection process: In the above solution, there may be 80,000-100,000 anchor points per frame. For each anchor point, it is necessary to first find the corresponding region of interest through projection transformation, and then perform interpolation and convolution operations to obtain the detection result. This requires a lot of calculation and is time-consuming.

[0005] 2. High detection cost: The above solution requires the use of lidar point cloud data as input, which makes the detection cost too high. Summary of the Invention

[0006] In view of this, the present application provides a three-dimensional target detection method and device based on binocular vision.

[0007] Specifically, this application is implemented through the following technical solutions:

[0008] According to a first aspect of an embodiment of the present application, a three-dimensional target detection method based on binocular vision is provided, comprising:

[0009] Obtaining a disparity map of a binocular image, and obtaining image features of the binocular image;

[0010] Determining the camera coordinate system coordinates of each pixel in the disparity map, and performing a fixed-point operation on the camera coordinate system coordinates of each pixel to obtain the three-dimensional grid coordinates of each pixel;

[0011] Determining bird's-eye view data based on the three-dimensional grid coordinates of each pixel and image features of the binocular image;

[0012] Perform three-dimensional target detection on the bird's-eye view data.

[0013] According to a second aspect of an embodiment of the present application, a three-dimensional object detection device based on binocular vision is provided, comprising:

[0014] an acquisition unit, configured to acquire a disparity map of a binocular image and image features of the binocular image;

[0015] a fixed-point unit, configured to determine the camera coordinate system coordinates of each pixel in the disparity map, and perform a fixed-point operation on the camera coordinate system coordinates of each pixel to obtain a three-dimensional grid coordinate of each pixel;

[0016] a determining unit, configured to determine bird's-eye view data based on the three-dimensional grid coordinates of each pixel and image features of the binocular image;

[0017] A detection unit is used to perform three-dimensional target detection on the bird's-eye view data.

[0018] According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0019] Memory for storing computer programs;

[0020] The processor is used to implement the above-mentioned three-dimensional target detection method based on binocular vision when executing the program stored in the memory.

[0021] According to a fourth aspect of an embodiment of the present application, a machine-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the three-dimensional target detection method based on binocular vision is implemented.

[0022] According to a fifth aspect of an embodiment of the present application, there is provided a three-dimensional object detection system based on binocular vision, comprising: a binocular camera, a processor, and a machine-readable storage medium;

[0023] The binocular camera is used to obtain binocular images;

[0024] The machine-readable storage medium is configured to store machine-executable instructions that can be executed by the processor;

[0025] The processor is used to execute machine-executable instructions to implement the above-mentioned three-dimensional target detection method based on binocular vision.

[0026] The three-dimensional target detection method based on binocular vision in the embodiment of the present application obtains a disparity map of the binocular image and image features of the binocular image, determines the camera coordinate system coordinates of each pixel in the disparity map, and performs a fixed-point operation on the camera coordinate system coordinates of each pixel to obtain the three-dimensional grid coordinates of each pixel; further, based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image, determines bird's-eye view data, and performs three-dimensional target detection on the bird's-eye view data. By cleverly integrating image features with three-dimensional topology, three-dimensional target detection based on binocular vision is efficiently achieved, thereby improving the performance of three-dimensional target detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a flowchart of a three-dimensional target detection method based on binocular vision, shown in an exemplary embodiment of the present application;

[0028] Figure 2 This is a schematic diagram of a process for obtaining three-dimensional grid coordinates of each pixel, shown in an exemplary embodiment of the present application;

[0029] Figure 3 This is a schematic diagram of a process for determining bird's-eye view data according to an exemplary embodiment of the present application;

[0030] Figure 4 This is a schematic diagram of a three-dimensional target detection solution implementation process shown in an exemplary embodiment of the present application;

[0031] Figure 5A and Figure 5B is a schematic diagram of a feature extraction network structure shown in an exemplary embodiment of the present application;

[0032] Figure 6 This is a schematic diagram of a network structure for three-dimensional target detection shown in an exemplary embodiment of the present application;

[0033] Figure 7 1 is a schematic diagram of a training process of a three-dimensional object detection network shown in an exemplary embodiment of the present application;

[0034] Figure 8 1 is a schematic structural diagram of a three-dimensional target detection device based on binocular vision, shown in an exemplary embodiment of the present application;

[0035] Figure 9 is a structural schematic diagram of another three-dimensional target detection device based on binocular vision, shown in yet another exemplary embodiment of the present application;

[0036] Figure 10 It is a structural diagram of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0037] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0038] The terms used in this application are for the purpose of describing particular embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0039] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application are further described in detail below with reference to the accompanying drawings.

[0040] See Figure 1 , is a flow chart of a three-dimensional target detection method based on binocular vision provided in an embodiment of the present application, such as Figure 1 As shown, the three-dimensional target detection method based on binocular vision may include the following steps:

[0041] Step S100: Obtain a disparity map of the binocular image, and obtain image features of the binocular image.

[0042] In an embodiment of the present application, for the binocular image (usually an RGB image) acquired by the binocular camera, on the one hand, a disparity image of the binocular image can be obtained so as to perform three-dimensional space mapping in the subsequent process; on the other hand, feature extraction can be performed on the binocular image to obtain image features of the binocular image.

[0043] For example, for a binocular image, a disparity estimation method, such as a pre-trained neural network, may be used to obtain a corresponding disparity map.

[0044] For example, the features of the binocular image can be extracted through a neural network.

[0045] It should be noted that when performing image feature extraction, either a monocular image or a binocular image can be input.

[0046] The acquired image features have the same resolution as the input image (ie, the length and width are the same).

[0047] Step S110 : determining the camera coordinate system coordinates of each pixel in the disparity map, and performing a fixed-point operation on the camera coordinate system coordinates of each pixel to obtain the three-dimensional grid coordinates of each pixel.

[0048] In an embodiment of the present application, in order to achieve three-dimensional space mapping, when the disparity map of the binocular image is obtained, the camera coordinate system coordinates of each pixel in the disparity map can be determined, and the camera coordinate system coordinates of each pixel can be fixed to obtain the three-dimensional grid coordinates of each pixel.

[0049] Step S120 : Determine the bird's-eye view data based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image.

[0050] Step S130: Perform three-dimensional target detection on the bird's-eye view data.

[0051] In an embodiment of the present application, when the three-dimensional grid coordinates of each pixel are obtained in the manner of step S110, bird's-eye view data can be constructed based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image, and then, three-dimensional target detection can be performed on the constructed bird's-eye view data.

[0052] It can be seen that in Figure 1 In the method flow shown, on the one hand, the disparity map of the binocular image is obtained, and the disparity map is mapped to the three-dimensional space to obtain the three-dimensional grid coordinates of each pixel; on the other hand, the image features of the binocular image are obtained, and then, based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image, the bird's-eye view is determined, and three-dimensional target detection is performed on the bird's-eye view. By cleverly integrating image features with three-dimensional topology, three-dimensional target detection based on binocular vision is efficiently achieved, thereby improving the performance of three-dimensional target detection.

[0053] In some embodiments, as Figure 2 As shown, in step S110, the camera coordinate system coordinates of each pixel in the disparity map are determined, and the camera coordinate system coordinates of each pixel are fixed to obtain the three-dimensional grid coordinates of each pixel. This can be achieved by the following steps:

[0054] Step S111: determining the camera coordinate system coordinates of each pixel based on the pixel coordinates of each pixel in the disparity map, the disparity value of each pixel, and the camera intrinsic parameters;

[0055] Step S112: performing three-dimensional spatial constraints on the camera coordinate system coordinates of each pixel based on the preset three-dimensional spatial constraint interval to obtain the camera coordinate system coordinates of the pixels within the preset three-dimensional spatial constraint interval;

[0056] Step S113: Based on the preset segmentation interval, the camera coordinate system coordinates of the pixels within the preset spatial constraint interval are converted into three-dimensional grid coordinates.

[0057] For example, when obtaining the disparity map of the binocular image, each pixel position in the disparity map can be traversed. For any pixel, the camera coordinate system coordinates of the pixel can be determined based on the pixel coordinates of the pixel (that is, the position of the pixel in the disparity map, such as row i and column j), the disparity value of the pixel, and the camera intrinsic parameters.

[0058] Considering that when performing three-dimensional target detection, the detection is usually performed on a specified spatial range in the coordinate system with the camera as the coordinate origin, and no detection is performed outside the spatial range, therefore, when performing three-dimensional space mapping, it is necessary to limit the range of x, y, and z (that is, the three-dimensional space constraint interval).

[0059] Accordingly, when the camera coordinate system coordinates of each pixel are determined, the camera coordinate system coordinates of each pixel can be subjected to three-dimensional spatial constraints based on the preset three-dimensional spatial constraint interval to obtain the camera coordinate system coordinates of the pixels within the preset three-dimensional spatial constraint interval. Furthermore, the camera coordinate system coordinates of the pixels within the preset spatial constraint interval can be converted into three-dimensional grid coordinates based on the preset segmentation interval, that is, each pixel point is fixed. The specific implementation can be described in detail below, and the embodiments of the present application will not be repeated here.

[0060] In some embodiments, as Figure 3 As shown, in step S120, based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image, the bird's-eye view data is determined, which can be achieved by the following steps:

[0061] Step S121: For a three-dimensional grid corresponding to an image feature of any channel, based on the three-dimensional grid coordinates of each pixel, set the voxel value of the three-dimensional grid coordinate position of each pixel as the feature value of each pixel in the image feature of the channel;

[0062] Step S122: Determine the bird's-eye view data based on the three-dimensional grid corresponding to the image features of each channel.

[0063] For example, when constructing bird's-eye view data, the voxel value of the three-dimensional grid coordinate position can be determined based on each feature layer (the number of feature layers is consistent with the number of channels of the image).

[0064] For the image features of any channel (ie, a feature layer), for each pixel in the feature layer, the voxel value of the corresponding three-dimensional grid coordinate position is the feature value of the pixel in the feature layer.

[0065] Taking into account the situation that multiple pixel positions may be mapped to the same three-dimensional grid coordinate on a layer of feature map, for the three-dimensional grid coordinates with multiple pixel position mappings, it is necessary to determine the voxel value of the three-dimensional grid coordinate based on the feature values ​​of the multiple pixel positions of the mapping.

[0066] In one example, based on the three-dimensional grid coordinates of each pixel, setting the voxel value of the three-dimensional grid coordinate position of each pixel as the feature value of each pixel in the image feature of the channel may include:

[0067] When there are multiple pixels corresponding to the same three-dimensional grid coordinates, determining the voxel value of the three-dimensional grid coordinate based on a first preset strategy;

[0068] The first preset strategy includes but is not limited to one of the following strategies:

[0069] Determine the sum of the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates as the voxel value of the three-dimensional grid coordinate;

[0070] Determine the maximum value among the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates as the voxel value of the three-dimensional grid coordinate;

[0071] Determine the non-zero minimum value among the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates as the voxel value of the three-dimensional grid coordinate;

[0072] The average value of the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates is determined as the voxel value of the three-dimensional grid coordinates.

[0073] Exemplarily, according to the above method, for the image feature of one channel (ie, one feature layer), a corresponding three-dimensional grid can be obtained, that is, a total of c (c is the number of channels) three-dimensional grids can be obtained.

[0074] For the three-dimensional grid corresponding to any feature layer, the three-dimensional grid can be stacked according to the height dimension (Y component), and the bird's-eye view data (height dimension is c) can be determined based on the stacked three-dimensional grid corresponding to the image features of each channel.

[0075] In one example, stacking the corresponding three-dimensional grids of any channel image feature along the height dimension may include:

[0076] For a plurality of voxels having the same coordinates in the length dimension and the width dimension in the three-dimensional grid coordinates, determining a voxel value after stacking the plurality of voxels based on a second preset strategy;

[0077] The second preset strategy includes but is not limited to one of the following strategies:

[0078] Determine the sum of the voxel values ​​of the plurality of voxels as the voxel value after the plurality of voxels are stacked;

[0079] Determine the maximum value among the voxel values ​​of the plurality of voxels as the voxel value after the plurality of voxels are stacked;

[0080] Determine a non-zero minimum value among the voxel values ​​of the plurality of voxels as the voxel value after the plurality of voxels are stacked;

[0081] An average value of the voxel values ​​of the plurality of voxels is determined as the voxel value after the plurality of voxels are stacked.

[0082] Exemplarily, for a three-dimensional grid corresponding to any feature layer, voxels having the same length dimension and width dimension coordinates may be determined based on the length dimension and width dimension in the three-dimensional grid coordinates.

[0083] For multiple voxels with the same coordinates in the length dimension and the width dimension, they can be stacked according to a preset strategy (referred to as the second preset strategy in this article) to obtain stacked voxel values.

[0084] For example, when the bird's-eye view data is obtained, a pre-trained three-dimensional object detection network can be used to perform three-dimensional object detection on the bird's-eye view data.

[0085] In one example, the BACKBONE (backbone network) and HEAD (head network) in the three-dimensional target detection network used to perform three-dimensional target detection on the bird's-eye view data can adopt a two-dimensional target detection network structure, and the output of the HEAD includes the height of the three-dimensional bounding box of the target to be detected (which can be called h), the height coordinate of the three-dimensional bounding box in the three-dimensional coordinate system (which can be called y), and the yaw angle of the three-dimensional bounding box (which can be called θ).

[0086] For example, since the dimension of the bird's-eye view data obtained in the above manner is the same as the dimension of the binocular image data, the three-dimensional target detection task can be simplified to a two-dimensional target detection task. When constructing a three-dimensional target detection network for performing three-dimensional detection on the above-mentioned bird's-eye view data, BACKBONE and HEAD can adopt a two-dimensional target detection network structure.

[0087] However, since three-dimensional target detection is required in the embodiment of the present application, compared with two-dimensional target detection, the HEAD part needs to additionally predict the height information of the target (which can be represented by the three-dimensional bounding box height h and the height coordinate y of the three-dimensional bounding box in the three-dimensional coordinate system) and the yaw angle θ of the three-dimensional target bounding box. That is, in addition to outputting two-dimensional detection information, the HEAD part also needs to output the three-dimensional bounding box height h of the target to be detected, the height coordinate y of the three-dimensional bounding box in the three-dimensional coordinate system, and the three-dimensional bounding box.

[0088] In some embodiments, the image features of the binocular image are realized by a feature extraction module in a pre-trained 3D object detection network;

[0089] Training of a 3D object detection network can include:

[0090] Perform 3D object detection and specified semantic / instance segmentation tasks based on the image features extracted by the feature extraction module;

[0091] The loss of the 3D object detection task and the loss of the specified semantic / instance segmentation task are used as feedback to tune the parameters of the feature extraction module. The specific implementation is explained below with specific examples.

[0092] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below with reference to specific examples.

[0093] See Figure 4 In this embodiment, the three-dimensional target detection solution implementation process can be as follows Figure 4 As shown, the implementation process may include:

[0094] 1. Input a binocular RGB image (i.e., the binocular image mentioned above) and obtain the disparity map corresponding to the image through a disparity estimation method (such as a pre-trained neural network);

[0095] It should be noted that the disparity estimation method is not limited to the pre-trained neural network, and may also include other methods, which is not limited in the embodiments of the present application.

[0096] 2. Use a neural network to extract features from binocular images (the input for feature extraction can be either a monocular image or a binocular image).

[0097] For example, the length and width of the RGB features output by the neural network should be the same as the length and width of the input image, that is, the same resolution.

[0098] It should be noted that there is no restriction on the structure of the neural network and the number of channels of the RGB features, and they can be adjusted according to the specific task.

[0099] For example, the feature extraction network structure diagram can be as follows Figure 5A or Figure 5B As shown. Among them:

[0100] Figure 5A and Figure 5B It is the most basic network structure of feature extraction network. Figure 5A The resolution of the feature map of the intermediate layer of the feature extraction network shown is unchanged. Figure 5B The resolution of the intermediate layers of the feature extraction network shown changes and is restored to the feature map size with the same resolution as the input image at the final output.

[0101] It should be noted that Figure 5A and Figure 5BThe data blocks in the middle are for demonstration purposes only, and their thickness does not represent the number of feature map channels. Furthermore, various complex network structures can be introduced into the above basic network structure, such as residual connection structures, multi-level feature map cascade structures, and Inception structures.

[0102] 3. Traverse each pixel position (row, column) in the disparity map obtained in step 1, and calculate the camera coordinate system coordinates of the pixel mapped to the three-dimensional space through its corresponding disparity value and camera intrinsic parameters.

[0103] For example, the relationship between parallax and depth can be obtained through the imaging model of a binocular camera, which is:

[0104]

[0105] Among them, z is the depth, f U is the horizontal focal length of the camera, b is the baseline length, d is the parallax, u L with u R They represent the horizontal pixel positions of the points in the three-dimensional space on the left and right binocular images.

[0106] Taking the left image in the binocular image as an example, each pixel (u, v) in the camera coordinate system of the left image is mapped to the three-dimensional space coordinate (x, y, z). The calculation formula is:

[0107]

[0108]

[0109]

[0110] Among them, D(u, v) is the disparity of the corresponding pixel position, c U and c V is the position offset of the pixel coordinate origin relative to the camera center. V and f U are the vertical and horizontal focal lengths of the camera.

[0111] 4. By using three-dimensional spatial constraints (limiting the x, y, z range, i.e. the three-dimensional spatial constraint interval mentioned above), retain the points mapped into the three-dimensional constraint space.

[0112] For example, x can be [-10, 10], y can be [-1.5, 2], and z can be [0, 10], and the unit is m.

[0113] However, it should be recognized that the range of the above three-dimensional space constraint interval is not unique and can be adjusted according to specific tasks.

[0114] 5. The set of points in the three-dimensional space obtained by executing step 4 is called a "pseudo point cloud" (assuming that the three-dimensional space points acquired by the radar are called a point cloud, and the three-dimensional space points obtained by inferring the estimated disparity map are called a "pseudo point cloud"). Calculate the position coordinates of each point in the pseudo point cloud in the three-dimensional grid, that is, perform a fixed-point operation.

[0115] For example, assuming that the X segmentation interval is 0.05m, the Y segmentation interval is 0.1m, and the Z segmentation interval is 0.05m, then for each point in the three-dimensional space, the corresponding three-dimensional grid coordinates are:

[0116]

[0117] It should be recognized that the values ​​of the above segmentation intervals are not unique and can be adjusted according to specific tasks.

[0118] 6. The three-dimensional grid coordinates corresponding to each pixel position in the image are obtained through step 5, and then the bird's-eye view (BEV) data are constructed based on these coordinates.

[0119] For example, the BEV data structure can be constructed by the following steps:

[0120] 6.1 Filling the 3D Grid

[0121] Taking the value interval preset in step 4 and the segmentation interval preset in step 5 as an example, a three-dimensional grid with a dimension of 35×200×400 can be constructed.

[0122] Exemplarily, the value of each voxel (1×1×1) in the three-dimensional grid is preset to 0, and then the voxel value of the three-dimensional grid coordinate position obtained in step 5 is updated to 1.

[0123] 6.2. Constructing BEV-based feature layer

[0124] Taking the preset value interval in step 4 and the preset segmentation interval in step 5 as an example, the RGB features of the c channels obtained in step 2 are used to construct c 35×200×400 three-dimensional grids.

[0125] Exemplarily, the value of each voxel (1×1×1) in the preset three-dimensional grid is 0. For each pixel in each layer of the feature map, the voxel value of the corresponding three-dimensional grid coordinate position is set as the feature value of the pixel.

[0126] Considering that multiple pixel positions on a layer of feature map may be mapped to the same three-dimensional grid coordinate, the value-taking strategy for each voxel position in the three-dimensional grid (i.e., the first preset strategy mentioned above) may include: (1) accumulating values; (2) taking the maximum value; (3) taking the non-zero minimum value; and (4) taking the average value.

[0127] Then, for each feature layer, the three-dimensional grid generated is manipulated into a single-channel feature along the height dimension (the Y component, i.e., 35 in 35×200×400). The manipulation strategy (i.e., the second preset strategy described above) may include: (1) accumulating values ​​along the channel direction; (2) taking the maximum value along the channel direction; (3) taking the mean value along the channel direction; and (4) taking the non-zero minimum value along the channel direction if there is a non-zero value, otherwise taking zero.

[0128] Finally, the obtained c feature channels are stacked together to obtain a three-dimensional grid map of RGB features with a dimension of c×200×400.

[0129] 7. Use the result obtained in step 6 as the input of the 3D object detection network to perform 3D object detection.

[0130] For example, the network structure of 3D object detection is as follows Figure 6 shown.

[0131] like Figure 6 As shown, BEV is the output of step 6, and the BACKBONE and HEAD network structures can be the BACKBONE and HEAD network structures of any two-dimensional detection method.

[0132] Compared with two-dimensional detection, the HEAD part requires additional prediction of the object's height information (the height h of the three-dimensional bounding box and the height coordinate y of the three-dimensional bounding box in the three-dimensional coordinate system) and the three-dimensional bounding box's azimuth angle θ.

[0133] In this embodiment, the dimensions of the BEV data obtained after point-based data localization are the same as those of the RGB image data. This simplifies the 3D object detection task to a 2D one, allowing the use of any 2D object detection algorithm for RGB images for 3D object detection. This significantly reduces the difficulty of 3D object detection.

[0134] In one example, a 3D object detection network can be trained as follows:

[0135] See Figure 7 , is a schematic diagram of a training process of a three-dimensional target detection network provided in an embodiment of the present application, such as Figure 7 As shown in the figure, in order to make the entire network training process more stable, after extracting the RGB features, an additional network branch for predicting the mask MASK can be introduced. The loss calculated by this branch participates in the gradient backpropagation.

[0136] It should be noted that the calculation method of the loss in this branch is not unique and can be any pixel-by-pixel loss (L1 loss, L2 loss, smooth L1, etc.). The label (ground truth) representation method of this branch is not unique. The specific representation principle is: in three-dimensional space, the pseudo point cloud within the three-dimensional detection box with the category is mapped to the pixel position in the RGB image. Following this principle, the representation method can be:

[0137] (1) label is a single-channel mask with the same resolution as the input image. The mask values ​​of different classes are different, while the mask values ​​of the same class are the same. A non-zero pixel position indicates that the pixel position can be mapped to the annotated 3D detection box of the corresponding class in 3D space.

[0138] (2) Label is a mask with n channels and the same resolution as the input image. Each channel represents a detection class. For each class of mask, a non-zero pixel position indicates that the pixel position can be mapped to the annotated 3D detection box of the class in 3D space. Since each class has been separated by different channels, the mask values ​​of different classes can be the same, and the mask values ​​of the same class can be different.

[0139] In addition, the above-mentioned branches are not limited to the network branches for predicting the mask MASK, and they can also be network branches for other semantic / instance segmentation tasks, which will not be elaborated in the embodiments of the present application.

[0140] exist Figure 7 In the training process shown, the network's 3D detector is responsible for predicting the object's 3D information (x, y, z, h, w, l, θ) and its detection confidence. In addition, all losses used in 2D object detection (Focal Loss, Cross Entropy, GIOU Loss, etc.) can be used for 3D object detection loss calculation.

[0141] For example, Figure 7 In the training process shown, the loss of the 3D object detection network can be determined by the following strategy:

[0142] Loss = αLoss mask +Loss 3d Among them, α is greater than or equal to 0, which is used to weigh the final loss. When α is 0, Loss mass (i.e., the loss of the network branch that predicts the mask MASK) does not participate in the gradient backpropagation.

[0143] In this embodiment, an end-to-end network framework is used, allowing the network to be trained directly without requiring additional intermediate processing steps. Compared to conventional multi-stage tasks that require separate model training, the network training in this embodiment allows for end-to-end training of the network from image input to final detection output, greatly simplifying the training process.

[0144] The above describes the method provided by this application. The following describes the device provided by this application:

[0145] See Figure 8 , is a structural diagram of a three-dimensional target detection device based on binocular vision provided in an embodiment of the present application, such as Figure 8 As shown, the three-dimensional target detection device based on binocular vision may include:

[0146] An acquiring unit 810 is configured to acquire a disparity map of a binocular image and image features of the binocular image;

[0147] A fixed point unit 820 is used to determine the camera coordinate system coordinates of each pixel in the disparity map and perform a fixed point operation on the camera coordinate system coordinates of each pixel to obtain the three-dimensional grid coordinates of each pixel;

[0148] a determining unit 830 for determining bird's-eye view data based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image;

[0149] The detection unit 840 is configured to perform three-dimensional target detection on the bird's-eye view data.

[0150] In some embodiments, the fixation unit 820 determines the camera coordinate system coordinates of each pixel in the disparity map and performs a fixation operation on the camera coordinate system coordinates of each pixel, including:

[0151] Determining the camera coordinate system coordinates of each pixel based on the pixel coordinates of each pixel in the disparity map, the disparity value of each pixel, and the camera intrinsic parameters;

[0152] Based on a preset three-dimensional space constraint interval, performing three-dimensional space constraints on the camera coordinate system coordinates of each pixel to obtain the camera coordinate system coordinates of the pixels within the preset three-dimensional space constraint interval;

[0153] Based on a preset segmentation interval, the camera coordinate system coordinates of the pixels within the preset spatial constraint interval are converted into three-dimensional grid coordinates.

[0154] In some embodiments, the determining unit 830 determines the bird's-eye view data based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image, including:

[0155] For the three-dimensional grid corresponding to the image feature of any channel, based on the three-dimensional grid coordinates of each pixel, the voxel value of the three-dimensional grid coordinate position of each pixel is set as the feature value of each pixel in the image feature of the channel;

[0156] The bird's-eye view data is determined based on the three-dimensional grid corresponding to the image features of each channel.

[0157] In some embodiments, the determining unit 830 sets the voxel value of the three-dimensional grid coordinate position of each pixel as the feature value of each pixel in the image feature of the channel based on the three-dimensional grid coordinate of each pixel, including:

[0158] When there are multiple pixels corresponding to the same three-dimensional grid coordinates, determining the voxel value of the three-dimensional grid coordinate based on a first preset strategy;

[0159] The first preset strategy includes one of the following strategies:

[0160] Determine the sum of the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates as the voxel value of the three-dimensional grid coordinate;

[0161] Determine the maximum value among the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates as the voxel value of the three-dimensional grid coordinate;

[0162] Determine the non-zero minimum value among the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates as the voxel value of the three-dimensional grid coordinate;

[0163] The average value of the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates is determined as the voxel value of the three-dimensional grid coordinates.

[0164] In some embodiments, the determining unit 830 determines the bird's-eye view data based on the three-dimensional grid corresponding to the image features of each channel, including:

[0165] The three-dimensional grids corresponding to the image features of any channel are stacked along the height dimension;

[0166] The bird's-eye view data is determined based on the stacked three-dimensional grid corresponding to the image features of each channel.

[0167] In some embodiments, the determining unit 830 stacks the three-dimensional grids corresponding to any channel image feature along the height dimension, including:

[0168] For a plurality of voxels having the same coordinates in the length dimension and the width dimension in the three-dimensional grid coordinates, determining a voxel value after stacking the plurality of voxels based on a second preset strategy;

[0169] The second preset strategy includes one of the following strategies:

[0170] Determine the sum of the voxel values ​​of the plurality of voxels as the voxel value after the plurality of voxels are stacked;

[0171] Determine the maximum value among the voxel values ​​of the plurality of voxels as the voxel value after the plurality of voxels are stacked;

[0172] Determine a non-zero minimum value among the voxel values ​​of the plurality of voxels as the voxel value after the plurality of voxels are stacked;

[0173] An average value of the voxel values ​​of the plurality of voxels is determined as the voxel value after the plurality of voxels are stacked.

[0174] In some embodiments, the backbone network BACKBONE and the head network HEAD in the three-dimensional target detection network used to perform three-dimensional target detection on the bird's-eye view data adopt a two-dimensional target detection network structure, and the output of the HEAD includes the three-dimensional bounding box height h of the target to be detected, the height coordinate y of the three-dimensional bounding box in the three-dimensional coordinate system, and the yaw angle θ of the three-dimensional bounding box.

[0175] In some embodiments, the image features of the binocular image are realized by a feature extraction module in a pre-trained three-dimensional object detection network.

[0176] like Figure 9 As shown, the device also includes:

[0177] The training unit 850 is configured to train the three-dimensional object detection network by:

[0178] Performing three-dimensional object detection tasks and specified semantic / instance segmentation tasks based on the image features extracted by the feature extraction module;

[0179] The loss of the three-dimensional object detection task and the loss of the specified semantic / instance segmentation task are used as feedback to tune the parameters of the feature extraction module.

[0180] See Figure 10 , is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004. The processor 1001, the communication interface 1002, and the memory 1003 communicate with each other via the communication bus 404. The memory 1003 stores a computer program; the processor 1001 can execute the binocular vision-based three-dimensional target detection method described above by executing the program stored in the memory 1003.

[0181] The memory 1003 mentioned herein may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the memory 1002 may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, a storage drive (such as a hard disk drive), a solid-state drive, any type of storage disk (such as a CD, DVD, etc.), or similar storage media, or a combination thereof.

[0182] In an optional embodiment, a machine-readable storage medium is also provided. Figure 10 The memory 1002 in the machine-readable storage medium stores machine-executable instructions. When executed by the processor, the machine-executable instructions implement the above-described method for three-dimensional object detection based on binocular vision. For example, the machine-readable storage medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, or optical data storage device.

[0183] The present application also provides a three-dimensional target detection system based on binocular vision, which may include a binocular camera, a processor, and a machine-readable storage medium; wherein:

[0184] Binocular camera, used to obtain binocular images;

[0185] a machine-readable storage medium for storing machine-executable instructions that can be executed by a processor;

[0186] A processor is used to execute machine-executable instructions to implement the three-dimensional target detection method based on binocular vision described above.

[0187] Exemplarily, the above-mentioned three-dimensional target detection system based on binocular vision may include a drone or an autonomous driving vehicle with a binocular camera (that is, the above-mentioned binocular camera is a binocular camera). The processor of the drone or autonomous driving vehicle can realize three-dimensional target detection based on the binocular image obtained by the binocular camera, and control the flight of the drone or the driving of the autonomous driving vehicle according to the detection results.

[0188] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0189] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A three-dimensional target detection method based on binocular vision, characterized in that: include: Acquire a disparity map of a binocular image, and acquire image features of the binocular image; Determine the camera coordinate system coordinates of each pixel in the disparity map, and perform a fixed-point operation on the camera coordinate system coordinates of each pixel to obtain a three-dimensional grid coordinate of each pixel; Determining the bird's-eye view data based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image, including: for the three-dimensional grid corresponding to the image features of any channel, based on the three-dimensional grid coordinates of each pixel, setting the voxel value of the three-dimensional grid coordinate position of each pixel to the feature value of each pixel in the image features of the channel; determining the bird's-eye view data based on the three-dimensional grid corresponding to the image features of each channel; The method of determining the bird's-eye view data based on the three-dimensional grids corresponding to the image features of each channel includes: stacking the three-dimensional grids corresponding to the image features of any channel along the height dimension to obtain a single channel feature; and determining the bird's-eye view data based on the single channel feature obtained by stacking the three-dimensional grids corresponding to the image features of each channel; Perform three-dimensional target detection on the bird's-eye view data.

2. The method according to claim 1, characterized in that: The determining the camera coordinate system coordinates of each pixel in the disparity map and performing a fixed-point operation on the camera coordinate system coordinates of each pixel includes: Determine the camera coordinate system coordinates of each pixel based on the pixel coordinates of each pixel in the disparity map, the disparity value of each pixel, and the camera intrinsic parameter; Based on a preset three-dimensional space constraint interval, performing three-dimensional space constraints on the camera coordinate system coordinates of each pixel to obtain the camera coordinate system coordinates of the pixels within the preset three-dimensional space constraint interval; Based on a preset segmentation interval, the camera coordinate system coordinates of the pixels within the preset spatial constraint interval are converted into three-dimensional grid coordinates.

3. The method according to claim 1, characterized in that The step of setting the voxel value of the three-dimensional grid coordinate position of each pixel as the feature value of each pixel in the image feature of the channel based on the three-dimensional grid coordinate of each pixel includes: When there are multiple pixels corresponding to the same three-dimensional grid coordinates, determining the voxel value of the three-dimensional grid coordinate based on a first preset strategy; The first preset strategy includes one of the following strategies: The sum of the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates is determined as the voxel value of the three-dimensional grid coordinate; Determine the maximum value among the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates as the voxel value of the three-dimensional grid coordinate; Determine the non-zero minimum value among the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates as the voxel value of the three-dimensional grid coordinate; The average value of the characteristic values ​​of a plurality of pixels having the same corresponding three-dimensional grid coordinates is determined as the voxel value of the three-dimensional grid coordinates.

4. The method according to claim 1, characterized in that: The three-dimensional grid corresponding to any channel image feature is stacked along the height dimension, including: For a plurality of voxels having the same coordinates in the length dimension and the width dimension in the three-dimensional grid coordinates, determining a voxel value after the plurality of voxels are stacked based on a second preset strategy; The second preset strategy includes one of the following strategies: Determine the sum of the voxel values ​​of the multiple voxels as the voxel value after the multiple voxels are stacked; Determine the maximum value among the voxel values ​​of the plurality of voxels as the voxel value after the plurality of voxels are stacked; Determine the non-zero minimum value among the voxel values ​​of the plurality of voxels as the voxel value after the plurality of voxels are stacked; An average value of the voxel values ​​of the multiple voxels is determined as the voxel value after the multiple voxels are stacked.

5. The method according to claim 1, characterized in that The backbone network BACKBONE and the head network HEAD in the three-dimensional target detection network for performing three-dimensional target detection on the bird's-eye view data adopt a two-dimensional target detection network structure, and the output of the HEAD includes the three-dimensional bounding box height h of the target to be detected, the height coordinate y of the three-dimensional bounding box in the three-dimensional coordinate system, and the yaw angle θ of the three-dimensional bounding box.

6. The method according to any one of claims 1 to 5, characterized in that: The image features of the binocular image are realized by a feature extraction module in a pre-trained three-dimensional object detection network. The training of the three-dimensional object detection network includes: Performing three-dimensional object detection tasks and designated semantic / instance segmentation tasks based on the image features extracted by the feature extraction module respectively; The loss of the three-dimensional object detection task and the loss of the specified semantic / instance segmentation task are used as feedback to perform parameter tuning on the feature extraction module.

7. A three-dimensional target detection device based on binocular vision, characterized in that: include: An acquisition unit, used to acquire a disparity map of a binocular image, and to acquire image features of the binocular image; A fixed-point unit, used to determine the camera coordinate system coordinates of each pixel in the disparity map, and perform a fixed-point operation on the camera coordinate system coordinates of each pixel to obtain a three-dimensional grid coordinate of each pixel; A determination unit is used to determine the bird's-eye view data based on the three-dimensional grid coordinates of each pixel and the image features of the binocular image, including: for the three-dimensional grid corresponding to the image features of any channel, based on the three-dimensional grid coordinates of each pixel, the voxel value of the three-dimensional grid coordinate position of each pixel is set as the feature value of each pixel in the image features of the channel; based on the three-dimensional grid corresponding to the image features of each channel, the bird's-eye view data is determined; the determining the bird's-eye view data based on the three-dimensional grid corresponding to the image features of each channel includes: stacking the three-dimensional grid corresponding to the image features of any channel along the height dimension to obtain a single channel feature; and determining the bird's-eye view data based on the single channel feature obtained by stacking the three-dimensional grids corresponding to the image features of each channel; A detection unit is used to perform three-dimensional target detection on the bird's-eye view data.

8. The device according to claim 7, characterized in that The fixed-point unit determines the camera coordinate system coordinates of each pixel in the disparity map and performs a fixed-point operation on the camera coordinate system coordinates of each pixel, including: Determine the camera coordinate system coordinates of each pixel based on the pixel coordinates of each pixel in the disparity map, the disparity value of each pixel, and the camera intrinsic parameter; Based on a preset three-dimensional space constraint interval, performing three-dimensional space constraints on the camera coordinate system coordinates of each pixel to obtain the camera coordinate system coordinates of the pixels within the preset three-dimensional space constraint interval; Based on a preset segmentation interval, the camera coordinate system coordinates of the pixels within the preset spatial constraint interval are converted into three-dimensional grid coordinates.

9. A three-dimensional target detection system based on binocular vision, characterized in that: include: A binocular camera, a processor, and a machine-readable storage medium; The binocular camera is used to obtain binocular images; The machine-readable storage medium is used to store machine-executable instructions that can be executed by the processor; The processor is used to execute machine executable instructions to implement the method steps of any one of claims 1-6.