基于YOLOv8s的钢材表面缺陷检测方法研究
Steel Surface Defect Detection Based on YOLOv8s
DOI: 10.12677/csa.2026.164141, PDF,   
作者: 芦志远:辽宁科技大学电子与信息工程学院,辽宁 鞍山
关键词: 目标检测YOLOv8钢材表面缺陷NEU-DET数据增强深度学习Object Detection YOLOv8 Steel Surface Defect NEU-DET Data Augmentation Deep Learning
摘要: 钢材表面缺陷的准确检测是保障钢铁产品质量的关键环节。针对热轧带钢表面缺陷种类多样、部分类别与背景纹理相似导致漏检率高等问题,本文针对NEU-DET数据集对YOLOv8s进行系统的优化与评估,构建强有力的基准检测模型。以东北大学热轧带钢表面缺陷数据集(NEU-DET)为实验基础,该数据集涵盖裂纹、夹杂物、斑块、麻面、轧入氧化皮和划痕6类缺陷,共1800张图像。通过高分辨率输入(800 × 800像素)、AdamW优化器、Mosaic/MixUp/CopyPaste多策略数据增强及余弦学习率调度等组合优化策略,相比YOLOv8s默认配置(640 × 640,默认数据增强)显著提升了模型性能。实验结果表明,优化后模型在验证集上mAP@0.5达到0.739 (基线0.701),较基线提升了3.8%。其中斑块类AP最高为0.923,划痕类为0.868,最优F1分数为0.69 (置信度阈值0.292)。混淆矩阵及可视化分析揭示了各类缺陷的检测特性,为后续改进指明了方向。
Abstract: Accurate detection of steel surface defects is essential for quality assurance in steel manufacturing. Aiming at the problems of diverse defect types and a high miss-detection rate caused by similarity between certain defect categories and background textures in hot-rolled strip steel, this paper systematically optimizes and evaluates YOLOv8s on the NEU-DET dataset to construct a strong baseline detection model. Experiments are conducted on the NEU-DET dataset released by Northeastern University, which covers six types of defects—crazing, inclusion, patches, pitted surface, rolled-in scale, and scratches—totaling 1800 images. Through a combination of high-resolution input (800 × 800 pixels), AdamW optimizer, multi-strategy data augmentation (Mosaic/MixUp/CopyPaste), and cosine learning rate scheduling, the optimized model achieves mAP@0.5 = 0.739 on the validation set, representing a +3.8% improvement over the YOLOv8s default configuration baseline (640 × 640, mAP@0.5 = 0.701). Among individual categories, patches achieve the highest AP of 0.923 and scratches reach 0.868, while the optimal F1 score is 0.69 at a confidence threshold of 0.292. Confusion matrix and visualization analyses reveal the detection characteristics of each defect type and indicate directions for future improvement.
文章引用:芦志远. 基于YOLOv8s的钢材表面缺陷检测方法研究[J]. 计算机科学与应用, 2026, 16(4): 419-427. https://doi.org/10.12677/csa.2026.164141

参考文献

[1] 赵朗月, 吴一全. 基于机器视觉的表面缺陷检测方法研究进展[J]. 仪器仪表学报, 2022, 43(1): 198-219.
[2] 徐彦威, 李军, 董元方, 等. YOLO系列目标检测算法综述[J]. 计算机科学与探索, 2024, 18(9): 2221-2238.
[3] Jocher, G., Chaurasia, A. and Qiu, J. (2023) Ultralytics YOLO (Version 8.0.0).
https://github.com/ultralytics/ultralytics
[4] 王延舒, 余建波. 基于自适应全局定位算法的带钢表面缺陷检测[J]. 自动化学报, 2024, 50(8): 1550-1564.
[5] 卢俊哲, 张铖怡, 刘世鹏, 等. 面向复杂环境中带钢表面缺陷检测的轻量级DCN-YOLO [J]. 计算机工程与应用, 2023, 59(15): 318-328.
[6] 梁礼明, 龙鹏威, 冯耀, 等. 改进轻量化VTG-YOLOv7-tiny的钢材表面缺陷检测[J]. 光学精密工程, 2024, 32(8): 1227-1240.
[7] 王春梅, 刘欢. YOLOv8-VSC: 一种轻量级的带钢表面缺陷检测算法[J]. 计算机科学与探索, 2024, 18(1): 151-160.
[8] 朱成杰, 刘乐乐, 朱洪波. 基于YOLOv8-NFMC的带钢表面缺陷检测算法[J]. 国外电子测量技术, 2024, 43(7): 97-104.
[9] 刘毅, 蒋三新. 基于改进YOLOX的钢材表面缺陷检测研究[J]. 现代电子技术, 2024, 47(9): 131-138.