作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2024, Vol. 50 ›› Issue (8): 22-30. doi: 10.19678/j.issn.1000-3428.0068537

• 人工智能与模式识别 • 上一篇    下一篇

面向废旧电缆检测的轻量化网络模型

饶日昕1, 王怡文1, 曾砺志2, 童心恬1, 赵海涛1,*()   

  1. 1. 华东理工大学信息科学与工程学院, 上海 200237
    2. 华东理工大学机械与动力工程学院, 上海 200237
  • 收稿日期:2023-10-10 出版日期:2024-08-15 发布日期:2023-12-19
  • 通讯作者: 赵海涛
  • 基金资助:
    国家自然科学基金(62173143)

Lightweight Network Model for Waste Cable Detection

Rixin RAO1, Yiwen WANG1, Lizhi ZENG2, Xintian TONG1, Haitao ZHAO1,*()   

  1. 1. School of Information Science and Engineering, East China University of Science and Technology, Shanghai 200237, China
    2. School of Mechanical and Power Engineering, East China University of Science and Technology, Shanghai 200237, China
  • Received:2023-10-10 Online:2024-08-15 Published:2023-12-19
  • Contact: Haitao ZHAO

摘要:

目前我国废旧电缆回收主要依靠人工分拣, 存在耗时耗力、准确性低的问题。为了更好地将模型部署至小型化硬件设备并提高检测实时性, 提出基于改进YOLOv5s的废旧电缆检测网络模型。首先, 将主干网络中的标准卷积模块替换为轻量化的幻象(Ghost)模块以减小网络的复杂度, 并且在快速空间金字塔池化(SPPF)模块前引入卷积块注意力模块(CBAM), 提高了特征提取和融合的效率。其次, 将网络中Neck部分的C3模块结合有效通道注意力模块(ECA), 实现了跨通道的信息交互, 提高了网络特征融合能力。最后, 在损失函数的计算部分使用Wise-交并比(WIoU)作为新的边界框损失函数以提升回归效果, 加快模型的收敛速度。实验结果表明: 改进模型的平均检测精度为96.3%, 相比单点多框检测器(SSD)提高了1.2个百分点; 参数量为5.15×106, 相比YOLOv5s模型减少了27.0%;在小型嵌入式设备LubanCat-1上的推理速度达到8.49帧/s, 具有良好的实时性, 适用于废旧电缆的实时检测与分类。

关键词: 废旧电缆检测, YOLOv5s模型, 轻量化, 注意力机制, 嵌入式设备

Abstract:

Currently, waste cable recycling in China relies primarily on manual sorting, which is time-consuming, labor-intensive, and inaccurate. To deploy the model on small embedded devices more effectively and improve real-time detection, an improved lightweight network model based on YOLOv5s for waste cable detection is proposed herein. First, standard convolution modules in the Backbone of the network are replaced with lightweight Ghost modules to reduce network complexity, and a Convolutional Block Attention Module (CBAM) is introduced before a Fast Spatial Pyramid Pooling (SPPF) module to enhance feature extraction and fusion efficiency. Second, the C3 module in the neck of the network is combined with an Effective Channel Attention (ECA) module to facilitate inter-channel information interaction and enhance the network's feature fusion capability. Finally, Wise Intersection over Union (WIoU) is utilized as a new bounding box loss function to improve the regression effect and accelerate the model convergence speed. The experimental results demonstrate that the improved model achieves an average detection accuracy of 96.3%, which is 1.2 percentage points higher than that of the Single Shot multibox Detector (SSD). There are 5.15×106 parameters in the proposed model, which is a 27.0% reduction compared with the YOLOv5s model. The inference speed on the small embedded device, LubanCat-1, reaches 8.49 frame/s, indicating excellent real-time performance and suitability for real-time detection and classification of waste cables.

Key words: waste cable detection, YOLOv5s model, lightweight, attention mechanism, embedded device