YOLOv9 ve YOLOv11 mimarileriyle hibrit veri üzerinde gerçek zamanlı trafik kazası tespit sistemi


Balkaya Z., ÖZGÜLTEKİN C., Serttaş S., Bakir C.

Niğde Ömer Halisdemir Üniversitesi Mühendislik Bilimleri Dergisi, cilt.14, sa.4, ss.1542-1558, 2025 (TRDizin)

Özet

Trafik kazaları ülkemizde ve birçok ülkede önemli bir sorun haline gelmiştir. Kazalar ekonomik ve sağlık maliyetlerinin yanı sıra can kayıplarını da artırmaktadır. Bu nedenle kazaların zamanında tespiti oldukça önemli bir konudur. Bu çalışmada bu sorunların önüne geçmek amacıyla özgün oluşturulmuş YOLOv9 ve YOLOv11 modelleri kullanılarak hibrit veri seti üzerinde bir kaza tespit ve önlem alma sistemi geliştirilmiştir. Çalışmanın ilk aşamasında benzer görseller ve etiketler çıkarılarak her iki modelin eğitimi için veriler hazırlanmıştır. "Kaza" ve "kaza olmayan" sınıflarını içeren, farklı kaynaklardan elde edilen görüntülerle oluşturulan hibrit veri kümeleri kullanılmıştır. Veri dengesizliğini gidermek için Generative Adversarial Network (GAN) ile sentetik görüntüler üretilmiş, görüntüler etiketlenip uygun boyutlara getirilmiş, benzer ve tekrar edenler temizlenmiştir. YOLOv9 modeline özellikleri daha iyi yakalayabilmesi için Hiyerarşik Özellik Dikkat Katmanı (HFAM), YOLOv11 modeline ise çevresel faktörlere duyarlılığını artıran Dinamik Kontekst Zenginleştirme Katmanı (DCEL) katmanı eklenmiştir. Model performansları, mAP50, mAP50-95, doğruluk, kesinlik, duyarlılık ve F1 skoru gibi metriklerle, hiperparametre optimizasyonu ve k-fold çapraz doğrulama ile beş farklı senaryo (5 farklı veri kümesi) üzerinde değerlendirilmiştir. Bu çalışmada önerilen modellerin performansı SSD ve Fast R-CNN gibi klasik nesne algılama modelleri ile karşılaştırılmıştır. Sonuç olarak, her iki modelin de trafik kazalarını başarılı bir şekilde tespit edebildiği ve farklı veri yapılarında genelleme yeteneklerinin yüksek olduğu görülmüştür.
Traffic accidents have become a significant problem in our country and many other countries. Accidents increase the economic and health costs as well as the loss of life. Therefore, the timely detection of accidents is a very important issue. In this study, an accident detection and precaution system was developed on a hybrid dataset using the originally created YOLOv9 and YOLOv11 models in order to prevent these problems. In the first stage of the study, data was prepared for the training of both models by extracting similar images and labels. Hybrid datasets created with images obtained from different sources containing the "accident" and "non-accident" classes were used. In order to eliminate data imbalance, synthetic images were produced with Generative Adversarial Network (GAN), images were labeled and resized to appropriate sizes, and similar and repetitive ones were cleaned. Hierarchical Feature Attention Layer (HFAM) was added to the YOLOv9 model to better capture features, and Dynamic Context Enrichment Layer (DCEL) layer was added to the YOLOv11 model, which increases its sensitivity to environmental factors. Model performances are evaluated on five different scenarios (5 different datasets) with metrics such as mAP50, mAP50-95, accuracy, precision, sensitivity and F1 score, with hyperparameter optimization and k-fold cross validation. In this study, the performance of the proposed models is compared with classical object detection models such as SSD and Fast R-CNN. As a result, it is seen that both models can successfully detect traffic accidents and have high generalization abilities on different data structures.