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

计算机工程 ›› 2025, Vol. 51 ›› Issue (2): 78-85. doi: 10.19678/j.issn.1000-3428.0068445

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

基于改进YOLOv7的MODF端口状态检测算法

胡朝举*(), 郭凤仪   

  1. 华北电力大学计算机系, 河北 保定 071000
  • 收稿日期:2023-09-25 出版日期:2025-02-15 发布日期:2024-04-26
  • 通讯作者: 胡朝举
  • 基金资助:
    国家自然科学基金(61502168)

MODF Port State Detection Algorithm Based on Improved YOLOv7

HU Chaoju*(), GUO Fengyi   

  1. Department of Computing, North China Electric Power University, Baoding 071000, Hebei, China
  • Received:2023-09-25 Online:2025-02-15 Published:2024-04-26
  • Contact: HU Chaoju

摘要:

人工巡检的管理方式导致光纤总配线架(MODF)端口状态的信息准确率较低, 无法区分占用端口与虚占端口。针对MODF资源管理中的端口状态识别问题, 提出一种改进的YOLOv7目标检测模型。鉴于数据集采集困难且类别不均衡, 采用多种数据增强方法来扩充数据集; 在骨干网络中使用共享权重的感受野扩大模块(RFEM), 扩大端口目标的感受野, 减少训练过程中的过拟合风险; 提出F-EMA注意力模块, 以提高对空间上下文信息的利用率, 减少因端口接近或被遮挡而导致的漏检、误检等情况; 使用NWD损失函数替代交并比(IoU)度量, 减轻对小目标位置偏差的敏感性, 提升密集小物体检测准确率。实验结果表明, 改进模型的mAP@0.5值达到98.8%, 相比原Yolov7模型提升了2百分点, mAP@0.5∶0.95值达到63.8%, 提升了9.5百分点, 提高了MODF端口资源利用率, 满足智能巡检系统对于端口占用状态识别准确率的基本要求。

关键词: 深度学习, YOLOv7算法, 光纤总配线架, 损失函数, 感受野扩大模块, 注意力模块

Abstract:

In recent years, manual inspection management methods have led to low accuracy in identifying the status of Fiber Optic Distribution Frame (MODF) ports, making it difficult to differentiate between occupied and unoccupied ports. To address the problem of status recognition in MODF port resource management, this study proposes an improved YOLOv7 object-detection model. First, owing to the difficulty in data collection and unbalanced categories, multiple data enhancement methods are used to expand the dataset. In addition, a shared-weight Receptive Field Expansion Module (RFEM) is used in the backbone network to enlarge the receptive field of the port targets and reduce the risk of overfitting during the training process. The F-EMA attention module is proposed to improve the utilization of spatial context information and reduce missed detections and false alarms caused by ports being closed or occluded. The Normalized Gaussian Wasserstein Distance (NWD) loss function is used to replace the Intersection over Union (IoU) measurement, which alleviates the sensitivity to the position deviation of small targets and improves the detection accuracy of dense small objects. The experimental results show that the mAP@0.5 value of the improved model reaches 98.8%, which is 2 percentage points higher than that of the original Yolov7 model, whereas the mAP@0.5∶0.95 value reaches 63.8%, which is 9.5 percentage points higher. This improves the utilization rate of MODF port resources and meets the basic requirements of the intelligent inspection system for the accuracy of port occupancy status recognition.

Key words: deep learning, YOLOv7 algorithm, Fiber Optic Distribution Frame (MODF), loss function, Receptive Field Expansion Module (RFEM), attention module