透過您的圖書館登入
IP:216.73.216.225
  • 學位論文

基於YOLO物件偵測於螺帽影像瑕疵辨識之研究

Nut Defects System Based on YOLO Object Detection Model

指導教授 : 張友倫

摘要


本論文研製之基於YOLO物件偵測於螺帽影像瑕疵辨識之研究。首先,本研究比較了YOLOv5和YOLOv7模型的訓練效果,並採用了餘弦退火學習率策略。結果顯示,YOLOv5的表現優於YOLOv7,尤其是YOLOv5x雖然在性能上表現最佳,但訓練時間過長;相比之下,YOLOv5l雖性能稍差但訓練時間較短,綜合來看,YOLOv5l的訓練結果最佳。其次,本研究在YOLOv5l模型中加入了CA注意力機制,發現CA注意力機制更關注通道之間的全局特徵,但會忽略空間中的局部資訊特徵。訓練模型後發現單一的檢測機制未必能有效提升檢測性能,但值得注意的是,加入CA後模型變得輕量化,訓練時間有所下降,對於有訓練時間要求的情況,這是一個可行的方案。最後,研究結果顯示,調整學習率確實有助於解決模型過度擬合的問題,但同時也可能導致性能指標下降。針對YOLOv5l模型的性能分析顯示,在批次大小為8且學習率為0.001的情況下,訓練時間較短且mAP表現優異,為最佳選擇。雖然在批次大小為8且學習率為0.0001的情況下,mAP表現最佳,但實際偵測效果不如前者。因此,對於YOLOv5l模型而言,在批次大小為8且學習率為0.001的條件下進行訓練是最佳選擇。本研究探討了YOLO模型在六角螺帽瑕疵辨識中的應用,並提出了一些提升模型性能的有效方法,為製造業中產品瑕疵檢測技術的進一步發展提供了參考。

並列摘要


This paper presents a study on defect detection in hexagonal nuts based on YOLO object detection. First, the study compares the training effectiveness of YOLOv5 and YOLOv7 models, utilizing a cosine annealing learning rate strategy. The results show that YOLOv5 outperforms YOLOv7, particularly with YOLOv5x achieving the best performance, albeit with a longer training time. In contrast, YOLOv5l, while slightly less performant, has a shorter training time, making it the best overall choice. Next, the study incorporates the CA attention mechanism into the YOLOv5l model, finding that the CA mechanism focuses more on global features between channels while neglecting local spatial features. The results indicate that a single detection mechanism may not effectively improve detection performance. However, it is noteworthy that the inclusion of CA reduces the model's weight, leading to shorter training times, making it a feasible solution for scenarios with training time constraints. Finally, the study shows that adjusting the learning rate helps mitigate the issue of model overfitting, although it may lead to a decline in performance metrics. Performance analysis of the YOLOv5l model reveals that with a batch size of 8 and a learning rate of 0.001, the training time is shorter and the mAP performance is excellent, making it the optimal choice. Although the mAP performance is highest with a batch size of 8 and a learning rate of 0.0001, the actual detection performance is inferior to the former. Therefore, for the YOLOv5l model, training with a batch size of 8 and a learning rate of 0.001 is the best option. This study explores the application of the YOLO model in defect detection of hexagonal nuts and proposes effective methods to enhance model performance, providing valuable references for the further development of defect detection technology in manufacturing.

參考文獻


[1]. Li, L., Xia, Z., Li, Z., Han, H., Yang, L., Feng, X., & Roli, F. Wooden Spoon
Crack Detection by Prior Knowledge-Enriched Deep Convolutional Network.
Engineering Applications of Artificial Intelligence, Vol. 126, 2023.
[2]. Zhao, Z., Guo, guangxue, Zhang, L., & Li, Y. A New Anti-Vibration Hammer Rust
Detection Algorithm Based on Improved YOLOv7. Energy Reports, Vol. 9, pp.

延伸閱讀