# Automated Vision-Based Crack Detection on Concrete Surfaces Using Deep Learning
## 2 Methodology
### AlexNet CNN Model  
A CNN consists of several hidden layers as well as input and output layers. The layers of a CNN generally consist of convolutional, ReLU, pooling, fully connected, and normalization layers. This study analyzed the image database by applying a DCNN classifier to classify the input images into two categories: no-crack and crack. The CNN network was designed based on AlexNet for image classification. Figure 2 shows an overview of the CNN classifier based on AlexNet. AlexNet, a large neural network with 60 million parameters and 650,000 neurons, consists of 5 convolutional layers followed by max-pooling layers, 3 fully connected layers, and a final 1000-way SoftMax layer. AlexNet has been widely trained on more than a million images and can classify images into 1000 classes. Since the number of image classes in this study was two (no-crack and crack), the output number of classes was changed to two.  
A new activation function was used in the AlexNet neural networks to provide nonlinearity. Several traditional activation functions, including logistic function, tanh function, and arctan function, tend to cause gradient vanishing problems. To overcome this, a new activation function was used, the rectified linear unit (ReLU), and its definition is shown in Equation (1).  
\[\text{ReLU}(x)=\max(x,0) \tag{1}\]  
Deep neural networks with ReLU as the activation function converge faster than those with tanh units. Dropout was employed in fully connected layers to avoid overfitting that trains only a portion of the neurons in each iteration. The dropout reduces joint adaptation  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Total Number of Images** & **20,000** \\ \hline
**Crack Images** & 10,000 \\
**No-crack Images** & 10,000 \\
**Size (Pixels)** & 227 \(\times\) 227 \\
**Number of Color Channels** & 3 \\
**Training Data** & 14,000 \\
**Validation Data** & 2000 \\
**Test Data** & 4000 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Concrete crack image datasets.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Total Number of Images** & **16,285** \\ \hline
**Bridge-Decks** & 4086 \\
**Pavements** & 7300 \\
**Walls** & 4899 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Cross-image datasets.  
Figure 2: AlexNet CNN classifier.  
between neurons and improves generalization and robustness. Convolution was employed for automatic feature extraction and defined as in Equation (2).  
\[C(m,n)=(M.w)(m,n)=\sum_{k}\sum_{l}M(m-k,n-l)w(k,l) \tag{2}\]  
where \(w\) is the convolution kernel. Pooling was employed for automatic feature reduction, which considered a group of neighboring pixels in the feature map and generated a representation value. Cross-channel normalization was used to improve the generalization. In addition, fully connected layers were used for classification in which the neurons in fully connected layers were directly linked. The SoftMax activation function was expressed as in Equation (3). The SoftMax activates neurons by constraining the output in the range of (0, 1).  
\[\text{SoftMax}\left(x\right)_{i}=\frac{\exp(x_{i})}{\sum_{j=1}^{n}\exp(x_{j})} \tag{3}\]