跳到主要內容

簡易檢索 / 詳目顯示

研究生: 周彥廷
Yen-Ting Chou
論文名稱: YOLOv7 模型於小物件檢測之改良與應用
Application of Improved YOLOv7 on Small Object Detection
指導教授: 林錦德
Chin-Te Lin
口試委員:
學位類別: 碩士
Master
系所名稱: 工學院 - 機械工程學系
Department of Mechanical Engineering
論文出版年: 2023
畢業學年度: 111
語文別: 中文
論文頁數: 104
中文關鍵詞: YOLOv7Small Object DetectionK-means++CBAMAnchor Free Detection Head
相關次數: 點閱:21下載:2
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本研究目的為改良YOLOv7物件偵測模型於小物件偵測之能力。本研究總整前人於YOLOv4、YOLOv5等模型上的提升方法,包含調整模型輸出、更改骨幹結構、使用CBAM注意力機制模組、以K-means++聚類算法計算錨框以及使用無錨框檢測頭的改良方法。將上述方法與綜合應用提出各種改動後,本研究使用了回收玻璃的資料集訓練這些改動模型,並且進行結果的分析與討論。根據結果,本研究發現於小物件偵測時使用K-means++聚類算法來計算錨框之結果較差。最佳的組合是調整了backbone與輸出,同時加入了CBAM模組與使用了無錨框檢測頭的模型。相較於初始的YOLOv7模型,本研究提出的改良模型能成功將測試資料的mAP數值提升8.7%。本研究對小物件偵測的數種改善方法實際測試並提出相應理由,並成功的提升YOLOv7於小物件的偵測能力。


    The purpose of this study is to improve the capability of the object detection model YOLOv7 in detecting small objects. The study integrates previous enhancement methods used in models of YOLOv4 and YOLOv5, including adjusting the model output, modifying the backbone structure, incorporating the CBAM attention mechanism module, using the K-means++ clustering algorithm to calculate anchor boxes, and employing the Anchor-Free Detection Head for anchor-less detection. By applying and combining these methods, the study trained the modified models using a dataset of recycled glass and conducted an analysis and discussion of the results. Based on the findings, the study observed that using the K-means++ clustering algorithm for anchor box calculation yielded inferior results in small object detection. The optimal combination involved adjusting the backbone and output, incorporating the CBAM module, and utilizing the anchor-free detection head. Compared to the original YOLOv7 model, the modified model in this study successfully increased the mAP value by 8.7%. The study practically tested and provided corresponding justifications for several improvement methods in small object detection, effectively enhancing the detection YOLOv7 capability for small objects.

    摘要 i 亮點 i ABSTRACT ii 致謝 iii 目錄 iv 圖目錄 vi 表目錄 viii 第一章 緒論 1 1-1 背景與動機 1 1-2 文獻回顧 2 1-3 研究目的 4 第二章 相關技術介紹 5 2-1 深度學習影像偵測指標分類與指標 5 2-2 YOLO模型的發展歷程 10 2-3 YOLO v7模型的架構 12 2-4 現有的玻璃色選機 16 2-5 提升小物件辨識的方法 19 第三章 研究方法 25 3-1 本研究預計使用的模型更動 26 3-2 各項改動的組合 30 3-3 數值目標與目標速度 33 第四章 實驗設計 35 4-1 資料集建立 35 4-2 模型訓練環境 38 4-3 模型訓練參數 39 第五章 結果與討論 43 5-1 單項模型改動結果比較 43 5-2 多項模型改動結果比較 46 5-3 模型訓練小結 51 5-4 實際於回收玻璃的應用 52 第六章 結論與建議 53 6-1 具體貢獻 53 6-2 應用 53 6-3 限制 53 6-4 未來展望 54 參考文獻 55 附錄 58

    [1] W. Rawat and Z. Wang, "Deep convolutional neural networks for image classification: A comprehensive review," Neural Comput, vol. 29, no. 9, pp. 2352-2449, Sep 2017, doi: 10.1162/NECO_a_00990.
    [2] H. Q. A. Juliana, N. Sakundarini, and L. C. Seong, "Classification of contaminants in glass recycling using hybrid cnn-svm model," in 2022 IEEE International Conference on Artificial Intelligence in Engineering and Technology (IICAIET), 13-15 Sept. 2022 2022, pp. 1-6, doi: 10.1109/IICAIET55139.2022.9936857.
    [3] G. Bonifazi and S. Serranti, "Imaging spectroscopy based strategies for ceramic glass contaminants removal in glass recycling," Waste Management, vol. 26, no. 6, pp. 627-639, 2006/01/01/ 2006, doi: https://doi.org/10.1016/j.wasman.2005.06.004.
    [4] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, "You only look once: Unified, real-time object detection," p. arXiv:1506.02640. [Online]. Available: https://ui.adsabs.harvard.edu/abs/2015arXiv150602640R
    [5] C.-Y. Wang, A. Bochkovskiy, and H.-Y. M. Liao, "Yolov7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors," p. arXiv:2207.02696. [Online]. Available: https://ui.adsabs.harvard.edu/abs/2022arXiv220702696W
    [6] T.-Y. Lin et al., "Microsoft coco: Common objects in context," p. arXiv:1405.0312. [Online]. Available: https://ui.adsabs.harvard.edu/abs/2014arXiv1405.0312L
    [7] J. Y. Liu, X. F. Zhu, X. Y. Zhou, S. H. Qian, and J. H. Yu, "Defect detection for metal base of to-can packaged laser diode based on improved yolo algorithm," (in English), Electronics-Switz, vol. 11, no. 10, May 2022, doi: ARTN 1561
    10.3390/electronics11101561.
    [8] M. C. Wang, Y. M. Zhu, Y. K. Liu, and H. P. Deng, "X-ray small target security inspection based on tb-yolov5," (in English), Secur Commun Netw, vol. 2022, Aug 2 2022, doi: Artn 2050793
    10.1155/2022/2050793.
    [9] Z. Q. Zhao, P. Zheng, S. T. Xu, and X. D. Wu, "Object detection with deep learning: A review," (in English), Ieee T Neur Net Lear, vol. 30, no. 11, pp. 3212-3232, Nov 2019, doi: 10.1109/Tnnls.2018.2876865.
    [10] S. Minaee, Y. Y. Boykov, F. Porikli, A. J. Plaza, N. Kehtarnavaz, and D. Terzopoulos, "Image segmentation using deep learning: A survey," (in English), Ieee T Pattern Anal, vol. 44, no. 7, pp. 3523-3542, Jul 1 2022, doi: 10.1109/Tpami.2021.3059968.
    [11] J. Hui. "Map (mean average precision) for object detection." https://jonathan-hui.medium.com/map-mean-average-precision-for-object-detection-45c121a31173 (accessed.
    [12] 河北森虹宇环境科技有限公司. "森虹宇工业智能色选机 金属玻璃粮食塑料颜色筛选设备." https://detail.1688.com/offer/644888827456.html?spm=a261b.2187593.0.0.79773b9fz0EeNO (accessed.
    [13] J. Redmon and A. Farhadi, "Yolo9000: Better, faster, stronger," p. arXiv:1612.08242doi: 10.48550/arXiv.1612.08242.
    [14] J. Redmon. "Darknet." https://github.com/pjreddie/darknet (accessed.
    [15] A. Bochkovskiy, C.-Y. Wang, and H.-Y. M. Liao, "Yolov4: Optimal speed and accuracy of object detection," p. arXiv:2004.10934doi: 10.48550/arXiv.2004.10934.
    [16] C.-Y. Wang, A. Bochkovskiy, and H.-Y. M. Liao. "Official yolov7." https://github.com/WongKinYiu/yolov7 (accessed.
    [17] C.-Y. Wang, H.-Y. M. Liao, and I.-H. Yeh, "Designing network design strategies through gradient path analysis," p. arXiv:2211.04800doi: 10.48550/arXiv.2211.04800.
    [18] H. X. Huang, X. D. Tang, F. Wen, and X. Jin, "Small object detection method with shallow feature fusion network for chip surface defect detection," (in English), Sci Rep-Uk, vol. 12, no. 1, Mar 10 2022, doi: ARTN 3914
    10.1038/s41598-022-07654-x.
    [19] S. Woo, J. Park, J.-Y. Lee, and I. S. Kweon, "Cbam: Convolutional block attention module," p. arXiv:1807.06521doi: 10.48550/arXiv.1807.06521.
    [20] Z. Liu et al., "Swin transformer: Hierarchical vision transformer using shifted windows," p. arXiv:2103.14030doi: 10.48550/arXiv.2103.14030.
    [21] H. Gong et al., "Swin-transformer-enabled yolov5 with attention mechanism for small object detection on satellite images," (in English), Remote Sens-Basel, vol. 14, no. 12, Jun 2022, doi: ARTN 2861
    10.3390/rs14122861.
    [22] Z. Liu et al., "Swin transformer v2: Scaling up capacity and resolution," p. arXiv:2111.09883doi: 10.48550/arXiv.2111.09883.
    [23] A. Benjumea, I. Teeti, F. Cuzzolin, and A. Bradley, "Yolo-z: Improving small object detection in yolov5 for autonomous vehicles," p. arXiv:2112.11798. [Online]. Available: https://ui.adsabs.harvard.edu/abs/2021arXiv211211798B
    [24] Z. Huang, J. Wang, X. Fu, T. Yu, Y. Guo, and R. Wang, "Dc-spp-yolo: Dense connection and spatial pyramid pooling based yolo for object detection," p. arXiv:1903.08589doi: 10.48550/arXiv.1903.08589.
    [25] D. Im, S. Lee, H. Lee, B. Yoon, F. So, and J. Jeong, "A data-centric approach to design and analysis of a surface-inspection system based on deep learning in the plastic injection molding industry," (in English), Processes, vol. 9, no. 11, Nov 2021, doi: ARTN 1895
    10.3390/pr9111895.
    [26] T. Lin. "Labelimg 1.8.6." https://pypi.org/project/labelImg/ (accessed.
    [27] C.-Y. Wang, A. Bochkovskiy, and H.-Y. M. Liao. "Yolov7 anchor free detection head." https://github.com/WongKinYiu/yolov7/tree/u6 (accessed.
    [28] ultralytics. "Get started with yolov5 ? In docker." https://docs.ultralytics.com/yolov5/environments/docker_image_quickstart_tutorial/?h=docker (accessed.

    QR CODE
    :::