In recent years, the rapid development of intelligent transportation systems has highlighted the critical need for real-time traffic monitoring and accident response. Among various technologies, Unmanned Aerial Vehicles (UAV drones) have emerged as a powerful tool due to their flexibility, aerial perspective, and ability to cover wide areas. Coupled with deep learning techniques, UAV drones offer unprecedented potential for automating traffic accident detection, which is essential for reducing response times and enhancing road safety. In this study, I address the challenge of detecting traffic accidents in complex urban environments using video footage from UAV drones. Traditional methods often rely on manual reporting or simulated models, which suffer from delays and limited adaptability. To overcome these limitations, I propose a novel framework that integrates an improved YOLOv8 object detection model with an optimized DeepSORT multi-object tracking algorithm. This approach aims to achieve high accuracy and real-time performance, enabling rapid identification and localization of accidents from UAV drone videos. The significance of this work lies in its potential to integrate into smart city infrastructures, providing a scalable solution for traffic management and emergency services. Throughout this article, I will emphasize the role of UAV drones in transforming traffic surveillance, and I will present detailed methodologies, experimental results, and insights derived from this research.
The core of my approach revolves around enhancing two key components: object detection and multi-object tracking. For object detection, I utilize the YOLOv8 architecture, which is known for its speed and accuracy in real-time applications. However, to better handle the diverse and dynamic scenes captured by UAV drones—such as varying altitudes, lighting conditions, and occlusions—I introduce modifications to the backbone network. Specifically, I integrate the Universal Inverted Bottleneck (UIB) search module, which enhances feature extraction capabilities by combining multiple network structures like inverted bottlenecks and depthwise separable convolutions. This improvement allows the model to capture fine-grained details of vehicles and pedestrians, even in cluttered environments. For tracking, I employ the DeepSORT algorithm, which combines motion prediction via Kalman filtering with appearance-based re-identification. To boost its performance, I replace the default feature extractor with a ResNet-50 module, which provides stronger feature representations for matching objects across frames. The synergy between these improved components results in a robust system capable of detecting and tracking accident-involved vehicles with high precision and speed. In the following sections, I will delve into the technical details, supported by mathematical formulations and empirical data, to demonstrate the effectiveness of this framework for UAV drone-based accident detection.

The use of UAV drones for traffic monitoring has gained traction due to their ability to capture high-resolution video from unique vantage points. Unlike fixed cameras, UAV drones can be deployed quickly to accident sites, providing real-time feeds that are crucial for timely intervention. However, analyzing these videos manually is inefficient, necessitating automated systems powered by deep learning. My research builds upon existing works that apply convolutional neural networks (CNNs) and tracking algorithms to traffic scenes, but I focus specifically on adaptations for UAV drone footage, which often contains challenges like small object sizes, motion blur, and perspective distortions. By leveraging advancements in object detection and tracking, I aim to create a model that not only identifies accidents but also maintains consistent tracking of vehicles before, during, and after incidents. This holistic approach is vital for understanding accident dynamics and facilitating rapid response teams. In this article, I will present a comprehensive analysis of my model, including ablation studies to validate each improvement, and I will discuss how this technology can be integrated into broader intelligent transportation systems. The increasing adoption of UAV drones in urban areas underscores the importance of such research, as it paves the way for safer and more efficient roads.
To provide a solid foundation, let me first explain the theoretical background of the key algorithms used in this study. The YOLOv8 model is an evolution of the YOLO series, designed for real-time object detection. It consists of a backbone for feature extraction, a neck for feature fusion, and a head for detection. The loss function in YOLOv8 combines classification and regression losses, which can be expressed as:
$$L_{\text{total}} = L_{\text{cls}} + L_{\text{reg}}$$
where $L_{\text{cls}}$ is the binary cross-entropy loss for classification, and $L_{\text{reg}}$ is a combination of Distribution Focal Loss and IoU loss for bounding box regression. Mathematically, for a predicted bounding box with coordinates $(x, y, w, h)$ and ground truth $(x^*, y^*, w^*, h^*)$, the regression loss can be approximated as:
$$L_{\text{reg}} = \lambda_1 \cdot L_{\text{DFL}} + \lambda_2 \cdot L_{\text{IoU}}$$
with $L_{\text{IoU}} = 1 – \text{IoU}( \text{pred}, \text{gt} )$, where IoU is the Intersection over Union. The DeepSORT algorithm, on the other hand, uses a Kalman filter to predict object states and a Hungarian algorithm for data association. The cost matrix for matching is a weighted sum of motion and appearance metrics:
$$C_{ij} = \alpha \cdot d_{\text{motion}}(i,j) + \beta \cdot d_{\text{appearance}}(i,j)$$
where $d_{\text{motion}}$ is the Mahalanobis distance based on Kalman filter predictions, and $d_{\text{appearance}}$ is the cosine distance between feature vectors extracted by a deep network. In my improved version, I use ResNet-50 to compute $d_{\text{appearance}}$, enhancing reliability in complex scenes captured by UAV drones. These formulas underpin the technical innovations in my model, which I will further elaborate with experimental validation.
The integration of the UIB module into YOLOv8’s backbone is a key contribution. The UIB module is a flexible structure that can be adapted to various network depths, offering a balance between computational efficiency and feature richness. Its architecture involves inverted bottlenecks with squeeze-and-excitation attention, which can be summarized as follows: given an input feature map $X$, the UIB module applies a 1×1 convolution to expand channels, followed by depthwise convolution and another 1×1 convolution to compress channels, with a skip connection and attention mechanism. This process enhances the model’s ability to capture multi-scale features, which is crucial for detecting small vehicles or debris in UAV drone videos. To quantify the impact, I conducted experiments comparing the baseline YOLOv8 with my modified version, denoted as YOLOv8-seg-C2f_UIB. The results, presented in later sections, show significant gains in detection accuracy, particularly for challenging cases like occluded objects or low-resolution frames from UAV drones.
For multi-object tracking, the improved DeepSORT with ResNet-50 feature extraction addresses common issues in UAV drone footage, such as rapid camera movement and frequent occlusions. The ResNet-50 model, pre-trained on large datasets, generates robust feature embeddings that remain consistent across frames. This is vital for maintaining track identities when objects temporarily disappear or change appearance due to lighting variations. In practice, the tracking pipeline involves detecting objects in each frame using YOLOv8-seg-C2f_UIB, predicting their next positions with Kalman filters, and associating them using the cost matrix defined above. The cascade matching strategy in DeepSORT prioritizes frequently seen objects, reducing identity switches. I optimized this pipeline for speed by streamlining the feature extraction process, ensuring that the system can process high-frame-rate videos from UAV drones in real time. The combination of these improvements leads to a cohesive framework that excels in dynamic traffic environments monitored by UAV drones.
To evaluate my model, I created a custom dataset using UAV drone videos of traffic scenes, including various accident scenarios. The dataset comprises 2,000 frames extracted from videos taken at different altitudes and angles, simulating real-world conditions. Each frame was annotated with four classes: non-accident vehicles, accident-involved non-motorized vehicles, accident-involved motorized vehicles, and accident-involved large vehicles. I split the data into training and testing sets with an 8:2 ratio. The training parameters were set as shown in Table 1, ensuring consistent experimentation.
| Parameter | Value |
|---|---|
| Image Size (imgsz) | 640 |
| Batch Size (batch) | 4 |
| Patience (patience) | 30 |
| Device (device) | GPU 0 |
| Epochs (epochs) | 100 |
| Initial Learning Rate (lr0) | 0.01 |
| Resume Training (resume) | True |
| Workers (worker) | 0 |
The evaluation metrics included precision (P), recall (R), mean Average Precision at IoU threshold 0.5 (mAP@0.5), mAP over IoU thresholds from 0.5 to 0.95 (mAP@0.5:0.95), frames per second (FPS) for inference speed, and the number of parameters. Precision and recall are defined as:
$$P = \frac{TP}{TP + FP}, \quad R = \frac{TP}{TP + FN}$$
where TP, FP, and FN denote true positives, false positives, and false negatives, respectively. The mAP is computed as the area under the precision-recall curve, providing a comprehensive measure of detection accuracy. FPS indicates the real-time capability, which is crucial for applications involving UAV drones that stream live video. My experiments were conducted on a system with an NVIDIA GeForce GTX 1050 Ti GPU, 4 GB VRAM, and 16 GB RAM, using Python 3.8, CUDA 11.8, and PyTorch 2.1.1.
The results from testing my improved model on the dataset are summarized in Table 2. As shown, the model achieved high performance across all accident classes, with an average mAP@0.5 of 95.3% and an average precision of 95.1%. These numbers demonstrate the effectiveness of the UIB module in enhancing feature extraction for diverse object types in UAV drone footage. Notably, the recall for non-motorized accident vehicles reached 93.6%, indicating robust detection even for smaller targets. The overall mAP@0.5:0.95 of 88.7% reflects consistent performance across varying IoU thresholds, which is essential for accurate bounding box localization in complex scenes captured by UAV drones.
| Accident Type | Precision (P) / % | Recall (R) / % | mAP@0.5 / % | mAP@0.5:0.95 / % |
|---|---|---|---|---|
| Non-accident Vehicles | 92.7 | 82.3 | 95.6 | 88.7 |
| Non-motorized Accident | 97.1 | 93.6 | 96.9 | 86.3 |
| Motorized Accident | 94.2 | 89.2 | 94.2 | 91.7 |
| Large Vehicle Accident | 96.5 | 94.8 | 94.4 | 88.1 |
| Average | 95.1 | 88.9 | 95.3 | 88.7 |
To highlight the improvements over baseline models, I compared my YOLOv8-seg-C2f_UIB with the standard YOLOv8. The comparison, presented in Table 3, reveals that my model outperforms the baseline by 2.7% in precision, 7.5% in recall, and 4.1% in mAP@0.5. This significant boost can be attributed to the UIB module’s ability to capture multi-scale features and the optimized DeepSORT tracking with ResNet-50. Additionally, the inference speed increased to 108 FPS from 75 FPS in the baseline, showcasing the efficiency gains crucial for real-time processing of UAV drone videos. The parameter count rose slightly to 20 million, but this is justified by the enhanced performance, especially in challenging scenarios where UAV drones operate.
| Model | mAP@0.5 / % | Recall (R) / % | Precision (P) / % | mAP@0.5:0.95 / % | Parameters / M | FPS |
|---|---|---|---|---|---|---|
| YOLOv8 (Baseline) | 91.2 | 81.4 | 92.4 | 86.7 | 15 | 75 |
| YOLOv8-seg-C2f_UIB (Improved) | 95.3 | 88.9 | 95.1 | 88.7 | 20 | 108 |
To further validate the contributions of each component, I conducted ablation studies by incrementally adding improvements to the baseline. The results are shown in Table 4. Starting with the baseline combination of YOLOv8 and DeepSORT, I first modified only the YOLOv8 backbone with the UIB module, which increased mAP@0.5 by 1.7%. Then, I modified only the DeepSORT feature extractor to ResNet-50, which improved FPS by 7 frames while maintaining accuracy. When both modifications were combined, the model achieved the best performance: mAP@0.5 of 96.0% and FPS of 108. This synergistic effect underscores the importance of co-optimizing detection and tracking for UAV drone applications. The ablation study confirms that each enhancement plays a vital role in handling the complexities of aerial video analysis, such as variable object sizes and motion patterns unique to UAV drones.
| Model Configuration | mAP@0.5 / % | Parameters / M | FPS |
|---|---|---|---|
| YOLOv8 + DeepSORT (Baseline) | 93.5 | 6.24 | 75 |
| YOLOv8 (UIB) + DeepSORT | 95.2 | 7.18 | 72 |
| YOLOv8 + DeepSORT (ResNet-50) | 93.8 | 6.31 | 82 |
| YOLOv8 (UIB) + DeepSORT (ResNet-50) (Full Model) | 96.0 | 8.20 | 108 |
The visual analysis of the model’s performance on sample UAV drone videos reinforces these quantitative findings. For instance, in a collision scenario, the improved model detected and tracked the involved vehicles within 172 frames, whereas the baseline took longer and had more identity switches. This early and stable tracking is critical for accident response, as it allows authorities to assess the situation quickly. The integration of UAV drones into this pipeline enables continuous monitoring from optimal angles, providing comprehensive scene understanding. The ResNet-50 features proved particularly effective in maintaining track consistency during occlusions, such as when vehicles pass behind obstacles—a common occurrence in urban environments monitored by UAV drones. These observations align with the metrics, demonstrating that the model not only achieves high accuracy but also operates robustly in real-world conditions.
In terms of computational efficiency, the model’s design ensures that it can be deployed on edge devices accompanying UAV drones. The UIB module’s lightweight structure reduces redundant computations, while the optimized DeepSORT minimizes latency in feature matching. The overall system can process video streams at 108 FPS, which is more than sufficient for real-time analysis given that typical UAV drone cameras operate at 30 FPS. This headroom allows for additional processing, such as sending alerts or integrating with other smart city systems. The use of UAV drones as data collection platforms amplifies these benefits, as they can be dynamically repositioned to cover accident hotspots, providing a scalable solution for city-wide traffic management.
Looking ahead, there are several directions for future work. First, expanding the dataset to include more diverse weather conditions and times of day would enhance the model’s robustness for UAV drone operations. Second, incorporating 3D localization techniques could provide precise accident coordinates, aiding emergency responders. Third, federated learning approaches could be explored to train models on distributed UAV drone data while preserving privacy. The continuous evolution of UAV drone technology, such as improved battery life and higher-resolution cameras, will further boost the applicability of this research. I believe that the fusion of deep learning with UAV drones holds immense potential for transforming traffic safety, and this study serves as a step toward that future.
In conclusion, I have presented a comprehensive framework for traffic accident detection using UAV drone videos. By integrating the UIB module into YOLOv8 and optimizing DeepSORT with ResNet-50, I developed a model that achieves high detection accuracy (mAP@0.5 of 96.0%) and real-time inference speed (108 FPS). The ablation studies confirm the contributions of each component, and the experimental results demonstrate superiority over baseline models. This work addresses key challenges in complex traffic scenes, such as occlusions and small object detection, which are prevalent in footage from UAV drones. The implications extend beyond accident detection to broader applications in traffic flow analysis and urban planning. As UAV drones become increasingly integrated into smart cities, automated systems like this will play a pivotal role in enhancing road safety and operational efficiency. I hope that this research inspires further innovations in leveraging UAV drones for public safety and intelligent transportation.
