CrackFormer: A reinforcement learning-enhanced Swin Transformer V3 framework for high-fidelity detection and segmentation of pavement surface cracks
Pavement crack detection plays a vital role in maintaining road infrastructure, yet traditional manual inspection methods are time-consuming, error-prone and inefficient at scale. Existing deep learning approaches often struggle with discontinuous cracks, varying illumination and noisy backgrounds leading to poor generalization. To address these limitations, CrackFormer is introduced as an end-to-end transformer-based segmentation framework designed for robust high-accuracy crack detection across diverse real-world conditions. A Region Proposal Network (RPN) derived from Mask R-CNN is employed to dynamically localize high-probability crack regions, enhancing computational efficiency by filtering out irrelevant background textures. These extracted regions are then processed by a hierarchical Swin Transformer V3 backbone which captures both local texture and long-range contextual dependencies essential for accurate segmentation. To further enhance crack boundary refinement framework incorporates a reinforcement learning module that adaptively optimizes segmentation outputs over time. This agent receives reward signals based on Intersection over Union (IoU) gains and learns an optimal policy to guide boundary updates during training. The entire framework is trained end-to-end using a combination of supervised loss and policy gradients. The system is low-power oriented and can smoothly connect to IoT networks and perform working with decent efficiency at low-power consumer electronics. This makes it very ideal for real time infrastructure monitoring in connected smart environment. The framework also employs a hybrid decoding structure that balances precision and inference speed making it suitable for both GPU and edge-device deployments. Its modular pipeline enables domain adaptation and real-time performance without sacrificing segmentation quality. Experimentally CrackFormer achieves a mean IoU of 89.35% and a Dice score of 92.75% on the Crack500 dataset outperforming existing models by over 3.9% in IoU. It maintains high AUC values above 0.90 across all crack types and demonstrates strong generalization on UAV-Crack500 and SC-Crack datasets. The model also supports real-time inference at 13 FPS with 98 ms latency and operates effectively on low-power devices such as the Jetson Nano. The suggested model will be relevant to use in highway maintenance, the infrastructure of smart cities, and automated road inspection applications. It assists in lowering repair cost, traffic disruption and avoiding structural collapse as it enables real-time and accurate crack detection and this process requires minimal manual intervention. The system establishes solutions to major issues of civil and industrial engineers, including labor intensiveness of inspection tasks, manual errors, and quick deployment, and is also suitable to work on edges when limited resources are available, such as Jetson Nano. The research objectives are clearly stated: the speedy detection of cracks using a deep learning-based crack detector, its improvement through reinforcement learning to promote performance and the scalability of the framework preventing the additional expense of computations in an edge device, on a light-weight machine, and the ease of implementation.
Publication Details
- Journal
- Alexandria Engineering Journal
- Published
- 2025-10-11
- DOI
- https://doi.org/10.1016/j.aej.2025.08.011
- Citations
- 2
- Primary Topic
- Microbial Metabolic Engineering and Bioproduction
- Type
- article
- Field-Weighted Citation Impact
- 1.61