Views
No views yet
traffic-accident-detection-yolo11xaccident and vehicle in images or video frames.1from ultralytics import YOLO
2
3# Load the fine-tuned model
4model = YOLO('path/to/best.pt')
5
6# Run inference on an image
7results = model('path/to/image.jpg')
8
9# Visualize the results
10results.show()| Metric | Value |
|---|---|
| mAP@0.5 | 0.826 |
| mAP@0.5:0.95 | 0.600 |
| Precision (all) | 0.808 |
| Recall (all) | 0.759 |
| F1-score (all) | 0.782 |
| Precision (Accident) | 0.811 |
| Recall (Accident) | 0.855 |
| F1-score (Accident) | 0.833 |
| Precision (Vehicle) | 0.805 |
| Recall (Vehicle) | 0.663 |
| F1-score (Vehicle) | 0.727 |