Efficient deep learning based rail fastener screw detection method for fastener screw maintenance robot under complex lighting conditions

Yijie Cai, Ming He, Bin ChenScientific 2024

Abstract

For the rail fastener replacement operation at night in the wilderness, the lighting conditions on the rail fastener screws are complex, due to the multiple illuminants like headlamps and flashlights at the site, making some parts of the objects appear dark or low light status in the camera. These complex lighting conditions (CLCs) interfere with the fastener recognition ability of the fastener screw detection algorithm since it can hardly maintain fixed and optimized lighting conditions of the fastener screw. We propose the LFGB-YOLO, a novel YOLO-based model that contains two principal parts: the Light-Fast part and the GB-Neck part. The Light-Fast part can reduce the network Params, FLOPs, and memory access frequency in feature extraction while keeping a high precision. The GB-Neck part can lighten the feature fusion network while maintaining the ability of accurate feature information extraction operation. Experimental results demonstrate that the LFGB-YOLO performs excellently in metrics like Recall, [email protected], F1 score, and FPS, better than the performance of competitive models like YOLOv5n, YOLOv7-miny, and YOLOv8. The performance metrics of the proposed model, Recall, [email protected], F1-score, and FPS are increased by 8.9%, 4%, 4.8%, and 8.1% compared with the baseline model.

Introduction

Maintaining the thousands of fasteners that secure rails to sleepers is a grueling task, often performed at night in remote areas. While maintenance robots are being deployed to automate the tightening and loosening of these screws, they face a major computer vision hurdle: lighting.

In the wilderness at midnight, a robot relies on headlamps and flashlights. This creates "Complex Lighting Conditions" (CLCs)—harsh shadows, high-contrast glares, and deep-seated dark spots that make a standard screw look like a piece of ballast or a random shadow. Existing object detection models either struggle to identify screws in these shadows (low recall) or are too computationally heavy to run in real-time on the limited hardware of a mobile robot.

Methodology

The authors introduced LFGB-YOLO, which modifies the YOLOv5n architecture through two primary upgrades: the Light-Fast Backbone and the GB-Neck.

The overall architecture of LFGB-YOLO, featuring the Light-Fast backbone, GB-Neck, and detection heads.

The Light-Fast Backbone

To reduce the computational "weight," the authors replaced the standard C3 module with a Fast-C2 module. This incorporates FasterNet blocks, which are designed to minimize memory access frequency and redundancy. They also introduced a Split-F module to further discretize output information, making feature extraction more efficient without a massive drop in precision.

Structure of the Fast-C2 module, integrating Split-F and FastNet blocks for efficient feature extraction.

The GB-Neck

For the "neck" of the model (where features are fused), the authors moved away from standard structures in favor of a BiFPN (Bi-directional Feature Pyramid Network). This allows for better cross-level information exchange. They integrated GSConv (Slim-Neck) to keep the module lightweight and added the SimAM (Simple Attention Module). SimAM is a "parameter-free" attention mechanism that calculates 3D weights based on an energy function, helping the model focus on the screw's features without adding to the parameter count.

Finally, they swapped the standard loss function for SIoU (SCYLLA-IoU), which accounts for the angle and distance between predicted and actual boxes, leading to faster and more stable convergence.

Datasets and Experimental Setup

Because no public dataset existed for rail fasteners under midnight wilderness lighting, the authors built their own CLC Dataset consisting of 300 original images captured at various distances, angles, and lighting intensities. To improve generalization, they expanded this to 1,000 images using data augmentation techniques like flipping, cropping, grayscale scaling, noise addition, and edge sharpening. The dataset focuses on Type II rail fasteners, a common standard in railway systems.

Results and Discussion

LFGB-YOLO showed impressive improvements over the baseline YOLOv5n:

  • Recall: Increased by 8.9%.
  • [email protected]: Increased by 4%.
  • F1-score: Increased by 4.8%.
  • Speed: Reached 186 FPS, an 8.1% increase over the baseline.

The paper demonstrates that for specialized robotics, "off-the-shelf" models like YOLOv8 aren't always the best fit. By stripping back the backbone and using more efficient feature fusion (BiFPN), they achieved better results with fewer parameters (approx. 1.19M). Using SimAM allowed the model to "focus" on the screws in the dark without slowing down the robot's processing speed.

Conclusion and Future Work

While the results are promising, the current model is trained specifically on Type II fasteners. Future work will involve expanding the dataset to include other fastener types (WJ-7, WJ-8, etc.) and environmental factors like rain, snow, or heavy dust. Additionally, the authors plan to validate the model on actual edge computing devices typically found on small-scale robots.

Summary updated

BibTeX
@inproceedings{cai2024efficient,
  author = {Yijie Cai and Ming He and Bin Chen},
  title = {{Efficient deep learning based rail fastener screw detection method for fastener screw maintenance robot under complex lighting conditions}},
  booktitle = {Scientific},
  year = {2024},
  doi = {10.1038/s41598-024-77364-z},
}
Figure