A method for extracting trajectory data from drone aerial video of traffic participants at complex intersections
Through the combination of UAV aerial video data and MHA-YOLOv8 and T-SORT algorithms, the problem of low accuracy in extracting trajectories of traffic participants in complex intersections is solved, especially the identification and trajectory tracking of vulnerable road users, achieving high performance. Accurate and comprehensive traffic data acquisition.
Patent Information
- Application Number
- CN202311286306.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2043-10-07
AI Technical Summary
The existing technology has low accuracy in extracting trajectories of traffic participants in complex intersections, especially for vulnerable road users and trajectory tracking in complex intersection congestion situations. It is difficult for traditional methods to provide comprehensive and detailed traffic data.
UAV aerial video data is used, combined with GPS positioning and scale-invariant feature transformation algorithms for video stabilization processing, the MHA-YOLOv8 model is used for target detection, and the T-SORT algorithm is used for tracking and data extraction to build a high-precision map and output Multidimensional transportation vehicle trajectory data set.
It achieves high-precision extraction of trajectories of traffic participants at complex intersections, especially the accurate identification and trajectory tracking of vulnerable road users, improves the comprehensiveness and detail of traffic data, and solves the problems of low accuracy and insufficient coverage in traditional methods. question.
Smart Images

Figure CN118172385B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of traffic data processing, and in particular to a method for extracting trajectories of unmanned aerial vehicle (UAV) aerial video of traffic participants at complex intersections. Background Art
[0002] In the 21st century, the progress of autonomous vehicles, intelligent transportation systems, and smart cities has led to increasing interest in the extraction of trajectories of traffic participants. Trajectory data plays a key role in understanding traffic patterns, improving traffic safety, and facilitating urban planning and governance. However, due to limitations in viewing angles, occlusions, and resolution, traditional ground cameras or satellite images often fail to provide sufficiently accurate and comprehensive trajectory data. In recent years, drones have emerged as a new way to collect traffic data, along with their advanced imaging technology and real-time kinematic (RTK) positioning technology using the Global Navigation Satellite System (GNSS), which ensures the accuracy and effectiveness of data collection. However, the use of drones for traffic monitoring and management, especially the extraction of trajectories of traffic participants (TPs) in complex urban scenarios, still faces many challenges, including the accuracy of identifying small targets and the precise tracking of trajectories in complex intersections.
[0003] At present, the models that perform well in the field of target detection are: ①YOLO: Introduces a new architecture that can simultaneously predict multiple targets in an image and their respective locations; however, YOLO shows poor performance when dealing with small objects or overlapping objects. ②SSD: Outperforms YOLO in dealing with small objects, but requires a large number of annotated samples during the training phase. In order to improve accuracy and speed while improving the handling of small objects, a two-stage detector is proposed. ③Two-stage detector Mask R-CNN, Fast R-CNN, Faster R-CNN: Improve accuracy and speed while improving the handling of small objects, but despite the optimization, the CNN framework is a more complex model that requires more computing resources.
[0004] In the field of target tracking, the algorithm developed by Bewley et al. using SORT has advantages in simplicity and speed. However, when dealing with long-term occlusion and substantial changes in target appearance, its performance lags significantly behind more complex methods. Hou et al.'s Deep SORT introduced deep learning to enhance tracking performance, but its processing speed cannot meet the requirements of real-time processing. Voigtlaender et al.'s Siam R-CNN achieved higher tracking accuracy, but also required a large amount of training data and faced the challenge of overfitting. Therefore, the above target detection and target tracking methods have not been fully and exhaustively considered in the problem of traffic planning. Summary of the invention
[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method for extracting trajectories of traffic participants in complex intersections from drone aerial videos, thereby overcoming the defects in the prior art that vulnerable road users are not given enough attention and the trajectory extraction accuracy is low.
[0006] Technical solution: A method for extracting trajectories of traffic participants from drone aerial video at complex intersections, comprising the following steps:
[0007] A1. Video Collection: First, we use drones to collect data and use aerial survey drones to take aerial photos of intersections. We collect and manually annotate a drone bird’s-eye view dataset called VRUD (Vulnerable Road User Dataset), which includes a large number of vulnerable road users.
[0008] A2. Video processing: Combined with GPS positioning points, the scale-invariant feature transform (SIFT) algorithm is used to eliminate the interference of drones on the captured video;
[0009] A3. Target detection: Use the MHA-YOLOv8 model to perform target detection on all trajectory points in the video.
[0010] A4. Tracking and data extraction: Use the T-SORT algorithm to track the transportation vehicles, and convert the transportation vehicle trajectories into a coordinate system based on the collected GPS feature points, build a high-precision map, analyze the traffic data, and output a multi-dimensional high-precision transportation vehicle trajectory dataset in the form of a csv file.
[0011] Furthermore, the video processing method uses a scale-invariant feature transform (SIFT) algorithm combined with GPS feature points to achieve video stabilization and solve the image distortion problem, including the following steps:
[0012] B1. Use GPS feature points in high-precision maps constructed using aerial surveys as positioning points.
[0013] B2. Apply the SIFT operator to extract image feature points from the first and last frames of the video.
[0014] B3. Combine the positioning points with the image features through feature point matching, select several frames in the video for stabilization, and combine the positioning points with the image feature points obtained by SIFT.
[0015] B4. Use GPS positioning points and image feature points to construct the affine transformation matrix of the feature template.
[0016] B5. This matrix facilitates the rapid radial change and alignment of each frame in the video, effectively completing the entire video stabilization process.
[0017] Furthermore, the object detection method uses the MHA-YOLOv8 model. When the original object box in YOLOv8 is annotated with a horizontal bounding box, which is not suitable for annotating the track points in the aerial drone video, an oriented bounding box (OBB) detector is introduced to replace the horizontal bounding box detector, and the format of the data output is enhanced;
[0018] The YOLOv8 model integrates the attention mechanism to improve the performance of YOLOv8 in identifying small target VRUs (vulnerable road users).
[0019] Furthermore, the target detection method proposes an MHA-YOLOv8 framework; when the original YOLOv8 backbone relies on a CNN-based structure, which limits its ability to capture long-range interactions and global semantic relevance, a multi-head self-attention mechanism of the Transformer module is introduced, including the following steps:
[0020] C1. The input image region is mapped to three vectors — query vector, key vector, and value vector — through the embedded patch vector.
[0021] C2. The weight distribution between each query vector and all key vectors is obtained by calculating the dot product of and then scaling and softmax normalizing the result.
[0022] C3. Multiply the obtained similarity values by their respective value vectors to obtain semantic weights.
[0023] C4, add all semantic weights to the weight to produce self-attention features.
[0024] C5. Finally, a multi-layer perceptron (MLP) is used to obtain an information-rich feature map.
[0025] The specific formula is as follows:
[0026]
[0027] Where TA is the self-attention feature value; Q is the query vector; K is the key value; V is a value vector; d k Represents the scale factor.
[0028] The MHA-YOLOv8 framework is characterized in that a coordinate attention module is introduced into the YOLOv8 detection head to enhance the model's recognition performance for densely concentrated VRUs in a region; the coordinate attention module captures the relationship between all spatial positions in the input feature map through attention mapping, and the specific formula is as follows:
[0029]
[0030] Among them, CA i,j represents the value of the attention map, H and W represent the height and width of the input feature map respectively; Q′ i,j represents the query vector of the CA module, K′ u,v Indicates the key value, V u,v Represents the value of the feature map; where d′ k represents the dimension of the feature vector, and E represents the coordinate embedding of the relative position in the encoding space, represented by (i, j) and (u, v).
[0031] The MHA-YOLOv8 framework is characterized in that when the traditional convolution kernel will generate high computational cost, a depth-separable convolution (DSC) is used to decompose the convolution into depth convolution and point-by-point convolution, including the following steps:
[0032] D1. Deep convolution: Each channel of the input feature map is independently convolved using the corresponding kernel to obtain an intermediate feature map with the same number of channels as the input feature map.
[0033] D2. In the point-by-point convolution step, a 1×1 convolution kernel is applied to each channel of the intermediate feature map to obtain the final output feature map.
[0034] The tracking method is characterized in that: the T-sort algorithm introduces an IoU matching module.
[0035] The IoU matching module is responsible for determining whether the target is in the tunnel area and processing the trajectory of the target when tunnel occlusion occurs, including the following steps:
[0036] E1, the rotation bounding box of the marked target, the specific formula is as follows:
[0037] A t =[x t ,y t , w t ,h t ,θ t ]
[0038] Where (x t ,y t ) is the center coordinate of the bounding box, w t and h t Respectively represent the width and height of the bounding box, θ t Indicates the rotation angle of the bounding box.
[0039] E2. Express the target A at time t+1 as a rotating bounding box. The specific formula is as follows:
[0040] A t+1 =[xt+1 ,y t+1 , w t+1 ,h t+1 ,θ t+1 ]
[0041] E3, A t and A t+1 The formula for calculating the IOU value between is as follows:
[0042]
[0043] Where Area(Overlap) represents the intersection area of the rotation bounding box of object A at time t and t+1, and Area(A t ) and Area(A t+1 ) represent the rotated bounding box areas of object A at time t and t+1 respectively.
[0044] Furthermore, the tracking method is characterized in that: the T-sort algorithm introduces a CNN-MFE module, which is characterized in that: when the traditional trajectory extraction method is difficult to meet the needs of diverse and complex traffic participants, a convolutional neural network (CNN) is used for multi-task learning, and the motion trajectory features of various TPs are trained at the same time, including the following steps:
[0045] A continuous frame sequence containing all TPs is manually extracted from the traffic monitoring video. For each TPs, we annotate its rotation bounding box information in each frame, including the position (center coordinates, width, height) and rotation angle of the bounding box, and define the input of the CNN network as CNN-MFE. The specific formula is as follows:
[0046] X=[X1,X2,...,X T ]
[0047] Where X t Represents information about a rotated bounding box.
[0048] The specific formula for the output of the CNN network is as follows:
[0049] Z=F merge (Z task , Z type )
[0050] Where Z task represents the task-specific motion features, Z type Indicates type-specific motion characteristics.
[0051] The data extraction method is characterized in that the trajectory data of TPs is converted from the image coordinate system to the real coordinate system of the high-precision map by calibrating the GPS feature points, and includes the following steps:
[0052] F1. Calculate the coordinates of TPs in the image coordinate system and then transform them into the camera coordinate system.
[0053] F2. Use GPS feature points for calibration, determine the transformation matrix, and convert the camera coordinates of TPs into real-world coordinates. The specific formula for defining the trajectory data of TPs is as follows:
[0054] X img =[x1, x2, ..., x T ]
[0055] where x t Represents the image coordinates at time t;
[0056] F3. Use the inverse matrix of the camera intrinsic parameter matrix to transform the image coordinates into camera coordinates. The specific formula is as follows:
[0057]
[0058] Where K represents the intrinsic parameter matrix of the camera
[0059] F4. Use GPS feature points for coordinate calibration. The coordinates of GPS feature points in the camera coordinate system are:
[0060]
[0061] Real-world latitude and longitude coordinates are represented as:
[0062]
[0063] F5. Using the least squares method, find a transformation matrix T to satisfy the following equation:
[0064]
[0065] F6. Using the transformation matrix, the camera coordinates of TPs can be converted into the coordinates of the real world. The specific formula is as follows:
[0066]
[0067] F7. After coordinate transformation, a multi-dimensional, high-precision TPs trajectory dataset is obtained:
[0068]
[0069] Compared with the prior art, the present invention has the following beneficial effects:
[0070] 1. Unlike previous algorithms that only cover basic traffic scenarios such as highways, intersections, and T-junctions, complex intersections with unique situations, such as underpasses, U-turns, and dedicated turning lanes, have not received enough attention in these datasets.
[0071] 2. Existing mainstream datasets mainly focus on collecting and studying vehicle trajectories, while the trajectories of other TPs, such as vulnerable road users (VRUs), have not been fully addressed. These VRUs include pedestrians, cyclists, and others who behave differently from vehicles in the traffic system. Studying their movement trajectories is also crucial for enhancing traffic safety and traffic planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is a GPS coordinate information map;
[0073] Figure 2 This is the structural diagram of MHA-YOLOv8 and Transformer encoder;
[0074] Figure 3 It is the number graph of TPs in VURD dataset;
[0075] Figure 4 This is the evaluation result diagram of MHA-YOLOv8 and other algorithms on the VRUD dataset;
[0076] Figure 5 It is the framework diagram of T-SORT algorithm;
[0077] Figure 6 Comparison chart of tracking algorithms for VRUD dataset 。 DETAILED DESCRIPTION
[0078] The present invention will now be further described with reference to the embodiments and the accompanying drawings.
[0079] This embodiment provides a method for extracting trajectories of drone aerial video of traffic participants at a complex intersection, the method comprising:
[0080] Step 1, video acquisition: flight area planning: before data collection, careful flight area planning is essential. The selected area must be safe and comply with drone flight regulations, and the data objectives and expected image quality must be considered to determine the best flight altitude and route.
[0081] Mapping and aerial photography: Use the mapping and aerial photography capabilities of the aerial survey drone to build a map of the data collection area. This data will be used to create a high-precision map on the computer. The selection of the optimal height is critical to ensure full coverage of the intended collection area. Hover the drone in the center of the collection area, configure the camera lens, take overhead shots (θ = 90°) at an altitude of 100-120 meters, and facilitate subsequent data processing by maintaining an appropriate size for moving objects captured in the video recorded by the drone.
[0082] GPS feature point collection: Select 3 to 4 GPS feature points in the collection area, and use the pointing and positioning function of the aerial survey drone to obtain the precise latitude and longitude coordinates of these feature points.
[0083] Specifically, in this embodiment, the location of data collection is located at the intersection of 22.716 degrees north latitude and 113.300 degrees east longitude. The drone flies at an altitude of 120 meters and uses a bird's-eye view to collect images. In order to collect GPS feature point data, we set up 4 GPS calibration points on the ground and use the differential positioning (RTK) function of the drone to accurately collect the GPS coordinates of these calibration points. The coordinate information is as follows: Figure 1 shown.
[0084] The surveying and aerial photography capabilities of the M300 RTK UAV were then used to construct a high-precision intersection model, which accurately represents the layout of the intersection in detail and constructs a high-precision map.
[0085] Step 2: Video processing: When the drone hovers over the collection area to collect traffic video, external factors such as airflow, light, electromagnetic interference, and characteristics of the drone's own control system, GPS accuracy, flight mode, etc. may cause image distortion such as jitter, translation, and scaling.
[0086] In order to solve the above problems, the present invention uses the scale-invariant feature transform (SIFT) algorithm combined with GPS feature points to achieve video stabilization. First, we use the GPS feature points in the high-precision map constructed by aerial survey as positioning points. Then, the SIFT operator is applied to extract image feature points from the first and last frames of the video. Through feature point matching, the positioning points are combined with the image feature p, and several frames in the video are selected for stabilization.
[0087] To achieve stabilization, we use GPS positioning points and image feature points to construct the affine transformation matrix of the feature template. This matrix facilitates the rapid radial change and alignment of each frame in the video, effectively completing the entire video stabilization process. The fusion of GPS feature points and SIFT algorithm helps alleviate the image distortion problem and improve the overall quality of the captured traffic video.
[0088] Step 3, object detection: The original YOLOv8 backbone relies on a CNN-based structure, which limits its ability to capture long-range interactions and global semantic correlations. To address this limitation, the present invention proposes the MHA-YOLOv8 framework, such as Figure 2 As shown in the figure, two key improvements are made to YOLOv8. First, the Transformer module is integrated before the backbone network SPPF (Spatial Pyramid Pooling with Faster) to introduce a multi-head self-attention mechanism. Second, the Coordinate Attention (CA) module is introduced on the small detection head to improve recognition accuracy.
[0089] Specifically, in this embodiment, the specific steps of the MHA-YOLOv8 framework are as follows:
[0090] A1. First, the convolution layer extracts initial features from the input image, and then a depth-wise separable convolution layer (DSC) is used for further feature extraction and size reduction, including the following steps:
[0091] Depthwise convolution: Each channel of the input feature map is independently convolved using the corresponding kernel to obtain an intermediate feature map with the same number of channels as the input feature map.
[0092] Point-wise convolution: Apply a 1×1 convolution kernel to each channel of the intermediate feature map to obtain the final output feature map.
[0093] A2. Next, the Transformer module is used to learn the relationship between features, including the following steps:
[0094] The input image region is mapped to three vectors – query vector, key vector and value vector – through the embedded patch vector.
[0095] The weight distribution between each query vector and all key vectors is obtained by calculating the dot product of and then scaling and softmax normalizing the result.
[0096] The obtained similarity values are multiplied by their respective value vectors to obtain the semantic weights.
[0097] All semantic weights are then added together with the weights, resulting in a self-attention feature.
[0098] Finally, through the processing of multilayer perceptron (MLP), an information-rich feature map is obtained.
[0099] A3, SPPF module is used for multi-scale feature pooling. The goal of this process is to generate more expressive and multi-scale information features for subsequent object detection tasks.
[0100] A4, Neck network is used for feature fusion and dimensionality reduction to fuse feature maps of different scales together. This helps the model detect objects of different sizes.
[0101] A5. In the Head module, a multi-scale detection head is used to capture targets of different sizes in order to more comprehensively detect objects in the image. The CA detection head is used to detect small targets, which enhances the model's recognition performance for densely concentrated VRUs in the area.
[0102] In this example, the training set used is Figure 3 As shown, it includes 1670 pedestrians, 89 tricycles, 384 bicycles, 7870 motorcycles, 8910 cars, 423 trucks and 109 buses. It contains about 20,000 TPs trajectories, totaling about 50,000 frames.
[0103] We compare the proposed MHA-YOLOv8 vehicle detection method with the state-of-the-art methods, namely Mask R-CNN, Fast R-CNN, and YOLOv8. Since most traffic detection models do not take into account vulnerable road users such as pedestrians, electric vehicles, and motorcycles, we fine-tune these models using the VRUD dataset and use OBB format for data output to conduct a comprehensive comparison with our TPs detection algorithm, such as Figure 4 As shown in the figure, it can be seen that the addition of the attention mechanism significantly improves the performance of the YOLOv8 model in identifying small targets in mixed traffic flows. The addition of the coordinate attention (CA) module improves the global positioning accuracy of traffic participants (TPs).
[0104] Step 4. Tracking method: The most popular tracking algorithm is the SORT algorithm, which is a well-received online tracker. This algorithm enables the tracker to learn the characteristics of the target simultaneously in the tracking task, and is usually combined with Kalman filtering to improve accuracy. However, complex intersections require long-term occlusion situations, such as tunnel passing, and traditional tracking algorithms may not be suitable for TPs tracking datasets.
[0105] Therefore, the present invention proposes a T-SORT algorithm, such as Figure 5 As shown in the figure, the IoU matching module is integrated into the SORT++ framework, and the MFE model is implemented using the CNN network structure to adapt to the trajectory tracking of multiple types of TPs.
[0106] In this example, we use the detection results of the MHA-YOLO model as the input of the T-SORT algorithm, identify the bounding boxes and filter them to obtain the matching tracks. Subsequently, IoU matching is used to reduce the tracking error caused by occlusion.
[0107] The IoU matching module determines whether the target is in the tunnel area, and processes the target blocked by the tunnel, including the following steps:
[0108] B1. Input: Give the rotation bounding box of target A at time t and the rotation bounding box of target A at time t.
[0109] B2. Calculate IoU: Use the IoU formula to calculate the intersection and union ratio of the rotated bounding box of target A at time .
[0110] B3. Tunnel occlusion determination: Establish a threshold to determine the occurrence of tunnel occlusion. If it is greater than or equal to the threshold and the vehicle position is within the specified tunnel area, target A is considered to be experiencing tunnel occlusion. Otherwise, if target A is not within the tunnel area, target A is considered to be two different targets at time t and time t+1, and a new trajectory needs to be created.
[0111] B4. Connect trajectories: Connect the trajectory of target A before entering the tunnel with the trajectory after exiting the tunnel.
[0112] B5. Use the inertial prediction method to predict the motion trajectory of the vehicle in the tunnel. Integrate these three trajectories to ensure the continuity of the trajectory.
[0113] The trajectory data output by the IoU matching module is fed into the CNN-MFE module, which aims to address the challenge of motion feature extraction when tracking multiple types of TPs. Since different types of vehicles such as pedestrians, bicycles, motorcycles, and cars have different motion patterns, traditional trajectory extraction methods are difficult to meet the needs of diverse and complex traffic participants. In order to adapt to this diversity and capture discriminative motion features, we use convolutional neural networks (CNNs) for multi-task learning and train motion trajectory features of various TPs simultaneously.
[0114] In this embodiment, the following steps are specifically included:
[0115] C1, input layer: receives a continuous frame sequence X, each time step X t as input.
[0116] C2, convolution layer: Use multiple convolution kernels to perform convolution operations on the input features to extract spatial features.
[0117] C3, pooling layer: pooling operation is performed on the convolutional features to reduce the dimension.
[0118] C4, fully connected layer: fully connects the pooled features to generate task-specific and type-specific motion features. Task branch: independent branches are designed for different motion feature tasks, aiming to extract motion features of specific TPs.
[0119] C5, type branch: Establish independent branches for different types of TPs to facilitate the extraction of specific types of motion features.
[0120] C6, fusion layer: integrates task-specific and type-specific motion features to produce the final motion feature representation.
[0121] The features are then input into the Kalman filter, which continuously fuses state predictions and observation data to provide estimates of the target state and the uncertainty of the estimate, helping the tracking algorithm to more accurately estimate the target's motion and deal with uncertainty, thereby achieving efficient multi-target tracking.
[0122] Finally, the trajectory data of TPs is converted from the image coordinate system to the real coordinate system of the high-precision map. This conversion is completed by calibrating the GPS feature points, ensuring the accurate mapping of the location information of TPs to the latitude and longitude coordinates in the real world.
[0123] In this example, to evaluate the tracking accuracy of T-SORT, we manually annotated the locations and categories of all TPs in the VURD dataset as a test set. We calculated the MOTA (Multi-Object Tracking Accuracy) and IDSW (ID Switching) metrics and compared them with other popular object tracking methods, including SORT, DeepSORT, OC-SORT, and ByteTrack. The results are shown in Figure 2. Figure 6 As shown in Figure 2. T-SORT shows excellent performance with an IDSW value of 0, indicating no misidentification of IDs. According to our analysis, traditional tracking algorithms are prone to losing track of the target when facing tunnel occlusion. In contrast, our proposed T-SORT is able to locate the vehicle in a timely manner and concatenate the trajectories of the vehicle before, inside, and after the tunnel to form a complete trajectory.
Claims
1. A method for extracting trajectory data from drone aerial video of traffic participants at complex intersections. Its characteristics are as follows, including the following steps: A. High-precision data acquisition: A1. Video collection: First, we use drones to collect data. We use aerial survey drones to take aerial photos of intersections. We collect and manually annotate a drone bird’s-eye view dataset called the Vulnerable Road User Dataset, which includes a large number of vulnerable road users. A2. Video processing: Combined with GPS positioning points, the scale-invariant feature transformation algorithm is used to eliminate the interference of drones on the captured video; A3. Target detection: The MHA-YOLOv8 model is used to detect targets at all trajectory points in the video. The MHA-YOLOv8 model integrates the Transformer module before the YOLOv8 backbone network SPPF and introduces a multi-head self-attention mechanism. Secondly, a coordinate attention module is introduced on the small detection head. A4. Tracking and data extraction: Use the T-SORT algorithm to track the transportation vehicles, and convert the transportation vehicle trajectory into a coordinate system based on the collected GPS feature points, build a high-precision map, analyze the traffic data, and output a multi-dimensional high-precision transportation vehicle trajectory data set. The T-SORT algorithm integrates the IoU matching module into the SORT++ framework, and the T-SORT algorithm introduces the CNN network structure to implement the MFE model, including the use of convolutional neural networks for multi-task learning, and simultaneously trains the motion trajectory characteristics of various traffic participants, including the following steps: Manually extract continuous frame sequences containing all traffic participants from traffic surveillance videos; For each traffic participant, we annotate its rotation bounding box information in each frame, including the center coordinates, width, height and rotation angle of the bounding box, and define the input of the CNN network as follows: X=[X1,X2,…,X T ] Where X T Information representing the rotation bounding box; Use multiple convolution kernels to perform convolution operations on input features to extract spatial features; Then use the pooling layer to perform pooling operations on the convolutional features to reduce the dimension; Then, a fully connected layer is used to perform a fully connected operation on the pooled features to generate task-specific and type-specific motion features; Among them, the task branches include designing independent branches for different motion feature tasks, aiming to extract the motion features of specific traffic participants; The type branch includes establishing independent branches for different types of traffic participants, which is convenient for extracting specific types of motion features; The fusion layer is used to integrate task-specific and type-specific motion features to produce the final motion feature representation. The specific formula is as follows: Z=F merge (WITH task ,WITH type ) Among them, Z task represents the task-specific motion features, Z type Indicates type-specific motion characteristics.
2. The method for extracting trajectory data of drone aerial video of traffic participants at complex intersections according to claim 1, characterized in that: The video processing method adopts a scale-invariant feature transformation algorithm combined with GPS feature points to achieve video stabilization and solve the image distortion problem, and includes the following steps: B1. Use GPS feature points in high-precision maps constructed by aerial survey as positioning points; B2, applying the scale-invariant feature transformation operator to extract image feature points from the first and last frames of the video; B3, select several frames in the video for stabilization through feature point matching, and combine the positioning points with the image feature points obtained by scale-invariant feature transformation; B4. Use GPS positioning points and image feature points to construct the affine transformation matrix of the feature template; B5. This matrix facilitates the rapid radial change and alignment of each frame in the video, effectively completing the entire video stabilization process.
3. The method for extracting trajectory data of drone aerial video of traffic participants at complex intersections according to claim 1, characterized in that: The target detection method uses the MHA-YOLOv8 model, introduces a directional bounding box detector to replace the original YOLOv8 horizontal bounding box detector, and enhances the format of data output; the YOLOv8 model integrates the attention mechanism, and improves the performance of YOLOv8 in identifying small target vulnerable road users.
4. The method for extracting trajectory data of unmanned aerial vehicle aerial video of traffic participants at complex intersections according to claim 1, characterized in that: The target detection method proposes the MHA-YOLOv8 framework; introduces the multi-head self-attention mechanism of the Transformer module, including the following steps: The self-attention feature is calculated by the following formula: Where TA is the self-attention feature value; Q is the query vector; K is the key value; V is a value vector; d k represents the scale factor; Finally, an information-rich feature map is obtained through multi-layer perceptron processing.
5. The method for extracting trajectory data of drone aerial video of traffic participants at complex intersections according to claim 1 is characterized in that: The YOLOv8 detection head introduces a coordinate attention module; the coordinate attention module captures the relationship between all spatial positions in the input feature map through attention mapping. The specific formula is as follows: Among them, CA i,j represents the value of the attention map; H and W represent the height and width of the input feature map respectively; Q′ i,j represents the query vector of the coordinate attention module; K′ u,v Indicates key value; V u,v Represents the value of the feature map; d′ k represents the dimension of the feature vector; E represents the coordinate embedding of the relative position in the encoding space, represented by (i, j) and (u, v).
6. The method for extracting trajectory data of drone aerial video of traffic participants at complex intersections according to claim 1, characterized in that: In the MHA-YOLOv8 framework, the convolutional layer first extracts initial features from the input image, and then a depth-wise separable convolutional layer is used for further feature extraction and size reduction, including the following steps: Deep convolution: Each channel of the input feature map is independently convolved using the corresponding kernel to obtain an intermediate feature map with the same number of channels as the input feature map; Point-wise convolution: Apply a 1×1 convolution kernel to each channel of the intermediate feature map to obtain the final output feature map.
7. The method for extracting trajectory data of a traffic participant from an unmanned aerial vehicle video at a complex intersection according to claim 1, characterized in that: The T-SORT algorithm introduces an IoU matching module; the IoU matching module is responsible for determining whether the target is in the tunnel area and processing the trajectory of the target when tunnel occlusion occurs, including the following steps: E1. The rotation bounding box of the marked target. The specific formula is as follows: A t =[x t ,y t ,w t ,h t ,θ t ] Where (x t ,y t ) is the center coordinate of the bounding box; w t and h t Respectively represent the width and height of the bounding box; θ t Indicates the rotation angle of the bounding box; E2. Express the target A at time t+1 as a rotating bounding box. The specific formula is as follows: A t+1 =[x t+1 ,y t+1 ,w t+1 ,h t+1 ,θ t+1 ] E3, A t and A t+1 The calculation formula of intersection-over-combination ratio is as follows: Area(Overlap) represents the intersection area of the rotation bounding box of object A at time t and t+1; Area(A t ) and Area(A t+1 ) represent the rotated bounding box areas of object A at time t and t+1 respectively.
8. The method for extracting trajectory data of drone aerial video of traffic participants at complex intersections according to claim 1, characterized in that: The conversion of the trajectory data of traffic participants from the image coordinate system to the real coordinate system of the high-precision map is completed by calibrating the GPS feature points, including the following steps: G1. Calculate the coordinates of the traffic participants in the image coordinate system and then transform them into the camera coordinate system; G2. Use GPS feature points for calibration, determine the transformation matrix, and convert the camera coordinates of the traffic participant into real-world coordinates; the specific formula for defining the trajectory data of the traffic participant is as follows: X img =[x1,x2,...,x t ] x t Represents the image coordinates at time t; G3. Use the inverse matrix of the camera intrinsic parameter matrix to transform the image coordinates into camera coordinates. The specific formula is as follows: Where K represents the intrinsic parameter matrix of the camera; Represents the camera coordinates; G4. Use GPS feature points for coordinate calibration. The coordinates of GPS feature points in the camera coordinate system are: G5. Using the least squares method, find a transformation matrix T to satisfy the following equation: in is the camera coordinate of the traffic participant at time t; is the coordinate of the GPS feature point in the camera coordinate system; T is a 3x3 transformation matrix; G6. Finally, the camera coordinates of traffic participants can be converted into real-world coordinates using the transformation matrix. The specific formula is as follows: G7. After coordinate transformation, a multi-dimensional, high-precision trajectory dataset of traffic participants is obtained: Where X gps Represents the real-world coordinate position of traffic participants.
