A monocular three-dimensional detection method and device based on spatial relationship between adjacent targets

By introducing adjacent target spatial relationship detection and nonlinear least squares optimization into the monocular three-dimensional target detection network, the problem of poor detection accuracy of occluded targets is solved, and the detection effect and depth prediction accuracy are improved.

CN118447468BActive Publication Date: 2024-09-20山西省财政税务专科学校
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410905053.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-09-20
Estimated Expiration
2044-07-08

AI Technical Summary

Technical Problem

Existing monocular 3D target detection networks have poor detection accuracy for occluded targets.

Method used

A detection method based on the spatial relationship between adjacent targets is adopted, the feature map is extracted through the Smoke backbone network, the two-dimensional and three-dimensional attributes of the target are predicted by combining the 2D and 3D detection modules, and the spatial constraints of adjacent targets are used for three-dimensional space optimization. Nonlinear least squares optimization of 3D prediction boxes.

Benefits of technology

It improves the detection effect of occluded targets and the accuracy of target depth prediction. By decoupling the target depth into visual depth and attribute depth, the detection accuracy is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447468B
    Figure CN118447468B
Patent Text Reader

Abstract

The invention provides a monocular 3D detection method and device based on the spatial relationship between adjacent targets, belonging to the technical field of target detection. The invention solves the problem that the existing monocular 3D target detection network has poor detection accuracy for occluded targets. The invention comprises the following steps: inputting a picture into a Smoke backbone network to obtain a feature map; performing 2D detection, 3D detection and spatial constraint detection of adjacent targets based on the feature map to obtain a target 2D prediction frame, a 3D prediction frame including a target 3D center, a yaw angle, a 3D length, width and height, a target visual depth and a target attribute depth; the spatial constraint detection of adjacent targets obtains the spatial constraint of the adjacent targets by predicting the 3D distance between the 3D center of the target and the 3D center of the adjacent targets; performing target 3D space optimization in combination with the spatial constraint of the adjacent targets and the target 3D prediction frame to obtain a final 3D prediction frame with a more accurate result. The invention is applied to 3D target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention provides a monocular three-dimensional detection method and device based on the spatial relationship between adjacent targets, belonging to the technical field of target detection. Background Art

[0002] The powerful representation ability and rich feature representation of deep learning have greatly improved the accuracy of target detection and promoted the development of target detection. Convolutional neural network is a type of neural network that includes convolution, pooling, activation function calculation and has a certain depth structure. It is one of the representative algorithms in the field of deep learning. Convolutional neural network can not only extract high-level features and improve the expression ability of features, but also integrate feature extraction, feature selection and feature classification in the same model. Through end-to-end training, it optimizes functions as a whole and enhances the separability of features. Object detection based on convolutional neural network has long become a research hotspot in the field of computer vision.

[0003] Autonomous driving is the future development trend. In recent years, three-dimensional object detection has gradually become popular, and many excellent monocular three-dimensional object detection networks have emerged. Following the ideas of the R-CNN series in two-dimensional object detection, Chen Yan et al. used domain-specific priors (such as shape, height, position distribution, etc.) to remove low-confidence suggestions and proposed a pioneering region-based method Mono3D. Zhou Xingyi et al. proposed an anchor-free one-stage detector called CenterNet and extended it to image-based 3D detection. The framework encodes the object as a single point (the center point of the object) and uses key point estimation to find it. In addition, multiple parallel detection heads are used to estimate other properties of the object, including depth, size, position and orientation. Garrick Blasey et al. proposed an anchor-based detector M3D-RPN, which is essentially a customized RPN for one-stage 3D detection. It generates 2D anchors and 3D anchors for a given image. In the field of object detection, many scholars have applied the above models to monocular three-dimensional object detection, but their model detection accuracy is poor, especially for occluded targets. Summary of the invention

[0004] In order to solve the problem that the existing monocular three-dimensional target detection network has poor detection accuracy for occluded targets, the present invention proposes a monocular three-dimensional detection method and device based on the spatial relationship between adjacent targets.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a monocular three-dimensional detection method based on the spatial relationship between adjacent targets, comprising the following steps:

[0006] S1: Input the image into the Smoke backbone network to obtain the feature map;

[0007] S2: 2D detection, 3D detection and spatial constraint detection of adjacent targets are performed based on feature maps;

[0008] The 2D detection module predicts the length and width of the target's 2D center and 2D bounding box, and then obtains the target's 2D prediction box.

[0009] 3D detection uses a 3D detection head to predict the target's 3D center, yaw angle, 3D length, width and height, target visual depth and target attribute depth, and then obtains the target's 3D prediction box;

[0010] The spatial constraint detection of adjacent targets obtains the spatial constraint of adjacent targets by predicting the 3D distance between the 3D center of the target and the 3D center of the adjacent targets.

[0011] S3: Combine the spatial constraints of adjacent targets and the target 3D prediction box to optimize the target's 3D space and obtain a more accurate final 3D prediction box.

[0012] The Smoke backbone network in step S1 adopts an improved DLA-34 network. The improvement is that all the hierarchical aggregation connections in the traditional DLA-34 network are replaced with deformable convolution connections, the output feature map is downsampled 4 times relative to the original map, and all batch normalization operations are replaced with group normalization operations.

[0013] The 2D detection module in step S2 uses a CenterNet network with three output branches:

[0014] Target keypoint location branch: Output W × H × C The heat map of W , H are the width and height of the heat map, respectively. C is the target type;

[0015] Target size branch: outputs the length and width of the two-dimensional prediction box;

[0016] Target center branch: Outputs the center position of the 2D prediction box and the offset vector of the target key point position. The 3D detection in step S2 detects the target visual depth and target attribute depth respectively through two 3D detection heads, and the final target depth is the sum of the target visual depth and the target attribute depth.

[0017] The target 3D center uses the center point of the target in world space c w =( x , y , z ), where the coordinate system is established by taking the image plane asxy plane, so the coordinates z Indicates the depth of the target center point, x, y It only represents the horizontal and vertical coordinates, and its projection in the feature map is c o =( u , v ), predict the center point of the target in world space c w Relative to key point position c g The offset is ( , ), let the intrinsic matrix of the camera be K:

[0018] ;

[0019] In the above formula: f x Indicates the use of pixels to describe x The length of the focal length in the axial direction, f y Indicates the use of pixels to describe y The length of the focal length in the axial direction, a x The actual position of the principal point x Axis coordinates, in pixels, a y The actual position of the principal point y Axis coordinates, in pixels;

[0020] Then the center point of the target in world space is expressed as:

[0021] ;

[0022] In the above formula: u g is the horizontal coordinate of the key point position, v g is the vertical coordinate of the key point position, Represents the center point of the target in world space c w Relative to key point position c g The horizontal axis offset, Represents the center point of the target in world space c w Relative to key point position c g The vertical axis offset, z Indicates the depth of the target center point.

[0023] Object yaw angle in 3D detection α= β + γ ,in β is the global direction in the camera coordinate system, γ is the relative rotation angle between the target and the camera view, γ =arctan( x / z );

[0024] The three-dimensional length, width and height of the target in 3D detection are directly regressed in meters.

[0025] The spatial constraint of adjacent targets is to define the range circle by setting the distance of their 2D bounding box centers as the diameter, and ignoring other target centers if they are contained within the range circle;

[0026] Given a pair of selected targets, their 3D centers in world space are =( x i , y i , z i )and =( x j , y j , z j ), their two-dimensional bounding box centers on the feature map are and ,in , For the goal i The horizontal and vertical coordinates of the two-dimensional bounding box on the feature map, , For the goal j The horizontal and vertical coordinates of the two-dimensional bounding box on the feature map, the regression target of the spatial constraint of adjacent objects is the three-dimensional distance between the above two objects.

[0027] The steps to achieve the regression goal of spatial constraints of adjacent targets are as follows:

[0028] First locate the midpoint in 3D space ;

[0029] Then, take the viewpoint direction as the Z axis, As the origin, use the left-hand system to establish the local coordinate system, and the adjacent targets and The three-dimensional absolute distance is ,in is the absolute value of the horizontal coordinate difference between adjacent targets, is the absolute value of the difference in ordinates between adjacent targets, is the absolute value of the Z coordinate difference between adjacent targets, and the three-dimensional distance between adjacent targets in the local coordinate system is selected as the predicted three-dimensional spatial constraint of adjacent targets.

[0030] In step S3, nonlinear least squares method is used to optimize the 3D prediction box space. The specific steps are as follows:

[0031] Assume that in a graph, the network outputs N targets, among which there are M pairs of spatial constraints between adjacent targets. It is considered as a graph with N vertices and M edges. Each vertex can be connected to multiple adjacent vertices, and targets that are not connected by other vertices do not need to be optimized.

[0032] For connecting vertices C i and vertices C j There are three error terms in the spatial constraints between adjacent targets. To measure the three-dimensional distance estimated by the network and two connected vertices C i and C j The three-dimensional position of and The distance between The inconsistency of yes and The absolute differences along the three axes are expressed as follows:

[0033] = ;

[0034] = ;

[0035] For each target, the error terms of the spatial constraints of all its neighboring targets for the predicted three-dimensional center are calculated and averaged to obtain the optimized 3D prediction box center.

[0036] A monocular three-dimensional detection device based on the spatial relationship between adjacent targets comprises a processor and a memory, wherein the memory stores a computer program of a monocular three-dimensional detection method based on the spatial relationship between adjacent targets, and the processor is used to execute the computer program.

[0037] The beneficial effects of the present invention compared to the prior art are as follows: the present invention improves the detection effect of occluded targets by encoding the spatial relationship between adjacent targets, and decouples target depth prediction into target visual depth and target attribute depth, thereby improving the accuracy of target depth prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The present invention will be further described below in conjunction with the accompanying drawings:

[0039] Figure 1 is a flow chart of the detection method of the present invention;

[0040] Figure 2 Schematic diagram of the detected target, where (2a) represents the schematic diagram of the 3D prediction box and the 2D prediction box in the 3D image, (2b) represents the feature map, and (2c) represents the target map from a bird's-eye view;

[0041] Figure 3 An example diagram of the spatial constraints between adjacent targets;

[0042] Figure 4 is an example graph containing all valid target pairs;

[0043] Figure 5 are the spatial constraint graphs of adjacent targets in different coordinate systems, where (5a) represents the spatial constraint graph of adjacent targets in the camera coordinate system, and (5b) represents the spatial constraint graph of adjacent targets in the local coordinate system;

[0044] Figure 6 These are example diagrams for reasoning the three-dimensional distance between adjacent targets in different coordinate systems, where (6a) represents an example diagram for reasoning the three-dimensional distance between adjacent targets in the camera coordinate system, and (6b) represents an example diagram for reasoning the three-dimensional distance between adjacent targets in the local coordinate system. DETAILED DESCRIPTION

[0045] like Figures 1 to 6 As shown, the present invention provides a monocular 3D detection method based on the spatial relationship between adjacent targets, which improves the detection effect of occluded targets by encoding the spatial relationship between adjacent targets, and decouples the target depth prediction into the target visual depth and the target attribute depth, thereby improving the accuracy of the target depth prediction. Figure 1 The flowchart of the method of the present invention is shown, and the specific steps are as follows:

[0046] S1: Input the image into the Smoke backbone network to obtain the feature map;

[0047] S2: 2D detection, 3D detection and spatial constraint detection of adjacent targets are performed based on feature maps;

[0048] The 2D detection uses the 2D detection head to predict the 2D center of the target and the length and width of the 2D bounding box, and then obtains the target 2D prediction box;

[0049] 3D detection uses a 3D detection head to predict the target's 3D center, yaw angle, 3D length, width and height, target visual depth and target attribute depth, and then obtains the target's 3D prediction box;

[0050] The spatial constraint detection of adjacent targets obtains the spatial constraint of adjacent targets by predicting the 3D distance between the 3D center of the target and the 3D center of the adjacent targets.

[0051] S3: Combine the spatial constraints of adjacent targets and the target 3D prediction box to optimize the target's 3D space and obtain a more accurate final 3D prediction box.

[0052] The Smoke backbone network uses the hierarchical fusion network DLA-34 as the backbone network to extract features because it can aggregate information across different levels. The present invention improves on DLA-34 by replacing all hierarchical aggregation connections with deformable convolution connections. The output feature map is downsampled 4 times relative to the original map. Compared with the original DLA-34 network, the present invention replaces all batch normalization (BN) operations with group normalization (GN) because it has been proven that the GN operation is insensitive to batch size and is more robust to training noise.

[0053] 2D detection is implemented based on CenterNet and has three output branches: target key point location branch: output W × H × C The heat map of W , H are the width and height of the heat map, respectively. C is the target type; target size branch: outputs the length and width of the two-dimensional prediction box; target center branch: outputs the offset vector of the center position of the two-dimensional prediction box and the target key point position. Figure 2 As shown in Figure (2a), the plane rectangular box represents the two-dimensional prediction box, and the three-dimensional rectangular box represents the three-dimensional prediction box. Figure 2 The relationship between the target key point position, the 2D prediction box center, and the 3D prediction box center is mainly explained through three perspectives. c g Represents the key point position, which is obtained through the target key point position branch. c o Represents the center of the 3D prediction box. The 3D prediction box center is obtained by 3D detection and the offset of the key point position, thus obtaining the 3D prediction box center. c b The center of the two-dimensional prediction box is represented by the offset of the center of the two-dimensional prediction box relative to the key point position obtained by 2D detection, thereby obtaining the center of the two-dimensional prediction box. The present invention uses the KITTI dataset. In the 3D target detection of the KITTI dataset, the target types include cars, cyclists, and pedestrians, namely C = 3. Extract the key point position of the target from the output feature map cg =( u g , v g The other two branches, each containing two channels, output the size of the 2D prediction box ( w b , h b ) and the key point positions extracted from c g To the center of the 2D prediction box c b =( u b , v b )'s offset vector ( δ u , δ v ), as shown in Figure (2b). u g is the horizontal coordinate of the key point position, v g is the vertical coordinate of the key point position, w b is the width of the feature map bounding box, h b is the height of the feature map bounding box, u b is the horizontal coordinate of the center of the feature map bounding box, v b is the ordinate of the center of the feature map bounding box.

[0054] The center point of the target in world space is represented by c w =( x , y , z ), where the coordinate system is established by taking the image plane as xy plane, so the coordinates z Indicates the depth of the target center point, x, y It only represents the horizontal and vertical coordinates and has no specific meaning. Its projection in the feature map is c o =( u , v ),like Figure 2 As shown. Predict the center point of the target in world space c w Relative to key point position c g The offset is ( , ).

[0055] The 3D detection of the present invention decouples the target depth into the target visual depth and the target attribute depth. Target visual depth: The visual depth of a monocular image has important characteristics. For a monocular-based system, the visual depth is highly dependent on the two-dimensional box size of the object (distant objects appear small on the image, and vice versa) and the position on the image. Target attribute depth: Attribute depth refers to the depth offset from the visible surface to the 3D center of the object, which is called the target attribute depth because it is more likely to be related to the intrinsic attributes of the object. For example, when the direction of the car in 3D space is parallel to the z-axis (depth direction), the attribute depth of the tail of the car is half the length of the car. On the contrary, if the direction is parallel to the x-axis, the attribute depth is half the width of the car. It can be seen that the attribute depth depends on the direction of the target and its inherent attributes. As described above, the present invention uses two separate 3D detection heads to estimate the target visual depth and target attribute depth respectively. The 3D detection head includes a detection head for the three-dimensional center of the target, a yaw angle detection head, a three-dimensional length, width and height detection head, and a depth detection head. The target depth is the sum of the target visual depth and the target attribute depth. Decoupling the target depth has the following advantages: (1) Decoupling depth is logical and intuitive, and can represent the object more comprehensively and accurately; (2) It allows the network to extract different types of features for different types of depths, which facilitates learning.

[0056] Assuming the depth of the target center point is z, the intrinsic matrix K of the camera is:

[0057] ;

[0058] In the above formula: f x Indicates the use of pixels to describe x The length of the focal length in the axial direction, f y Indicates the use of pixels to describe y The length of the focal length in the axial direction, a x Indicates the actual position of the principal point (the intersection of the optical axis and the image plane is called the principal point of the camera) x Axis coordinates, in pixels, a y The actual position of the principal point y Axis coordinates, in pixels;

[0059] Then the center point of the target in world space is expressed as:

[0060] ;

[0061] In the above formula: Represents the center point of the target in world space c w Relative to key point position cg The horizontal axis offset, Represents the center point of the target in world space c w Relative to key point position c g The vertical axis offset, z Indicates the depth of the target center point;

[0062] The 3D length, width and height prediction branch of the 3D detection head directly regresses the length, width and height of the 3D prediction box in meters. w × h × l ).

[0063] As shown in Figure (2c), to predict the yaw angle of the target α , we can first return to the global direction in the camera coordinate system β , and then calculate the relative rotation angle between the target and the camera perspective γ =arctan( x / z ), x , z The 3D center of the target is the center point of the target in world space. c w =( x , y , z ) x , z , and finally the target's yaw angle can be calculated α = β + γ .

[0064] In addition to the conventional 2D detection head and 3D detection head, this paper also proposes a new regression objective, namely predicting the spatial constraints of adjacent objects. The spatial constraint strategy of adjacent objects is as follows: Figure 3 For any pair of objects, a range circle is defined by setting the distance between the centers of their 2D bounding boxes as the diameter. If the range circle contains the center of the other object, the pair is ignored. Figure 4 An example graph containing all valid target pairs is shown.

[0065] Given a pair of selected targets, their 3D centers in world space are =( x i , y i , z i )and =( x j , yj , z j ), their 2D prediction box centers on the feature map are and ,in , For the goal i The horizontal and vertical coordinates of the two-dimensional bounding box on the feature map, , For the goal j The horizontal and vertical coordinates of the 2D bounding box on the feature map. The regression target of the spatial constraint of adjacent objects is the 3D distance between the two objects. First, locate the midpoint in 3D space Then, take the viewpoint direction as the Z axis, As the origin, use the left-hand system to establish the local coordinate system, and the adjacent targets and The three-dimensional absolute distance is ,in is the absolute value of the horizontal coordinate difference between adjacent targets, is the absolute value of the difference in ordinates between adjacent targets, is the absolute value of the Z coordinate difference between adjacent targets. Figure (5b) shows the regression target.

[0066] During training, the real 3D target center can be easily obtained from the training data , = ,in is the rotation matrix from the camera coordinate system to the local coordinate system, is the midpoint of the paired targets The viewpoint direction, that is, the direction of the Z axis, =arctan( / ), is the distance vector between the two targets in the camera coordinate system, which can be obtained by subtracting the three-dimensional centers of the two targets in the camera coordinate system. .

[0067] like Figure 6 As shown, the three-dimensional distance between adjacent targets in the camera coordinate system k w It is invariant under different viewing angles. The three-dimensional distance between adjacent targets in the local coordinate system k v It changes with the change of viewing angle, so the three-dimensional distance between adjacent targets in the local coordinate system k v More meaningful.

[0068] During the inference process, the 2D position of the target is first predicted, then the adjacent target closest to the center of the 2D bounding box of the target is found, and the 3D distance between the two adjacent targets in the local coordinate system is predicted. k v .

[0069] The present invention also proposes a 3D prediction box space optimization method from the perspective of graph. Assuming that in a graph, the network outputs N targets, among which there are M pairs of spatial constraints between adjacent targets, it is regarded as a graph with N vertices and M edges. Each vertex can connect multiple adjacent vertices. Targets that are not connected by other vertices do not need to be optimized. The nonlinear least squares method is used to optimize the 3D prediction box space.

[0070] For connecting vertices C i and vertices C j There are three error terms in the spatial constraints between adjacent targets. To measure the three-dimensional distance estimated by the network and two connected vertices C i and C j The three-dimensional position of and The distance between Therefore, the error term yes and The absolute differences along the three axes are expressed as follows:

[0071] = ;

[0072] = ;

[0073] For each target, the error terms of the spatial constraints of all its neighboring targets for the predicted three-dimensional center are calculated and averaged to obtain the optimized 3D prediction box center.

[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A monocular 3D detection method based on the spatial relationship between adjacent objects. Features: The following steps are involved: S1: Input the image into the Smoke backbone network to obtain a feature map; the Smoke backbone network in step S1 adopts an improved DLA-34 network. The improvement is that all hierarchical aggregation connections in the traditional DLA-34 network are replaced with deformable convolution connections, the output feature map is downsampled 4 times relative to the original image, and all batch normalization operations are replaced with group normalization operations; S2: 2D detection, 3D detection and spatial constraint detection of adjacent targets are performed based on feature maps; The 2D detection module predicts the length and width of the target's 2D center and 2D bounding box, and then obtains the target's 2D prediction box. 3D detection uses a 3D detection head to predict the target's 3D center, yaw angle, 3D length, width and height, target visual depth and target attribute depth, and then obtains the target's 3D prediction box; The spatial constraint detection of adjacent targets obtains the spatial constraint of adjacent targets by predicting the 3D distance between the 3D center of the target and the 3D center of the adjacent targets. The spatial constraint of adjacent targets is to define the range circle by setting the distance of their 2D bounding box centers as the diameter, and ignoring other target centers if they are contained within the range circle; Given a pair of selected targets, their 3D centers in world space are =( x i , y i , z i )and =( x j , y j , z j ), their two-dimensional bounding box centers on the feature map are and ,in , For the goal i The horizontal and vertical coordinates of the two-dimensional bounding box on the feature map, , For the goal j The horizontal and vertical coordinates of the two-dimensional bounding box on the feature map, the regression target of the spatial constraint of the adjacent objects is the three-dimensional distance between the above two objects; The steps to achieve the regression goal of spatial constraints of adjacent targets are as follows: First locate the midpoint in 3D space ; Then, take the viewpoint direction, that is, the shooting direction of the camera, as the Z axis. As the origin, use the left-hand system to establish the local coordinate system, and the adjacent targets and The three-dimensional absolute distance is ,in is the absolute value of the horizontal coordinate difference between adjacent targets, is the absolute value of the difference in ordinates between adjacent targets, is the absolute value of the Z coordinate difference between adjacent targets, and the three-dimensional distance between adjacent targets in the local coordinate system is selected as the three-dimensional spatial constraint of the predicted adjacent targets, where the local coordinate system refers to the midpoint of the line from the camera position to the adjacent targets as the z-axis and the perpendicular line as the x-axis; S3: Combine the spatial constraints of adjacent targets and the target 3D prediction frame to optimize the target 3D space and obtain a more accurate final 3D prediction frame; In step S3, nonlinear least squares method is used to optimize the 3D prediction box space. The specific steps are as follows: Assume that in a graph, the network outputs N targets, among which there are M pairs of spatial constraints between adjacent targets. It is considered as a graph with N vertices and M edges. Each vertex can be connected to multiple adjacent vertices, and targets that are not connected by other vertices do not need to be optimized. For connecting vertices C i and vertices C j There are three error terms in the spatial constraints between adjacent targets. To measure the three-dimensional distance estimated by the network and two connected vertices C i and C j The three-dimensional position of and The distance between The inconsistency of yes and The absolute differences along the three axes are expressed as follows: = ; = ; For each target, the error terms of the spatial constraints of all its neighboring targets for the predicted three-dimensional center are calculated and averaged to obtain the optimized 3D prediction box center.

2. According to claim 1, a monocular three-dimensional detection method based on the spatial relationship between adjacent targets, Features: The 2D detection module in step S2 uses a CenterNet network with three output branches: Target keypoint location branch: Output W × H × C The heat map of W , H are the width and height of the heat map, respectively. C is the target type; Target size branch: outputs the length and width of the two-dimensional prediction box; Target center branch: Outputs the center position of the 2D prediction box and the offset vector of the target key point position.

3. The monocular three-dimensional detection method based on the spatial relationship between adjacent targets according to claim 2, Features: The 3D detection in step S2 detects the target visual depth and the target attribute depth respectively through two 3D detection heads, and the final target depth obtained is the sum of the target visual depth and the target attribute depth.

4. The monocular three-dimensional detection method based on the spatial relationship between adjacent targets according to claim 3, Features: The target 3D center uses the center point of the target in world space c w =( x , y , z ), where the coordinate system is established by taking the image plane as xy plane, so the coordinates z Indicates the depth of the target center point, x, y It only represents the horizontal and vertical coordinates, and its projection in the feature map is c o =( u , v ), predict the center point of the target in world space c w Relative to key point position c g The offset is ( , ), let the intrinsic matrix of the camera be K: ; In the above formula: f x Indicates the use of pixels to describe x The length of the focal length in the axial direction, f y Indicates the use of pixels to describe y The length of the focal length in the axial direction, a x The actual position of the principal point x Axis coordinates, in pixels, a y The actual position of the principal point y Axis coordinates, in pixels; Then the center point of the target in world space is expressed as: ; In the above formula: u g is the horizontal coordinate of the key point position, v g is the vertical coordinate of the key point position, Represents the center point of the target in world space c w Relative to key point position c g The horizontal axis offset, Represents the center point of the target in world space c w Relative to key point position c g The vertical axis offset, z Indicates the depth of the target center point.

5. The monocular three-dimensional detection method based on the spatial relationship between adjacent targets according to claim 3, Features: Object yaw angle in 3D detection α = β + γ ,in β is the global direction in the camera coordinate system, γ is the relative rotation angle between the target and the camera view, γ =arctan( x / z ); The three-dimensional length, width and height of the target in 3D detection are directly regressed in meters.

6. A monocular three-dimensional detection device based on the spatial relationship between adjacent targets, comprising a processor and a memory, Features: The memory stores a computer program for the monocular three-dimensional detection method based on the spatial relationship between adjacent targets as described in any one of claims 1 to 5, and the processor is used to execute the above computer program.