Method, system and device for detecting road vehicle speed and vehicle distance based on unmanned aerial vehicle vision

By combining the improved YOLOv11 algorithm with the BotSort framework and an innovative calibration method, the problems of small target detection and trajectory loss in UAV vision systems have been solved, achieving efficient and accurate vehicle speed and distance measurement, and adapting to the real-time monitoring needs of complex traffic scenarios.

CN120877528BActive Publication Date: 2025-12-12NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511357893.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2025-12-12
Estimated Expiration
2045-09-23

AI Technical Summary

Technical Problem

Traditional detection methods such as inductive loops and microwave radar are costly and inflexible in complex traffic scenarios, making them difficult to adapt to dynamic monitoring needs. Furthermore, the performance of UAV vision systems decreases when detecting small target vehicles from a high-altitude perspective. Traditional multi-target tracking algorithms are prone to trajectory loss or identification confusion when moving quickly or being occluded. The conversion between pixel coordinates and world coordinates is complex and has poor adaptability.

Method used

This paper integrates the improved YOLOv11 algorithm with the BoT-SORT tracking framework, combines an innovative reference calibration method, and performs real-time vehicle tracking by improving the YOLOv11 network and BotSort algorithm. It establishes a transformation matrix between pixel coordinates and world coordinates, uses the EMA module and SPPF_LSKA multi-scale fusion unit to improve feature extraction, adds a small target detection head, and calculates vehicle speed and distance by combining homography matrix calibration.

Benefits of technology

It achieves low-cost, high-precision detection of road vehicle speed and distance, improves detection accuracy and speed, meets the real-time data requirements of intelligent transportation systems, and provides a stable and reliable solution for intelligent traffic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120877528B_ABST
    Figure CN120877528B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of intelligent transportation, and discloses a method, system and equipment for detecting road vehicle speed and vehicle distance based on unmanned aerial vehicle vision. The method comprises the following steps: tracking vehicles in a video taken by an unmanned aerial vehicle in real time by improving a YOLOv11 network and a BotSort algorithm, obtaining vehicle trajectories, converting pixel coordinates of vehicles detected in each frame into world coordinates by combining a conversion matrix H of pixel coordinates and world coordinates, and forming a trajectory sequence of vehicles in a world coordinate system; for a vehicle i, obtaining corresponding world coordinates from pixel coordinates at time t and (t+delta t) in consecutive video frames through the conversion matrix H, calculating displacement between two points according to an Euclidean distance formula, and calculating average speed of the vehicle in the time period. The application can realize efficient, stable and reliable vehicle speed measurement and vehicle distance calculation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of intelligent transportation, and particularly relates to a method, system and device for detecting road vehicle speed and vehicle distance based on unmanned aerial vehicle vision. BACKGROUND

[0002] With the rapid development of intelligent transportation systems (ITS), higher requirements are put forward for real-time speed monitoring and vehicle distance detection of road vehicles.

[0003] Traditional detection methods such as ground inductive coils and microwave radars have problems such as high deployment cost, poor flexibility, and high maintenance difficulty, and are difficult to adapt to the dynamic monitoring needs of complex traffic scenes.

[0004] Detection technology based on machine vision has become a research hotspot in the field of traffic monitoring due to its advantages of non-contact, wide coverage, and rich information. Among them, the monitoring mode of unmanned aerial vehicles carrying visual sensors has great application potential in urban road monitoring, highway inspection, emergency command and other scenes due to its unique advantages such as flexible high-altitude perspective, rapid deployment, and large-scale traffic flow perception.

[0005] In the field of vehicle detection and tracking technology, the YOLO series algorithm is widely used in real-time target detection tasks due to its end-to-end efficient detection capability. However, in complex road scenes, vehicles are densely packed and frequently occluded, and the detection performance of traditional target detection algorithms for small target vehicles decreases under the high-altitude perspective of unmanned aerial vehicles. Traditional multi-target tracking algorithms (such as DeepSORT) rely on the simple fusion of motion prediction and appearance features, and are prone to track loss or identity (ID) switching confusion when targets move quickly, change posture, or are temporarily occluded, resulting in cumulative errors in continuous measurement of speed and vehicle distance.

[0006] In the aspect of coordinate conversion and parameter measurement, how to accurately convert pixel coordinates to world coordinates in the unmanned aerial vehicle vision system is a key technical difficulty. Traditional calibration methods rely on high-precision calibration objects or complex calculation models, which are cumbersome to deploy and have poor adaptability in actual traffic scenes. SUMMARY

[0007] The present application aims to overcome the shortcomings of the prior art and provide a method, system and device for detecting road vehicle speed and vehicle distance based on unmanned aerial vehicle vision, which combines improved YOLOv11 algorithm and BoT-SORT tracking framework, and realizes efficient vehicle speed measurement and vehicle distance calculation through innovative reference object calibration method, providing a low-cost and high-precision solution for intelligent transportation management and automatic driving roadside perception systems.

[0008] Specifically, the present application is implemented by using the following technical solutions.

[0009] On one hand, the present invention provides a road vehicle speed detection method based on UAV vision, comprising:

[0010] By improving the YOLOv11 network and using the BotSort algorithm, vehicles in the drone aerial videos are tracked in real time to obtain vehicle trajectories. Then, the pixel coordinates of the detected vehicles in each video frame are transformed using the pixel coordinates to world coordinates transformation matrix H. Convert to world coordinates This forms the trajectory sequence of the vehicle in the world coordinate system. , where t represents a time frame;

[0011] For a given vehicle i, suppose that in several consecutive video frames, the pixel coordinates at times t and t+∆t are respectively and The corresponding world coordinates are obtained through the transformation matrix H between pixel coordinates and world coordinates. and Calculate the displacement d between two points using the following Euclidean distance formula. i :

[0012] Calculate the average speed v of the vehicle during the time interval from t to (t+∆t). i for:

[0013] Furthermore, the improved YOLOv11 network includes:

[0014] An EMA module is embedded in the C3k2 module of the backbone network to construct an attention-enhanced feature extraction unit;

[0015] The SPPF module in the neck network is upgraded to the SPPF_LSKA multi-scale fusion unit to construct a feature fusion structure that enhances long-range dependencies.

[0016] Based on the existing three-scale detection head, a new micro-target detection head has been added to form a four-level detection system.

[0017] Furthermore, the EMA module in the C3k2 module of the backbone network, which constructs an attention-enhanced feature extraction unit, includes:

[0018] The original features X∈R are input into the improved YOLOv11 network. C×H×W First, the feature maps are divided into multiple sub-feature groups and then reshaped through batch processing. The grouped feature maps are as follows:

[0019]

[0020] in, grouped feature map; reshape represents a grouping operation on X; B is the dimension of batch processing; C is the number of feature maps; H is the height of the feature map; W is the width of the feature map; and g is the number of groups;

[0021] The sub-features in each sub-feature group enter two parallel branches, and multi-scale feature extraction is performed on the parallel branches; one branch is a channel attention branch, spatial average pooling is performed on the sub-features respectively, global statistics are extracted, then channel information is fused through 1x1 convolution, and channel attention weights are generated using Sigmoid activation, which are multiplied with the original features to realize dynamic calibration of the channel dimension; the other branch is a spatial attention branch, 3x3 convolution is applied to the sub-features to capture local spatial context, and then average pooling is performed to compress the spatial dimension, and then spatial attention weights are generated through Softmax, which are broadcasted to 1xHxW and used for weighting of the spatial dimension;

[0022] The outputs of the two parallel branches are fused in the spatial and channel dimensions, the channel weights of the channel attention branch are added to the spatial weights of the spatial attention branch, and then Sigmoid normalization is performed to obtain joint attention weights, which are multiplied with the original features to complete multi-scale attention modulation; the modulation results of all sub-feature groups are combined to restore the original channel dimension CxHxW, and finally the residual connection is added to the original features to obtain the output.

[0023] Further, the SPPF module in the neck network is upgraded to an SPPF_LSKA multi-scale fusion unit to construct a long-distance dependence enhanced feature fusion structure, which comprises:

[0024] 1-2-1) The dynamic weighted pooling of LSKA is used to replace the fixed pooling kernel of the SPPF module in the neck network of the original YOLOv11 network, which includes three core branches: a local receptive field branch that extracts local detail features through 3x3 convolution to capture high-frequency information; a global receptive field branch that expands the receptive field through 7x7 convolution to model long-distance spatial dependence relationships; and an attention weight generation branch that generates a channel attention vector a through global average pooling and a fully connected layer;

[0025] 1-2-2) The features of different kernels are fused with the attention weights to generate weighted multi-scale features:

[0026] 1-2-3) Spatial pyramid pooling reconstruction, the weighted multi-scale features are combined with stepwise pooling kernels according to the following formula, and multi-granularity semantic information of the target is captured through pooling operations of different scales;

[0027] 1-2-4) Output feature reorganization, restore the pooled features to the original dimension, and connect with the input feature residual, finally output the multi-scale features fused with local and global attention guided.

[0028] Further, the original three-scale detection head is added to the new micro-target detection head to form a four-level detection system, which includes:

[0029] On the basis of the original detection head of YOLOv11, a higher resolution micro-target detection head is added, which fuses the shallow feature map of the backbone network through two layers of bilinear upsampling to generate the corresponding original Figure 1 / 8 scale feature layer.

[0030] Further, the conversion matrix H of the pixel coordinates and the world coordinates is obtained by the following method:

[0031] Select a section of the unmanned aerial vehicle video to be processed, take several frames of the video to calibrate the candidate area, and select a fixed physical size feature from the candidate area as a calibration reference;

[0032] A world coordinate system O−XYZ is established, taking the road surface as the XY plane, and the origin O is set as a certain fixed feature point. For the reference object with a known fixed physical size feature, its world coordinates are determined through geometric relationship , select multiple feature point pairs (u i ,v i )↔(X i ,Y i );

[0033] The conversion matrix H of the pixel coordinates and the world coordinates satisfies the following formula:

[0034]

[0035] Through at least 4 groups of feature point pairs (u i ,v i )↔(X i ,Y i ), the unknown parameters h 11 , h 12 , h 13 , h 21 , h 22 , h 23 , h 31 , h 32 of the conversion matrix H of the pixel coordinates and the world coordinates are solved.

[0036] Further, the fixed physical size feature is:

[0037] The lane structure features in the candidate region include, but are not limited to, lane line length, lane line spacing along the road traffic direction, lane line width, and lane line spacing along the road traffic direction; or

[0038] The dynamic reference object is selected, and a standard size of the dynamic reference object is obtained from a preset size database.

[0039] In another aspect, the present application provides a road vehicle distance detection method based on unmanned aerial vehicle vision, comprising:

[0040] By improving the YOLOv11 network and the BotSort algorithm, the vehicles in the unmanned aerial vehicle aerial video to be processed are tracked in real time, the ID of each vehicle is obtained, and the world coordinate information of the road lane line is combined to determine whether the vehicles are in the same lane;

[0041] For two vehicles j and k in the same lane, the pixel coordinates and are extracted, the pixel coordinates are converted into world coordinates and respectively by combining the conversion matrix H of the pixel coordinates and the world coordinates;

[0042] The distance between the two vehicles j and k in the same lane is calculated by using the Euclidean distance formula :

[0043] .

[0044] In still another aspect, the present application provides a road vehicle speed and distance detection system based on unmanned aerial vehicle vision, which realizes the road vehicle speed and distance detection method based on unmanned aerial vehicle vision, and comprises an unmanned aerial vehicle perception subsystem, a vision processing server, a homography matrix calibration calculation engine, and a motion analysis module.

[0045] The unmanned aerial vehicle perception subsystem comprises a high-definition camera and an edge computing unit; the high-definition camera collects real-time video streams of the road and transmits them to the vision processing server; the edge computing unit realizes image preprocessing on the collected video streams;

[0046] The visual processing server comprises an improved YOLOv11 detection module, a BoT-SORT tracking module and a candidate region calibration unit; the improved YOLOv11 detection module realizes detection on an input video frame, and outputs a detection result of the video frame, comprising position information, category information and confidence of a vehicle detection frame, to the BoT-SORT tracking module; the BoT-SORT tracking module uses improved Kalman filtering to predict the detection result, and further reduces coordinate deviation caused by camera motion through camera motion compensation, and finally outputs a tracking vehicle ID through a multi-feature fusion matching strategy; and the candidate region calibration unit calibrates a road region based on a calibration method.

[0047] The homography matrix calibration calculation engine comprises a reference calibration module and a homography matrix calculator; the reference calibration module calibrates physical dimensions of a reference; and the homography matrix calculator solves a conversion matrix H of pixel coordinates and world coordinates.

[0048] The motion analysis module comprises a frame difference speed measurement module and / or a vehicle distance calculation module; the frame difference speed measurement module combines a timestamp to calculate displacement change of a vehicle in a set time period, and determines the speed of the vehicle; and the vehicle distance calculation module combines the conversion matrix H of pixel coordinates and world coordinates and the tracking vehicle ID to determine the vehicle distance of two tracking vehicles in the same lane.

[0049] In another aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the above-mentioned road vehicle speed and distance detection method based on UAV vision.

[0050] The road vehicle speed and distance detection method, system and device based on UAV vision of the present application have the following advantages:

[0051] In order to improve the performance of YOLOv11 algorithm in the road vehicle detection task, the road vehicle speed and distance detection method, system and device based on UAV vision of the present application are improved, and the improved YOLOv11 algorithm significantly improves the detection accuracy and speed of road vehicles, and the output detection frame coordinates, confidence and category are more accurate.

[0052] The method, system and device for detecting road vehicle speed and vehicle distance based on unmanned aerial vehicle vision of the application select BotSort algorithm as the core of the tracking module, the BotSort algorithm can directly use the high-quality detection result output by the improved YOLOv11 algorithm, realize the deep fusion of detection and trajectory through the joint measurement of cosine distance and Mahalanobis distance, form a "detection-tracking" closed loop optimization, and further improve the overall system performance; the BotSort algorithm is designed to be lightweight, while maintaining high MOTA (multi-target tracking accuracy), the operation efficiency is better than similar algorithms, which can meet the real-time processing requirements of unmanned aerial vehicles and realize "device lightweight".

[0053] In the unmanned aerial vehicle vision detection system, accurate conversion of pixel coordinates to world coordinates is the core premise of vehicle speed and vehicle distance measurement. The method, system and device for detecting road vehicle speed and vehicle distance based on unmanned aerial vehicle vision of the application can quickly establish the mapping relationship between pixel coordinates and world coordinates by setting a reference object with a known size in the scene and combining the method of solving the homography matrix, effectively reducing the calibration complexity and improving the robustness of the system in different monitoring scenes.

[0054] Whether it is the complex traffic environment of urban roads or the long-distance monitoring of highways, the method, system and device for detecting road vehicle speed and vehicle distance based on unmanned aerial vehicle vision of the application can realize stable and reliable speed measurement and distance measurement function through dynamic updating of coordinate conversion matrix and real-time adjustment of detection and tracking parameters; meet the real-time data requirements of intelligent transportation systems, provide strong support for traffic flow optimization, accident prevention, etc., provide a low-cost, high-precision solution for intelligent traffic management and automatic driving roadside sensing systems, and have broad application prospects. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1 is a system composition schematic diagram of an embodiment of the application.

[0056] Figure 2 is a detailed system flow schematic diagram of an embodiment of the application.

[0057] Figure 3 is an improved YOLOv11 network structure schematic diagram of an embodiment of the application.

[0058] Figure 4 is an EMA added to the improved YOLOv11 of an embodiment of the application.

[0059] Figure 5 is an improved YOLOv11 result schematic diagram of an embodiment of the application in a public data set VisDrone.

[0060] Figure 6is a reference feature of an embodiment of the present application and a corresponding relationship diagram of a world coordinate.

[0061] Figure 7 is a vehicle speed and distance measurement result diagram of an embodiment of the present application. DETAILED DESCRIPTION

[0062] The present application will be further described in detail below with reference to the embodiments and the accompanying drawings.

[0063] Embodiment 1:

[0064] An embodiment of the present application is a road vehicle speed and distance detection system based on unmanned aerial vehicle vision, as shown in the figure, including an unmanned aerial vehicle perception subsystem, a vision processing server, a homography matrix calibration calculation engine, and a motion analysis module. Figure 1

[0065] The unmanned aerial vehicle perception subsystem includes a high-definition camera and an edge computing unit. The high-definition camera collects real-time video streams of the road and transmits them to the vision processing server. The edge computing unit is equipped with a high-performance edge computing module (such as NVIDIA Jetson nano) to perform image denoising and image enhancement preprocessing on the collected video streams.

[0066] The vision processing server includes an improved YOLOv11 detection module, a BoT-SORT tracking module, and a candidate region calibration unit. The improved YOLOv11 detection module detects the input video frames and outputs the detection results of the video frames, including the position information, class information, and confidence of the vehicle detection box, to the BoT-SORT tracking module. The BoT-SORT tracking module uses an improved Kalman filter to predict the detection results, reduces the coordinate offset caused by camera motion through camera motion compensation (CMC), and finally outputs the tracking vehicle ID through a multi-feature fusion matching strategy to realize real-time and stable tracking of vehicles. The candidate region calibration unit calibrates the road region based on a calibration method.

[0067] The homography matrix calibration calculation engine includes a reference calibration module and a homography matrix calculator. The reference calibration module is used to calibrate the physical dimensions of the reference, such as the length of the lane dashed line, the width of the lane, and the length of the vehicle. The homography matrix calculator solves the conversion matrix H of the pixel coordinates and the world coordinates, thereby establishing the projection relationship of the pixel coordinate system to the world coordinate system.

[0068] The motion analysis module includes a frame difference speed measurement module and a distance calculation module. The frame difference speed measurement module calculates the displacement change of the vehicle within a certain time period combined with the timestamp to determine the speed of the vehicle. The distance calculation module determines the distance between two tracking vehicles in the same lane combined with the conversion matrix H of the pixel coordinates and the world coordinates and the tracking vehicle ID.​

[0069] Embodiment 2:

[0070] One embodiment of the present application is a method for detecting road vehicle speed and vehicle distance based on unmanned aerial vehicle vision, as shown in the following steps: Figure 2

[0071] I. Real-time tracking of vehicle lines in the unmanned aerial vehicle aerial video to be processed by improving the YOLOv11 network and the BotSort algorithm, using the vehicle trajectory obtained by tracking, combining the pixel coordinate and the world coordinate conversion matrix H, and converting the pixel coordinates of the vehicle detected in each frame into world coordinates to form a vehicle trajectory sequence in the world coordinate system , wherein t represents the time frame.

[0072] In complex traffic scenes, the vehicle target under the high-altitude perspective of the unmanned aerial vehicle often presents small size characteristics, and the traditional YOLO algorithm is prone to missed detection or false detection. The present application optimizes the original YOLOv11 architecture in three key parts of the backbone network, feature fusion module and detection head for the small target detection problem under the high-altitude perspective of the unmanned aerial vehicle, including the fusion of EMA attention mechanism, the improvement of SPPF module to SPPF_LSKA multi-scale fusion module and the addition of small target detection head, forming a three-layer architecture system of "backbone enhancement-multi-scale fusion-full-scale detection" to improve the precision of the model for small target detection. The improved YOLOv11 architecture is shown in Figure 3 .

[0073] Specifically, the improved YOLOv11 network of the present application comprises:

[0074] (I) Embedding an efficient multi-scale attention module (EMA) in the C3k2 module of the backbone network to construct an attention-enhanced feature extraction unit, as shown in Figure 4 . Specifically, it includes:

[0075] 1. The feature map X ∈ R C×H×W input into the improved YOLOv11 network is first divided into multiple sub-feature groups, and reshaped by batch dimension to retain complete channel information and reduce computational complexity. The feature map after grouping is as follows:

[0076]

[0077] wherein, the feature map after grouping; reshape represents the grouping operation on X; B is the dimension of the batch; C is the number of feature maps; H is the height of the feature map; W is the width of the feature map; g is the number of groups (for example, 32). ​

[0078] 2. The sub-features in each sub-feature group enter two parallel branches, and multi-scale feature extraction is performed on the parallel branches.

[0079] One branch (upper middle edge branch) is a channel attention branch: spatial average pooling (AvgPool) is performed on the sub-features to extract global statistics; then, 1x1 convolution is used to fuse channel information, and Sigmoid activation is used to generate channel attention weights; the weights are multiplied by the original sub-features to realize dynamic calibration of the channel dimension; Figure 4 The other branch (lower middle edge branch) is a spatial attention branch: 3x3 convolution is applied to the sub-features to capture local spatial context, and then average pooling is performed to compress the spatial dimension; then, Softmax is used to generate spatial attention weights; the weights are broadcasted to 1xHxW to be used for weighting in the spatial dimension. This branch focuses on spatial features under different receptive fields, and improves the ability to capture object edges and small targets.

[0080] Figure 4 3. Cross-dimension interaction and feature reorganization. The outputs of the two parallel branches are fused in the spatial and channel dimensions, the channel weights of the channel attention branch are added to the spatial weights of the spatial attention branch, and then Sigmoid normalization is performed to obtain joint attention weights. The weights are multiplied by the original features to complete multi-scale attention modulation. The modulation results of all sub-feature groups are combined to restore the original channel dimension CxHxW, and finally, the residual connection is used to superimpose the original features to obtain the output.

[0081] The application embeds an efficient multi-scale attention module (EMA) in the C3k2 module position of the backbone network (Backbone), adopts a cross-space-channel interaction mechanism, extracts local and global context information through parallel sub-branches, and dynamically calibrates the channel weights of the feature map. By optimizing the allocation of feature channel weights, the complex background interference is suppressed, and the key vehicle features are focused. The EMA mechanism reconstructs part of the channels to the batch dimension and groups the channel dimensions into multiple sub-features to uniformly distribute the spatial semantic features in each feature group in order to retain the information on each channel and reduce the computational overhead. Specifically, in addition to encoding global information to recalibrate the channel weights in each parallel branch, the output features of the two parallel branches are further aggregated through cross-dimension interaction to capture pixel-level pairwise relationships. By adding this attention mechanism, the false detection of vehicles and backgrounds (such as trees and shadows) at high-altitude perspectives is reduced; through multi-scale feature enhancement, the discrimination ability of occluded or blurred vehicles is improved. This method effectively combines global and local, channel and spatial attention while maintaining low computational cost and parameter quantity, avoiding the information loss caused by channel reduction in traditional methods.

[0082] The application embeds an efficient multi-scale attention module (EMA) in the C3k2 module position of the backbone network (Backbone), adopts a cross-space-channel interaction mechanism, extracts local and global context information through parallel sub-branches, and dynamically calibrates the channel weights of the feature map. By optimizing the allocation of feature channel weights, the complex background interference is suppressed, and the key vehicle features are focused. The EMA mechanism reconstructs part of the channels to the batch dimension and groups the channel dimensions into multiple sub-features to uniformly distribute the spatial semantic features in each feature group in order to retain the information on each channel and reduce the computational overhead. Specifically, in addition to encoding global information to recalibrate the channel weights in each parallel branch, the output features of the two parallel branches are further aggregated through cross-dimension interaction to capture pixel-level pairwise relationships. By adding this attention mechanism, the false detection of vehicles and backgrounds (such as trees and shadows) at high-altitude perspectives is reduced; through multi-scale feature enhancement, the discrimination ability of occluded or blurred vehicles is improved. This method effectively combines global and local, channel and spatial attention while maintaining low computational cost and parameter quantity, avoiding the information loss caused by channel reduction in traditional methods. ​

[0083] (ii) Upgrade the SPPF module in the neck network of the original YOLOv11 network to an SPPF LSKA multi-scale fusion unit, and construct a long-distance dependency enhanced feature fusion structure, including:

[0084] 1-2-1) Use the dynamic weighted pooling of LSKA (Large Separable Kernel Attention) to replace the fixed pooling kernel of the SPPF (Spatial Pyramid Pooling-Fast) module in the neck network of the original YOLOv11 network, which contains three core branches:

[0085] (1) Local receptive field branch (small kernel)

[0086]

[0087] Extract local detail features through 3x3 convolution to capture edge, texture and other high-frequency information. Among them, Fgroup is the input and grouped feature.

[0088] (2) Global receptive field branch (large kernel)

[0089]

[0090] Expand the receptive field through 7x7 convolution to model long-distance spatial dependency.

[0091] (3) Attention weight generation

[0092] Generate a channel attention vector a through global average pooling and a fully connected layer, as follows:

[0093]

[0094] Where W is a learning parameter used to dynamically assign the importance of different kernels.

[0095] 1-2-2) Multi-scale feature fusion: fuse the features of different kernels with attention weights according to the following formula to generate weighted multi-scale features F fused :

[0096]

[0097] This operation preserves the original features through residual connection while enhancing the response of key regions.

[0098] 1-2-3) Spatial pyramid pooling reconstruction, which combines the fused features with a ladder-shaped pooling kernel:

[0099]

[0100] Capturing multi-granular semantic information F of the target through pooling operations of different scales. pool .

[0101] 1-2-4) Output feature recombination: restore the pooled features to their original dimensions and connect them with the input feature residuals.

[0102]

[0103] The final output integrates multi-scale features guided by local and global attention while maintaining the original dimensionality.

[0104] The serial pooling structure in the original SPPF (Spatial Pyramid Pooling Fast Module) is replaced with the SPPF_LSKA module, and a lightweight large kernel attention (LSKA) unit is introduced. Long-range spatial dependencies are extracted through decomposed large kernel convolution (such as 7×7 depthwise separable convolution), and multi-branch pooling (max pooling and average pooling) is combined to achieve multi-granularity feature fusion. The receptive field is expanded to capture the overall structure of vehicles at a distance, which solves the problem of insufficient multi-scale feature fusion in long-distance scenes by the traditional SPPF module.

[0105] (III) Based on the original three-scale detection head of the original YOLO network, a small target detection head is added to form a four-level detection system.

[0106] The original YOLO network has three detector heads (P3, P4, and P5) from top to bottom, representing their detection capabilities at small, medium, and large scales, respectively. However, for small objects, there are problems such as few features, unclear semantic features, and the tendency for features to be submerged with continuous convolution.

[0107] This invention adds a micro-target detection head to the original three-scale detection heads P3, P4, and P5 of the YOLO network, forming a four-level detection system, specifically including:

[0108] By fusing shallow features from the third layer of the backbone network through two layers of bilinear upsampling (magnifying by 2 times each time) (preserving 1 / 4 of the original resolution information), the corresponding original... Figure 1 / 8 scale feature layers (e.g., 128×128 high-resolution feature layers). Utilizing the high spatial resolution information of shallow features improves the recall rate of small targets; through multi-level detection head collaboration, full-scale coverage from tiny to large vehicles is achieved.

[0109] By designing smaller convolution kernels and deeper network layers, the extraction ability of small target vehicle features is enhanced. On the basis of the original detection head (large, medium and small target detection layer) of YOLOv11, a higher resolution micro target detection head is added, the shallow feature map of the backbone network is fused through up-sampling to generate a feature layer with a size of 128x128, and a dense anchor frame (scaled to the original Figure 1 / 8 scale) is designed to cover micro targets. By using the high spatial resolution information of the shallow features, the recall rate of small targets is improved; through the cooperation of multiple detection heads, full-scale coverage from micro to large vehicles is realized.

[0110] Through the above improvements, the optimized YOLOv11 algorithm significantly improves the detection accuracy and speed of road vehicles, providing a more reliable foundation for subsequent vehicle tracking based on the BotSort algorithm and speed and vehicle distance calculation.

[0111] The present application adopts the VisDrone2019 dataset as the experimental data source, which contains rich images of road scenes from the perspective of unmanned aerial vehicles, covering samples of different light conditions, vehicle scales and background complexities, and has strong representativeness and challenge. During the training process, the number of training rounds is set to 100 to fully evaluate the learning ability and performance stability of the algorithm.

[0112] After 100 rounds of training, the improved YOLOv11 algorithm has achieved significant improvement in the mAP@0.5 indicator, compared with the original YOLOv11 algorithm, the improved YOLOv11 algorithm has achieved significant improvement in detection accuracy, as shown in Figure 5 , the accuracy is improved by 5%.

[0113] On the basis of detection, in order to realize the differentiation of each vehicle, a tracking algorithm is also needed.

[0114] Preferably, in another embodiment, the BotSort algorithm used by the present application is a high-efficiency multi-target tracking (MOT) algorithm based on deep matching and motion model, the core idea of which is to use improved Kalman filtering to predict the detection results of the current frame, then through camera motion compensation (CMC) to reduce the coordinate offset caused by camera motion, and finally through a multi-feature fusion matching strategy to realize stable tracking. Specifically:

[0115] (1) The position information, class information, confidence, etc. of the vehicle detection frame obtained by the improved YOLOv11 algorithm are converted into the information required by the BotSort algorithm (the coordinate information and confidence (x, y, conf) of the target obtained by YOLO detection, etc.), and are delivered to the BotSort algorithm. The BotSort algorithm uses an improved Kalman filter (KF) to predict the position of the detected target in the next frame. The KF state vector is defined as [x, y, w, h, vx, vy, vx, vy], wherein (x, y) is the center point coordinate, w is the width of the detection frame, h is the height of the detection frame, (vx, vy) is the change rate of the speed of the detected target in the x and y directions, respectively. x y w h x y w h

[0116] The improved Kalman filter is used for prediction instead of the traditional SORT method of only estimating the aspect ratio, which can improve the adaptability of vehicle size changes. The BotSort algorithm also dynamically adjusts the noise parameters according to the motion behavior and matching state of the target, so that the filter can more "intelligent"ly weigh the prediction and observation.

[0117] (2) Camera motion compensation: the affine transformation matrix A between adjacent video frames is calculated by a global motion estimation method (such as the OpenCV method in the opencv library), which is decomposed into a scale-rotation matrix S and a translation vector T.

[0118] A=[M,T]

[0119] Wherein, M is a scale-rotation matrix, used to control image scaling and rotation; T is a translation vector, representing the overall displacement of the camera in the image.

[0120] In order to make the predicted position closer to the real motion, the BotSort algorithm also corrects the predicted state and the covariance:

[0121] Prediction state correction:

[0122] Covariance correction:

[0123] Wherein, represents the predicted value of the Kalman filter for the target state of the current frame (including the center point coordinate, speed, etc.), T is a translation vector, covariance matrix, is the covariance matrix of the predicted state, ​​​​​​​​is the transpose matrix of the scale rotation matrix.

[0124] (3) The detected target and the predicted target are matched by adopting the following multi-level matching strategy:

[0125] The multiple targets detected in each frame of image need to be distinguished during tracking, and the detected target and the predicted target are matched after the position of the target in the previous frame is predicted.

[0126] The BotSort algorithm no longer uses a single matching method (such as only using IoU matching), but a matching strategy with multiple stages and priorities is designed to improve matching accuracy and stability.

[0127] The first priority is to match the high-confidence detection box based on the IoU distance: for the detection box in the current video frame with a confidence higher than the set high threshold, the IoU (intersection over union) distance is used to match the predicted box first; if it is not matched, the second priority matching method is used;

[0128] The second priority is that for the target in the current video frame with a confidence between the set low threshold and the set high threshold, the IoU cannot be used for matching alone, because the position may not be accurate, so the appearance feature (ReID) and the IOU are combined to judge. The following formula is the distance fusion formula used for judgment:

[0129]

[0130] Wherein, λ is a weight coefficient, used to dynamically balance the motion and appearance information, ; is the IoU distance of the predicted box and the detection box; is the cosine distance of the appearance feature (ReID) and the current detection. If ≤ the preset second priority matching result threshold, it is considered that the matching is unsuccessful, otherwise, the matching is successful.

[0131] The multi-level matching strategy can effectively solve the identity confusion problem when the trajectories cross, compared with the traditional greedy matching algorithm (such as IOU matching), the number of vehicle ID switching is greatly reduced, and a stable trajectory sequence is provided for subsequent vehicle distance calculation.

[0132] In the present application, the BotSort algorithm is selected as the core of the tracking module, mainly based on the following technical advantages and scene adaptability:

[0133] (1) To cope with the detection challenge under the perspective of the unmanned aerial vehicle:

[0134] When the unmanned aerial vehicle is imaging at high altitude, the vehicle target often presents small size and dense distribution characteristics. Although the improved YOLOv11 detection head improves the small target detection accuracy, the positioning error (such as boundary box offset) of the detection box may still lead to tracking association difficulties. The multi-level matching strategy of the BotSort algorithm preferentially matches high confidence detection results, can filter low confidence detection boxes, and reduces the probability of false association.

[0135] The motion of the vehicle on the road has strong dynamics (such as lane changing and crossing driving), and the traditional motion model (such as the uniform motion assumption) is easy to fail. The adaptive motion model of the BotSort algorithm can learn the vehicle motion mode in real time, dynamically adjust the prediction parameters combined with the position, speed and other information of the detection box, and significantly improve the trajectory continuity.

[0136] (2) Strengthen the robustness of complex scenes:

[0137] There are often obstructions (such as trees, buildings obstructing part of the vehicle), changes in light (such as shadow areas) and other disturbances in urban roads. The appearance feature matching mechanism of the BotSort algorithm can still maintain feature association when the target is partially obscured through deep feature extraction, reducing the loss of vehicle ID caused by appearance changes.

[0138] For multi-vehicle dense scene, the global optimal matching algorithm of the BotSort algorithm can effectively solve the identity confusion problem when the trajectories cross, and compared with the traditional greedy matching algorithm (such as IOU matching), the number of vehicle ID switching is greatly reduced, providing stable trajectory sequence for subsequent vehicle distance calculation.

[0139] (3) Cooperative optimization with improved detection algorithm:

[0140] Through the improved YOLOv11 algorithm, the detection accuracy of multi-scale vehicles is improved, and the detection box coordinates, confidence and appearance features output are more accurate. The BotSort algorithm can directly use these high-quality detection results, through a multi-level matching strategy, to realize the deep fusion of detection and tracking, form a "detection-tracking" closed loop optimization, and further improve the overall system performance.

[0141] The unmanned aerial vehicle platform is limited by computing power and power consumption, and needs to realize real-time detection and tracking under limited resources. The BotSort algorithm is designed to be lightweight, while maintaining high MOTA (multi-target tracking accuracy), and has higher operation efficiency than similar algorithms (such as FairMOT, DeepSORT), which can meet the real-time processing (≥25FPS) requirements of the unmanned aerial vehicle, and adapt to the design goal of "device lightweight" in the present application.

[0142] Preferably, in another embodiment, the pixel coordinate and world coordinate conversion matrix H in step one is based on the homography matrix calibration method of scene reference, using fixed or dynamic reference objects with known physical dimensions in the road (such as lane line length, lane width, standard vehicle length, etc.), to construct the mapping relationship of pixel coordinates and world coordinates, which specifically includes the following steps:

[0143] 1) Extract reference object features and corresponding world coordinates

[0144] 1-A) Select a section of the unmanned aerial vehicle aerial video to be processed, take several frames of the video to calibrate the candidate area, including the area where the road is located, and the position of the lane; select a fixed physical dimension feature with a fixed physical dimension feature as a calibration reference from the candidate area.

[0145] Preferably, the length of the lane line, the distance between the lane lines in the traffic direction, the width of the lane line, and the distance between the lane lines in the traffic direction in the candidate area are measured as the calibration reference.

[0146] The fixed physical dimension feature can be a lane structure feature, including but not limited to lane dashes (the length of a single segment is usually 6m, and the interval is 9m), lane line width (standard lane width 3.5m or 3.75m), road edge line, etc. Dynamic reference objects can also be selected, and their standard dimensions can be obtained from a pre-set size database as fixed physical dimension features. For example, a small car is selected as a dynamic reference object, and the standard dimensions of the vehicle category (small car) are matched with the pre-set size database to obtain the standard dimensions of about 4m in length and 1.5m in width.

[0147] 1-B) Establish a world coordinate system O−XYZ, taking the road surface as the XY plane (Z=0), and the origin O can be set as a certain fixed feature point, such as the point with the same Y value as the first dashed line at the leftmost upper part of the lane area, as shown in Figure 6 The world coordinates of the reference object with known fixed physical dimension features can be directly determined by geometric relationship. Accordingly, multiple sets of feature point pairs (u i ,v i )↔(X i ,Y i ) can be selected.

[0148] 2) Solve the conversion matrix H of pixel coordinates and world coordinates

[0149] The conversion matrix H of pixel coordinates and world coordinates is a homography matrix, which describes the projection transformation relationship from the XY plane of the world coordinate system to the image pixel plane, and satisfies the following formula:

[0150]

[0151] At least 4 sets of feature point pairs (ui v i )↔(X i ,Y i ), the 8 unknown parameters of homography matrix H are solved by least squares method or RANSAC algorithm. The specific steps are as follows:

[0152] The linear equation set is constructed for each group of feature point pairs, and the homographic transformation formula is substituted to obtain:

[0153]

[0154] Convert to homogeneous equation form:

[0155]

[0156] Finally, the .

[0157] II. Calculate the vehicle speed by using time difference method.

[0158] For a vehicle i, assuming that in the continuous video frames, the pixel coordinates of the t and (t+∆t) time are and , the corresponding world coordinates obtained through the conversion matrix H are and , the displacement d between the two points is calculated according to the following Euclidean distance formula i :

[0159] The average speed v of the vehicle in the time period from t to (t+∆t) is calculated as: i

[0160] Embodiment 3:

[0161] Another embodiment of the application is a vehicle distance measurement method, comprising:

[0162] I. The video to be processed by the unmanned aerial vehicle aerial photography is tracked in real time by improving the Yolov11 network and the BotSort algorithm, and the ID of each vehicle obtained by tracking is combined with the world coordinate information of the road lane line to determine whether the vehicle is in the same lane.

[0163] II. For two vehicles j and k in the same lane, the pixel coordinates and are extracted, and the pixel coordinates are respectively converted into world coordinates and by combining the pixel coordinates with the world coordinate conversion matrix H.

[0164] ​III. Calculate the distance between two vehicles j and k in the same lane using the Euclidean distance formula. :

[0165]

[0166] IV. (Optional) Set safe following distance thresholds based on traffic regulations or practical application needs. When the calculated vehicle spacing < When this is triggered, an early warning is provided, offering real-time safety alerts to the intelligent traffic management system.

[0167] Vehicle speed and distance measurement results are as follows Figure 7 As shown.

[0168] In some embodiments, certain aspects of the above-described techniques may be implemented by one or more processors of a processing system executing software. The software includes one or more sets of executable instructions stored or otherwise tangibly implemented on a non-transitory computer-readable storage medium. The software may include instructions and certain data that, when executed by one or more processors, manipulate one or more processors to perform one or more aspects of the above-described techniques. The non-transitory computer-readable storage medium may include, for example, magnetic or optical disk storage devices, solid-state storage devices such as flash memory, cache, random access memory (RAM), or other non-volatile memory devices. The executable instructions stored on the non-transitory computer-readable storage medium may be source code, assembly language code, object code, or other instruction formats interpreted or otherwise executed by one or more processors.

[0169] Computer-readable storage media can include any storage medium or combination of storage media that can be accessed by a computer system during use to provide instructions and / or data to the computer system. Such storage media can include, but are not limited to, optical media (e.g., optical discs (CDs), digital versatile optical discs (DVDs), Blu-ray discs), magnetic media (e.g., floppy disks, magnetic tapes, or magnetic hard disks), volatile memory (e.g., random access memory (RAM) or cache), non-volatile memory (e.g., read-only memory (ROM) or flash memory), or microelectromechanical systems (MEMS) based storage media. Computer-readable storage media can be embedded in a computing system (e.g., system RAM or ROM), fixedly attached to a computing system (e.g., a magnetic hard disk drive), removably attached to a computing system (e.g., an optical disc or universal serial bus-based (USB) flash memory), or coupled to a computer system via a wired or wireless network (e.g., network-accessible storage (NAS)).

[0170] Note that not all of the activities or elements described above in the general description are required, that a portion of a specific activity or device can not be required, and that one or more further activities or devices can be performed or included in addition to those described. Still further, the order in which activities are listed are not necessarily the order in which they are performed. Also, the concepts have been described with reference to particular embodiments. However, one of ordinary skill in the art appreciates that various modifications and changes can be made without departing from the scope of the present disclosure as set forth in the claims below. Accordingly, the specification and figures are to be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of the present disclosure.

[0171] Benefits, other advantages, and solutions to problems have been described above with regard to specific embodiments. However, the benefits, advantages, solutions to problems, and any feature(s) that can cause any benefit, advantage, or solution to occur or become more pronounced are not to be construed as a critical, required, or essential feature of any or all the claims. Furthermore, the particular embodiments disclosed above are illustrative only as the disclosed subject matter can be modified and practiced in different but equivalent manners that are apparent to those skilled in the art having the benefit of the teachings herein. No terminology employed herein is intended to be particularly indicative or descriptive acronyms or naming conventions for any particular inventive element or method step. No terminology which is used to describe a particular embodiment should be construed as limiting of such embodiment. Other than the independently described claim language, no limitation relating to the precise construction of any element or instrumentality is intended. Thus, it is intended that the present disclosure cover any and all modifications and variations of the specific embodiments described herein. It is intended that the present disclosure be limited only by the terminology provided in the claims.

Claims

1. A method for detecting road vehicle speed based on UAV vision, characterized in that, include: By improving the YOLOv11 network and using the BotSort algorithm, vehicles in the drone aerial videos are tracked in real time to obtain vehicle trajectories. Then, the pixel coordinates of the detected vehicles in each video frame are transformed using the pixel coordinates to world coordinates transformation matrix H. Convert to world coordinates This forms the trajectory sequence of the vehicle in the world coordinate system. , where t represents a time frame; For a given vehicle i, in several consecutive video frames, the pixel coordinates at times t and t+∆t are respectively and The corresponding world coordinates are obtained through the transformation matrix H between pixel coordinates and world coordinates. and Calculate the displacement d between two points using the following Euclidean distance formula. i : ; Calculate the average speed v of the vehicle during the time interval from t to (t+∆t). i for: ; The improved YOLOv11 network includes: An EMA module is embedded in the C3k2 module of the backbone network to construct an attention-enhanced feature extraction unit; The SPPF module in the neck network is upgraded to the SPPF_LSKA multi-scale fusion unit to construct a feature fusion structure that enhances long-range dependencies. Based on the existing three-scale detection head, a new micro-target detection head has been added to form a four-level detection system; The EMA module in the C3k2 module of the backbone network, which constructs an attention-enhanced feature extraction unit, includes: The original features X∈R are input into the improved YOLOv11 network. C×H×W First, the feature maps are divided into multiple sub-feature groups and then reshaped through batch processing. The grouped feature maps are as follows: ; in, The feature map after grouping; reshape represents the grouping operation on X; B is the batch dimension; C is the number of feature maps; H is the feature map height; W is the feature map width; g is the number of groups; The sub-features in each sub-feature group are fed into two parallel branches, which perform multi-scale feature extraction. One branch is the channel attention branch, which performs spatial average pooling on each sub-feature to extract global statistics. Then, it fuses channel information through 1×1 convolution and uses Sigmoid activation to generate channel attention weights. These weights are multiplied by the original features to achieve dynamic calibration of the channel dimension. The other branch is the spatial attention branch, which applies 3×3 convolution to each sub-feature to capture the local spatial context. Then, it performs average pooling to compress the spatial dimension. Finally, it generates spatial attention weights through Softmax. These weights are broadcast and expanded to 1×H×W for spatial dimension weighting. The outputs of the two parallel branches are fused in both spatial and channel dimensions. The channel weights of the channel attention branch are added to the spatial weights of the spatial attention branch, and then normalized by Sigmoid to obtain the joint attention weights. These weights are multiplied by the original features to complete multi-scale attention modulation. The modulation results of all sub-feature groups are merged to restore the original channel dimension C×H×W. Finally, the output is obtained by superimposing it with the original features through residual connection.

2. The road vehicle speed detection method based on UAV vision according to claim 1, characterized in that, The step of upgrading the SPPF module in the neck network to an SPPF_LSKA multi-scale fusion unit and constructing a long-range dependency-enhanced feature fusion structure includes: 1-2-1) LSKA dynamic weighted pooling is used to replace the fixed pooling kernel of the SPPF module in the neck network of the original YOLOv11 network. It includes three core branches: a local receptive field branch, which extracts local detail features and captures high-frequency information through 3×3 convolution; a global receptive field branch, which expands the receptive field and models long-distance spatial dependencies through 7×7 convolution; and attention weight generation, which generates channel attention vector α through global average pooling and fully connected layers. 1-2-2) Fusing features from different kernels with attention weights generates weighted multi-scale features: 1-2-3) Spatial pyramid pooling reconstruction: The weighted multi-scale features are combined using a step-by-step pooling kernel to capture the multi-granular semantic information of the target through pooling operations at different scales. 1-2-4) Output feature recombination restores the pooled features to their original dimensions and connects them with the input feature residuals, ultimately outputting multi-scale features that are fused with local and global attention guidance.

3. The road vehicle speed detection method based on UAV vision according to claim 1, characterized in that, The addition of a micro-target detection head to the existing three-scale detection head, forming a four-level detection system, includes: Based on the original YOLOv11 detection head, a new high-resolution micro-target detection head is added. It generates a feature layer corresponding to 1 / 8 scale of the original image by fusing two layers of bilinear upsampling and the shallow feature map of the backbone network.

4. The road vehicle speed detection method based on UAV vision according to claim 1, characterized in that, The transformation matrix H between pixel coordinates and world coordinates is obtained in the following way: Select a segment of drone aerial video to be processed, and take several frames from the video to calibrate candidate regions; select regions with fixed physical size characteristics from the candidate regions as calibration benchmarks; Establish a world coordinate system O−XYZ, with the road surface as the XY plane and the origin O set as a fixed feature point. For a reference object with known fixed physical dimensions, determine its world coordinates through geometric relationships. Select multiple sets of feature point pairs (u i ,v i )↔(X i ,Y i ); The transformation matrix H between pixel coordinates and world coordinates satisfies the following equation: ; Through at least 4 sets of feature point pairs (u i ,v i )↔(X i ,Y i Solve for the unknown parameter h of the transformation matrix H between pixel coordinates and world coordinates. 11 h 12 h 13 h 21 h 22 h 23 h 31 h 32 .

5. The road vehicle speed detection method based on UAV vision according to claim 4, characterized in that, The fixed physical dimension feature is: The lane structure features in the candidate region include, but are not limited to, lane length, lane spacing along the road traffic direction, lane width, and lane spacing along the road traffic radial direction; or Select a dynamic reference object and obtain its standard dimensions from a preset size database.

6. A road vehicle distance detection method based on UAV vision, characterized in that, include: By improving the YOLOv11 network and BotSort algorithm, vehicles in the drone aerial video are tracked in real time, the ID of each vehicle is obtained, and the world coordinate information of the road lane lines is combined to determine whether the vehicles are in the same lane. For two vehicles j and k in the same lane, extract their pixel coordinates. and Using the transformation matrix H between pixel coordinates and world coordinates, the pixel coordinates are converted into world coordinates respectively. and ; The distance between two vehicles j and k in the same lane is calculated using the Euclidean distance formula. : ; The improved YOLOv11 network includes: An EMA module is embedded in the C3k2 module of the backbone network to construct an attention-enhanced feature extraction unit; The SPPF module in the neck network is upgraded to the SPPF_LSKA multi-scale fusion unit to construct a feature fusion structure that enhances long-range dependencies. Based on the existing three-scale detection head, a new micro-target detection head has been added, forming a four-level detection system; The EMA module in the C3k2 module of the backbone network, which constructs an attention-enhanced feature extraction unit, includes: The original features X∈R are input into the improved YOLOv11 network. C×H×W First, the feature maps are divided into multiple sub-feature groups and then reshaped through batch processing. The grouped feature maps are as follows: ; in, The feature map after grouping; reshape represents the grouping operation on X; B is the batch dimension; C is the number of feature maps; H is the feature map height; W is the feature map width; g is the number of groups; The sub-features in each sub-feature group are fed into two parallel branches, which perform multi-scale feature extraction. One branch is the channel attention branch, which performs spatial average pooling on each sub-feature to extract global statistics. Then, it fuses channel information through 1×1 convolution and uses Sigmoid activation to generate channel attention weights. These weights are multiplied by the original features to achieve dynamic calibration of the channel dimension. The other branch is the spatial attention branch, which applies 3×3 convolution to each sub-feature to capture the local spatial context. Then, it performs average pooling to compress the spatial dimension. Finally, it generates spatial attention weights through Softmax. These weights are broadcast and expanded to 1×H×W for spatial dimension weighting. The outputs of the two parallel branches are fused in both spatial and channel dimensions. The channel weights of the channel attention branch are added to the spatial weights of the spatial attention branch, and then normalized by Sigmoid to obtain the joint attention weights. These weights are multiplied by the original features to complete multi-scale attention modulation. The modulation results of all sub-feature groups are merged to restore the original channel dimension C×H×W. Finally, the output is obtained by superimposing it with the original features through residual connection.

7. A road vehicle speed and distance detection method system based on UAV vision, implementing the road vehicle speed detection method based on UAV vision as described in any one of claims 1-5 or the road vehicle distance detection method based on UAV vision as described in claim 6, characterized in that, It includes a drone perception subsystem, a vision processing server, a homography matrix calibration calculation engine, and a motion analysis module; The UAV perception subsystem includes a high-definition camera and an edge computing unit; the high-definition camera collects real-time video streams of the road and transmits them to the vision processing server. The edge computing unit performs image preprocessing on the acquired video stream; The vision processing server includes an improved YOLOv11 detection module, a BoT-SORT tracking module, and a candidate region calibration unit. The improved YOLOv11 detection module detects input video frames and outputs the detection results, including the vehicle detection box's position information, category information, and confidence score, which are then sent to the BoT-SORT tracking module. The BoT-SORT tracking module uses an improved Kalman filter to predict the detection results, then reduces coordinate offset caused by camera motion through camera motion compensation, and finally outputs the tracked vehicle ID through a multi-feature fusion matching strategy. The candidate region calibration unit calibrates the road area based on a calibration method. The homography matrix calibration calculation engine includes a reference object calibration module and a homography matrix calculator; the reference object calibration module calibrates the physical dimensions of the reference object; the homography matrix calculator solves for the transformation matrix H between pixel coordinates and world coordinates; The motion analysis module includes a frame difference speed measurement module and / or a vehicle distance calculation module; the frame difference speed measurement module calculates the displacement change of the vehicle within a set time period by combining the timestamp to determine the vehicle speed; the vehicle distance calculation module combines the transformation matrix H between the pixel coordinates and world coordinates and the tracking vehicle ID to determine the distance between two tracking vehicles in the same lane.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the road vehicle speed detection method based on UAV vision as described in any one of claims 1-5 or the road vehicle distance detection method based on UAV vision as described in claim 6.

Citation Information

Patent Citations

  • Face detection method and device based on YOLOv8 target detection model

    CN118470767A

  • Work vehicle detection and tracking method and system

    WO2023065395A1