# Concrete Crack Detection Based on Well-Known Feature Extractor Model and the YOLO_v2 Network
## 2 Methods
### Transfer Learning-Based Feature Extractors  
Transfer learning technology is the reuse of a pre-trained model on a new problem. With transfer learning technology, we transferred the weights that CNN had learned at 'Question A' to a new 'Question B'. Some well-known CNN models (e.g., alexnet, googlenet, etc.) were trained on the ImageNet database [22] which was used in the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) [38]. These CNN models had strong feature extraction ability and could classify images into 1000 object categories. Therefore, we employed these excellent CNN models as feature extractors of the YOLO_v2.  
In this paper, 11 well-known CNN models were employed as the YOLO_v2 feature extractor. including: 'alexnet', 'googlenet','mobilenetv2', 'inceptionv3','squeezenet','resnet18','resnet50','resnet101', 'vgg16', 'vgg19', and 'inceptionresnetv2', which were named as TN1, TN2,..., TN11, respectively. Table 1 lists their properties; Table 2 lists the  
Figure 2: Locate the anchor box using the detection layer.  
The performance of the YOLO_v2 was investigated by comparing four factors:  
(1) Feature extractor model. The 11 well-known CNN models (illustrated in Section 2.2) were used as the feature extractor of the YOLO_v2;  
(2) Maximum epoch. An epoch was a full circle in the entire training dataset. When the precision of the YOLO_v2 reached a plateau and was clearly no longer improving, the starting epoch of the plateau was defined as the maximum epoch. In this paper, 1\(\sim\)30 epochs were designed to observe the change of detection results with epochs.  
(3) Feature images in different CNN layers. The optimal model obtained in Step (2) was the feature extractor, and feature images of multiple layers were obtained and used as the input of the YOLO_v2 detection layer, the influence of feature images of different layers on the detection results was studied.  
(4) Testing image size. On the basis of Step (3), different sized (32 \(\times\) 32, 64 \(\times\) 64, 128 \(\times\) 128, 256 \(\times\) 256, 512 \(\times\) 512, 1024 \(\times\) 1024, 2048 \(\times\) 2048) images were used as the testing data. The influence of testing image size on detection results was studied.  
Computational cost and detection precision are important indexes to evaluate the performance of the YOLO detector. The computation time (the unit is seconds) was the processing time of the entire detection process, which included feature extraction and detector training. Detection precision included precision, recall, and average precision (_AP_). The following is a detailed explanation of these three terms:  
Precision: represented the classification effect of the classifier, which was the ratio of true positive instances to the total positive instances (Equation (2)). Recall: was a ratio of true positive instances to the sum of true positives and false negatives in the detection (Equation (3)).  
\[P=\frac{TP}{TP+FP} \tag{2}\]  
\[R=\frac{TP}{TP+FN} \tag{3}\]  
where \(TP\) (true positive instances): positive instances that were predicted to be positive instances. \(FN\) (false negative instances): positive instances that were predicted to be negative instances. \(FP\) (false positive instances): negative instances that were predicted to be positive instances.  
_AP_ was used to reflect the detection precision, which was a combined outcome of the precision and recall metrics.  
\[AP=\sum_{k=1}^{N}P(k)\Delta R(k) \tag{4}\]  
where \(k=1,2,\ldots,N\); and \(N\) is the number of samples, \(P(k)\) is the precision of the \(k\)-th sample, and is the difference of \(\Delta R(k)\) the recall between the \(k\)-th sample and \(k-1\)-th sample.