# Blind Recognition of Frame Synchronization Based on Deep Learning
## 2 Algorithm Description
### Frame Synchronization Recognition Network Training  
Let's denote the set of frame length categories as \(\lambda=\{L_{1},L_{2},L_{3},\dots,L_{i},\dots,L_{p}\}\), where \(p\) represents the total number of frame length categories to be recognized. For each frame category to be recognized, we generated enough data frames according to the frame structure with error rate of \(0.02m\), \(m=[0,1,2,...,10]\), and then constructed positive and negative samples as described in Section \(B\). All \(n\) satifies Equation (1) will be used to  
Figure 4: Some positive samples of the generated images.  
generated positive samples, so that all types of stripes will be included, the recognition ability of the network model will be improved. Each RGB image in positive samples is labeled with its corresponding frame length category. Split both the positive samples set and negative samples set with the same error rates into training and validation sets in a 9:1 ratio. All the training(validation) set for all the frame length categories with various error rates constitute the training(validation) set for the neural network.  
CNN typically consists of multiple layers, where each layer sequentially performs operations such as convolution and pooling on the input information. This process ultimately completes the extraction of image features. The output of an image after passing through the convolutional layers can be written as  
\[Y_{i,j,k}=b(k)+\sum\sum\sum[X(m,n,c)W(k,m,n,c)]. \tag{5}\]  
Considering the wide application and diversified branches of ResNet in image classification, we choose to use ResNet50 network in our recognition algorithm. ResNet50 [31] introduces the structure of residual blocks, which successfully solves problems such as gradient vanishing and explosion in training deep neural networks. This enables the network to learn feature representations more deeply, thereby improving the model's performance. Table 1 presents the network structure of the ResNet50 model used in this paper.  
The activation function and loss function used in ResNet50 network are shown in Equations (6) and (7):  
\[ReLU(x)=max(0,x). \tag{6}\]  
\[C=-\frac{1}{n}\sum_{x}y_{i}Ina_{i}. \tag{7}\]  
where Equation (6) is ReLU function, and Equation (7) is cross-entropy loss function of multi-classification form.  
We feed the training set into the neural network model and the model will iteratively update the network parameters with the stochastic gradient descent algorithm. The training process continues until the cross-entropy loss function of the network reaches its minimum value, resulting in a well-trained model for frame length recognition.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Layer Name** & **Output Size** & **Parameters for Each Layer** \\ \hline Conv1 & \(112\times 112\) & \(7\times 7\), 64, stride2 \\ \hline Conv2\_x & \(56\times 56\) & \(\begin{bmatrix}1\times 1,64\\ 3\times 3,64\\ 1\times 1,256\end{bmatrix}\times 3\) \\ \hline Conv3\_x & \(28\times 28\) & \(\begin{bmatrix}1\times 1,128\\ 3\times 3,128\\ 1\times 1,512\end{bmatrix}\times 4\) \\ \hline Conv4\_x & \(14\times 14\) & \(\begin{bmatrix}1\times 1,256\\ 3\times 3,256\\ 1\times 1,1024\end{bmatrix}\times 6\) \\ \hline Conv5\_x & \(7\times 7\) & \(\begin{bmatrix}1\times 1,512\\ 3\times 3,512\\ 1\times 1,2048\end{bmatrix}\times 3\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: ResNet50 Network Structure.