## 1 Introduction  
During the service life of infrastructure such as buildings, bridges and roads, crack defects are always inevitable, which may lead to structural performance degradation and may even bring about catastrophic failures and enormous loss of human lives [1, 2]. To reduce the adverse effect of crack defects, it is necessary to conduct defect detection and inspection for regular maintenance. Traditional methods for crack detection are mainly based on manual visual inspection by certified inspectors, which may be labor intensive, time consuming and highly subjective [3]. In the last few years, crack detection techniques based on image processing have developed rapidly, and several approaches such as edge detection [4], region growth [5], threshold segmentation [6] and morphological operations [7] have emerged and been applied to the detection of infrastructure defects. With these methods, the cracks can be easily extracted from the background according to the edge, color, shape and other information of the images. However, it is worth noting that the key to the success of such image-processing-based approaches is to select an appropriate threshold value for accurate image classification. An improper parameter may cause relatively poor detection accuracy [8], especially for scenes with complex backgrounds. With the great improvement of computer hardware, image recognition and detection based on machine learning (ML) have achieved great breakthroughs. The basic idea of ML is to extract common crack features from the training set and to apply them to the testing set for detection. Generally, ML can be divided into supervised learning, unsupervised learning and semi-supervised learning based on learning mechanisms. Unsupervised learning can learn the differences between cracks and backgrounds autonomously without manual labeling of image data, and it can remove the influence of subjective factors. Someunsupervised learning approaches, such as the K-means algorithm [9] and principal component analysis (PCA) [10], have been used to discover the laws hidden in image data and to extract cracks from the background, and they perform poorly on images including noise and uneven illumination. To extract cracks effectively from complex backgrounds, some supervised learning-based methods, for instance, the support vector machine (SVM) [11], random forest (RF) [12] and decision tree (DT) [13], have been developed and applied to crack classification. With a large number of labeled high-quality image data, the classifier can be trained to obtain featured information of crack classification. Generally, these methods heavily depend on the quality and quantity of manually extracted features. For infrastructure with complex conditions, it is difficult to obtain universal features suitable for all cracks and to achieve a desirable detection effect. Recently, the success of deep learning in the field of computer vision provides an opportunity for the development of crack classification models. The image classification models developed based on convolutional neural networks (CNNs) have satisfactory prediction accuracy that even exceeds that of humans [14] and can effectively remove the influence of uneven illumination [15] and noise [16]. They work well in pavement crack detection [17] and concrete structure crack detection [18], and the model training is time consuming. To improve the training efficiency, transfer learning [19; 20] is integrated into the crack classification model. Although high-performance models based on transfer learning can be obtained and perform well in crack detection, a huge number of samples is required to train the models. Generally, infrastructure in normal service may have very few crack defects of concern, resulting in a relatively high cost of obtaining the desired training samples. Moreover, crack labeling used in neural network models is usually performed manually and is labor intensive, which limit the wide application of this kind of method in crack detection.