Next Article in Journal
An Efficient Simulation Scene Generation Method Based on Extracted Road Network Topology and Large Language Models
Previous Article in Journal
Enhancing Disaster Prevention in Port and Municipal Environments: A Comparative Risk Analysis and the Role of UAV-Based Monitoring
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Real-Time Detection of Near-Miss Events and Risk Assessment in Urban Traffic Using Multi-Object Tracking and Bird’s Eye View Mapping

1
School of Information Engineering, Chengyi College, Jimei University, Xiamen 361000, China
2
School of Computer Sciences, Universiti Sains Malaysia (USM), Penang 11800, Malaysia
*
Author to whom correspondence should be addressed.
Future Transp. 2026, 6(2), 80; https://doi.org/10.3390/futuretransp6020080
Submission received: 23 February 2026 / Revised: 25 March 2026 / Accepted: 30 March 2026 / Published: 1 April 2026

Abstract

Near-miss events, defined as hazardous traffic interactions without actual collisions, provide valuable indicators for proactive traffic safety assessment. However, existing studies mainly focus on collision detection or object-level perception, while near-miss interactions and their severity remain insufficiently explored. This study proposes a video-based framework for real-time near-miss detection and risk evaluation in complex urban intersections. The framework integrates an enhanced YOLOv11 detector with a small-object detection head, BoT-SORT multi-object tracking, and bird’s-eye-view (BEV) transformation to accurately extract trajectories and motion features of heterogeneous road users. A Near-Miss Risk Index (RI) is developed by jointly considering spatial proximity, time-to-collision, and motion intensity to quantify near-miss severity levels. Experimental results on real-world CCTV data demonstrate that the proposed method effectively identifies high-risk interactions among vehicles, motorcycles, and pedestrians, providing interpretable severity assessment and supporting proactive traffic safety analysis for intelligent transportation systems.

1. Introduction

1.1. Research Background

The detection of traffic near-miss events is of great significance for the development of smart cities [1]. Most officially recorded traffic safety incidents are accidents that have already occurred, many of which involve personal injuries and property losses. However, as revealed through eyewitness accounts and CCTV surveillance footage, a large number of near-miss events remain unrecorded. Although near-miss events do not result in actual accidents, they can be regarded as potential triggers that may lead to subsequent hazardous situations or secondary accidents. Therefore, research on the assessment and detection of traffic near-miss events is critically important, as it enables proactive intervention to prevent traffic accidents at an early stage. Moreover, the volume of CCTV video data collected continuously throughout the day is extremely large and impractical for manual inspection. To address this challenge, this study proposes a fast and automated traffic near-miss event monitoring method based on computer vision techniques.

1.2. Significance of the Study

Although 2D object detection algorithms have been extensively applied in traffic surveillance, several critical challenges remain unresolved in complex urban environments. Among existing approaches, the YOLO series has become one of the most representative one-stage detectors due to its high inference speed and suitability for real-time traffic monitoring [2]. However, the deep hierarchical structure of YOLO-based models limits their sensitivity to small objects, which are common in urban traffic scenes, such as distant pedestrians, cyclists, and motorcycles. Increasing input image resolution is often adopted to mitigate this issue, yet this strategy leads to higher computational costs and does not fundamentally address the inherent limitations of feature representation, particularly under strong illumination and complex background conditions.
Furthermore, traffic videos captured by roadside CCTV cameras are typically obtained from oblique viewpoints. As a result, detection outputs in the image plane cannot accurately reflect the true geometric positions and spatial relationships of road users. Without appropriate spatial transformation, such limitations hinder precise distance estimation, motion analysis, and interaction modeling, all of which are essential for traffic risk evaluation. Although two-stage detection algorithms can achieve higher detection accuracy, their computational complexity prevents their practical deployment in real-time traffic surveillance systems.
In addition, existing studies predominantly focus on object-level perception tasks, such as detection and tracking, while comparatively limited attention has been paid to the dynamic interactions among heterogeneous road users. Complex behaviors including mutual influence, evasive maneuvers, and short-term conflict evolution are rarely modeled explicitly, despite their critical importance for understanding traffic safety mechanisms and predicting potential collision risks.
Motivated by these limitations, this study aims to establish a more comprehensive and practical traffic monitoring framework for near-miss analysis. Specifically, an enhanced YOLOv11 [3] architecture is proposed by introducing an additional detection head tailored for small object perception, thereby improving detection robustness in complex traffic scenes. In parallel, a bird’s-eye-view (BEV) [4] transformation is integrated to reconstruct more realistic spatial relationships among road users. By jointly addressing small object detection, spatial accuracy, and interaction analysis, the proposed framework provides a stronger foundation for reliable near-miss detection and risk assessment, ultimately contributing to safer and more intelligent transportation systems.
The remainder of this paper is organized as follows. Section 2 reviews previous research on vehicle detection, multi-object tracking, and near-miss events. Section 3 presents the methodology and overall framework of the proposed approach, including the implementation of the enhanced YOLOv11 object detector, BoT-SORT [5] multi-object tracking, bird’s-eye-view transformation, and distance-based surrogate indicators for near-miss detection. Section 4 details the identification of key parameters for road-user interactions and the computation of near-miss risk metrics. Section 5 presents and analyzes the experimental results, including detection accuracy, tracking performance, and near-miss severity evaluation. Finally, Section 6 concludes the paper with a summary of findings and discussions on future research directions.

2. Related Works

2.1. Object Detection Algorithm

Object detection is a critical component in traffic surveillance and near-miss event analysis, providing spatial and semantic information necessary for downstream motion and risk assessment. Numerous detection algorithms have been developed, ranging from two-stage detectors such as Faster R-CNN [6], which offer high localization accuracy but often incur substantial computational overhead, to one-stage detectors such as SSD [7] and YOLO, which provide faster inference at some cost in precision. Transformer-based detectors like DETR [8] and its variants have demonstrated strong performance in capturing global context and modeling complex object relationships, yet their high computational requirements limit their applicability in real-time traffic monitoring.
In this study, YOLOv11 is selected as the backbone object detection algorithm due to its favorable balance between accuracy, speed, and scalability. As a one-stage detector, YOLOv11 performs single-pass object localization and classification while incorporating architectural refinements in the backbone and neck networks that enhance multi-scale feature representation and improve information flow between shallow and deep layers. These improvements enable robust detection of heterogeneous road users, including vehicles, motorcycles, cyclists, and pedestrians, even under challenging conditions such as small objects, partial occlusions, illumination variations, and complex backgrounds. Compared with other detectors, YOLOv11 achieves superior real-time performance without sacrificing detection precision, making it particularly suitable for near-miss analysis in dense urban intersections.
Moreover, object detection alone is insufficient for near-miss evaluation. Temporal consistency and trajectory extraction are required to compute motion-based risk indicators such as relative distance, velocity change, deceleration, and time-to-collision. The detections provided by YOLOv11 serve as reliable inputs for multi-object tracking algorithms, enabling accurate spatiotemporal analysis and quantitative assessment of near-miss events.
In summary, while multiple detection algorithms could be applied to traffic monitoring, YOLOv11 offers the optimal combination of real-time performance, small-object sensitivity, and robustness in complex traffic scenarios, forming a solid foundation for near-miss event detection and risk assessment.

2.2. Object Tracking Algorithm

Multi-object tracking (MOT) [9] plays a critical role in traffic scene understanding, as it enables continuous localization and identity preservation of road users across video frames. Most existing tracking methods follow the tracking-by-detection paradigm and can be broadly classified into motion-based, appearance-based, and hybrid approaches. Early representative methods, such as SORT [10], primarily rely on Kalman filtering and Intersection over Union (IoU) for data association. Although these approaches achieve high computational efficiency, they often suffer from frequent identity switches in crowded traffic environments or under partial occlusion.
To alleviate this limitation, DeepSORT [11] incorporates appearance features extracted by convolutional neural networks, significantly enhancing identity consistency. However, the introduction of deep appearance models inevitably increases computational complexity, which limits its applicability in real-time surveillance scenarios. In recent years, more advanced tracking algorithms have further improved robustness by integrating richer feature representations and attention mechanisms. In particular, transformer-based trackers enhance appearance modeling by capturing long-range dependencies and contextual information, which is especially beneficial in complex traffic scenes involving frequent interactions among heterogeneous road users. Nevertheless, many high-accuracy tracking methods remain computationally demanding and are therefore unsuitable for large-scale or real-time traffic monitoring systems.
Considering the stringent requirements of near-miss event detection—namely high temporal continuity, accurate trajectory extraction, and real-time performance—this study adopts BoT-SORT as the multi-object tracking algorithm. BoT-SORT achieves a favorable balance between tracking accuracy and computational efficiency by jointly leveraging motion cues, IoU-based geometric constraints, and transformer-enhanced appearance features within a unified association framework. This design effectively reduces identity switches and trajectory fragmentation in dense and occluded traffic scenarios.
Reliable and continuous trajectories are essential for near-miss analysis, as key risk indicators such as relative distance [12], velocity variation [13], and time-to-collision (TTC) [14] are directly derived from object motion information. By providing stable identity preservation and smooth trajectories for multiple road user types—including vehicles, pedestrians, and cyclists—BoT-SORT enables accurate characterization of short-duration yet high-risk interactions. Its robustness to occlusion and complex interactions makes it particularly suitable for near-miss event detection, thereby establishing a reliable foundation for proactive traffic safety analysis and intelligent transportation systems.

2.3. Near-Miss Event Detection in Traffic System

Traffic near-miss detection aims to identify hazardous traffic situations in which no actual collision occurs, yet a clear potential risk of collision is present [15]. Typical near-miss scenarios include sudden braking, emergency evasive maneuvers, and close interactions between pedestrians and vehicles [16]. By detecting such events, potential safety risks can be recognized before accidents occur, thereby supporting proactive accident prevention, enhancing traffic safety analysis, and facilitating decision-making in intelligent transportation systems. Moreover, near-miss detection provides valuable evidence for urban traffic optimization, insurance investigation, and liability assessment. Compared with traditional traffic safety studies that rely solely on recorded accident data, near-miss detection offers the advantages of richer data availability and more timely safety feedback, making it an effective approach for improving the safety and reliability of traffic systems.
However, accurate near-miss analysis requires reliable spatial representation of road users. In general, conventional 2D object detection results are insufficient for planning and risk assessment tasks, especially in real-world surveillance scenarios. When using real-time CCTV video streams, the oblique viewing angles between cameras and the ground plane hinder precise estimation of the true center positions and geometric relationships of road users. This limitation significantly affects the accurate analysis of spatial interactions and collision risks. Therefore, before conducting near-miss detection, a bird’s-eye-view (BEV) transformation is introduced to convert perspective-view images into a top-down representation, which enables more accurate spatial reasoning and risk assessment among different road users.
In recent years, with the rapid development of deep learning and computer vision, significant progress has been made in object detection and traffic safety analysis. In terms of traffic safety evaluation, Xu et al. [17] utilized city-wide near-miss data to quantitatively assess urban traffic safety and analyze spatial distribution patterns. Taking New York City as a case study, their work demonstrated the effectiveness of near-miss data in capturing potential traffic risks and provided valuable data support for subsequent research.
Regarding object detection, existing studies mainly focus on improving and optimizing classical deep learning models. Zhou et al. [18] proposed a lightweight cascade algorithm combined with enhanced SSD techniques, achieving a good balance between accuracy and efficiency. Meanwhile, Ren et al. [19] introduced the Kolmogorov-Arnold network into Fast R-CNN, significantly improving the model’s nonlinear representation capability and detection performance.
Furthermore, YOLO-based models have been widely adopted in traffic scenarios due to their real-time performance. Saiveena and Praveen [20] integrated Vision Transformers with YOLOv5 to achieve accurate vehicle detection and image segmentation in edge intelligence environments. He et al. [21] proposed an improved YOLO-Lite method to enhance detection performance while maintaining real-time capability. In addition, Köylü [22] conducted a comparative analysis of YOLO-based traffic sign detection methods using a newly constructed dataset, providing useful insights for practical applications.
In summary, although existing studies have made progress in traffic safety analysis and object detection, most of them focus on isolated tasks. There is still a lack of integrated frameworks that combine object detection, multi-object tracking, and risk assessment. Therefore, developing a unified approach that integrates high-accuracy detection models (e.g., improved YOLO variants) with tracking algorithms for real-time near-miss detection and risk quantification in complex traffic environments remains a critical research challenge.

3. Methodology

3.1. Overall Framework

This study presents a comprehensive framework for near-miss event detection in complex urban intersection scenarios, which integrates object detection, multi-object tracking, BEV-based spatial mapping, motion dynamics analysis, and quantitative risk assessment.
The overall framework is illustrated in Figure 1 and consists of the following stages:
(a)
Object detection using enhanced YOLOv11 algorithm
(b)
Multi-object tracking via BoT-SORT
(c)
Bird’s-Eye View (BEV) spatial transformation
(d)
Speed and trajectory estimation in BEV space
(e)
Near-miss event identification based on distance and Time-To-Collision (TTC)
To effectively identify potential collision risks in complex urban intersection environments, this study develops a systematic near-miss detection framework, as illustrated in Algorithm 1 below. The proposed framework integrates multiple key components, including object detection, multi-object tracking, BEV-based spatial transformation, motion information extraction, and risk assessment. By jointly modeling the spatial proximity and motion interaction among road users, the framework enables continuous monitoring of traffic conflicts and provides a quantitative basis for near-miss evaluation. Based on this Algorithm and Framework, the detailed algorithm design and implementation are introduced in the following sections.
Algorithm 1: Near-Miss Detection Pipeline
           Input:    Video stream V (CCTV footage)
    YOLOv11-enhanced model M
    BEV homography matrix H
    Risk thresholds: D_th, T_th, V_max
Output:    Annotated video with near-miss events
    CSV log of object positions, speeds, and risk indices
1:    Initialize multi-object tracker (BoT-SORT)
2:    Initialize data structures
3:    For each frame f in video V do
4:    # Step 1: Object Detection
5:    detections ← M.detect(f)
6:    # Step 2: Multi-Object Tracking
7:    tracked_objects ← BoT-SORT.update(detections)
8:    # Step 3: BEV Transformation
9:    For each tracked object o do
10:    center_img ← center of o.bounding_box
11:    bev_pos ← H * center_img
12:    bev_history[o.id].append(bev_pos)
13:    speed ← compute_speed(bev_history[o.id])
14:    track_history[o.id].append({
15:    “class”: o.class, “bbox”: o.bounding_box,
16:    “bev_pos”: bev_pos, “speed”: speed
17:    })
18:    End For
19:    # Step 4: Near-Miss Risk Computation
20:    near_miss_events ← []
21:    For each pair of tracked objects (i, j) do
22:    d ← distance(bev_pos_i, bev_pos_j)
23:    ttc ← compute_ttc(d, speed_i, speed_j)
24:    RI ← ALPHA*R_d + BETA*R_ttc + GAMMA*R_v
25:    level ← risk_level(RI)
26:    If RI ≥ 0.3 then
27:    near_miss_events.append({
28:    “id_pair”: (i, j), “RI”: RI, “level”: level
29:    })
30:    End If
31:    End For
32:    End For
33:    Save annotated video and CSV log

3.2. Improved YOLOv11 Architecture for Small Object Detection in Traffic Scenarios

To improve detection performance in complex traffic environments, particularly for small-scale road users, the YOLOv11 architecture is enhanced as shown in Figure 2. In the backbone, the conventional convolutional structure is augmented with the Swin Transformer, which introduces a hierarchical vision transformer with shifted window mechanisms. This design significantly improves the model’s ability to capture long-range dependencies and global contextual information, thereby enhancing feature representation for small and distant objects.
The proposed improvements to the YOLOv11 are motivated by the inherent limitations of conventional convolution-based detectors in complex traffic environments, particularly in handling small-scale and densely distributed road users. Although existing YOLO-based models achieve strong performance in general object detection tasks, they often rely heavily on local receptive fields, which restrict their ability to capture long-range dependencies and global contextual information. This limitation becomes more pronounced in urban traffic scenarios, where interactions among multiple road users are highly dynamic and spatially correlated.
In real-world traffic scenes, objects such as pedestrians and motorcycles frequently appear at long distances with low resolution, small pixel occupancy, and severe occlusions caused by other vehicles or environmental structures. In addition, variations in illumination, motion blur, and background clutter further increase the difficulty of accurate detection. These factors not only degrade feature representation but also lead to missed detections and inaccurate localization, especially for small targets. Moreover, repeated downsampling operations in deep networks tend to cause significant information loss for fine-grained features, which are critical for identifying small objects.
Furthermore, near-miss event detection imposes higher requirements on both spatial precision and temporal consistency, as it relies on accurately capturing subtle interactions and relative motion between road users. Therefore, improving the model’s ability to perceive small-scale objects, preserve spatial details, and effectively fuse multi-scale features is essential for enhancing detection robustness in such safety-critical applications. To address these challenges, this study proposes an enhanced YOLOv11 architecture, as illustrated in Figure 2.
In the backbone, the conventional convolutional structure is augmented with the Swin Transformer, which introduces a hierarchical vision transformer with shifted window mechanisms. This design significantly improves the model’s ability to capture long-range dependencies and global contextual information, thereby enhancing feature representation for small and distant objects that are difficult to distinguish using local convolutional features alone.
In the neck, Coordinate Attention is embedded into the feature fusion process. Unlike traditional attention mechanisms, it encodes both channel relationships and precise positional information along spatial directions, enabling the network to better focus on critical regions such as object boundaries and motion-related features. This is particularly beneficial in traffic scenarios where spatial cues play a crucial role in distinguishing interacting road users.
In the head, an additional small-object detection branch is introduced, operating on higher-resolution feature maps to explicitly enhance the representation and localization of small-scale targets. This design effectively mitigates feature loss caused by repeated downsampling and significantly reduces missed detections of small objects such as pedestrians and motorcycles.
Overall, the proposed enhancements improve the model’s capability in multi-scale feature representation, spatial awareness, and small-object detection. As a result, the improved architecture achieves superior performance in detecting diverse road users and provides a more reliable foundation for near-miss event detection and risk assessment in complex urban traffic environments.

3.3. Multi-Object Tracking with BoT-SORT

BoT-SORT (Bounding-box Overlap and Transformer-based SORT) is a state-of-the-art multi-object tracking (MOT) algorithm that extends the classical SORT and DeepSORT frameworks by integrating transformer-based feature modeling and robust association strategies.
BoT-SORT is designed to achieve high tracking accuracy while maintaining real-time performance, making it particularly suitable for complex traffic surveillance scenarios. In the context of traffic near-miss event detection, BoT-SORT plays a critical role by providing reliable and continuous trajectories of multiple road users, which are essential for analyzing spatiotemporal interactions and potential collision risks. Its basic process is shown in Figure 3.
BoT-SORT further advances multi-object tracking by introducing transformer-based appearance modeling, which enhances the discriminative capability of object representations. By leveraging self-attention mechanisms, BoT-SORT captures long-range dependencies and contextual relationships among features, enabling more robust identity association across frames. Additionally, BoT-SORT combines motion cues, appearance similarity, and bounding-box overlap in a unified data association framework, resulting in improved tracking stability and reduced identity switches. This balance between accuracy and efficiency makes BoT-SORT well suited for real-time traffic monitoring systems deployed on edge devices or city-scale CCTV networks.
In traffic near-miss event detection, accurate tracking is as important as reliable detection. Near-miss events are typically characterized by short temporal windows in which two or more road users come into dangerously close proximity without resulting in an actual collision. Detecting such events requires precise trajectory extraction, consistent identity preservation, and high temporal resolution. BoT-SORT enables continuous tracking of vehicles, pedestrians, and cyclists, allowing the system to compute key indicators such as relative distance, time-to-collision (TTC), speed changes, and evasive maneuvers.
Moreover, BoT-SORT facilitates the analysis of dynamic interactions among heterogeneous road users. By maintaining stable object identities across frames, it becomes possible to model pairwise and group-level interactions, which are crucial for understanding complex traffic behaviors at intersections, crosswalks, and mixed-traffic environments. When combined with bird’s-eye-view (BEV) transformation and geometric reasoning, BoT-SORT-based trajectories can be mapped into a unified spatial coordinate system, further improving the accuracy of near-miss risk assessment.
In summary, BoT-SORT provides a robust and efficient multi-object tracking solution that significantly enhances traffic near-miss event detection. Its transformer-enhanced appearance modeling, coupled with efficient motion and geometric association strategies, enables reliable trajectory extraction in complex traffic scenes. By supporting fine-grained spatiotemporal analysis and interaction modeling, BoT-SORT contributes to proactive traffic safety monitoring and offers strong technical support for intelligent transportation systems and smart city applications.

3.4. Bird’s-Eye View (BEV) Transformation

Accurate spatial analysis of road users is essential for near-miss event detection. However, directly computing distances and velocities from image coordinates is unreliable due to perspective distortion and oblique camera viewpoints. To overcome this limitation, a Bird’s-Eye View (BEV) transformation is introduced, projecting detected object positions from the image plane onto a ground-plane coordinate system. This transformation provides precise spatial measurements, enabling reliable trajectory reconstruction, motion estimation, and risk assessment in complex traffic environments.
Assuming a locally planar road surface, the relationship between image coordinates u v and BEV coordinates X Y is modeled using a homography matrix H :
X Y 1 H u v 1
The homography matrix is estimated using manually selected reference points from lane markings and stop lines with known real-world distances.
For each tracked object, the center point of the bounding box is computed as:
( u c , v c ) = x 1 + x 2 2 y 1 + y 2 2
This point is projected into BEV space to obtain a physically meaningful ground position X c Y c .
Let X t Y t and X t Δ t Y t Δ t denote the BEV positions of an object at consecutive frames. The instantaneous speed is estimated as:
v ( t ) = X t X t Δ t ) 2 + ( Y t Y t Δ t ) 2 Δ t
This BEV-based velocity estimation reduces scale inconsistency and improves robustness compared to image-space measurements.

3.5. Near-Miss Judgment

3.5.1. Distance Measurement

The spatial distance between any two road users, i and j , is computed in the Bird’s-Eye View (BEV) coordinate system to eliminate perspective distortion from camera viewpoints [23]. Specifically, the BEV distance d i j B E V is calculated as:
d i j B E V = X i X j ) 2 + ( Y i Y j ) 2
where X i Y i and X j Y j are the ground-plane coordinates of road users i and j , respectively. This distance represents the true separation between objects on the road surface, providing a more accurate measure of proximity than image-plane distances. Accurate spatial measurement is essential for assessing the potential for conflicts and identifying interactions that may lead to near-miss events.

3.5.2. Time-to-Collision (TTC)

Time-to-Collision (TTC) quantifies the temporal urgency of a potential interaction between two road users. It is defined as:
T T C i j = d i j B E V v i v j + ϵ
where v i and v j are the velocities of users i and j along their motion directions, and ϵ is a small constant to prevent division by zero. TTC reflects the remaining time before two road users would collide if they continue along their current trajectories at constant speeds. Smaller TTC values indicate higher risk, highlighting interactions that require immediate attention for safety analysis. By combining BEV distance and TTC, both spatial and temporal aspects of risk are captured.

3.5.3. Near-Miss Criteria

A near-miss event is identified when both spatial proximity and temporal risk conditions are satisfied:
N e a r M i s s i j = 1 ,       d i j B E V < D t h T T C i j < T t h 0 ,                                                               o t h e r w i s e
where D t h and T t h are predefined safety thresholds for minimum acceptable distance and critical time-to-collision, respectively. An event labeled as a near-miss indicates that the road users came unusually close to each other in both space and time, representing a high-risk interaction. This criterion enables systematic identification of hazardous moments even when no collision occurs, providing valuable input for proactive traffic safety analysis and for quantifying risk severity across different types of road users.

4. Near-Miss Severity Level via Risk Index

Traditional near-miss detection methods typically produce binary results, indicating only whether a near-miss event occurs or not. However, traffic safety analysis and intelligent transportation systems require a continuous and interpretable risk assessment to quantify the severity of near-miss interactions. To address this limitation, this work proposes a Near-Miss Risk Index (NM-RI) that integrates spatial proximity, temporal urgency, and motion intensity, enabling fine-grained severity evaluation of traffic conflicts.
The choice of spatial proximity, time-to-collision (TTC), and the NM-RI as reference indicators is motivated by their complementary ability to capture different aspects of traffic interactions. Spatial proximity reflects the physical closeness between road users, directly indicating the potential for collision. TTC measures the temporal urgency of interactions, showing how quickly two road users may approach a critical state. While distance and TTC capture geometric and temporal aspects individually, the NM-RI further combines these factors with motion intensity, providing a continuous, interpretable, and holistic measure of near-miss severity. The innovation of this approach lies in moving beyond traditional binary detection: by integrating distance, TTC, and motion, the NM-RI enables dynamic, fine-grained risk quantification for each interaction. This not only improves the interpretability of near-miss events [20] but also allows intelligent transportation systems to prioritize interventions based on the severity of potential conflicts, which is not achievable with existing methods.

4.1. Risk Index Formulation

For a pair of interacting road users i and j , the Near-Miss Risk Index is defined as:
RI i j = α R d + β R t t c + γ R v
where R d denotes spatial risk, R t t c denotes temporal risk, R v denotes motion intensity risk, α , β , γ are weighting coefficients satisfying.
α + β + γ = 1

4.2. Spatial Risk Component

The spatial risk reflects the physical closeness between two road users in BEV space:
R d = max 0 , / 1 d i j D t h
where d i j is the BEV distance between objects i and j , D t h is a predefined safety distance threshold. This formulation ensures that spatial risk increases rapidly as objects approach each other.

4.3. Temporal Risk Component

The temporal urgency of a near-miss interaction is modeled using Time-To-Collision (TTC):
R t t c = max 0 , / 1 T T C i j T t h
where T T C i j represents the estimated time before a potential collision, T t h is the critical TTC threshold. Smaller TTC values indicate higher imminent collision risk.

4.4. Near-Miss Severity Levels

Sudden or high-speed movements significantly increase near-miss severity. Motion intensity risk is modeled as:
R v = v i v j V m a x
where v i and v j are BEV-estimated speeds of the two road users, V m a x is the maximum expected relative speed used for normalization. This term captures aggressive maneuvers such as emergency braking or abrupt acceleration.
Based on the Risk Index value, near-miss events are categorized into three severity levels as shown in Table 1. This grading enables hierarchical traffic safety analysis and prioritization.

5. Experimental Works and Results

5.1. Dataset Description

The experimental dataset (POL37 Dataset) [24] is collected from CCTV surveillance footage at some intersections in Penang. Due to the large scale of the dataset and the lack of annotations, this study selects three categories of targets for analysis: vehicles, motorcycles, and pedestrians, as shown in Figure 4. The final experimental dataset volume statistics are as follows: there are 3600 images for training, 450 images for validation and 450 images for testing. The allocation of the ultimate labels revealed that pedestrians accounted for only 2.07% of the dataset, while vehicles and motorcycles comprised 70.11% and 27.82%.
A total of 20 h of video footage were collected from the designated road sections and time periods, as summarized in Table 2. The video was processed at 30 frames per second (fps), resulting in over 2 million individual images. This extensive data collection captures a variety of traffic scenarios, including changes in lighting, weather conditions, and traffic density, providing a rich dataset for object detection and traffic analysis. However, due to limitations in computer hardware, such as processing power, memory, and storage, utilizing the entire set of 2 million images was not feasible for annotation and experimentation. To address this constraint, a random selection method was employed to curate a more manageable subset of the images while ensuring the dataset remained representative of the overall video data. As a result, 4500 images were randomly selected to form the experimental dataset. The selected images were reviewed to ensure diversity in traffic conditions, object types (vehicles, pedestrians, motorcycles), and near-miss scenarios, providing a comprehensive dataset for analysis. Each frame underwent a detailed annotation process using LabelImg for bounding box annotations and type labelling. This approach balances dataset size with computational limitations, facilitating rigorous experimentation while maintaining the quality and diversity of the dataset. The experimental dataset will serve as the basis for training and evaluating object detection and tracking models, with a focus on real-time traffic object detection and near-miss event prediction.

5.2. Object Detection and Tracking Results

This section presents the experimental results of object detection and multi-object tracking in real-world traffic scenarios. In this experiment, the enhanced YOLOv11 detector with an additional small-object detection head is employed to identify heterogeneous traffic participants, while the BoT-SORT algorithm is used to maintain consistent identities and extract continuous trajectories across video frames. The model was trained for 100 epochs on an ASUS TUF Gaming Air laptop, providing sufficient computational power for efficient training and evaluation.
The performance of the proposed detection framework is evaluated on the POL37 urban intersection dataset, which contains complex traffic conditions including dense vehicle flow, frequent motorcycle interactions, and pedestrian crossings. Both mean Average Precision (mAP) and qualitative visual results are analyzed to assess detection accuracy, tracking stability, and robustness under challenging environments. The experimental results demonstrate that the proposed framework provides reliable perception outputs, forming a foundation for subsequent near-miss event detection and severity assessment.
Average Precision (AP) and mean Average Precision (mAP) [25] are used as evaluation metrics. AP is defined as the area under the Precision–Recall (P–R) curve for a specific class, while mAP is the mean of the AP values over all object classes. They are widely used to evaluate the detection performance of object detection models. The definitions can be expressed as follows:
AP = 0 1 P R d R
mAP = 1 N i = 1 N AP i
where P ( R ) is the precision as a function of recall R , N is the total number of object classes, and AP i is the average precision of class i .
For experimental evaluation, 30-s video segments from two representative road sections were selected as test data. The object detection results are shown in Figure 5.
Figure 5 and Table 3 show the object detection results in different road scenarios and the evaluation metrics during training. (a) presents the detection results on Road 1, while (b) shows the results on Road 2. The model accurately detects cars, motorcycles, and pedestrians, even in complex or crowded scenes. The dark blue boxes indicate detected cars, the light blue boxes indicate detected motorcycles, and the white boxes indicate detected pedestrians. Table 3 displays the mAP curve during training, indicating stable convergence. The AP values for each category are: car 96.9%, motor 98.1%, and person 92.7%, with an overall mAP of 95.9%, demonstrating that the model achieves high accuracy and reliability in multi-class object detection, suitable for practical road monitoring applications.
The lower number of pedestrians in Table 3 reflects the urban traffic conditions in Penang, Malaysia, where sidewalks are often missing and pedestrian signals at intersections are rare. As a result, motorcycles, which have a high incidence of traffic accidents in the region, are the main focus of this study. This is also reflected in the results, with motorcycle detection achieving a precision of 98.1%, demonstrating the effectiveness of the proposed method for the most relevant road users in this context.
Since three key modifications are introduced to YOLOv11 in this study, ablation experiments are conducted to evaluate the effectiveness of each individual component, as shown in Table 4. The results demonstrate that each module contributes differently to the overall performance improvement. Starting from the baseline model with an mAP@50 of 93.10%, incorporating the Swin Transformer into the backbone yields a modest gain of +0.40%, indicating that enhanced global feature modeling provides limited but consistent improvement in object representation. When Coordinate Attention is further introduced into the neck, the performance increases to 93.80%, achieving an additional gain of +0.30%. This suggests that embedding positional information into channel attention improves feature fusion, although the contribution remains incremental. In contrast, the introduction of the small-object detection head leads to a significant performance boost, increasing the mAP@50 to 94.90% (+1.10%). This clearly indicates that the small-object detection head is the dominant contributor among all proposed components, highlighting its effectiveness in handling small-scale targets in complex traffic scenes. Finally, by integrating all three components, the proposed model achieves the highest mAP@50 of 95.90%, resulting in an overall improvement of 2.80% over the baseline. The results suggest that while the Swin Transformer and Coordinate Attention provide complementary enhancements, the primary performance gain is driven by the small-object detection head.
From a practical perspective, although the additional modules introduce some computational overhead, the performance gains—especially those contributed by the small-object detection head—justify the increased complexity. Therefore, the proposed design achieves a favorable trade-off between accuracy and efficiency, making it suitable for real-world traffic monitoring applications.
Table 5 further compares the proposed method with several mainstream object detection algorithms on the POL37 dataset. Traditional two-stage detectors such as SSD (75.4%), R-CNN (60.4%), and Fast R-CNN (73.2%) show relatively lower performance due to their limitations in handling complex traffic scenarios. One-stage detectors, including YOLOv5 (93.2%) and YOLOv7 (93.4%), achieve competitive results; however, they still fall short of the proposed method. In contrast, the improved model achieves the best performance with mAP@50 of 95.90%, outperforming all compared methods.
These results demonstrate that the proposed enhancements not only improve detection accuracy but also provide stronger robustness and better adaptability to small objects and complex traffic environments. This makes the model more suitable for practical applications such as near-miss event detection and traffic risk assessment.
To further evaluate the robustness of the proposed algorithm, additional testing was conducted on data from road segments of POL37 that were not included in the training set. The detection results are presented in Figure 6. As shown, the algorithm consistently detects various traffic participants under different road conditions, indicating strong generalization capability and stable performance across unseen scenarios.
The dataset used in Figure 7 is obtained from a publicly available source on Roboflow, which exhibits substantial differences from the training dataset in terms of camera height, viewing angle, and scene composition. Such discrepancies introduce a clear domain shift, making it suitable for evaluating the cross-dataset generalization capability of the proposed model. As shown in Figure 7a, the model achieves a high detection rate for cars, while the performance on motorcycles is comparatively lower. Nevertheless, no false positives are observed, indicating strong detection reliability. The limited detection performance for pedestrians can be attributed to the insufficient representation of this class in the training data, which restricts the model’s ability to generalize to underrepresented categories. In Figure 7b, despite the application of mirroring transformation and noise perturbation, the model consistently maintains high detection accuracy for vehicles and motorcycles. This demonstrates that the proposed approach is robust to common image perturbations and exhibits strong resilience under challenging visual conditions. Overall, these results validate the effectiveness of the model in handling domain shifts and confirm its robust generalization performance in unseen traffic environments.
The corresponding tracking results, matching the object detection in Figure 5, are shown in Figure 8. It illustrates the multi-object tracking results combined with BEV-based velocity estimation. Each detected road user is assigned a unique identity (ID), which is consistently maintained across consecutive frames by the BoT-SORT tracking algorithm. The trajectories visualize the historical motion paths of vehicles, motorcycles, and pedestrians, demonstrating stable identity preservation even in dense traffic conditions.
Based on the BEV transformation, the image-plane detections are projected onto the ground-plane coordinate system, enabling accurate estimation of motion direction and speed. The velocity vectors shown in the figure represent the real-world movement trends of road users, which are difficult to obtain directly from perspective images due to geometric distortion. By integrating object tracking with BEV-based motion analysis, the proposed framework provides reliable trajectory and velocity information.
To evaluate the accuracy of the tracking module, this study conducted an analysis using the standard metrics MOTA (Multiple Object Tracking Accuracy) and MOTP (Multiple Object Tracking Precision). These metrics quantitatively assess the tracking performance, with MOTA measuring the overall accuracy in maintaining correct object identities and MOTP evaluating the precision of object localization across frames. The results are shown in Table 6, where the MOTA value is 0.79 on Road 1 and 0.68 on Road 2, the MOTP value is 0.22 on Road 1 and 0.21 on Road 2. A MOTA of 0.79 indicates that the tracking module correctly maintains the identities of the majority of targets, demonstrating reliable multi-object association. The MOTP of 0.22 reflects a relatively high spatial precision in estimating object positions, indicating that the module can accurately localize targets even in complex traffic scenes.
Since the proposed system relies on tracking outputs for near-miss detection and risk quantification, tracking errors can propagate to the final risk indicators in different ways and with varying levels of impact. Among these, identity switches are particularly critical, as they disrupt trajectory continuity and may lead to incorrect velocity estimation, which directly affects time-to-collision (TTC) calculations. Compared to localization errors, such identity-related errors tend to have a more significant impact on risk assessment because TTC is highly sensitive to motion consistency over time. In contrast, localization errors reflected by MOTP primarily influence the spatial accuracy of detected objects, thereby affecting distance estimation. Although such errors may introduce deviations in risk metrics, their impact is relatively moderate compared to identity switches, especially when the positional deviation remains small. Additionally, missed detections can result in fragmented trajectories, potentially causing underestimation of near-miss events, while false positives may introduce artificial interactions and lead to risk overestimation.
Overall, the relatively high MOTA values indicate that identity switches and missed detections are effectively controlled, while the low MOTP values suggest that localization errors remain within an acceptable range. Therefore, the error propagation from tracking to near-miss indicators is limited, ensuring that the computed risk metrics are sufficiently reliable for practical traffic safety analysis.

5.3. Visualization of Near-Miss Events

In this study, the analysis was carried out under standard urban traffic conditions, with moderate vehicle density, clear weather, and daylight illumination. The near-miss events captured in the POL37 dataset represent situations in which road users come into close proximity, but they do not encompass all types of emergency or accident-prone scenarios. The evolution of each interaction depends on road users’ actions, such as braking, lane changes, and evasive maneuvers, which are only partially reflected in the observed data.
Several factors may limit the generalizability of the results. Partially occluded objects are more difficult to detect, which can lead to underestimation of near-miss severity. Environmental conditions, including rain, fog, nighttime, and varying road surfaces, have not been fully tested and could affect detection and tracking performance. Variations in traffic density and driver behavior also influence near-miss occurrences and the measured Risk Index, meaning the results may differ in regions with more heterogeneous traffic patterns.
Despite these limitations, the proposed Near-Miss Risk Index offers advantages over classic Time-to-Collision measures by integrating spatial proximity, temporal urgency, and motion intensity into a continuous, interpretable risk score. Unlike TTC, which only estimates the imminence of a potential collision, NM-RI accounts for interactions among vehicles, motorcycles, and pedestrians, enabling finer prioritization of high-risk events. This makes the framework particularly useful for intelligent transportation systems and urban traffic safety monitoring, while also pointing to future improvements, such as validation under extreme conditions, enhanced small-object detection, and the integration of predictive trajectory modeling. Instead of center-to-center distance, the minimum edge-to-edge distance between bounding boxes is adopted to more accurately reflect the physical proximity of road users. This definition avoids false negatives when objects are spatially close but have distant centers, which is common in heterogeneous traffic scenarios. The experimental results are shown in Figure 9 and Figure 10.
Figure 9 and Figure 10 illustrates representative near-miss events detected under different risk levels. In Figure 10a, the red bounding boxes denote high-risk near-miss events, where road users are in extremely close proximity and exhibit very short time-to-collision (TTC). These scenarios typically correspond to sudden braking, rapid approach, or abrupt trajectory convergence, indicating an imminent collision risk.
Figure 10b presents medium-risk near-miss events, highlighted by yellow bounding boxes. In these cases, although no immediate collision is observed, the spatial distance between road users is relatively small and the TTC values indicate limited reaction time. Such interactions often occur during lane changes, merging behaviors, or motorcycle filtering, representing potentially dangerous but avoidable situations.
Figure 10c shows low-risk near-miss events, marked by green bounding boxes. These interactions are characterized by larger inter-object distances and longer TTC values, suggesting sufficient reaction time for road users. While these events do not pose immediate danger, they still reflect frequent traffic interactions and provide valuable information for traffic flow analysis and safety monitoring.
Overall, Figure 10 demonstrates the effectiveness of the proposed risk assessment framework in distinguishing near-miss severity levels. The visual consistency between bounding-box colors and interaction intensity confirms that the proposed Risk Index can reliably reflect real-world traffic risk conditions.

5.4. Near-Miss Severity Level Analysis Results

Table 7 lists the predefined TTC thresholds used to classify near-miss risk levels for various types of road users, including vehicles, motorcycles, and pedestrians. The thresholds represent the critical time remaining before a potential collision, with smaller values indicating higher risk. These values provide a quantitative basis for the calculation of the Risk Index and support systematic near-miss event detection and severity assessment.
The TTC thresholds used in this study are chosen based on the reaction and braking characteristics of different road users as well as local traffic conditions in Penang, Malaysia. Specifically, a TTC threshold of 1.0 s is applied for interactions between motorcycles, 1.5 s for vehicle–vehicle interactions, 2.0 s for vehicle–motorcycle interactions, and 2.5 s for vehicle–pedestrian interactions. Motorcycles are highly maneuverable but have shorter stopping distances, so a lower threshold allows sensitive detection of high-risk near-miss events. Vehicles, in contrast, require longer stopping distances, and pedestrian safety requires earlier risk assessment due to their vulnerability, justifying higher thresholds. This tiered approach ensures that the TTC-based evaluation reflects the actual risk levels for different road-user interactions, balancing timely detection with the avoidance of excessive false alarms.
As shown in Table 8 and Table 9, high-risk near-miss events are characterized by extremely small spatial and temporal margins. For example, on Road 1, high-risk events have an average edge distance of only 0.28 px and a mean TTC of 0.0023 s, indicating almost immediate collision risk. In contrast, low-risk events on the same road present a much larger mean edge distance of 6.72 px and a TTC of 2.15 s, providing sufficient reaction time for road users. This clear difference across risk levels demonstrates that the proposed Risk Index effectively captures the severity of near-miss interactions.
Table 10 presents the number of near-miss events detected per 1800 frames, corresponding to one minute of 30 fps video. It should be noted that these counts represent detected instances within the video frames, rather than the actual number of events occurring per minute in real traffic. The results reveal distinct patterns of near-miss occurrences across roads and interaction types.
On Road 1, vehicle-related interactions dominate the detected near-miss events, particularly car–car and car–motor scenarios. For example, car–car interactions register 1594 high-risk and 1719 medium-risk instances per 1800 frames, indicating dense traffic and frequent close encounters. Car–motor interactions similarly show high counts, with 1801 high-risk and 1801 medium-risk instances, reflecting strong interactions between cars and motorcycles in mixed-traffic environments.
In contrast, Road 2 exhibits a different risk distribution. Car–motor interactions include 90 high-risk, 474 medium-risk, and 60 low-risk instances per 1800 frames, suggesting that while conflicts occur, most remain at moderate risk. Pedestrian-related near-miss events are less frequent overall; however, car–person interactions still show 43 high-risk instances per 1800 frames, highlighting potential safety concerns for vulnerable road users.
These findings demonstrate that the proposed near-miss detection framework effectively captures the characteristics of road-user interactions and the heterogeneity of risk across different traffic environments. Moreover, by leveraging high-frame-rate video, the method can detect transient or subtle near-miss events that might be missed at lower sampling rates, which underscores the robustness and practical applicability of the algorithm in complex, dynamic traffic scenarios.
Figure 11 illustrates the distribution of edge distances—the minimum distances between vehicles, pedestrians, and motorcycles—corresponding to different near-miss risk levels (Low, Medium, High). The horizontal axis represents the risk levels, which are typically determined by combining Time-To-Collision (TTC) and edge distance into a Risk Index, while the vertical axis shows the edge distance in pixels, reflecting the closest approach between road users during each event. As expected, high-risk events exhibit smaller edge distances compared with low- and medium-risk events, indicating greater proximity and a higher potential for collision. Medium-risk events show edge distance distributions between the low- and high-risk levels. Overall, this figure provides a visual validation of the Risk Index and demonstrates its effectiveness in capturing the severity of near-miss interactions, offering valuable insights for traffic safety analysis and proactive risk warning.
Figure 12 illustrates the distribution of Time-to-Collision (TTC) for near-miss events across different risk levels (Low, Medium, High). The horizontal axis represents the risk levels, while the vertical axis shows TTC in seconds, where smaller values indicate higher potential collision risk. The boxplot visualizes the median, range, and outliers of TTC for each risk category. As expected, high-risk events exhibit lower TTC values than medium- and low-risk events, indicating that collisions could occur within a very short time, representing highly hazardous scenarios. Conversely, low-risk events generally have larger TTC, suggesting that even when road users come close, there is sufficient time to react, resulting in lower accident potential. This figure provides a visual validation of the Risk Index and demonstrates its correlation with potential collision time, supporting the effectiveness of proactive warning and near-miss assessment.
In summary, the analysis of edge distance and Time-to-Collision (TTC) indicates that high-risk near-miss events are characterized by smaller spatial separations and shorter potential collision times, while low-risk events exhibit larger distances and longer TTC. These consistent trends across both indicators confirm that the proposed Risk Index effectively captures the severity of near-miss interactions. The results demonstrate that the algorithm can reliably differentiate between risk levels, providing a quantitative foundation for proactive traffic safety management and intelligent transportation interventions.

5.5. Risk Model Sensitivity Analysis

To further evaluate the robustness of the threshold selection, a sensitivity analysis was conducted by slightly varying the TTC thresholds within a reasonable range (e.g., ±0.2–0.5 s). The results indicate that while the absolute number of detected near-miss events changes with different threshold values, the overall trend and relative risk distribution across different road-user interactions remain consistent. In particular, higher thresholds tend to increase the number of detected events, reflecting a more conservative risk estimation, whereas lower thresholds result in fewer but more critical events.
Importantly, the comparative risk patterns between different interaction types remain stable under these variations, suggesting that the proposed method is not overly sensitive to the exact threshold values. This demonstrates that the selected TTC thresholds provide a reasonable balance between detection sensitivity and robustness, ensuring reliable near-miss analysis under practical conditions.
To further illustrate the impact of TTC threshold variation, Figure 13 presents the relationship between different TTC values and the number of detected near-miss events (per frame) for car–car interactions over a 45-sec traffic video. As the threshold increases, the number of high-risk and medium-risk events gradually increases, while the number of low-risk events correspondingly decreases. This indicates that more events are classified into higher risk levels under a more conservative threshold setting. Despite these changes, the overall variation remains smooth and monotonic, without abrupt fluctuations. This suggests that the proposed method is robust to moderate variations in TTC thresholds, and the overall risk distribution evolves in a stable and predictable manner. Therefore, the selected thresholds are appropriate for balancing detection sensitivity and stability in real-world traffic scenarios.

6. Conclusions and Future Works

The experimental results on the POL37 dataset demonstrate that the proposed framework can effectively detect near-miss events in real time. Detection performance was quantified using standard evaluation metrics: average precision (AP) at mAP50, calculated based on the overlap between predicted bounding boxes and ground-truth annotations across all frames. The enhanced YOLOv11 detector with a small-object detection head achieved an AP of 95.9% @ mAP50, indicating high accuracy in identifying heterogeneous road users—including vehicles, motorcycles, and pedestrians—under the tested daylight and moderate traffic conditions. These metrics reflect the model’s ability to provide reliable inputs for near-miss risk assessment, although performance may vary under conditions not included in the evaluation dataset.
Despite these promising results, several limitations exist that constrain practical applications. First, small or partially occluded objects remain challenging to detect, particularly in dense urban traffic, which may reduce the precision of near-miss identification. Second, camera calibration errors can affect the accuracy of bird’s-eye-view mapping and spatial proximity calculations. Third, environmental factors, such as extreme weather, low illumination, or motion blur, have not been fully tested and may degrade detection performance. Finally, the current framework assumes a fixed frame rate and standard traffic patterns, which may limit generalization to different regions or unconventional traffic scenarios.
Compared to classic Time-to-Collision (TTC) measures, the proposed Near-Miss Risk Index (NM-RI) integrates spatial proximity, temporal urgency, and motion intensity, providing a continuous and interpretable assessment of risk severity. While TTC offers a straightforward estimate of imminent collision, NM-RI captures heterogeneous interactions and allows fine-grained prioritization of potential hazards, offering an advantage for urban traffic management and intelligent transportation systems.
Future work will address the identified limitations by enhancing small-object robustness under occlusion, varying illumination, and motion blur through attention mechanisms, transformer-based feature extraction, or adaptive background suppression. Additionally, integrating trajectory prediction with near-miss severity evaluation can enable proactive risk mitigation and more comprehensive monitoring of traffic safety. Testing under diverse weather, nighttime conditions, and varying camera setups will be essential to validate the system’s reliability for real-world applications.

Author Contributions

Methodology, L.Y.; software, L.Y.; validation, T.H.; data curation, T.H.; writing—original draft preparation, L.Y.; writing—review and editing, L.Y.; visualization, L.Y.; supervision, T.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Natural Science Foundation of Xiamen, China, grant number 3502Z202374057.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Kataoka, H.; Suzuki, T.; Oikawa, S.; Matsui, Y.; Satoh, Y. Drive video analysis for the detection of traffic near-miss incidents. In 2018 IEEE International Conference on Robotics and Autaomation (ICRA); IEEE: New York, NY, USA, 2018; pp. 3421–3428. [Google Scholar] [CrossRef]
  2. Jiang, P.; Ergu, D.; Liu, F.; Cai, Y.; Ma, B. A Review of Yolo algorithm developments. Procedia Comput. Sci. 2022, 199, 1066–1073. [Google Scholar] [CrossRef]
  3. Khanam, R.; Hussain, M. Yolov11: An overview of the key architectural enhancements. arXiv 2024, arXiv:2410.17725. [Google Scholar] [CrossRef]
  4. Waas, T.; Hugé, J.; Verbruggen, A.; Wright, T. Sustainable development: A bird’s eye view. Sustainability 2011, 3, 1637–1661. [Google Scholar] [CrossRef]
  5. Aharon, N.; Orfaig, R.; Bobrovsky, B.Z. BoT-SORT: Robust associations multi-pedestrian tracking. arXiv 2022, arXiv:2206.14651. [Google Scholar] [CrossRef]
  6. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2016, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed]
  7. Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. Ssd: Single shot multibox detector. In European Conference on Computer Vision; Springer International Publishing: Cham, Switzerland, 2016; pp. 21–37. [Google Scholar] [CrossRef]
  8. Zhu, X.; Su, W.; Lu, L.; Li, B.; Wang, X.; Dai, J. Deformable detr: Deformable transformers for end-to-end object detection. arXiv 2020, arXiv:2010.04159. [Google Scholar] [CrossRef]
  9. Voigtlaender, P.; Krause, M.; Osep, A.; Luiten, J.; Sekar, B.B.G.; Geiger, A.; Leibe, B. Mots: Multi-object tracking and segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: New York, NY, USA, 2019; pp. 7942–7951. [Google Scholar]
  10. Pereira, R.; Carvalho, G.; Garrote, L.; Nunes, U.J. Sort and deep-sort based multi-object tracking for mobile robotics: Evaluation with new data association metrics. Appl. Sci. 2022, 12, 1319. [Google Scholar] [CrossRef]
  11. Duan, C.; Li, X. Multi-target tracking based on deep sort in traffic scene. J. Phys. Conf. Ser. 2021, 1952, 022074. [Google Scholar] [CrossRef]
  12. Dang, T.T.; Ngan, H.Y.; Liu, W. Distance-based k-nearest neighbors outlier detection method in large-scale traffic data. In 2015 IEEE International Conference on Digital Signal Processing (DSP); IEEE: New York, NY, USA, 2015; pp. 507–510. [Google Scholar] [CrossRef]
  13. Li, Z.; Wang, W.; Chen, R.; Liu, P.; Xu, C. Evaluation of the impacts of speed variation on freeway traffic collisions in various traffic states. Traffic Inj. Prev. 2013, 14, 861–866. [Google Scholar] [CrossRef] [PubMed]
  14. Kiefer, R.J.; Flannagan, C.A.; Jerome, C.J. Time-to-collision judgments under realistic driving conditions. Hum. Factors 2006, 48, 334–345. [Google Scholar] [CrossRef] [PubMed]
  15. Yamamoto, S.; Kurashima, T.; Toda, H. Identifying near-miss traffic incidents in event recorder data. In Pacific-Asia Conference on Knowledge Discovery and Data Mining; Springer International Publishing: Cham, Switzerland, 2020; pp. 717–728. [Google Scholar] [CrossRef]
  16. Makizako, H.; Shimada, H.; Hotta, R.; Doi, T.; Tsutsumimoto, K.; Nakakubo, S.; Makino, K. Associations of near-miss traffic incidents with attention and executive function among older japanese drivers. Gerontology 2018, 64, 495–502. [Google Scholar] [CrossRef] [PubMed]
  17. Xu, C.; Gao, J.; Zuo, F.; Ozbay, K. Estimating urban traffic safety and analyzing spatial patterns through the integration of city-wide near-miss data: A New York City case study. Appl. Sci. 2024, 14, 6378. [Google Scholar] [CrossRef]
  18. Zhou, T.; Liu, Y.; Hong, Y.; Pu, Q. Lightweight Cascade Algorithm for Concrete Crack Detection with Enhanced SSD Techniques. J. Comput. Civ. Eng. 2026, 40, 04025138. [Google Scholar] [CrossRef]
  19. Ren, Z.; Tang, X.; Ren, G.; Wu, D. Research on improved fast-RCNN target detection algorithm based on Kolmogorov-Arnold network. Appl. Intell. 2026, 56, 63. [Google Scholar] [CrossRef]
  20. Saiveena, K.; Praveen, P. Edge intelligence-enabled vision transformer with YOLOv5 for accurate vehicle detection and image segmentation using adaptive multiscale deep learning mechanism. Comput. Electr. Eng. 2026, 134, 111086. [Google Scholar] [CrossRef]
  21. He, M.; Li, C.; Yang, J.; Ning, X. Real-time vehicle detection methods based on an improved YOLO-Lite approach in edge computing scenarios. Discov. Artif. Intell. 2026, 6, 213. [Google Scholar] [CrossRef]
  22. Köylü, F. A Comparative Analysis of YOLO-Based Traffic Sign Detections with a Novel Turkish Traffic Sign Dataset. IEEE Access 2026, 14, 7744–7763. [Google Scholar] [CrossRef]
  23. Aerts, K.; Lathuy, C.; Steenberghen, T.; Thomas, I. Spatial clustering of traffic accidents using distances along the network. In Proceedings of the 19th Workshop of the International Cooperation on Theories and Concepts in Traffic Safety, Minsk, Belarus, 26–27 October 2006; Volume 3. [Google Scholar]
  24. Lim, L.M.; Sadullah, A.F.M.; Ismail, M.T.; Awang, N.; Ali, M.K.M. Penang data safety prediction using database development and alternative road identification using Dijkstra approach. In AIP Conference Proceedings; AIP Publishing LLC.: New York, NY, USA, 2022; Volume 2465, p. 040007. [Google Scholar] [CrossRef]
  25. Fang, W.; Wang, L.; Ren, P. Tinier-YOLO: A real-time object detection method for constrained environments. IEEE Access 2019, 8, 1935–1944. [Google Scholar] [CrossRef]
Figure 1. Overall framework of the proposed near-miss detection system.
Figure 1. Overall framework of the proposed near-miss detection system.
Futuretransp 06 00080 g001
Figure 2. YOLOv11-enhanced architecture for near-miss event detection.
Figure 2. YOLOv11-enhanced architecture for near-miss event detection.
Futuretransp 06 00080 g002
Figure 3. BoT-SORT multi-object tracking framework.
Figure 3. BoT-SORT multi-object tracking framework.
Futuretransp 06 00080 g003
Figure 4. The POL37 Dataset Statistics.
Figure 4. The POL37 Dataset Statistics.
Futuretransp 06 00080 g004
Figure 5. Object detection results.
Figure 5. Object detection results.
Futuretransp 06 00080 g005aFuturetransp 06 00080 g005b
Figure 6. Object detection results on unseen road scenes.
Figure 6. Object detection results on unseen road scenes.
Futuretransp 06 00080 g006
Figure 7. Robustness evaluation on unseen road scenes by Roboflow.
Figure 7. Robustness evaluation on unseen road scenes by Roboflow.
Futuretransp 06 00080 g007
Figure 8. Tracking results with BEV-transformed speed information.
Figure 8. Tracking results with BEV-transformed speed information.
Futuretransp 06 00080 g008
Figure 9. Near-miss events on Road 1 (Red boxes indicate high-risk events, yellow boxes indicate medium-risk events, and green boxes indicate low-risk events).
Figure 9. Near-miss events on Road 1 (Red boxes indicate high-risk events, yellow boxes indicate medium-risk events, and green boxes indicate low-risk events).
Futuretransp 06 00080 g009
Figure 10. Near-miss events on Road 2 ((a) Red boxes indicate high-risk events, (b) yellow boxes indicate medium-risk events, and (c) green boxes indicate low-risk events).
Figure 10. Near-miss events on Road 2 ((a) Red boxes indicate high-risk events, (b) yellow boxes indicate medium-risk events, and (c) green boxes indicate low-risk events).
Futuretransp 06 00080 g010
Figure 11. Edge distance for Low, Medium, and High near-miss risk events.
Figure 11. Edge distance for Low, Medium, and High near-miss risk events.
Futuretransp 06 00080 g011
Figure 12. TTC distributions for Low, Medium, and High near-miss risk events.
Figure 12. TTC distributions for Low, Medium, and High near-miss risk events.
Futuretransp 06 00080 g012
Figure 13. Sensitivity analysis of TTC thresholds on near-miss event detection.
Figure 13. Sensitivity analysis of TTC thresholds on near-miss event detection.
Futuretransp 06 00080 g013
Table 1. Near-Miss Event Severity Levels.
Table 1. Near-Miss Event Severity Levels.
Risk Index RangeSeverity LevelDescription
RI < 0.6LowMinor interaction, negligible risk
0.6 ≤ RI < 0.8MediumNoticeable conflict, evasive behavior possible
0.8 ≤ RI < 1HighDangerous interaction requiring immediate attention
Table 2. Summary of Dataset Statistic.
Table 2. Summary of Dataset Statistic.
Road NameDurationHoursCategories
Jalan Sultan Azlan Shah2 February 2019–11 February 20191 h/dayMorningCar, Motorcycle and Person
Afternoon
Evening
Jalan Lebuh Carnarvon2 February 2019–11 February 20191 h/dayMorningCar, Motorcycle and Person
Afternoon
Evening
Table 3. Training Evaluation Results on Val Dataset.
Table 3. Training Evaluation Results on Val Dataset.
ClassLabelsPrecisionRecallAP@50
Car26,0320.9110.93796.9%
Person260.820.88792.7%
Motor68480.8890.94198.1%
All32,9360.8730.92295.9%
Table 4. Comparison of Ablation Experiment Results.
Table 4. Comparison of Ablation Experiment Results.
AlgorithmBackboneAttentionSmall-HeadmAP@50
Baseline YOLOv11CNN + C3K2xx93.10%
+SwinTransformerCNN + C3K2 + Swinxx93.50%
+CoordAttentionCNN + C3K2Coordx93.80%
+Small-object HeadCNN + C3K2x94.90%
Full VisionCNN + C3K2 + SwinCoord95.90%
Note: In the table, “x” indicates not used, and “✔” indicates used.
Table 5. The Outcomes Using the POL37 Dataset Across Various Object Detection Algorithms.
Table 5. The Outcomes Using the POL37 Dataset Across Various Object Detection Algorithms.
AlgorithmBackbonemAP@50
SSD [18]-75.4%
RCNN [19]-60.4%
Fast-RCNN [20]-73.2%
YOLOv5 [21]CSPDarknet93.2%
YOLOv7 [22]NN93.40%
Our VisionCNN + C3K2 + Swin95.90%
Table 6. Performance of the tracking module measured by MOTA and MOTP.
Table 6. Performance of the tracking module measured by MOTA and MOTP.
SetNum_FramesMOTAMOTP
Road 111020.790.22
Road 27690.680.31
Table 7. Time-to-Collision (TTC) Thresholds for Different Road Users.
Table 7. Time-to-Collision (TTC) Thresholds for Different Road Users.
Event ClassTTC Threshold
Motor-motor1.00 s
Car-car1.50 s
Car-motor2.00 s
Car-person2.50 s
Table 8. Edge Distance for Low, Medium, and High-Risk Events.
Table 8. Edge Distance for Low, Medium, and High-Risk Events.
SetRisk LevelEdge Distance/pxTTC/s
MeanMaxMinStd.MeanMaxMinStd.
Road 1High0.2815.4300.460.00230.5300.24
Medium0.9657.4803.230.261.900.50
Low6.7266.740.399.172.152.51.760.20
Road 2High0.00060.100.010.00020.0300.0024
Medium0.1913.7400.820.181.7900.43
Low3.0721.530.413.542.122.51.760.22
Table 9. TTC for Low, Medium, and High-Risk Events.
Table 9. TTC for Low, Medium, and High-Risk Events.
SetRisk LevelTTC/s
MeanMaxMinStd.
Road 1High0.00230.5300.24
Medium0.261.900.50
Low2.1562.51.760.2
Road 2High0.00020.0300.0024
Medium0.181.7900.43
Low2.122.51.760.22
Table 10. Number of Near-Miss Events per Minute by Risk Level.
Table 10. Number of Near-Miss Events per Minute by Risk Level.
SetClassRisk Level
HighMediumLow
Road 1car-car15941719203
car-motor18011801218
car-person1020
motor-motor000
motor-person000
person-person000
Road 2car-car2340511
car-motor9047460
car-person43129
motor-motor000
motor-person000
person-person000
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yang, L.; Hong, T. Real-Time Detection of Near-Miss Events and Risk Assessment in Urban Traffic Using Multi-Object Tracking and Bird’s Eye View Mapping. Future Transp. 2026, 6, 80. https://doi.org/10.3390/futuretransp6020080

AMA Style

Yang L, Hong T. Real-Time Detection of Near-Miss Events and Risk Assessment in Urban Traffic Using Multi-Object Tracking and Bird’s Eye View Mapping. Future Transportation. 2026; 6(2):80. https://doi.org/10.3390/futuretransp6020080

Chicago/Turabian Style

Yang, Lu, and Tao Hong. 2026. "Real-Time Detection of Near-Miss Events and Risk Assessment in Urban Traffic Using Multi-Object Tracking and Bird’s Eye View Mapping" Future Transportation 6, no. 2: 80. https://doi.org/10.3390/futuretransp6020080

APA Style

Yang, L., & Hong, T. (2026). Real-Time Detection of Near-Miss Events and Risk Assessment in Urban Traffic Using Multi-Object Tracking and Bird’s Eye View Mapping. Future Transportation, 6(2), 80. https://doi.org/10.3390/futuretransp6020080

Article Metrics

Back to TopTop