Sensors (Nov 2023)

Improved YOLOv7-Based Algorithm for Detecting Foreign Objects on the Roof of a Subway Vehicle

  • Weijun Wang,
  • Jinyuan Chen,
  • Zucheng Huang,
  • Hai Yuan,
  • Peng Li,
  • Xuyao Jiang,
  • Xintong Wang,
  • Cheng Zhong,
  • Qunxu Lin

DOI
https://doi.org/10.3390/s23239440
Journal volume & issue
Vol. 23, no. 23
p. 9440

Abstract

Read online

Subway vehicle roofs must be inspected when entering and exiting the depot to ensure safe subway vehicle operations. This paper presents an improved method for detecting foreign objects on subway vehicle roofs based on the YOLOv7 algorithm. First, we capture images of foreign objects using a line-scan camera at the depot entrance and exit, creating a dataset of foreign roof objects. Subsequently, we address the shortcomings of the YOLOv7 algorithm by introducing the Ghost module, an improved weighted bidirectional feature pyramid network (WBiFPN), and the Wise intersection over union (WIoU) bounding-box regression loss function. These enhancements are incorporated to build the subway vehicle roof foreign object detection model based on the improved YOLOv7, which we refer to as YOLOv7-GBW. The experimental results demonstrate the practicality and usability of the proposed method. The analysis of the experimental results indicates that the YOLOv7-GBW algorithm achieves a detection accuracy of 90.29% at a speed of 54.3 frames per second (fps) with a parameter count of 15.51 million. The improved YOLOv7 model outperforms mainstream detection algorithms in terms of detection accuracy, speed, and parameter count. This finding confirms that the proposed method meets the requirements for detecting foreign objects on subway vehicle roofs.

Keywords