A multi-uav cooperative three-dimensional vehicle detection method for complex urban intersections
By exchanging compressed 2D visual features among multiple drones and constructing a unified collaborative spatial representation, the problems of view transformation errors and high communication overhead in complex urban intersections are solved, achieving efficient 3D vehicle localization and detection, which is suitable for bandwidth-constrained urban intersection scenarios.
Patent Information
- Application Number
- CN202611412750.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-24
AI Technical Summary
Existing multi-UAV vision-coordinated 3D detection methods suffer from problems such as view transformation error accumulation, premature loss of fine-grained visual information, high communication overhead, and lack of vehicle prior knowledge in random queries at complex urban intersections, resulting in inaccurate vehicle 3D positioning and low communication efficiency.
A multi-UAV collaborative 3D vehicle detection method is adopted. By exchanging compressed 2D visual features among UAVs, a unified collaborative spatial representation is constructed using a cross-view deformable attention and conditional hybrid query generator. This reduces depth estimation error and guides 3D spatial search. Combined with a two-stage training strategy for task decoupling, the accuracy of vehicle 3D localization and communication efficiency are improved.
Under limited communication bandwidth conditions, it improves the accuracy and detection stability of vehicle 3D positioning, reduces communication overhead, expands the observation range, and mitigates the shading effect of buildings and green facilities. It is suitable for urban intersection scenarios with limited bandwidth and rapid deployment.
Smart Images

Figure CN123161184A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of UAV collaborative perception, computer vision and intelligent transportation technology, and specifically relates to a multi-UAV collaborative 3D vehicle detection method for complex urban intersections. Background Technology
[0002] Complex urban intersections converge vehicular traffic from multiple directions, typically surrounded by high-rise buildings, roadside greenery, traffic signs, and large vehicles. Due to limitations imposed by fixed camera installation locations and single viewing angles, vehicles are easily obscured by building edges, trees, or other vehicles, especially during periods of heavy traffic, vehicle turns, or large vehicles passing side-by-side. Single-view images struggle to fully capture the spatial position, size, and orientation of vehicles. Fixed roadside sensing equipment also suffers from long deployment cycles and difficulty in adjusting coverage areas, making it challenging to meet the rapid 3D sensing needs under conditions of sudden congestion, traffic accidents, and temporary traffic control.
[0003] Drones (UAVs) offer advantages such as flexible field of view, rapid deployment, and wide coverage. Multiple UAVs observing from the center of an intersection and from different entrances can mitigate the limited field of view and vehicle occlusion issues of a single UAV by leveraging complementary information from multiple perspectives. Existing visual multi-agent collaborative 3D detection methods typically first convert 2D image features into bird's-eye view features using depth estimation at each UAV, then compress and exchange these bird's-eye view features, and finally complete cross-UAV fusion and 3D detection. This approach is highly dependent on monocular or multi-view depth estimation and camera calibration accuracy; depth errors, UAV pose perturbations, and calibration errors can cause spatial misalignment during view conversion. Furthermore, constructing the bird's-eye view before communication prematurely loses fine-grained information specific to texture, edges, and viewpoint, affecting the detection of distant, small-scale, and partially occluded vehicles.
[0004] Furthermore, when multiple drones operate over urban intersections, wireless links are easily affected by building obstruction, spectrum interference, and changes in communication distance, resulting in limited and unstable communication bandwidth. Directly transmitting high-resolution bird's-eye view features incurs significant communication overhead, while excessive sparsification or compression may lead to the loss of crucial vehicle information. Existing Transformer-based 3D detection methods often employ random query initialization, lacking explicit semantic and spatial priors for vehicles. They require searching for targets within a large collaborative space, which can lead to slow training convergence and inaccurate localization of occluded vehicles. The optimization objectives of 2D and 3D detection differ, and direct joint training may also result in gradient conflicts.
[0005] Therefore, there is a need for a collaborative 3D vehicle detection method that can directly utilize the 2D visual information of multiple UAVs under limited communication bandwidth conditions, reduce the impact of depth estimation errors, and use 2D vehicle priors to guide 3D spatial search, so as to improve the accuracy, communication efficiency and deployment flexibility of vehicle 3D positioning in complex urban intersections. Summary of the Invention
[0006] The purpose of this invention is to solve the problems of view transformation error accumulation, premature loss of fine-grained visual information, large communication overhead, and lack of vehicle prior knowledge in existing multi-UAV visual collaborative 3D detection, and to provide a multi-UAV collaborative 3D vehicle detection method for complex urban intersections.
[0007] The multi-UAV collaborative 3D vehicle detection method for complex urban intersections proposed in this invention includes the following steps: Step 1: Deploy at least two drones equipped with multi-view cameras over a complex urban intersection, synchronize the time of each drone, calibrate the cameras and acquire their poses, and collect multi-view images of the intersection and corresponding metadata at the same time. Step 2: Construct a multi-UAV collaborative 3D vehicle detection model. The model structure is as follows: each UAV terminal is equipped with a shared parameter 2D vision backbone network, and the output of the 2D vision backbone network is connected to a feature compression module; the master UAV terminal is equipped with a channel recovery module, and the output of the channel recovery module is connected to a collaborative spatial encoder and a 2D sensing head; the output of the 2D sensing head is connected to a conditional hybrid query generator, and the outputs of both the conditional hybrid query generator and the collaborative spatial encoder are connected to a collaborative spatial decoder; the output of the collaborative spatial decoder is connected to a coordinate transformation module, which outputs the 3D vehicle detection results in a unified coordinate system at the intersection. Step 3: The multi-UAV collaborative 3D vehicle detection model is trained using a two-stage training method with task decoupling to obtain the weights of the trained model; Step 4: Input the multi-drone multi-view images and metadata at the same time into the trained model, and output the vehicle category, 3D center position, 3D size, orientation angle and detection confidence in the unified coordinate system of the intersection.
[0008] In step 1, one drone is designated as the master drone, and the remaining drones are designated as collaborating drones. The master drone is positioned above the central area of the intersection, and the collaborating drones are positioned above different entrances of the intersection, forming a cross array. Each drone is equipped with at least two types of cameras: forward-looking, rear-looking, left-looking, right-looking, and downward-looking. The camera fields of view of adjacent drones overlap and cover the central area of the intersection and the entrance areas. The metadata includes at least image timestamps, drone poses, camera intrinsic parameters, camera extrinsic parameters, and coordinate transformation relationships between the master drone and the collaborating drones.
[0009] In the model described in step 2, the two-dimensional visual backbone network extracts features from the images of each camera view of each UAV to obtain two-dimensional visual features; the feature compression module is composed of a standard convolutional layer and a depthwise separable convolutional layer connected in sequence, compressing the number of channels of the two-dimensional features from the original number of channels to a set number of channels; each UAV only sends the compressed two-dimensional features, and after the master UAV receives the compressed two-dimensional features from each UAV, it restores the number of channels to the original number of channels through the channel recovery module, and forms a collaborative two-dimensional feature set according to the UAV number, camera number and timestamp.
[0010] Furthermore, in step 2, the cooperative space encoder sets up multiple learnable cooperative space queries, each corresponding to a three-dimensional reference position within the unified cooperative space of the intersection. For any three-dimensional reference position, based on the pose of each UAV and the intrinsic and extrinsic parameters of the corresponding camera, the three-dimensional reference position is projected onto the view of each camera of each UAV. Multiple sampling points are selected around the effective projection position, and cross-view deformable attention is used to adaptively weight the two-dimensional features corresponding to each sampling point. After the layered processing of self-attention, residual normalization, spatial cross-attention and feedforward network, a unified cooperative space representation is obtained. The cross-view deformable attention learns multiple sampling offsets and corresponding normalized weights around the projection position for each attention head, and performs bilinear sampling from the two-dimensional features of the effective view; feature aggregation is performed only on the projected view with positive depth and located within the image boundary; the cooperative spatial encoder is composed of multiple coding layers connected in series, and each coding layer sequentially performs self-attention, residual normalization, cross-view spatial cross attention, residual normalization and feedforward network, and obtains a unified cooperative spatial representation after multiple iterations, thereby establishing the spatial correspondence between different UAVs and different camera views after the two-dimensional feature exchange is completed.
[0011] Furthermore, in the model described in step 2, the two-dimensional sensing head predicts vehicle bounding boxes, confidence levels, and categories based on the two-dimensional features of each camera. After non-maximum suppression, the K vehicle candidate boxes with the highest confidence levels are retained. For each vehicle candidate box, region features are cropped from the corresponding two-dimensional features through region of interest alignment. Max pooling and average pooling are performed along the channel dimension, respectively. The resulting spatial description maps are concatenated and then used to generate a spatial attention map through convolutional layers and activation functions. The spatial attention map is then used to perform weighted summation of the region features to obtain the vehicle instance content query. The spatial attention map is used to highlight the vehicle-related regions inside the candidate boxes and suppress interference from boundary backgrounds and occluded regions.
[0012] Furthermore, in the model described in step 2, the conditional hybrid query generator includes a cone-shaped relative position encoder; for each vehicle 2D candidate box, the homogeneous pixel coordinates of its four corner points are extracted; each corner point is mapped to a normalized ray direction at a unit relative depth using the inverse matrix of the corresponding camera intrinsic matrix; using the pose of the corresponding UAV and the camera extrinsic parameters, the spatial points corresponding to each normalized ray direction are transformed to the main UAV coordinate system; the transformed camera optical center is used as the vertex, and the four transformed spatial points are used to define the cone range, and the camera optical center and the four spatial points are concatenated to form a geometric position description vector; the geometric position description vector is mapped to a vehicle instance position query using a multilayer perceptron, and the instance position query is superimposed on the 2D feature region of the corresponding vehicle candidate box to obtain a position-enhanced collaborative 2D feature set; the encoding does not estimate the absolute depth of the vehicle, but describes the relative imaging range, camera observation direction, and positional relationship of the candidate box in a unified space.
[0013] Furthermore, the conditional hybrid query generator includes the generation of hybrid content queries and hybrid location queries. First, an initial 3D content query and an initial 3D location query with a preset total number of queries N are set. When the number of vehicle 2D candidate boxes K is less than N, the first K queries in the corresponding initial 3D queries are replaced with K vehicle instance content queries and K vehicle instance location queries, respectively, and the remaining NK initial 3D queries are retained. When K is greater than or equal to N, the vehicle instance content queries and vehicle instance location queries corresponding to the first N vehicle 2D candidate boxes are selected according to the confidence level to form hybrid content queries and hybrid location queries, respectively. The retained initial 3D queries are used to compensate for occluded vehicles, extremely small-scale vehicles, and vehicles crossing view boundaries that are missed by the 2D sensing head.
[0014] Furthermore, the collaborative spatial decoder first maps the conditional mixture query to normalized 3D reference points using a multilayer perceptron. In each decoding layer, the conditional mixture query is sequentially processed by self-attention, residual normalization, deformable cross-attention based on the 3D reference points, residual normalization, and feedforward network processing. The deformable cross-attention learns sampling offsets and corresponding weights around the 3D reference points for each attention head to sparsely aggregate local vehicle features from the unified collaborative spatial representation. After multilayer decoding, the vehicle category is output through a classification branch, and the vehicle center coordinates, length, width, height, and orientation angle are output through a regression branch. The collaborative spatial decoder consists of multiple decoding layers connected in series. Each decoding layer gradually refines the three-dimensional reference points and vehicle three-dimensional bounding box parameters during the layer-by-layer iteration process. The coordinate transformation module transforms the vehicle three-dimensional bounding box from the main UAV coordinate system to the intersection unified coordinate system according to the rigid body transformation matrix between the main UAV and the intersection unified coordinate system. The final output vehicle three-dimensional bounding box includes at least the center coordinates, length, width, height, and orientation angle under the intersection unified coordinate system.
[0015] In step 3, the first stage uses two-dimensional vehicle category loss, two-dimensional bounding box regression loss and distribution focus loss to train the two-dimensional visual backbone network and the two-dimensional perceptron; after the first stage of training is completed, the parameters of the two-dimensional visual backbone network and the two-dimensional perceptron are frozen; in the second stage, the Hungarian matching algorithm is used to complete the allocation of three-dimensional prediction results and three-dimensional annotation boxes, and the feature compression and recovery module, the cooperative spatial encoder, the conditional hybrid query generator and the cooperative spatial decoder are trained through three-dimensional classification loss and three-dimensional bounding box regression loss.
[0016] In step 4, the intersection road boundaries, approach lanes, exit lanes, stop lines, and lane center lines are pre-mapped to the intersection unified coordinate system. Based on the spatial inclusion relationship between the center of the vehicle's 3D bounding box and the road area, the approach direction and lane of the vehicle are determined, and the 3D detection results of the vehicle are sent to the intersection traffic management terminal in the form of timestamp, vehicle category, 3D center position, 3D size, orientation angle, road area, and detection confidence.
[0017] The working principle of this invention is: This invention deploys multiple drones equipped with multi-view RGB cameras over the central area and various entrance directions of a complex urban intersection. One drone serves as the master drone, while the others act as collaborating drones. Each drone extracts multi-view image features using a shared parameter 2D visual backbone network and performs channel compression on the 2D features through standard convolution and depthwise separable convolution. Instead of constructing a bird's-eye view representation locally, the collaborating drones send the compressed 2D features, along with their timestamps, camera numbers, and pose information, to the master drone. After the master drone completes feature channel recovery, it projects collaborative spatial reference points onto the views of each effective camera based on camera intrinsic and extrinsic parameters and the coordinate transformation relationship between drones. Furthermore, it utilizes cross-view deformable attention to sparsely aggregate vehicle features from different drones and perspectives, constructing a unified collaborative spatial representation of the intersection.
[0018] During the 3D vehicle detection process, the 2D sensing head first obtains vehicle candidate boxes from the views of each camera. It generates a vehicle instance content query by aligning regions of interest and spatial attention aggregation. Based on the imaging rays of the four corner points of the candidate boxes and the optical center of the camera, it constructs a cone-shaped relative position feature to generate a vehicle instance location query. Subsequently, the content query, location query, and randomly initialized 3D query are combined into a conditional hybrid query. The collaborative spatial decoder aggregates local vehicle features from a unified collaborative spatial representation around the predicted 3D reference point, outputting the vehicle category, 3D center position, length, width, height, and orientation angle. The detection results are then converted to the unified coordinate system of the intersection and associated with road spatial information such as the approach direction, lanes, and stop lines before being sent to the traffic management terminal.
[0019] During model training, the first stage utilizes 2D vehicle annotations to train a 2D visual backbone network and a 2D perceptron, enabling the model to obtain stable vehicle appearance representations and 2D candidate bounding box priors. After the first stage training is completed, the 2D modules are frozen. In the second stage, 3D vehicle annotations and Hungarian matching are used to train a feature compression and recovery module, a cooperative spatial encoder, a conditional hybrid query generator, and a cooperative spatial decoder. During actual detection, multi-UAV multi-view images and metadata collected simultaneously are input into the trained model, sequentially completing 2D feature extraction and exchange, unified cooperative space construction, conditional hybrid query generation, and 3D bounding box decoding, ultimately obtaining structured 3D detection results for vehicles within complex urban intersections.
[0020] The innovation of this invention is: (1) A multi-UAV collaborative perception mechanism is proposed, which first exchanges two-dimensional visual features and then constructs a unified collaborative space. Each UAV does not need to perform depth estimation and bird's-eye view conversion before communication. It can directly share two-dimensional view information through a lightweight feature compression and recovery module, thereby reducing view conversion error and communication overhead, and preserving vehicle texture, outline and edge details in different aerial views.
[0021] (2) Design a collaborative spatial encoder based on cross-view deformable attention. Establish a projection relationship between a unified spatial reference position and each effective camera view according to camera calibration parameters and UAV pose. Adaptively select sampling points around the projection position to realize sparse interaction and spatial alignment of features of multiple UAVs and multiple cameras, thereby enhancing the collaborative representation capability of occluded vehicles, distant vehicles and small-scale vehicles.
[0022] (3) Design a conditional hybrid query generation mechanism that integrates vehicle instance content prior, cone relative position prior and random 3D query, and combine it with a collaborative spatial decoder based on 3D reference points to guide the model to prioritize the search of potential vehicle areas while retaining the ability to compensate for 2D missed targets; further adopt a two-stage training strategy of task decoupling to alleviate the optimization conflict between 2D vehicle detection and cross-view 3D geometric modeling.
[0023] The beneficial effects of this invention are as follows: This invention avoids the accumulation of errors and loss of fine-grained information caused by depth estimation and bird's-eye view construction before communication by directly exchanging compressed two-dimensional visual features among multiple UAVs and completing cross-view spatial modeling uniformly at the master UAV end. By utilizing cross-view deformable attention to sparsely aggregate vehicle features in the effective projected view, the effective observation range of complex urban intersections can be expanded, the local occlusion caused by buildings, large vehicles and green facilities can be alleviated, and the computational burden of global dense feature interaction can be reduced.
[0024] Furthermore, this invention utilizes two-dimensional vehicle candidate bounding boxes to generate instance content queries and cone-shaped relative position queries, and coordinates with randomly initialized three-dimensional queries to guide decoding. This enables the model to quickly focus on potential vehicle areas and search for severely occluded, extremely small-scale, or two-dimensional missed vehicles, thereby improving the accuracy and detection stability of vehicle three-dimensional localization. Under the feature size and communication settings corresponding to the embodiment, the single communication data volume of this invention is 3.4375 MB, which is approximately 78.52% lower than the scheme that transmits 16 MB of dense bird's-eye view features. Combined with two-stage task decoupling training, it can further improve the model training stability and is suitable for multi-UAV collaborative perception scenarios at urban intersections with limited bandwidth, fluctuating links, and the need for rapid deployment. Attached Figure Description
[0025] Figure 1 This is a flowchart of the multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to the present invention; Figure 2 This is a schematic diagram of the overall structure of the multi-UAV collaborative 3D vehicle detection model of the present invention; Figure 3 This is a schematic diagram of the structure of the collaborative space encoder of the present invention; Figure 4This is a schematic diagram of the structure of the conditional hybrid query generator of the present invention; Figure 5 This is a schematic diagram of the cone-shaped relative position encoding process of the present invention. Figure 6 This is a schematic diagram of the structure of the collaborative spatial decoder of the present invention. Detailed Implementation
[0026] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention.
[0027] Example 1
[0028] like Figure 1 , Figure 2 As shown, this embodiment relates to a multi-UAV collaborative 3D vehicle detection method for complex urban intersections, including the following steps: Step 1: Deploy at least two drones equipped with multi-view cameras over a complex urban intersection, synchronize the time of each drone, calibrate the cameras and acquire their poses, and collect multi-view images of the intersection and corresponding metadata at the same time. Step 2: Construct a multi-UAV collaborative 3D vehicle detection model. The model structure is as follows: each UAV terminal is equipped with a shared parameter 2D vision backbone network, and the output of the 2D vision backbone network is connected to a feature compression module; the master UAV terminal is equipped with a channel recovery module, and the output of the channel recovery module is connected to a collaborative spatial encoder and a 2D sensing head; the output of the 2D sensing head is connected to a conditional hybrid query generator, and the outputs of both the conditional hybrid query generator and the collaborative spatial encoder are connected to a collaborative spatial decoder; the output of the collaborative spatial decoder is connected to a coordinate transformation module, which outputs the 3D vehicle detection results in a unified coordinate system at the intersection. Step 3: The multi-UAV collaborative 3D vehicle detection model is trained using a two-stage training method with task decoupling to obtain the weights of the trained model; Step 4: Input the multi-drone multi-view images and metadata at the same time into the trained model, and output the vehicle category, 3D center position, 3D size, orientation angle and detection confidence in the unified coordinate system of the intersection.
[0029] In step 1, one drone is designated as the master drone, and the remaining drones are designated as collaborating drones. The master drone is positioned above the central area of the intersection, and the collaborating drones are positioned above different entrances of the intersection, forming a cross array. Each drone is equipped with at least two types of cameras: forward-looking, rear-looking, left-looking, right-looking, and downward-looking. The camera fields of view of adjacent drones overlap and cover the central area of the intersection and the entrance areas. The metadata includes at least image timestamps, drone poses, camera intrinsic parameters, camera extrinsic parameters, and coordinate transformation relationships between the master drone and the collaborating drones.
[0030] In the model described in step 2, the two-dimensional visual backbone network extracts features from the images of each camera view of each UAV to obtain two-dimensional visual features; the feature compression module is composed of a standard convolutional layer and a depthwise separable convolutional layer connected in sequence, compressing the number of channels of the two-dimensional features from the original number of channels to a set number of channels; each UAV only sends the compressed two-dimensional features, and after the master UAV receives the compressed two-dimensional features from each UAV, it restores the number of channels to the original number of channels through the channel recovery module, and forms a collaborative two-dimensional feature set according to the UAV number, camera number and timestamp.
[0031] Furthermore, in step 2, the cooperative space encoder sets up multiple learnable cooperative space queries, each corresponding to a three-dimensional reference position within the unified cooperative space of the intersection. For any three-dimensional reference position, based on the pose of each UAV and the intrinsic and extrinsic parameters of the corresponding camera, the three-dimensional reference position is projected onto the view of each camera of each UAV. Multiple sampling points are selected around the effective projection position, and cross-view deformable attention is used to adaptively weight the two-dimensional features corresponding to each sampling point. After the layered processing of self-attention, residual normalization, spatial cross-attention and feedforward network, a unified cooperative space representation is obtained. The cross-view deformable attention learns multiple sampling offsets and corresponding normalized weights around the projection position for each attention head, and performs bilinear sampling from the two-dimensional features of the effective view; feature aggregation is performed only on the projected view with positive depth and located within the image boundary; the cooperative spatial encoder is composed of multiple coding layers connected in series, and each coding layer sequentially performs self-attention, residual normalization, cross-view spatial cross attention, residual normalization and feedforward network, and obtains a unified cooperative spatial representation after multiple iterations, thereby establishing the spatial correspondence between different UAVs and different camera views after the two-dimensional feature exchange is completed.
[0032] Furthermore, in the model described in step 2, the two-dimensional sensing head predicts vehicle bounding boxes, confidence levels, and categories based on the two-dimensional features of each camera. After non-maximum suppression, the K vehicle candidate boxes with the highest confidence levels are retained. For each vehicle candidate box, region features are cropped from the corresponding two-dimensional features through region of interest alignment. Max pooling and average pooling are performed along the channel dimension, respectively. The resulting spatial description maps are concatenated and then used to generate a spatial attention map through convolutional layers and activation functions. The spatial attention map is then used to perform weighted summation of the region features to obtain the vehicle instance content query. The spatial attention map is used to highlight the vehicle-related regions inside the candidate boxes and suppress interference from boundary backgrounds and occluded regions.
[0033] Furthermore, in the model described in step 2, the conditional hybrid query generator includes a cone-shaped relative position encoder; for each vehicle 2D candidate box, the homogeneous pixel coordinates of its four corner points are extracted; each corner point is mapped to a normalized ray direction at a unit relative depth using the inverse matrix of the corresponding camera intrinsic matrix; using the pose of the corresponding UAV and the camera extrinsic parameters, the spatial points corresponding to each normalized ray direction are transformed to the main UAV coordinate system; the transformed camera optical center is used as the vertex, and the four transformed spatial points are used to define the cone range, and the camera optical center and the four spatial points are concatenated to form a geometric position description vector; the geometric position description vector is mapped to a vehicle instance position query using a multilayer perceptron, and the instance position query is superimposed on the 2D feature region of the corresponding vehicle candidate box to obtain a position-enhanced collaborative 2D feature set; the encoding does not estimate the absolute depth of the vehicle, but describes the relative imaging range, camera observation direction, and positional relationship of the candidate box in a unified space.
[0034] Furthermore, the conditional hybrid query generator includes the generation of hybrid content queries and hybrid location queries. First, an initial 3D content query and an initial 3D location query with a preset total number of queries N are set. When the number of vehicle 2D candidate boxes K is less than N, the first K queries in the corresponding initial 3D queries are replaced with K vehicle instance content queries and K vehicle instance location queries, respectively, and the remaining NK initial 3D queries are retained. When K is greater than or equal to N, the vehicle instance content queries and vehicle instance location queries corresponding to the first N vehicle 2D candidate boxes are selected according to the confidence level to form hybrid content queries and hybrid location queries, respectively. The retained initial 3D queries are used to compensate for occluded vehicles, extremely small-scale vehicles, and vehicles crossing view boundaries that are missed by the 2D sensing head.
[0035] Furthermore, the collaborative spatial decoder first maps the conditional mixture query to normalized 3D reference points using a multilayer perceptron. In each decoding layer, the conditional mixture query is sequentially processed by self-attention, residual normalization, deformable cross-attention based on the 3D reference points, residual normalization, and feedforward network processing. The deformable cross-attention learns sampling offsets and corresponding weights around the 3D reference points for each attention head to sparsely aggregate local vehicle features from the unified collaborative spatial representation. After multilayer decoding, the vehicle category is output through a classification branch, and the vehicle center coordinates, length, width, height, and orientation angle are output through a regression branch. The collaborative spatial decoder consists of multiple decoding layers connected in series. Each decoding layer gradually refines the three-dimensional reference points and vehicle three-dimensional bounding box parameters during the layer-by-layer iteration process. The coordinate transformation module transforms the vehicle three-dimensional bounding box from the main UAV coordinate system to the intersection unified coordinate system according to the rigid body transformation matrix between the main UAV and the intersection unified coordinate system. The final output vehicle three-dimensional bounding box includes at least the center coordinates, length, width, height, and orientation angle under the intersection unified coordinate system.
[0036] In step 3, the first stage uses two-dimensional vehicle category loss, two-dimensional bounding box regression loss and distribution focus loss to train the two-dimensional visual backbone network and the two-dimensional perceptron; after the first stage of training is completed, the parameters of the two-dimensional visual backbone network and the two-dimensional perceptron are frozen; in the second stage, the Hungarian matching algorithm is used to complete the allocation of three-dimensional prediction results and three-dimensional annotation boxes, and the feature compression and recovery module, the cooperative spatial encoder, the conditional hybrid query generator and the cooperative spatial decoder are trained through three-dimensional classification loss and three-dimensional bounding box regression loss.
[0037] In step 4, the intersection road boundaries, approach lanes, exit lanes, stop lines, and lane center lines are pre-mapped to the intersection unified coordinate system. Based on the spatial inclusion relationship between the center of the vehicle's 3D bounding box and the road area, the approach direction and lane of the vehicle are determined, and the 3D detection results of the vehicle are sent to the intersection traffic management terminal in the form of timestamp, vehicle category, 3D center position, 3D size, orientation angle, road area, and detection confidence.
[0038] Example 2
[0039] like Figure 1 , Figure 2 As shown, this embodiment relates to a multi-UAV collaborative 3D vehicle detection method for complex urban intersections, including the following steps: Step 1: Deploy multiple drones equipped with multi-view RGB cameras to complete time synchronization, camera calibration, pose acquisition, and training data preprocessing; Step 2: Construct a multi-UAV collaborative 3D vehicle detection model consisting of a 2D vision backbone network, a feature compression and recovery module, a 2D perceptron, a collaborative spatial encoder, a conditional hybrid query generator, and a collaborative spatial decoder; Step 3: Adopt a two-stage training method with task decoupling. First, train the two-dimensional vision backbone network and the two-dimensional perception head, then freeze the trained parameters and train the remaining three-dimensional detection modules. Step 4: Input the multi-drone multi-view images and metadata at the same time into the trained model, and output the vehicle category, 3D center position, 3D size, orientation angle and detection confidence in the unified coordinate system of the intersection.
[0040] Step 1: Deployment of multiple drones, data collection and preprocessing, specifically including: Step 1.1: Deploy one main UAV over the central area of the intersection, and one cooperating UAV over each of the four approach directions, forming a cross-shaped array of five UAVs. Each UAV is equipped with five RGB cameras: forward-looking, rear-looking, left-looking, right-looking, and downward-looking. The camera fields of view of adjacent UAVs cover the center of the intersection and adjacent approach lanes, allowing targets obscured by buildings, green facilities, or large vehicles to be observed from other perspectives.
[0041] Step 1.2: Synchronize image acquisition from the five UAVs using a unified clock; calibrate the intrinsic parameter matrix and extrinsic parameters of each camera relative to the UAV's own coordinate system; and obtain the pose of each UAV relative to the unified coordinate system of the intersection using the onboard positioning and attitude determination module. Using the master UAV's coordinate system as the reference coordinate system for collaborative computation, calculate the rigid body transformation matrix from the collaborating UAV to the master UAV based on the pose of each UAV, and associate and store the timestamp, UAV number, camera number, intrinsic parameters, extrinsic parameters, and coordinate transformation matrix with the corresponding images.
[0042] Step 1.3: In this embodiment, UAV3D format data acquired by five UAVs in a cross-array configuration is used for model training and validation. The data contains 1000 scenes, with 20 frames continuously acquired for each scene; each frame contains 25 images with a resolution of 800×400 pixels from five cameras of each of the five UAVs, totaling approximately 500,000 images and containing approximately 3.3 million 3D bounding box annotations for vehicles. The data is organized in nuScenes format, with 700 scenes used for training, 150 scenes for validation, and the remaining scenes for testing.
[0043] Step 1.4: Scale the input image to 704×256 pixels, and synchronously update the camera intrinsic parameters and image enhancement matrix according to the scaling, cropping, or flipping parameters; normalize the pixel values to form a multi-UAV multi-view input under the same timestamp. The unified detection range for intersections is set to [-102.4 m, 102.4 m] in the x and y directions and [-10 m, 12 m] in the z direction. 3D bounding boxes outside this range are not included in the loss calculation.
[0044] Step 2: Construct a multi-UAV collaborative 3D vehicle detection model, specifically including: Step 2.1: Construct a 2D feature extraction and lightweight communication module. Let L be the number of drones participating in the collaboration, and each drone contain M cameras. The image acquired by the nth camera of the u-th drone is... Each UAV uses a shared parameter 2D visual backbone network to extract features, resulting in 2D features. :
[0045] Here, Backbone represents a two-dimensional visual backbone network with shared parameters, and C, H, and W represent the number of feature channels, height, and width, respectively. In this embodiment, L=5, M=5, the input size is 704×256 pixels, and the backbone network outputs two-dimensional features with a stride of 8 and the number of channels C=64, therefore H=32 and W=88.
[0046] The feature compression module sequentially employs standard convolution and depthwise separable convolution to compress the number of channels from 64 to 16. The collaborative UAV transmits the compressed features via a wireless link, and the master UAV uses the channel recovery module to restore the received features to 64 channels, forming a collaborative two-dimensional feature set based on UAV number, camera number, and timestamp.
[0047] Here, Compress and Decompress represent feature compression and channel recovery operations, respectively. This represents the set of collaborative 2D features obtained by the master drone. In this embodiment, four collaborative drones transmit single-precision features from five camera views respectively, with a single collaborative communication data volume of 3.4375 MB; depth estimation and bird's-eye view construction are not performed before feature transmission.
[0048] Step 2.2: Construct a cooperative spatial encoder, the structure of which is as follows: Figure 3 As shown. The cooperative spatial encoder sets 128×128 learnable cooperative spatial queries within the aforementioned detection range, with a query dimension of 256. Each query corresponds to a reference position p within a unified cooperative space. For the i-th camera of the u-th UAV, the camera intrinsic parameter matrix is used... Rotation matrix from camera coordinate system to main UAV coordinate system Translation vector Project the reference position onto the corresponding image plane:
[0049] Where Π represents homogeneous coordinate transformation and perspective projection operations. This represents the projected position of reference position p in the i-th camera image of the u-th UAV. A view from a camera is considered valid only if the projected point has positive depth and lies within the image boundary.
[0050] The collaborative spatial encoder consists of six serially connected coding layers. Each coding layer sequentially includes self-attention, residual normalization, cross-view spatial cross-attention, residual normalization, and a feedforward network. Spatial cross-attention centers on the effective projection point, learning multiple sampling offsets and normalized weights for each attention head, and performing bilinear sampling from the corresponding two-dimensional features. The update of the l-th coding layer for the query corresponding to the reference position p is as follows:
[0051] Where SCA represents cross-view spatial cross-attention, and FFN represents feedforward network. and Let these represent the input query and output query of the l-th layer, respectively. After six iterations, a unified collaborative space representation is obtained. This allows for the establishment of spatial correspondences between different UAVs and different camera views after the two-dimensional feature exchange is completed.
[0052] Step 2.3: Construct a conditional hybrid query generator, the structure of which is as follows: Figure 4 As shown, the 2D sensing head predicts vehicle bounding boxes, categories, and confidence levels based on features from each camera. After non-maximum suppression, K candidate vehicle boxes are retained in descending order of confidence. For the k-th candidate box, region features of a fixed spatial size are extracted using region of interest alignment. Max pooling and average pooling are performed along the channel dimension respectively. The concatenation of these two pooling operations is then followed by a 7×7 convolution and a sigmoid function to generate a spatial attention map.
[0053] in, and The channel max pooling plot and channel average pooling plot represent the regional characteristics, respectively. Represents a convolution mapping. This represents the Sigmoid function. The spatial attention map is used to perform a normalized weighted summation on the region features to obtain the vehicle instance content query:
[0054] Where h and w represent spatial indices in the regional features, and ε is a minimal constant set to prevent the denominator from being zero. This indicates the query for the instance content corresponding to the k-th candidate box. This operation highlights the vehicle area inside the candidate box and suppresses interference from the background and occluded areas at the edges of the candidate box.
[0055] Furthermore, according to Figure 5 The process shown constructs an instance-level cone-shaped relative position query. Homogeneous pixel coordinates of the four corner points of the k-th candidate box are extracted and converted into four normalized imaging rays at unit relative depth using the inverse of the corresponding camera intrinsic matrix. Based on the camera extrinsic parameters and the UAV pose, the four spatial points on the rays are transformed to the main UAV coordinate system. Using the camera optical center... Using these four spatial points as the vertices of a cone, we concatenate them with the camera's optical center to obtain a fifteen-dimensional geometric position description vector:
[0056] in, This represents the coordinates of the spatial point corresponding to the j-th corner point of the k-th candidate box in the main UAV coordinate system. This is achieved through a multilayer perceptron. The location query is mapped to an instance location query and broadcast overlaid onto the two-dimensional feature region of the corresponding candidate box, so that the encoder features and decoder queries adopt the same relative geometric prior.
[0057] To avoid confusion with the number of cameras, the following is based on... This represents the total number of queries performed by the decoder, and lets... Before Replace each random 3D content query with a vehicle instance content query, and then... Each random 3D location query is replaced with an instance location query, and the rest... Each random three-dimensional query remains unchanged, forming a conditional mixed query that includes mixed content queries and mixed location queries:
[0058] Two-dimensional prior queries are used to guide the decoder to prioritize candidate vehicle regions, while retained random three-dimensional queries are used to compensate for severely occluded vehicles, extremely small-scale vehicles, and vehicles crossing view boundaries that the two-dimensional sensing head may miss.
[0059] Step 2.4: Construct a cooperative spatial decoder, the structure of which is as follows: Figure 6 As shown. The collaborative spatial decoder consists of six decoding layers connected in series. First, a multilayer perceptron is used to map the conditional mixed query into normalized three-dimensional reference points:
[0060] MLP stands for Multilayer Perceptron. This represents a normalized set of 3D reference points. Each decoding layer sequentially performs self-attention, residual normalization, deformable cross-attention based on 3D reference points, residual normalization, and feedforward network processing on the query, progressively refining the reference points and the vehicle's 3D bounding box at each layer. Finally, the classification branch outputs the vehicle category. The regression branch outputs the vehicle's 3D bounding box. :
[0061] Where N represents the total number of queries; the vehicle's 3D bounding box includes at least the center coordinates, length, width, height, and orientation angle in the main UAV coordinate system. The bounding box is transformed into coordinates using a rigid body transformation matrix from the main UAV to the intersection's unified coordinate system, and the road area where the vehicle is located is determined based on the spatial relationship between the bounding box center and the road boundary, approach lane, exit lane, stop line, and lane centerline.
[0062] Step 3: Train the multi-UAV cooperative 3D vehicle detection model using a two-stage approach with task decoupling, specifically including: Step 3.1: In the first stage, the multi-view images of the training set are input into the shared two-dimensional visual backbone network and two-dimensional perceptron. The two-dimensional task loss is composed of two-dimensional vehicle category loss, two-dimensional bounding box regression loss and distribution focus loss. The two-dimensional visual backbone network and two-dimensional perceptron are updated through backpropagation so that they can obtain stable vehicle appearance representation and candidate box generation capabilities.
[0063] Step 3.2: After the first stage of training is completed, freeze the parameters of the 2D vision backbone network and the 2D perception head; input the multi-UAV multi-view images, camera calibration parameters, UAV pose and 3D vehicle annotations at the same time into the model, and train the feature compression and recovery module, the cooperative spatial encoder, the conditional hybrid query generator and the cooperative spatial decoder.
[0064] Step 3.3: In the second stage, use Hungarian matching to... Each 3D prediction result is assigned to a 3D bounding box, and the matching cost is a weighted average of vehicle classification cost, 3D center location cost, 3D size cost, and orientation cost. Gradient updates are performed using the 3D classification loss and the 3D bounding box regression loss. When the validation set metric no longer improves, the current model parameters are saved, and the parameters with the best validation results are used as the final weights.
[0065] The main training parameters in this embodiment are shown in Table 1. During training, a multi-view consistent data augmentation strategy is adopted, and the camera parameters related to the geometric transformation of the image are updated synchronously to ensure that the projection relationship remains consistent with the augmented image.
[0066] Table 1 shows the main implementation parameters of the multi-UAV collaborative 3D vehicle detection model.
[0067] Table 1
[0068] Step 4: Model testing, online detection, and result output, specifically including: Step 4.1: Input the multi-UAV multi-view images and corresponding metadata from the same timestamp in the test set into the trained model, and sequentially perform 2D feature extraction and compression, cross-UAV 2D feature transmission, cooperative spatial encoding, conditional hybrid query generation, and cooperative spatial decoding to obtain the vehicle 3D detection results. The Normalized Detection Score (NDS) is used to evaluate the overall detection performance, and the number of parameters, computational cost, and single communication data volume of the feature communication module are statistically analyzed.
[0069] Table 2 shows the detection performance and communication efficiency of this embodiment.
[0070] Table 2
[0071] The above results show that this embodiment achieves high 3D vehicle detection accuracy by compressing 2D feature exchange and cross-view sparse aggregation without sending bird's-eye view features. Compared with the collaborative scheme that transmits 16 MB of dense bird's-eye view features in a single transmission, the amount of data in a single communication is reduced by about 78.52%, which can meet the collaborative perception requirements under the conditions of limited bandwidth and link fluctuations at complex urban intersections.
[0072] Step 4.2: During online operation at the intersection, each collaborating UAV sends compressed 2D features and necessary metadata to the master UAV according to the timestamp. After completing 3D detection, the master UAV converts the vehicle bounding boxes to the intersection's unified coordinate system and outputs the timestamp, vehicle type, 3D center position, length, width, height, orientation angle, direction of entry, lane, and detection confidence level. The structured results can be sent to a traffic management terminal for temporary traffic monitoring, accident scene situational awareness, congestion analysis, or signal control assistance.
[0073] In this embodiment, the number of drones, cameras, collaborative space range, number of queries, number of feature channels, and training parameters can be adjusted according to the intersection size, traffic density, flight altitude, and wireless link bandwidth. Any technical solution that first exchanges two-dimensional visual features, then constructs a unified collaborative space, and uses two-dimensional vehicle priors and random three-dimensional queries to jointly guide three-dimensional decoding is an implementation of the concept of this invention.
[0074] The embodiments described in this specification are merely one specific implementation of the inventive concept. The scope of protection of this invention should not be limited to the specific parameters and device configurations described in the embodiments, but also includes equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A multi-UAV collaborative 3D vehicle detection method for complex urban intersections, characterized in that, Includes the following steps: Step 1: Deploy at least two drones equipped with multi-view cameras over a complex urban intersection, synchronize the time of each drone, calibrate the cameras and acquire their poses, and collect multi-view images of the intersection and corresponding metadata at the same time. Step 2: Construct a multi-UAV collaborative 3D vehicle detection model. The model structure is as follows: each UAV terminal is equipped with a shared parameter 2D vision backbone network, and the output of the 2D vision backbone network is connected to a feature compression module; the master UAV terminal is equipped with a channel recovery module, and the output of the channel recovery module is connected to a collaborative spatial encoder and a 2D sensing head; the output of the 2D sensing head is connected to a conditional hybrid query generator, and the outputs of both the conditional hybrid query generator and the collaborative spatial encoder are connected to a collaborative spatial decoder; the output of the collaborative spatial decoder is connected to a coordinate transformation module, which outputs the 3D vehicle detection results in a unified coordinate system at the intersection. Step 3: The multi-UAV collaborative 3D vehicle detection model is trained using a two-stage training method with task decoupling to obtain the weights of the trained model; Step 4: Input the multi-drone multi-view images and metadata at the same time into the trained model, and output the vehicle category, 3D center position, 3D size, orientation angle and detection confidence in the unified coordinate system of the intersection.
2. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 1, characterized in that, In step 1, one drone is designated as the master drone, and the remaining drones are designated as collaborating drones. The master drone is positioned above the central area of the intersection, and the collaborating drones are positioned above different entrances of the intersection, forming a cross array. Each drone is equipped with at least two of the following: forward-looking, rear-looking, left-looking, right-looking, and downward-looking cameras. The fields of view of adjacent drones overlap and cover the central area of the intersection and the entrance areas. The metadata includes at least image timestamps, drone poses, camera intrinsic parameters, camera extrinsic parameters, and coordinate transformation relationships between the master drone and the collaborating drones.
3. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 1, characterized in that, In the model of step 2, the two-dimensional vision backbone network extracts features from the images of each camera view of each UAV to obtain two-dimensional visual features; the feature compression module is composed of a standard convolutional layer and a depthwise separable convolutional layer connected in sequence, which compresses the number of channels of the two-dimensional features from the original number of channels to a set number of channels; each UAV only sends the compressed two-dimensional features, and after the master UAV receives the compressed two-dimensional features from each UAV, it restores the number of channels to the original number of channels through the channel recovery module, and forms a collaborative two-dimensional feature set according to the UAV number, camera number and timestamp.
4. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 1, characterized in that, In the model of step 2, the cooperative space encoder sets up multiple learnable cooperative space queries, each cooperative space query corresponding to a three-dimensional reference position within the unified cooperative space of the intersection; for any three-dimensional reference position, based on the pose of each UAV and the intrinsic and extrinsic parameters of the corresponding camera, the three-dimensional reference position is projected onto the view of each camera of each UAV; multiple sampling points are selected around the effective projection position, and cross-view deformable attention is used to adaptively weight the two-dimensional features corresponding to each sampling point. After the layered processing of self-attention, residual normalization, spatial cross attention and feedforward network, a unified cooperative space representation is obtained. The cross-view deformable attention learns multiple sampling offsets and corresponding normalized weights around the projection position for each attention head, and performs bilinear sampling from the two-dimensional features of the effective view. Feature aggregation is performed only on projected views with positive depth that are located within the image boundary. The collaborative spatial encoder consists of multiple coding layers connected in series. Each coding layer sequentially performs self-attention, residual normalization, cross-view spatial cross-attention, residual normalization, and feedforward network. After multiple iterations, a unified collaborative spatial representation is obtained, thereby establishing the spatial correspondence between different UAVs and different camera views after the two-dimensional feature exchange is completed.
5. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 1, characterized in that, In the model described in step 2, the 2D sensing head predicts vehicle bounding boxes, confidence scores, and categories based on the 2D features of each camera. After non-maximum suppression, the K vehicle candidate boxes with the highest confidence scores are retained. For each vehicle candidate box, region features are cropped from the corresponding 2D features through region of interest alignment. Max pooling and average pooling are performed along the channel dimension, respectively. The resulting spatial description maps are concatenated and then used to generate a spatial attention map through convolutional layers and activation functions. The spatial attention map is then used to perform weighted summation of the region features to obtain the vehicle instance content query. The spatial attention map is used to highlight the vehicle-related regions inside the candidate boxes and suppress interference from boundary backgrounds and occluded regions.
6. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 1, characterized in that, In the model described in step 2, the conditional hybrid query generator includes a cone-shaped relative position encoder; for each vehicle 2D candidate box, the homogeneous pixel coordinates of its four corner points are extracted; each corner point is mapped to a normalized ray direction at a unit relative depth using the inverse matrix of the corresponding camera intrinsic matrix; using the pose of the corresponding UAV and the camera extrinsic parameters, the spatial points corresponding to each normalized ray direction are transformed to the main UAV coordinate system; the transformed camera optical center is used as the vertex, and the four transformed spatial points are used to define the cone range, and the camera optical center and the four spatial points are concatenated to form a geometric position description vector; the geometric position description vector is mapped to a vehicle instance position query using a multilayer perceptron, and the instance position query is superimposed on the 2D feature region of the corresponding vehicle candidate box to obtain a position-enhanced collaborative 2D feature set; the encoding does not estimate the absolute depth of the vehicle, but describes the relative imaging range, camera viewing direction, and positional relationship of the candidate box in a unified space.
7. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 6, characterized in that, The conditional hybrid query generator includes the generation of hybrid content queries and hybrid location queries. First, it sets up an initial 3D content query and an initial 3D location query with a preset total of N queries. When the number of vehicle 2D candidate boxes K is less than N, the first K queries in the corresponding initial 3D queries are replaced with K vehicle instance content queries and K vehicle instance location queries, respectively, and the remaining NK initial 3D queries are retained. When K is greater than or equal to N, the vehicle instance content queries and vehicle instance location queries corresponding to the first N vehicle 2D candidate boxes are selected according to confidence level to form hybrid content queries and hybrid location queries, respectively. The retained initial 3D queries are used to compensate for occluded vehicles, extremely small-scale vehicles, and vehicles crossing view boundaries that are missed by the 2D sensing head.
8. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 1, characterized in that, In the model described in step 2, the cooperative space decoder first maps the conditional mixture query to normalized 3D reference points through a multilayer perceptron. In each decoding layer, the conditional mixture query is processed sequentially by self-attention, residual normalization, deformable cross-attention based on the 3D reference points, residual normalization, and feedforward network processing. The deformable cross-attention learns sampling offsets and corresponding weights around the 3D reference points for each attention head to sparsely aggregate local vehicle features from the unified cooperative space representation. After multi-layer decoding, the vehicle category is output through the classification branch, and the vehicle center coordinates, length, width, height and orientation angle are output through the regression branch. The collaborative spatial decoder consists of multiple decoding layers connected in series. Each decoding layer gradually refines the three-dimensional reference points and vehicle three-dimensional bounding box parameters during the layer-by-layer iteration process. The coordinate transformation module transforms the vehicle three-dimensional bounding box from the main UAV coordinate system to the intersection unified coordinate system according to the rigid body transformation matrix between the main UAV and the intersection unified coordinate system. The final output vehicle three-dimensional bounding box includes at least the center coordinates, length, width, height, and orientation angle under the intersection unified coordinate system.
9. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 1, characterized in that, In step 3, the first stage uses two-dimensional vehicle category loss, two-dimensional bounding box regression loss and distribution focus loss to train the two-dimensional vision backbone network and the two-dimensional perceptron; after the first stage of training is completed, the parameters of the two-dimensional vision backbone network and the two-dimensional perceptron are frozen; in the second stage, the Hungarian matching algorithm is used to complete the allocation of three-dimensional prediction results and three-dimensional annotation boxes, and the feature compression and recovery module, the cooperative spatial encoder, the conditional hybrid query generator and the cooperative spatial decoder are trained through three-dimensional classification loss and three-dimensional bounding box regression loss.
10. The multi-UAV collaborative 3D vehicle detection method for complex urban intersections according to claim 1, characterized in that, In step 4, the intersection road boundaries, approach lanes, exit lanes, stop lines, and lane center lines are pre-mapped to the intersection unified coordinate system. Based on the spatial inclusion relationship between the center of the vehicle's 3D bounding box and the road area, the vehicle's approach direction and lane are determined. The vehicle's 3D detection results are then sent to the intersection traffic management terminal in the form of timestamp, vehicle type, 3D center position, 3D size, orientation angle, road area, and detection confidence.
