請用此 Handle URI 來引用此文件:
http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/91467
標題: | 基於改良式YOLO及亮度分佈分析之應用於夜間行車記錄器的車輛影像辨識 Improved YOLO Algorithm Based on Intensity Distribution Analysis for Nighttime Vehicle Recognition in Driving Recorder |
作者: | 鞠之浩 Chih-Hao Chu |
指導教授: | 丁建均 Jian-Jiun Ding |
關鍵字: | 行車記錄器,夜間車輛辨識,後處理,亮度分佈分析, Driving Recorder,Nighttime Vehicle Recognition,YOLOv7,Post-processing,Intensity Distribution Analysis, |
出版年 : | 2024 |
學位: | 碩士 |
摘要: | 行車記錄器對駕駛人來說是非常重要的一項工具,在交通事故調查及證明上扮演著重要的角色,除此之外,隨著深度學習的快速發展,未來也可將行車記錄器進而利用成協助駕駛偵測前車狀況的工具,因此在本論文中,我們聚焦於夜間行車記錄器所拍攝的影像,提出了基於YOLOv7演算法及影像像素分布分析應用的前車辨識方法。
首先為了穩定YOLOv7夜間車輛辨識的準確性及穩定性,預先利用YOLOv7訓練好的權重再針對夜間的行車記錄器影像中的車輛進一步訓練,我們額外收集10組訓練資料,每組資料包含100張training及10張validation的夜間車輛影像進行訓練。 訓練完後利用新生成的YOLOv7權重進行夜間車輛影像辨識後,為了進一步提高辨識的精確性及穩定性,我們採用三種影像處理方法進行後處理,判斷偵測到的車輛是否為前車。本論文使用三種影像像素分布分析方法進行分析,淘汰我們認為YOLOv7偵測到的不是前車的bounding box,而提高模型的效果。 第一個影像像素分布分析方法是分析bounding box中高於門檻值的像素分布,因像素越亮其強度值越高,我們認為前車被偵測到的bounding box其像素強度值大於門檻時的分佈形狀,其寬與高的比例必在一定的門檻之上,若低於門檻代表其bounding box屬狹長型,則不符合真正的車輛的長寬比。 第二個方法是分析bounding box中像素強度值低於門檻時的數量比例,應介於上下限比例門檻之中,若YOLOv7偵測到的前車bounding box其所有像素強度值低於門檻值的數量比例不介於上下限之門檻比例時,可能屬於誤判或路邊未行駛低亮度的車輛或是由對向而來的高亮度車輛,因此將其淘汰。首先因行進間的車輛其後燈一定有亮度,若亮度過暗則不符合行進間車輛的條件,可能屬於誤判或為路邊未發動行駛之車輛,因此低亮度的像素佔比高於門檻時將其淘汰。另因對向來車因頭燈亮的關係,將整個bounding box的亮度皆提高許多,其低亮度像素佔比低於門檻的比例則非常低,而本篇論文重點在於提升夜間行進車輛辨識結果,因此停駛在路邊或是對向車道的車輛皆不符合本論文目的,因此皆需排除。 最後第三種方法是綜合兩個分析方法與原始YOLOv7進行比較,根據我們所使用的方法中,前兩種方法一起使用的結果是表現最好的。我們的研究不只可以增加行車紀錄器的用途,也可以運用在除了車禍以外的行車安全上。之後我們會再更精進提出的方法,並且運用在更多的場景上,像是夜間車輛追蹤或是測速等等的環境。 The driving recorder plays an important role in the process of accident investigation, providing invaluable evidence and insights into the sequence of events. Furthermore, the driving recorder has also evolved into a multifunctional technological tool with the boom of deep learning. This advancement has created the features for safety on it, one of them can provide timely warnings to the driver about potential dangers may be caused by cars in front. In this thesis, we focus on nighttime vehicle recognition on videos captured by driving recorders at night and propose three methods for identifying cars in front, by improving YOLOv7, along with two ways of intensity analysis based on image intensity distribution. To enhance the precise and stable nighttime vehicle recognition using YOLOv7, we first fine tune the YOLOv7 pretrained weights specifically for images captured by driving recorders at night. We collected 10 additional sets of training data, consisting of 100 training images and 10 validation images. We try to make the model is able to identify vehicles even in the night scenarios. After fine tuning the YOLOv7 model, we use the newly generated weights for nighttime vehicle recognition. To further improve the precision and accuracy of recognition, we propose three post-processing methods to determine whether the detected bounding boxes are cars in front of us. In this thesis, we take three methods of image pixel distribution analysis to identify and eliminate the detected bounding boxes that YOLOv7 with new weights has misidentified. Due to pixels become brighter, their intensity values increase. The first method is to analyze the pixel distribution in bounding boxes that exceed a specified threshold. We keep them and consider that the shape of those pixels in bounding boxes which the width-height ratio must larger than a certain threshold. In normal circumstances, the ratio should align with the expected ratios of a standard vehicle. If the width-height ratio falls below the threshold, the detected bounding box is nearly narrow, and it is abnormal for a car’s expected ratio. The second method is to analyze the percentage of pixels with intensity values below the threshold within the bounding box, which should fall within the upper and lower bound thresholds. If the percentage of pixels with intensity values below the threshold does not fall within the upper and lower bound thresholds, it may be a false positive such as a vehicle is parked on the roadside with low intensity or a vehicle with high intensity coming from the opposite direction. Therefore, we eliminate them. On the one hand, vehicles moving on the road must have bright rear lights. If the brightness is too low, it does not match the criteria for vehicles moving in front, potentially indicating a false positive like a car is parked on the roadside. Therefore, when the low intensity values percentage exceeds the upper bound threshold, we eliminate it. On the other hand, due to the headlights from oncoming vehicles on the opposite direction, the intensity values of the entire bounding box are significantly increased. The percentage of low intensity values may fall below the lower threshold. For this thesis we focus on improving nighttime recognition of moving vehicles in front, the vehicles parked on the roadside or the oncoming vehicles on the opposite direction should not be detected, so we excluded them. By combining these two methods we proposed with the robust capabilities of the YOLOv7 algorithm. The best performance can be achieved using the combined method. The proposed methods will not only improve the capabilities of driving recorder systems but also show the potential to enhance the road safety. In the future, we will further optimize the model’s performance and explore more application scenarios, such as vehicle tracking at nighttime and speed monitoring in driving environments. |
URI: | http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/91467 |
DOI: | 10.6342/NTU202400087 |
全文授權: | 同意授權(限校園內公開) |
顯示於系所單位: | 電信工程學研究所 |
文件中的檔案:
檔案 | 大小 | 格式 | |
---|---|---|---|
ntu-112-1.pdf 授權僅限NTU校內IP使用(校園外請利用VPN校外連線服務) | 3.45 MB | Adobe PDF | 檢視/開啟 |
系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。