# Convolutional Neural Networks for Off-Line Writer Identification Based on Simple Graphemes
## 4 Experiments with Convolutional Neural Networks
### Experiments with Original Simple Grapheme Images  
In order not to carry out the procedure of calculating the rectified grapheme and thus avoid this stage of the study process of the original graphemes, experiments are carried out with the RGB image of the original grapheme. The original image should be resized to match the size of the input image for each network, as the original dimension of the graphemes is about 800 \(\times\) 800 \(\times\) 3. For AlexNet it resizes to (227 \(\times\) 227 \(\times\) 3) and for VGG/ResNet to (224 \(\times\) 224 \(\times\) 3). This is illustrated in Figure 9.  
Tables 8-11 show the experiments with AlexNet, VGG-16, VGG-19 and ResNet-18 networks, respectively. Network training is performed by increasing the number of epochs until the error in the validation set reaches a minimum value. This process is carried out for all graphemes. For AlexNet, VGG-16 and VGG-19 networks the case of 50 epochs and for ResNet-18 the case of 80 epochs is shown. Likewise, the Tables show the execution times of the training of the CNNs and the classification times for each grapheme once the CNNs have been trained with the new images.  
It can be observed that the results are very similar for the all networks, both for the individual graphemes and for the grouping of all the graphemes, ranging between 95% and 98%. An important result is that, for this type of images, a small network such as the VGG-16 is sufficient to obtain high performance. For instance, with the VGG-16 network, the characters that presented the best  
Figure 8: Rectified Simple Grapheme Training time of AlexNet, VGG-16/VGG-19 and ResNet-18 networks.  
Figure 7: Rectified Simple Grapheme Test accuracy with AlexNet, VGG-16/VGG-19 and ResNet-18 networks.  
Figure 10 shows the test accuracy of applying the pre-trained CNNs to the original simple graphemes. It is observed that all the used networks achieve good results, being the VGG-16 the one with the best performance.  
Figure 11 shows the boxplots of the test set classification for all the networks used, in order to show the classification distribution of each grapheme by person. It is observed that the standard deviation of the classification results is very low for all networks, that the central tendency is high, and that there is very little presence of outliers. In particular, it is observed that the AlexNet network is the one with the greatest deviation. From these figures, it is possible to conclude a correct training and an adequate generalization (classification of the Test set).  
Figure 12 shows the training times of the networks used in this work (third column of Tables 8-11). It is observed that for networks of the same type (AlexNet and VGGs) the training time increases as the depth of the network increases. The network that stands out is ResNet-18, having a depth similar to that of VGGs networks and being trained with a greater number of epochs, the training time is less. It can be objectively concluded that in time/accuracy ResNet is the network with the best performance.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Strokes**} & \multicolumn{2}{c}{**Training**} & \multicolumn{2}{c}{**Validation**} & \multicolumn{2}{c}{**Test**} \\ \cline{2-9}  & **Accuracy** & **Time (s)** & **Loss** & **Accuracy** & **Loss** & **Accuracy** & **Time (s)** \\ \hline “C” & 100\% & \(9.3605\times 10^{3}\) & 0.3718 & 96\% & 0.5731 & 97\% & 3.9659 \\ “\(\sim\)” & 100\% & \(7.5222\times 10^{  
Figure 11: BoxPlots of Test Classification.  
Figure 12: Original Simple Grapheme Training Time with AlexNet, VGG-16/VGG-19 and ResNet-18 networks.