|
|
|
| Lightweight rebar surface defect detection algorithm based on global information perception |
Jian XIAO1( ),Xiaoyuan YANG1,Xinze HE1,Lin CHEN2,Xin HU3,*( ) |
1. School of Electronics and Control Engineering, Chang’an University, Xi’an 710064, China 2. School of Information Engineering, Suqian University, Suqian 223800, China 3. School of Energy and Electrical Engineering, Chang’an University, Xi’an 710064, China |
|
|
|
Abstract A lightweight defect detection algorithm was proposed to address the issues of insufficient detection accuracy for rebar surface defects and limited computational resources of terminal devices. Based on the YOLOv8n model, the C2f module was redesigned and a backbone network with global information modeling capabilities was constructed by combining the conditional positional encoding characteristics of the convolutional gated linear unit and the dynamic global interaction capability of the self-attention mechanism. A context anchor attention module was used to improve the high-level screening feature pyramid network. A combined strategy of width-wise and height-wise strip convolutions was adopted to effectively focus on the long-distance pixel information, and the information redundancy in multi-scale feature fusion was reduced through feature selection. An adaptive detection head was proposed via shared convolution and separated BN layers to improve the parameter utilization while ensuring the detection accuracy. The Unified-IoU bounding box loss function was employed to enhance the performance of dense defect detection through dynamic weight distribution. Experimental results showed that the improved algorithm achieved a mAP@0.5 of 95.4% on a self-constructed rebar dataset, which was 4.3 percentage points higher than that of YOLOv8n. The model’s parameter count was reduced to 1.4 M, representing a decrease of 53.33%, the computational complexity was reduced by 34.57%, and the FPS reached 156 frames per second, achieving a balance between the detection performance and the computational resource consumption. Additionally, the algorithm’s good generalization performance was validated on the NEU-DET dataset.
|
|
Received: 02 April 2025
Published: 23 May 2026
|
|
|
| Fund: 陕西省秦创原“科学家+工程师”队伍建设项目(2024QCY-KXJ-161);咸阳市重点研发计划资助项目(L2025-ZDKJ-ZDGG-RGZN-005). |
|
Corresponding Authors:
Xin HU
E-mail: xiaojian@chd.edu.cn;huxin@chd.edu.cn
|
基于全局信息感知的轻量级螺纹钢表面缺陷检测算法
针对螺纹钢表面缺陷检测精度不足及终端设备计算资源受限的问题,提出轻量级缺陷检测算法. 基于YOLOv8n模型,结合卷积门控线性单元的条件位置编码特性与自注意力机制的动态全局交互能力重新设计C2f模块,构建具有全局信息建模能力的主干网络. 采用上下文锚点注意力模块改进高层筛选特征金字塔网络,通过宽、高方向带状卷积组合策略聚焦远距离像素信息,并通过特征选择减少多尺度特征融合中的信息冗余. 通过共享卷积与分离BN层,提出自适应检测头,提高参数利用率并保证检测精度. 采用Unified-IoU边界框损失函数,通过动态权重分配提升密集缺陷检测性能. 实验结果表明,在自建螺纹钢数据集上,改进算法的mAP@0.5达到94.5%,较YOLOv8n提升了4.3个百分点;模型参数量降低至1.4 M,减少了53.33%;计算量降低了34.57%,FPS达到156帧/s,实现了检测性能与计算资源消耗的平衡. 此外,在NEU-DET数据集上验证了该算法具有良好的泛化性能.
关键词:
缺陷检测,
YOLOv8n,
轻量化网络,
全局信息,
高层筛选特征金字塔网络(HS-FPN),
Unified-IoU
|
|
| [1] |
TIAN Y, ZHANG G, YE H, et al Corrosion of steel rebar in concrete induced by chloride ions under natural environments[J]. Construction and Building Materials, 2023, 369: 130504
doi: 10.1016/j.conbuildmat.2023.130504
|
|
|
| [2] |
QIU J, ZHANG W, JING Y Quantitative linear correlation between self-magnetic flux leakage field variation and corrosion unevenness of corroded rebars[J]. Measurement, 2023, 218: 113173
doi: 10.1016/j.measurement.2023.113173
|
|
|
| [3] |
EDDY I C, UNDERHILL P R, MORELLI J, et al. Pulsed eddy current response to liftoff in different sizes of concrete embedded rebar [C]// Proceedings of the IEEE SENSORS. Montreal: IEEE, 2019: 1–4.
|
|
|
| [4] |
LUO Q, SUN Y, LI P, et al Generalized completed local binary patterns for time-efficient steel surface defect classification[J]. IEEE Transactions on Instrumentation and Measurement, 2019, 68 (3): 667- 679
doi: 10.1109/TIM.2018.2852918
|
|
|
| [5] |
YIN T, YANG J. Detection of steel surface defect based on faster R-CNN and FPN [C]// Proceedings of the 7th International Conference on Computing and Artificial Intelligence. Tianjin: ACM, 2021: 15–20.
|
|
|
| [6] |
胡欣, 周运强, 肖剑, 等 基于改进YOLOv5的螺纹钢表面缺陷检测[J]. 图学学报, 2023, 44 (3): 427- 437 HU Xin, ZHOU Yunqiang, XIAO Jian, et al Surface defect detection of threaded steel based on improved YOLOv5[J]. Journal of Graphics, 2023, 44 (3): 427- 437
|
|
|
| [7] |
李相垚, 侯红玲, 杨澳, 等. 面向钢材表面缺陷检测的DCS-YOLOv8算法研究[J/OL]. 机械科学与技术, 2024: 1–10. (2024-10-10) [2025-04-01]. https://link.cnki.net/doi/10.13433/j.cnki.1003-8728.20240128. LI Xiangyao, HOU Hongling, YANG Ao, et al. Research on DCS-YOLOv8 algorithm for steel surface defect detection [J/OL]. Mechanical Science and Technology for Aerospace Engineering, 2024: 1–10. (2024-10-10) [2025-04-01]. https://link.cnki.net/doi/10.13433/j.cnki.1003-8728.20240128.
|
|
|
| [8] |
刘义艳, 郝婷楠, 贺晨, 等 基于DBBR-YOLO的光伏电池表面缺陷检测[J]. 图学学报, 2024, 45 (5): 913- 921 LIU Yiyan, HAO Tingnan, HE Chen, et al Photovoltaic cell surface defect detection based on DBBR-YOLO[J]. Journal of Graphics, 2024, 45 (5): 913- 921
|
|
|
| [9] |
LIU G, HU Y, CHEN Z, et al Lightweight object detection algorithm for robots with improved YOLOv5[J]. Engineering Applications of Artificial Intelligence, 2023, 123: 106217
doi: 10.1016/j.engappai.2023.106217
|
|
|
| [10] |
王春梅, 刘欢 YOLOv8-VSC: 一种轻量级的带钢表面缺陷检测算法[J]. 计算机科学与探索, 2024, 18 (1): 151- 160 WANG Chunmei, LIU Huan YOLOv8-VSC: lightweight algorithm for strip surface defect detection[J]. Journal of Frontiers of Computer Science and Technology, 2024, 18 (1): 151- 160
|
|
|
| [11] |
TANG Z, ZHANG W, LI J, et al LTSCD-YOLO: a lightweight algorithm for detecting typical satellite components based on improved YOLOv8[J]. Remote Sensing, 2024, 16 (16): 3101
doi: 10.3390/rs16163101
|
|
|
| [12] |
梁礼明, 龙鹏威, 卢宝贺, 等. EHH-YOLOv8s: 一种轻量级的带钢表面缺陷检测算法[J/OL]. 北京航空航天大学学报, 2024: 1–15. (2024-08-08) [2025-04-01]. https://link.cnki.net/doi/10.13700/j.bh.1001-5965.2024.0426 LIANG Liming, LONG Pengwei, LU Baohe, et al. EHH-YOLOv8s: a lightweight algorithm for strip surface defect detection [J/OL]. Journal of Beijing University of Aeronautics and Astronautics, 2024: 1–15. (2024-08-08) [2025-04-01]. https://link.cnki.net/doi/10.13700/j.bh.1001-5965.2024.0426.
|
|
|
| [13] |
PENG H, XIE H, LIU H, et al LGFF-YOLO: small object detection method of UAV images based on efficient local-global feature fusion[J]. Journal of Real-Time Image Processing, 2024, 21 (5): 167
doi: 10.1007/s11554-024-01550-5
|
|
|
| [14] |
刘振江, 张会娟, 姬淼鑫, 等. 轻量级多尺度特征融合增强的空间非合作小目标检测算法[J/OL]. 北京航空航天大学学报, 2024: 1–12. (2024-09-20) [2025-04-01]. https://link.cnki.net/doi/10.13700/j.bh.1001-5965.2024.0509. LIU Zhenjiang, ZHANG Huijuan, JI Miaoxin, et al. Lightweight multi-scale feature fusion enhancement algorithm for spatial non-cooperative small target detection [J/OL]. Journal of Beijing University of Aeronautics and Astronautics, 2024: 1–12. (2024-09-20) [2025-04-01]. https://link.cnki.net/doi/10.13700/j.bh.1001-5965.2024.0509.
|
|
|
| [15] |
SHI D. TransNeXt: robust foveal visual perception for vision Transformers [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2024: 17773–17783.
|
|
|
| [16] |
CAI X, LAI Q, WANG Y, et al. Poly kernel inception network for remote sensing detection [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2024: 27706–27716.
|
|
|
| [17] |
CHEN Y, ZHANG C, CHEN B, et al Accurate leukocyte detection based on deformable-DETR and multi-level feature fusion for aiding diagnosis of blood diseases[J]. Computers in Biology and Medicine, 2024, 170: 107917
doi: 10.1016/j.compbiomed.2024.107917
|
|
|
| [18] |
王安静, 袁巨龙, 朱勇建, 等 基于改进YOLOv8s的鼓形滚子表面缺陷检测算法[J]. 浙江大学学报: 工学版, 2024, 58 (2): 370- 380 WANG Anjing, YUAN Julong, ZHU Yongjian, et al Drum roller surface defect detection algorithm based on improved YOLOv8s[J]. Journal of Zhejiang University: Engineering Science, 2024, 58 (2): 370- 380
|
|
|
| [19] |
LUO X, CAI Z, SHAO B, et al. Unified-IoU: for high-quality object detection [EB/OL]. (2024-08-13) [2025-04-01]. https://arxiv.org/abs/2408.06636.
|
|
|
| [20] |
YU W, SI C, ZHOU P, et al MetaFormer baselines for vision[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024, 46 (2): 896- 912
doi: 10.1109/TPAMI.2023.3329173
|
|
|
| [21] |
PATEL I, PATEL S An optimized deep learning model for flower classification using NAS-FPN and faster R-CNN[J]. International Journal of Scientific & Technology Research, 2020, 9 (3): 5308- 5318
|
|
|
| [22] |
QIAN X, ZHANG N, WANG W Smooth GIoU loss for oriented object detection in remote sensing images[J]. Remote Sensing, 2023, 15 (5): 1259
doi: 10.3390/rs15051259
|
|
|
| [23] |
PENG H, YU S A systematic IoU-related method: beyond simplified regression for better localization[J]. IEEE Transactions on Image Processing, 2021, 30: 5032- 5044
doi: 10.1109/TIP.2021.3077144
|
|
|
| [24] |
HAN K, WANG Y, TIAN Q, et al. GhostNet: more features from cheap operations [EB/OL]. (2020-03-13) [2025-04-01]. https://arxiv.org/abs/1911.11907.
|
|
|
| [25] |
TANG Y, HAN K, GUO J, et al. GhostNetV2: enhance cheap operation with long-range attention [C]// Proceedings of the 36th International Conference on Neural Information Processing Systems. New Orleans: Curran Associates Inc, 2022: 9969–9982.
|
|
|
| [26] |
MEHTA S, RASTEGARI M. MobileViT: light-weight, general-purpose, and mobile-friendly vision Transformer [EB/OL]. (2022-03-04) [2025-04-01]. https://arxiv.org/abs/2110.02178.
|
|
|
| [27] |
Howard A, SANDLER M, CHU G, et al. Searching for MobileNetV3 [C]// Proceedings of the IEEE/CVF International Conference on Computer Vision. Seoul: IEEE, 2019: 1314–1324.
|
|
|
| [28] |
QIN D, LEICHNER C, DELAKIS M, et al. MobileNetV4: universal models for the mobile ecosystem [C]// European Conference on Computer Vision. Milan: ECVA, 2025: 78–96.
|
|
|
| [29] |
YANG H, LIU J, MEI G, et al Research on real-time detection method of rail corrugation based on improved ShuffleNet V2[J]. Engineering Applications of Artificial Intelligence, 2023, 126: 106825
doi: 10.1016/j.engappai.2023.106825
|
|
|
| [30] |
梁礼明, 龙鹏威, 金家新, 等 基于改进YOLOv8s的钢材表面缺陷检测算法[J]. 浙江大学学报: 工学版, 2025, 59 (3): 512- 522 LIANG Liming, LONG Pengwei, JIN Jiaxin, et al Steel surface defect detection algorithm based on improved YOLOv8s[J]. Journal of Zhejiang University: Engineering Science, 2025, 59 (3): 512- 522
|
|
|
| [31] |
CHEN H, WANG Y, GUO J, et al. VanillaNet: the power of minimalism in deep learning [EB/OL]. (2023-05-23) [2025-04-01]. https://arxiv.org/abs/2305.12972.
|
|
|
| [32] |
CHEN J, KAO S, HE H, et al. Run, don’t walk: chasing higher FLOPS for faster neural networks [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Vancouver: IEEE, 2023: 12021–12031.
|
|
|
|
Viewed |
|
|
|
Full text
|
|
|
|
|
Abstract
|
|
|
|
|
Cited |
|
|
|
|
| |
Shared |
|
|
|
|
| |
Discussed |
|
|
|
|