.
In recent years, automatic image crack detection has become a critical task for ensuring the safety of various facilities. Many researchers utilized convolutional neural networks (CNNs) for crack detection. However, the existing CNN methods have the limitation of the receptive fields and struggle to establish long dependencies and global background information. Aiming to address this problem, we propose a CNN method with an attention module and recurrent mechanism. In terms of the backbone network, we propose a backbone network named Attention-VGG-19. In our network, we remove the last three fully connected layers of VGG-19 to expect the meaningful side output with different scales and to reduce the number of parameters. The fully connected layers are computationally intensive. The proposed network also provides integrated direct supervision for features of each convolutional stage. Then, to promote important features and suppress unimportant features, an attention module called CrackP attention is proposed. In the recurrent mechanism, the module can be unrolled into R loops to connect the path between one pixel and its neighboring ones. To prove the effectiveness of our proposed method, we evaluate it on four public crack datasets, DeepCrack, crack forest dataset (CFD), Crack500, and CrackTree260, on which it achieves F-score (F1) values of 0.876, 0.652, 0.692, and 0.593, respectively. After a guided filter is added, our method achieves F1 values of 0.878, 0.638, 0.681, and 0.526 on these four datasets.