<p>To address the limited adaptability of existing rail internal defect detection algorithms on low-power, low-memory flaw detection devices, this paper proposes CSP-YOLO-a real-time detection algorithm based on an improved YOLOv8. First, a data augmentation strategy tailored to the characteristics of rail B-scan images is developed to expand the defect dataset and improve the algorithm’s robustness and generalization. Second, inspired by GhostNet and incorporating the GhostConv module, the proposed C2f-GG (C2f with GhostNet and GhostConv) module reduces model complexity and increases detection speed. Third, the SPPF-CA (SPPF with Coordinate Attention) module, which integrates a coordinate attention mechanism, is introduced to enhance focus on defect regions and suppress background noise, considering the strong spatial correlation of defects in B-scan images. Fourth, the P5 large-object detection head is removed to better support small-object detection. Meanwhile, the P3--P4 detection head is replaced with the Independent Normalization Shared Convolution Head (INSCH) to enhance multi-scale feature extraction and further simplify the model. Finally, a layer-adaptive pruning technique is employed to further simplify deployment. Experimental results show that the proposed algorithm reduces the number of parameters and computational cost by 93.69% and 74.07%, respectively, with only a 0.1% drop in average precision (mAP@0.5). In addition, detection speeds (Frames Per Second, FPS) on CPU and GPU increase by 74.07% and 92.79%, respectively, enabling real-time detection for railway applications.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

CSP-YOLO: an efficient and lightweight real-time algorithm for internal rail defect detection

  • Xiaochun Wu,
  • Shuzhan Yu

摘要

To address the limited adaptability of existing rail internal defect detection algorithms on low-power, low-memory flaw detection devices, this paper proposes CSP-YOLO-a real-time detection algorithm based on an improved YOLOv8. First, a data augmentation strategy tailored to the characteristics of rail B-scan images is developed to expand the defect dataset and improve the algorithm’s robustness and generalization. Second, inspired by GhostNet and incorporating the GhostConv module, the proposed C2f-GG (C2f with GhostNet and GhostConv) module reduces model complexity and increases detection speed. Third, the SPPF-CA (SPPF with Coordinate Attention) module, which integrates a coordinate attention mechanism, is introduced to enhance focus on defect regions and suppress background noise, considering the strong spatial correlation of defects in B-scan images. Fourth, the P5 large-object detection head is removed to better support small-object detection. Meanwhile, the P3--P4 detection head is replaced with the Independent Normalization Shared Convolution Head (INSCH) to enhance multi-scale feature extraction and further simplify the model. Finally, a layer-adaptive pruning technique is employed to further simplify deployment. Experimental results show that the proposed algorithm reduces the number of parameters and computational cost by 93.69% and 74.07%, respectively, with only a 0.1% drop in average precision (mAP@0.5). In addition, detection speeds (Frames Per Second, FPS) on CPU and GPU increase by 74.07% and 92.79%, respectively, enabling real-time detection for railway applications.