# Research on Road Pattern Recognition of a Vision-Guided Robot Based on Improved-YOLOv8
## 3 Research on Pavement Pattern Recognition Based on Resnet 18  
### Construction of a Pavement Pattern Recognition Model Based on Resnet 18  
ResNet (Residual Networks) is a deep residual neural network proposed to solve the gradient disappearance and network degradation problems caused by the increase in neural network depth. Its main idea is to avoid direct identity mapping deep in the network by introducing a residual block structure that enables input and output shortcut connections. In view of the real-time requirements of AGV road adaptability recognition, a ResNet 18 network structure with a simple network structure and a small parameter amount is selected in this study, as shown in Figure 3, which can quickly realize feature extraction and recognition of different road surfaces. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**asphal**} & **Classification** & **good + dry** & **good + wet** & **slight + dry** & **slight + wet** & - & - \\ \cline{2-7}  & **Quantity** & 318 & 216 & 182 & 92 & - & - \\ \hline \multirow{2}{*}{**brick**} & **Classification** & **good + dry** & **good + wet** & **severe + dry** & **severe + wet** & - & - \\ \cline{2-7}  & **Quantity** & 481 & 301 & 32 & 57 & - & - \\ \hline \multirow{2}{*}{**cement**} & **Classification** & **good + dry** & **good + wet** & **severe + dry** & **severe + wet** & **slight + dry** & **slight + wet** \\ \cline{2-7}  & **Quantity** & 231 & 205 & 62 & 84 & 117 & 147 \\ \hline \multirow{2}{*}{**dirt**} & **Classification** & **good + dry** & **good + wet** & **severe + water** & **slight + wet** & - & - \\ \cline{2-7}  & **Quantity** & 108 & 118 & 26 & 52 & - & - \\ \hline \multirow{2}{*}{**gravel**} & **Classification** & **good + dry** & **good + water** & **good + wet** & **-** & - & - \\ \cline{2-7}  & **Quantity** & 95 & 170 & 84 & - & - & - \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Sampling quantity of pavements in different modes. Figure 3: Network structure of Resnet 18. The 18 convolutional layers contained in the representative network structure of ResNet 18, as shown in Figure 1 above, consist of 1 convolution layer of size 7 \(\times\) 7, 1 maximum pooling layer, 8 residual structures, 1 global average pooling layer, 1 full connection layer, and 1 softmax output layer. The concrete structure is as follows:  
(1) Input layer: input the pavement images with a size of 3 \(\times\) 224 \(\times\) 224. (2) Convolutional layer: 7 \(\times\) 7 convolutional layers and maximum pooling layers are used to reduce the dimensionality of input images. (3) Residual block: There are 8 residual blocks in total, each composed of two convolutional layers and one shortcut connection, which is used to solve the gradient disappearance and gradient explosion problems in deep convolutional neural networks. The residual block consists of two 3 \(\times\) 3 convolutional layers with the same number of output channels, each of which is followed by a batch normalization layer and a ReLU activation function. Then, we skip these two convolution operations through the cross-layer data path and add the input directly before the final ReLU activation function. Such a design requires that the outputs of the two convolutional layers be identical in shape to the inputs so that they can be added. If you want to change the number of channels, you need to introduce an extra 1 \(\times\) 1 convolutional layer to transform the input into the desired shape before adding it. A common representation of a staggered network is  
\[y_{l}=h(x_{l})+F(x_{l},W_{l})\]  
\[x_{l+1}=f(y_{l})\]  
If the situations of dimension upgrading or dimension reduction are not considered, \(h(. )\) is a direct mapping, and \(f(.