Detection method and device, vehicle and computer storage medium
By obtaining the basic depth information feature data of two-dimensional images in autonomous driving, predicting pixel-level and object-level depth features, and integrating camera internal parameters and confidence, the problem of insufficient camera-based 3D target detection accuracy is solved. Highly accurate 3D target detection is achieved.
Patent Information
- Application Number
- CN202310457626.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-24
- Publication Date
- 2024-10-25
AI Technical Summary
The accuracy of camera-based 3D target detection is insufficient because the 2D image does not contain depth information, causing collinear object points of different depths to overlap on the 2D image, making it impossible to accurately detect the depth of the target.
By obtaining the basic depth information feature data of the two-dimensional image, pixel-level and object-level depth feature predictions are performed, and information fusion is performed based on camera internal parameters and confidence to obtain the depth information of the target object.
The accuracy of 3D target detection is improved, the lack of accuracy and occlusion or truncation problems of depth prediction methods in the existing technology are overcome, and low-cost and accurate 3D target detection is achieved.
Smart Images

Figure CN118840408A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of autonomous driving technology, and in particular to a detection method, device, vehicle and computer storage medium. Background Art
[0002] With the development and application of artificial intelligence technology, more and more devices have become intelligent, especially autonomous driving technology. 3D object detection plays an important role in autonomous driving. 3D object detection refers to the detection of objects in the environment through acquisition devices to obtain the position of the object in the real world, the geometric information of the object, etc. Based on this information, the distance between the target and the vehicle and other key targets can be obtained, providing observations for the downstream planning and prediction tasks of autonomous driving.
[0003] In the related art, camera-based 3D object detection is low-cost, and the camera can also provide high-resolution visual information with rich semantic features. However, the problem with camera-based 3D object detection is that the 2D image generated by the camera itself does not contain depth information, that is, the imaging points of collinear object points at different depths on the 2D image will overlap, which leads to insufficient accuracy of camera-based 3D object detection. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a detection solution to at least partially solve the above-mentioned problem.
[0005] According to a first aspect of an embodiment of the present application, a detection method is provided, comprising: obtaining feature data of a two-dimensional image to be detected, including basic depth information; performing pixel-level depth feature prediction and object-level depth feature prediction for a target object based on the feature data, to obtain corresponding pixel-level depth information and a first confidence level thereof, as well as object-level depth information and a corresponding second confidence level thereof; performing fusion of the pixel-level depth information and the object-level depth information according to the first confidence level and the second confidence level; and obtaining depth information of the target object according to the fusion result.
[0006] According to a second aspect of an embodiment of the present application, a detection device is provided, including: an acquisition module for acquiring feature data of a two-dimensional image to be detected, including basic depth information; a prediction module for performing pixel-level depth feature prediction and object-level depth feature prediction for a target object based on the feature data, to obtain corresponding pixel-level depth information and a first confidence level thereof, as well as object-level depth information and a corresponding second confidence level thereof; a fusion module for fusing the pixel-level depth information and the object-level depth information according to the first confidence level and the second confidence level; and an output module for obtaining the depth information of the target object according to the fusion result.
[0007] According to a third aspect of an embodiment of the present application, a processor is provided for executing the method of the first aspect described above.
[0008] According to a fourth aspect of an embodiment of the present application, a vehicle is provided, comprising a collection device, a processor, a memory, a communication interface and a communication bus, wherein the collection device, the processor, the memory and the communication interface communicate with each other through the communication bus; the collection device is used to collect environmental data of the environment in which the vehicle is located and generate perception data; the memory is used to store at least one executable instruction, so that the processor executes the executable instruction based on the perception data to implement operations corresponding to the method of the first aspect.
[0009] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the method described in the first aspect.
[0010] According to the solution provided in the embodiment of the present application, the two-dimensional image can be processed to obtain pixel-level depth information and its first confidence, as well as object-level depth information and its corresponding second confidence, and based on the first confidence and the second confidence, the pixel-level depth information and the object-level depth information are fused to obtain more accurate depth information, thereby ensuring the accuracy of 3D target detection. In this way, accurate 3D target detection can be achieved with a relatively low-cost acquisition device (such as a camera). BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0012] Figure 1 A flowchart of a detection method according to Embodiment 1 of the present application;
[0013] Figure 2A A flow chart of the steps of a detection method according to Embodiment 2 of the present application
[0014] Figure 2B for Figure 2A A schematic diagram of a target detection model in the illustrated embodiment;
[0015] Figure 2C This is a schematic diagram of the process of performing pixel-level depth feature prediction according to step S204 of the second embodiment of the present application;
[0016] Figure 2D This is a schematic diagram of the process of performing object-level depth feature prediction according to step S204 of the second embodiment of the present application;
[0017] Figure 2E This is a schematic diagram of the step flow of step S206 according to the second embodiment of the present application;
[0018] Figure 3 is a structural block diagram of a detection device according to Embodiment 3 of the present application;
[0019] Figure 4 It is a schematic diagram of the structure of an electronic device of a vehicle according to the fourth embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0021] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0022] Embodiment 1
[0023] like Figure 1 As shown, a flow chart of the steps of the detection method of embodiment 1 of the present application is shown.
[0024] In this embodiment, the method can be used to process the two-dimensional image captured by the camera to realize 3D target detection based on the two-dimensional image, thereby detecting the target object and the depth information of the target object from the two-dimensional image. The method includes the following steps:
[0025] Step S102: Acquire feature data of the two-dimensional image to be detected, including basic depth information.
[0026] In order to ensure accurate depth estimation of the target object, the two-dimensional image data can be processed to obtain processed feature data including basic depth information. For example, a neural network (such as a backbone network that can highlight depth information and a multi-scale feature enhancement network) is used to process the two-dimensional image, but it is not limited thereto.
[0027] Step S104: performing pixel-level depth feature prediction and object-level depth feature prediction for the target object based on the feature data, and obtaining corresponding pixel-level depth information and its first confidence, and object-level depth information and its corresponding second confidence.
[0028] For example, in some examples, pixel-level depth feature prediction is used to predict the physical size of the target object and the pixel height of the target object in the two-dimensional image (the pixel height refers to the projection height of the target object on the two-dimensional image, which can also be called visual height, visual height) as pixel-level depth information. The depth of the target object can be determined using these pixel-level depth information and the camera's internal parameters. In addition, the pixel-level depth information and its first confidence level can also be predicted to facilitate subsequent fusion. The first confidence level is used to indicate the accuracy of the predicted pixel-level depth information, which can also be called uncertainty.
[0029] Object-level depth feature prediction is used to predict the 2D center point of the target object and the depth information of the 2D center point as the object-level depth information, so that the object-level depth information can be directly used as the depth of the target object. In addition, the object-level depth information and its corresponding second confidence level can also be predicted to facilitate the subsequent fusion of the pixel-level depth information and the object-level depth information, so as to obtain a more accurate depth of the target object. The second confidence level is used to indicate the accuracy of the predicted object-level depth information, which can also be called uncertainty.
[0030] Step S106: fusing the pixel-level depth information and the object-level depth information according to the first confidence level and the second confidence level.
[0031] For example, in some implementations, the depth of a target object is determined based on the pixel-level depth information and the intrinsic parameters (such as focal length, etc.) of the camera that collects the two-dimensional image (for ease of distinction, it can be recorded as the first depth). During fusion, the first confidence is weighted with the first depth, and the second confidence is weighted with the depth of the 2D center point of the target object indicated by the object-level depth information (which can be recorded as the second depth), and then the two weighted results are summed to achieve fusion.
[0032] For another example, in some other implementations, pixel-level depth information, object-level depth information, the first confidence level, and the second confidence level may be input into a trained fusion network, and the fusion network may be used to fuse them to obtain a fusion result.
[0033] Step S108: Obtaining depth information of the target object according to the fusion result.
[0034] For example, the fusion result (such as the fused depth) can be used as the depth information of the target object. Through the method of this embodiment, the pixel-level depth information of the target object and its first confidence, as well as the object-level depth information and its corresponding second confidence can be predicted in two different ways, and then the pixel-level depth information and the object-level depth information are fused based on the first confidence and the second confidence, so as to obtain a more accurate depth of the target object. In this way, it can overcome the existing method of directly predicting the depth of the target object in the two-dimensional image using the trained neural network model, which cannot adapt to the situation where the target object is occluded or truncated, and the problem of insufficient compatibility and migration generalization with different cameras, and overcome the problem of insufficient accuracy of directly predicting the depth of the target object based on the key point geometric prior method.
[0035] The method can be used to process a two-dimensional image to obtain pixel-level depth information and its first confidence, as well as object-level depth information and its corresponding second confidence, and based on the first confidence and the second confidence, the pixel-level depth information and the object-level depth information are fused to obtain more accurate depth information, thereby ensuring the accuracy of 3D target detection. Thus, accurate 3D target detection can be achieved with a relatively low-cost acquisition device (such as a camera).
[0036] Embodiment 2
[0037] In this embodiment, the method is implemented by training a target detection model as an example. For ease of understanding, the structure of the target detection model is described as follows: Figure 2A As shown, the target detection model includes a pre-processing network, a pixel-level unit for pixel-level depth feature prediction, and an object-level unit for object-level feature prediction, etc. In some examples, the pixel-level unit includes a physical size prediction branch, a pixel height prediction branch, and a pixel height uncertainty branch. The object-level unit includes a 2D center point prediction branch, a center point depth prediction branch, and a center point depth uncertainty prediction branch. In addition, the target detection model may also include a heading angle prediction branch for predicting the heading angle, etc. It should be noted that this embodiment only exemplifies a target detection model and does not exclude other models that can achieve the same effect.
[0038] like Figure 2B As shown, in combination with the target detection model, the method of the present application may include the following steps:
[0039] Step S202: Acquire feature data of the two-dimensional image to be detected, including basic depth information.
[0040] In the case where the target detection model includes a pre-processing network, this step can be implemented as follows: inputting a two-dimensional image into the pre-processing network, and using the pre-processing network to perform deep feature extraction on the two-dimensional image to obtain feature data output by the pre-processing network that includes basic depth information.
[0041] The pre-processing network may include a backbone network and a multi-scale feature enhancement network. The backbone network may use a CNN (convolutional neural network) that can achieve deep feature enhancement, but is not limited to this. The multi-scale feature enhancement network may use an FPN (image feature fusion network), but is not limited to this.
[0042] Optionally, in order to improve the accuracy of the prediction, the two-dimensional image captured by the camera can be data enhanced. For example, the two-dimensional image captured by the telephoto camera is converted into a short-focus two-dimensional image through an internal parameter conversion to increase the accuracy of subsequent predictions. Of course, the data enhancement process is not necessary.
[0043] The data-enhanced two-dimensional image can be processed by the backbone network and the multi-scale feature enhancement network in sequence to obtain feature data, which contains the basic depth information of the target object.
[0044] Step S204: performing pixel-level depth feature prediction and object-level depth feature prediction for the target object based on the feature data, and obtaining corresponding pixel-level depth information and its first confidence, and object-level depth information and its corresponding second confidence.
[0045] like Figure 2C As shown, as mentioned above, in some examples, the target detection model includes a physical size prediction branch, a pixel height prediction branch, and a pixel height uncertainty branch. In this case, performing pixel-level depth feature prediction for the target object based on the feature data may include the following sub-steps:
[0046] Sub-step S2041: Use the physical size prediction branch and the pixel height prediction branch of the target detection model to process the feature data respectively to predict the physical size of the target object and the pixel height information in the two-dimensional image as the pixel-level depth information of the target object.
[0047] The physical size prediction branch and the pixel height prediction branch can use a CNN network (convolutional neural network) with the same or different network structures, and its parameters can be obtained through model training. By inputting feature data into the physical size prediction branch, the geometric size (such as height) of the target object in the two-dimensional image can be predicted. By inputting feature data into the pixel height prediction branch, the pixel height information of each target object in the two-dimensional image can be predicted. The pixel height information can also be called visual height information, which can be the total height of the pixels occupied by the target object projected into the two-dimensional image.
[0048] It should be noted that a two-dimensional image may include one or more target objects. For a certain target object, only part of the target object may exist in the two-dimensional image. The method of the present application can adapt to this situation. The physical size prediction branch and the pixel height prediction branch can predict its physical size and pixel height.
[0049] Sub-step S2042: Use the pixel height uncertainty branch of the target detection model to process the feature data to predict a first confidence level corresponding to the pixel height information.
[0050] The pixel height uncertainty branch can be a trained CNN network, which is used to predict the first confidence level corresponding to the pixel height information. In this embodiment, the pixel height prediction branch and the pixel height uncertainty branch are predicted in parallel, such as the pixel height prediction branch can predict the pixel height of the target object for each pixel in the two-dimensional image when it belongs to the target object; the pixel height uncertainty branch can predict the corresponding pixel height uncertainty as the first confidence level when it belongs to the target object for each pixel in the two-dimensional image.
[0051] Similarly, if Figure 2D As shown, in step S204, the object-level depth feature prediction for the target object based on the feature data may include the following sub-steps:
[0052] Sub-step S2043: using the 2D center point prediction branch and the center point depth prediction branch of the target detection model to predict the feature data respectively, so as to obtain the depth information of the 2D center point of the target object as the object-level depth information.
[0053] Among them, the 2D center point prediction branch and the center point depth prediction branch can be formed by using a CNN network, and its specific network structure, number of layers, etc. can be different, and the trained parameters can also be different. Of course, in other embodiments, the 2D center point prediction branch and the center point depth prediction branch can also use other types of networks, which is not limited to this.
[0054] The feature data is input into the 2D center point prediction branch, which can predict the probability of each pixel in the two-dimensional image being the 2D center point of the target object. The feature data is input into the center point depth prediction branch, which can predict the center point depth of the target object when each pixel in the two-dimensional image is the center point of the target object.
[0055] Sub-step S2044: using the center point depth uncertainty prediction branch of the target detection model to predict the feature data to obtain a second confidence level corresponding to the depth information of the 2D center point.
[0056] The center point depth uncertainty prediction branch can be a CNN network. The feature data is input into the center point depth uncertainty prediction branch, which can predict the confidence (also called uncertainty) of the center point depth corresponding to each pixel in the two-dimensional image when it is the center point of the target object.
[0057] Step S206: fusing the pixel-level depth information and the object-level depth information according to the first confidence level and the second confidence level.
[0058] like Figure 2E As shown, in the case where the pixel-level depth information in the aforementioned step includes the physical size and pixel height information of the target object, and the object-level depth information includes the depth of the 2D center point of the target object, step S206 may include the following sub-steps:
[0059] Sub-step S2061: determining a first depth of the target object based on an intrinsic parameter of a camera that acquires the two-dimensional image, the physical size, and the pixel height information.
[0060] The intrinsic parameters of a camera are the inherent properties of the camera, and the lens and acquisition device used when acquiring two-dimensional images determine its intrinsic parameters. The intrinsic parameters include, for example, the focal length of the camera, but are not limited thereto. According to the imaging principle of the camera, there is a mapping relationship between the physical size of the target object in the three-dimensional world, the distance between the target object and the camera (that is, the depth of the target object relative to the camera), the pixel height of the target object in the two-dimensional image (also called visual height) and the intrinsic parameters.
[0061] This relationship can be expressed as: Among them, Z represents the depth of the center point of the target object, H represents the physical size of the target object, h represents the height of the projection of the target object on the two-dimensional image (i.e., pixel height), and f represents the camera intrinsic parameter. f can be obtained directly, H can be obtained through the physical size prediction branch, and h can be predicted through the pixel height prediction branch. Based on the aforementioned predicted physical size, pixel height information, and camera intrinsic parameters, the depth Z of the target object can be calculated (for ease of description, it is recorded as the first depth).
[0062] Sub-step S2062: fusing the first depth and the depth information of the 2D center point according to the first confidence level and the second confidence level.
[0063] Since the depth information of the 2D center point of the target object is directly predicted by the center point depth prediction branch in the aforementioned step, and the first pixel-based depth is obtained by calculation, the first confidence level and the second confidence level can be used to fuse the two to make the depth indicated by the fusion result more accurate.
[0064] In some cases, the first confidence and the second confidence may be used as weights to perform a weighted summation on the first depth and the depth information of the 2D center point to achieve fusion of the two.
[0065] In other cases, a fusion network may be trained, and the first confidence, the second confidence, the first depth, and the depth information of the 2D center point may be input into the fusion network, thereby obtaining the depth after fusion by the fusion network as a fusion result.
[0066] Of course, in other embodiments, fusion may be performed in other ways, which is not limited to this.
[0067] Step S208: Obtaining depth information of the target object according to the fusion result.
[0068] In some examples, the depth indicated by the fusion result can be directly used as the depth information of the target object. In other embodiments, the fusion result can be processed in other ways, and the processed result can be used as the depth information of the target object, which is not limited.
[0069] Since the target detection model in this embodiment adds a center point depth uncertainty prediction branch and a pixel height uncertainty branch, and in the training stage of the target detection model, the two uncertainty branches are trained using training data labeled with center point depth and pixel height, so that the two branches can accurately predict uncertainty, and then the first depth calculated by the predicted pixel height information can be used to fuse the predicted 2D center point depth information, so that a more accurate depth is obtained by fusing the depth obtained by multiple depth regression methods, thereby improving the 3D target detection accuracy. This method can be applied to all visual 3D target detection, and a more accurate depth prediction value is obtained through uncertainty fusion than a single depth prediction method.
[0070] Optionally, the method may further include step S210.
[0071] Step S210: using the heading angle prediction branch to process the feature data to obtain the heading angle information of the target object.
[0072] The heading angle prediction branch can be formed by a CNN network, which can obtain the heading angle of the target object by processing the feature data. The heading angle information includes a first angle relative to a first coordinate axis of the camera coordinate system, a second angle relative to a second coordinate axis of the camera coordinate system, and a third angle relative to a third coordinate axis of the camera coordinate system.
[0073] By using this target detection model, we can not only detect the heading angle of the target object relative to the camera, but also detect the 3D position coordinates (including depth), physical dimensions (such as length, width and height), and category of the target object relative to the camera, thereby achieving more accurate 3D target detection.
[0074] Embodiment 3
[0075] Reference Figure 3 , shows a structural block diagram of a detection device according to embodiment three of the present application.
[0076] The detection device comprises:
[0077] An acquisition module 302 is used to acquire feature data of a two-dimensional image to be detected, including basic depth information;
[0078] A prediction module 304, configured to perform pixel-level depth feature prediction and object-level depth feature prediction for the target object based on the feature data, and obtain corresponding pixel-level depth information and a first confidence level thereof, and object-level depth information and a corresponding second confidence level thereof;
[0079] A fusion module 306, configured to fuse the pixel-level depth information and the object-level depth information according to the first confidence level and the second confidence level;
[0080] The output module 308 is used to obtain the depth information of the target object according to the fusion result.
[0081] In order to ensure accurate depth estimation of the target object, the two-dimensional image data can be processed by the acquisition module 302 to obtain processed feature data including basic depth information. For example, a neural network (such as a backbone network that can highlight depth information and a multi-scale feature enhancement network) is used to process the two-dimensional image, but it is not limited thereto.
[0082] Based on the feature data output by the acquisition module 302, the prediction module 304 processes it. For example, in some examples, the prediction module 304 performs pixel-level depth feature prediction to predict the physical size of the target object and the pixel height of the target object in the two-dimensional image (the pixel height refers to the projection height of the target object on the two-dimensional image, which can also be called visual height, visual height) as pixel-level depth information. The depth of the target object can be determined using these pixel-level depth information and the camera's internal parameters. In addition, the pixel-level depth information and its first confidence level can also be predicted to facilitate subsequent fusion. The first confidence level is used to indicate the accuracy of the predicted pixel-level depth information, which can also be called uncertainty.
[0083] In addition, object-level depth feature prediction can be performed to predict the 2D center point of the target object and the depth information of the 2D center point as the object-level depth information, so that the object-level depth information can be directly used as the depth of the target object. In addition, the object-level depth information and its corresponding second confidence level can be predicted to facilitate the subsequent fusion of the pixel-level depth information and the object-level depth information, so as to obtain a more accurate depth of the target object. The second confidence level is used to indicate the accuracy of the predicted object-level depth information, which can also be called uncertainty.
[0084] The fusion module 306 can fuse the predicted results. For example, based on the pixel-level depth information and the internal parameters of the camera that collects the two-dimensional image (such as focal length, etc.), the depth of a target object (for the sake of distinction, it can be recorded as the first depth) is determined. During fusion, the first confidence is weighted with the first depth, and the second confidence is weighted with the depth of the 2D center point of the target object indicated by the object-level depth information (which can be recorded as the second depth), and then the two weighted results are summed to achieve fusion.
[0085] For another example, in some other implementations, pixel-level depth information, object-level depth information, the first confidence level, and the second confidence level may be input into a trained fusion network, and the fusion network may be used to fuse them to obtain a fusion result.
[0086] The output module 308 can use the fusion result (such as the fused depth) as the depth information of the target object. Through the method of this embodiment, the pixel-level depth information of the target object and its first confidence, as well as the object-level depth information and its corresponding second confidence can be predicted in two different ways, and then the pixel-level depth information and the object-level depth information are fused based on the first confidence and the second confidence, so as to obtain a more accurate depth of the target object. In this way, it can overcome the existing method of directly predicting the depth of the target object in the two-dimensional image using the trained neural network model, which cannot adapt to the situation where the target object is blocked or truncated, and the problem of insufficient compatibility and migration generalization with different cameras, and overcome the problem of insufficient accuracy of directly predicting the depth of the target object based on the key point geometric prior.
[0087] Optionally, when predicting pixel-level depth features for a target object based on the feature data, the prediction module 304 is used to: use a physical size prediction branch and a pixel height prediction branch of a target detection model to process the feature data, respectively, to predict the physical size of the target object and the pixel height information in the two-dimensional image as the pixel-level depth information of the target object; use a pixel height uncertainty branch of the target detection model to process the feature data to predict a first confidence level corresponding to the pixel height information.
[0088] For example, the physical size prediction branch and the pixel height prediction branch can use a CNN network (convolutional neural network) with the same or different network structures, and its parameters can be obtained through model training. By inputting feature data into the physical size prediction branch, the geometric size (such as height) of the target object in the two-dimensional image can be predicted. By inputting feature data into the pixel height prediction branch, the pixel height information of each target object in the two-dimensional image can be predicted. The pixel height information can also be called visual height information, which can be the total height of the pixels occupied by the target object projected into the two-dimensional image.
[0089] It should be noted that a two-dimensional image may include one or more target objects. For a certain target object, only part of the target object may exist in the two-dimensional image. The method of the present application can adapt to this situation. The physical size prediction branch and the pixel height prediction branch can predict its physical size and pixel height.
[0090] The pixel height uncertainty branch can be a trained CNN network, which is used to predict the first confidence level corresponding to the pixel height information. In this embodiment, the pixel height prediction branch and the pixel height uncertainty branch are predicted in parallel, such as the pixel height prediction branch can predict the pixel height of the target object for each pixel in the two-dimensional image when it belongs to the target object; the pixel height uncertainty branch can predict the corresponding pixel height uncertainty as the first confidence level when it belongs to the target object for each pixel in the two-dimensional image.
[0091] Optionally, when predicting object-level depth features for a target object based on the feature data, the prediction module 304 is used to: use a 2D center point prediction branch and a center point depth prediction branch of the target detection model to respectively predict the feature data to obtain depth information of the 2D center point of the target object as the object-level depth information; use a center point depth uncertainty prediction branch of the target detection model to predict the feature data to obtain a second confidence level corresponding to the depth information of the 2D center point.
[0092] Among them, the 2D center point prediction branch and the center point depth prediction branch can be formed by using a CNN network, and its specific network structure, number of layers, etc. can be different, and the trained parameters can also be different. Of course, in other embodiments, the 2D center point prediction branch and the center point depth prediction branch can also use other types of networks, which is not limited to this.
[0093] The feature data is input into the 2D center point prediction branch, which can predict the probability of each pixel in the two-dimensional image being the 2D center point of the target object. The feature data is input into the center point depth prediction branch, which can predict the center point depth of the target object when each pixel in the two-dimensional image is the center point of the target object.
[0094] The center point depth uncertainty prediction branch can be a CNN network. The feature data is input into the center point depth uncertainty prediction branch, which can predict the confidence (also called uncertainty) of the center point depth corresponding to each pixel in the two-dimensional image when it is the center point of the target object.
[0095] Optionally, the pixel-level depth information includes the physical size and pixel height information of the target object, and the object-level depth information includes the depth of the 2D center point of the target object; the fusion model 306 is used to determine the first depth of the target object based on the intrinsic parameters of the camera that captures the two-dimensional image, the physical size and the pixel height information; and fuse the first depth and the depth information of the 2D center point according to the first confidence level and the second confidence level.
[0096] Among them, the intrinsic parameters of the camera are the inherent properties of the camera, and the lens and acquisition device used when collecting two-dimensional images determine its intrinsic parameters. The intrinsic parameters include, for example, the focal length of the camera, but are not limited to this. According to the imaging principle of the camera, there is a mapping relationship between the physical size of the target object in the three-dimensional world, the distance between the target object and the camera (that is, the depth of the target object relative to the camera), the pixel height of the target object in the two-dimensional image (also called visual height) and the intrinsic parameters.
[0097] This relationship can be expressed as: Among them, Z represents the depth of the center point of the target object, H represents the physical size of the target object, h represents the height of the projection of the target object on the two-dimensional image (i.e., pixel height), and f represents the camera intrinsic parameter. f can be obtained directly, H can be obtained through the physical size prediction branch, and h can be predicted through the pixel height prediction branch. Based on the aforementioned predicted physical size, pixel height information, and camera intrinsic parameters, the depth Z of the target object can be calculated (for ease of description, it is recorded as the first depth).
[0098] Since the depth information of the 2D center point of the target object is directly predicted by the center point depth prediction branch in the aforementioned step, and the first pixel-based depth is obtained by calculation, the first confidence level and the second confidence level can be used to fuse the two to make the depth indicated by the fusion result more accurate.
[0099] In some cases, the first confidence and the second confidence may be used as weights to perform a weighted summation on the first depth and the depth information of the 2D center point to achieve fusion of the two.
[0100] In other cases, a fusion network may be trained, and the first confidence, the second confidence, the first depth, and the depth information of the 2D center point may be input into the fusion network, thereby obtaining the depth after fusion by the fusion network as a fusion result.
[0101] Optionally, the target detection model includes a heading angle prediction branch, and the device further includes:
[0102] The heading prediction module 310 is used to process the feature data using the heading angle prediction branch to obtain the heading angle information of the target object, wherein the heading angle information includes a first angle relative to the first coordinate axis of the camera coordinate system, a second angle relative to the second coordinate axis of the camera coordinate system, and a third angle relative to the third coordinate axis of the camera coordinate system.
[0103] The heading angle prediction branch can be formed by a CNN network, which can obtain the heading angle of the target object by processing the feature data. The heading angle information includes a first angle relative to a first coordinate axis of the camera coordinate system, a second angle relative to a second coordinate axis of the camera coordinate system, and a third angle relative to a third coordinate axis of the camera coordinate system.
[0104] By using this target detection model, we can not only detect the heading angle of the target object relative to the camera, but also detect the 3D position coordinates (including depth), physical dimensions (such as length, width and height), and category of the target object relative to the camera, thereby achieving more accurate 3D target detection.
[0105] Optionally, the target detection model includes a pre-processing network, and the acquisition module 302 is used to input the two-dimensional image into the pre-processing network, and use the pre-processing network to perform depth feature extraction on the two-dimensional image to obtain feature data output by the pre-processing network including basic depth information.
[0106] The pre-processing network may include a backbone network and a multi-scale feature enhancement network. The backbone network may use a CNN (convolutional neural network) that can achieve deep feature enhancement, but is not limited to this. The multi-scale feature enhancement network may use an FPN (image feature fusion network), but is not limited to this.
[0107] Optionally, in order to improve the accuracy of the prediction, the two-dimensional image captured by the camera can be data enhanced. For example, the two-dimensional image captured by the telephoto camera is converted into a short-focus two-dimensional image through an internal parameter conversion to increase the accuracy of subsequent predictions. Of course, the data enhancement process is not necessary.
[0108] The data-enhanced two-dimensional image can be processed by the backbone network and the multi-scale feature enhancement network in sequence to obtain feature data, which contains the basic depth information of the target object.
[0109] The detection device of this embodiment is used to implement the corresponding detection methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the detection device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0110] Embodiment 4
[0111] Reference Figure 4 , showing a schematic structural diagram of a vehicle according to Embodiment 4 of the present application.
[0112] The vehicle of this embodiment includes: a collection device 402, a processor 404, a memory 410, a communication interface 412 and a communication bus, wherein the collection device 402, the processor 404, the memory 410 and the communication interface 412 communicate with each other through the communication bus. The communication interface 412 is used to communicate with other electronic devices or servers.
[0113] The acquisition device 402 is used to acquire a two-dimensional image of the environment where the vehicle is located. Exemplarily, the acquisition device 402 can be implemented as a camera.
[0114] The memory 410 is used to store at least one executable instruction.
[0115] Processor 404 is used to execute executable instructions to implement the aforementioned method, for example, 3D target detection based on a two-dimensional image. Optionally, processor 404 may perform 3D target detection based on a two-dimensional image and a pre-trained target detection model. Among them, the specific implementation of the above-mentioned 3D target detection, as well as the 3D target detection performed by the target detection model can be implemented with reference to the relevant description in the aforementioned embodiment one or two, which will not be repeated here. Exemplarily, the processor 404 can be implemented as a vehicle-mounted embedded chip.
[0116] Optionally, the processor 404 may also make an autonomous driving decision based on the detection result of the 3D target detection; and, based on the decision result, drive the vehicle to perform driving task processing.
[0117] Generally, the vehicle also includes a driving device 406 and a control device 408. Then, after the processor 404 determines the corresponding automatic driving decision, it sends a driving signal to the driving device 406, and the driving device 406 uses the driving signal to control the control device 408 (such as brakes, accelerators, steering wheels, etc.) in the vehicle to perform corresponding control operations on the automatic driving settings, thereby realizing autonomous driving of the vehicle.
[0118] For the convenience and brevity of description, the specific working process of the vehicle described above can refer to the corresponding process description in the aforementioned method embodiment, and will not be repeated here.
[0119] It should be noted that in the embodiments of the present application, the vehicle may be a vehicle device or a robot device having the following functions:
[0120] (1) Passenger-carrying function, such as family cars and buses;
[0121] (2) Cargo-carrying functions, such as ordinary trucks, van trucks, trailer trucks, closed trucks, tank trucks, flatbed trucks, container trucks, dump trucks, trucks with special structures, etc.;
[0122] (3) Tool functions, such as logistics delivery vehicles, automated guided vehicles (AGVs), patrol cars, cranes, hoists, excavators, bulldozers, forklifts, road rollers, loaders, off-road engineering vehicles, armored engineering vehicles, sewage treatment vehicles, sanitation vehicles, vacuum trucks, floor scrubbers, water sprinklers, sweeping robots, food delivery robots, shopping guide robots, lawn mowers, golf carts, etc.;
[0123] (4) Entertainment functions, such as entertainment vehicles, amusement park self-driving devices, balance vehicles, etc.;
[0124] (5) Special rescue functions, such as fire trucks, ambulances, power repair vehicles, engineering rescue vehicles, etc.
[0125] An embodiment of the present application further provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the detection method described in any one of the above-mentioned method embodiments is implemented.
[0126] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0127] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microcontroller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here.
[0128] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0129] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.
Claims
1. A detection method, characterized in that: include: Acquire feature data of the two-dimensional image to be detected, including basic depth information; Based on the feature data, pixel-level depth feature prediction and object-level depth feature prediction are performed for the target object to obtain corresponding pixel-level depth information and a first confidence level thereof, and object-level depth information and a corresponding second confidence level thereof; According to the first confidence level and the second confidence level, fusing the pixel-level depth information and the object-level depth information; According to the fusion result, the depth information of the target object is obtained.
2. The method according to claim 1, characterized in that The performing pixel-level depth feature prediction for the target object based on the feature data includes: Using a physical size prediction branch and a pixel height prediction branch of a target detection model to process the feature data respectively, so as to predict the physical size of the target object and the pixel height information in the two-dimensional image as the pixel-level depth information of the target object; The feature data is processed using a pixel height uncertainty branch of the target detection model to predict a first confidence level corresponding to the pixel height information.
3. The method according to claim 1 or 2, characterized in that: The predicting of object-level depth features for the target object based on the feature data includes: Using a 2D center point prediction branch and a center point depth prediction branch of the target detection model, respectively predicting the feature data to obtain depth information of the 2D center point of the target object as the object-level depth information; The feature data is predicted using the center point depth uncertainty prediction branch of the target detection model to obtain a second confidence level corresponding to the depth information of the 2D center point.
4. The method according to claim 1, characterized in that: The pixel-level depth information includes the physical size and pixel height information of the target object, and the object-level depth information includes the depth of the 2D center point of the target object; The fusing the pixel-level depth information and the object-level depth information according to the first confidence level and the second confidence level includes: Determining a first depth of the target object based on an intrinsic parameter of a camera that acquires the two-dimensional image, the physical size, and the pixel height information; The first depth and the depth information of the 2D center point are fused according to the first confidence level and the second confidence level.
5. The method according to claim 1 or 4, characterized in that: The target detection model includes a heading angle prediction branch, and the method further includes: The feature data is processed using the heading angle prediction branch to obtain heading angle information of the target object, wherein the heading angle information includes a first angle relative to a first coordinate axis of a camera coordinate system, a second angle relative to a second coordinate axis of the camera coordinate system, and a third angle relative to a third coordinate axis of the camera coordinate system.
6. The method according to claim 1, characterized in that The target detection model includes a pre-processing network, and the acquisition of feature data of the two-dimensional image to be detected, including basic depth information, includes: The two-dimensional image is input into the pre-processing network, and the pre-processing network is used to perform depth feature extraction on the two-dimensional image to obtain feature data output by the pre-processing network including basic depth information.
7. A detection device, characterized in that: include: An acquisition module, used to acquire feature data of a two-dimensional image to be detected, including basic depth information; A prediction module, configured to perform pixel-level depth feature prediction and object-level depth feature prediction for a target object based on the feature data, and obtain corresponding pixel-level depth information and a first confidence level thereof, and object-level depth information and a corresponding second confidence level thereof; a fusion module, configured to fuse the pixel-level depth information and the object-level depth information according to the first confidence level and the second confidence level; The output module is used to obtain the depth information of the target object according to the fusion result.
8. A processor, characterized in that: Used to execute the method according to any one of claims 1 to 6.
9. A vehicle, characterized in that: It includes a collection device, a processor, a memory, a communication interface and a communication bus, wherein the collection device, the processor, the memory and the communication interface communicate with each other through the communication bus; The collection device is used to collect environmental data of the environment where the vehicle is located and generate perception data; The memory is used to store at least one executable instruction, so that the processor executes the executable instruction based on the perception data to implement the operation corresponding to the method as described in any one of claims 1-6.
10. A computer storage medium having a computer program stored thereon, characterized in that: This is achieved when the program is executed by a processor.
