# An End-to-End Classifier Based on CNN for In-Air Handwritten-Chinese-Character Recognition
## 4 Experiments
### Comparison Experiments  
In order to determine the appropriate mini-batch size under the condition that the learning rate is set to 0.001, the mini-batch size was set to 64, 128, 256 and 512, respectively. Similar to other studies in this field, and since the amount of data for each class in the dataset was equal, the accuracy criterion was used to evaluate the proposed method. The _accuracy_ was calculated by  
\[accuracy=\frac{TP+TN}{TP+TN+FN+FP} \tag{8}\]  
In Equation (8), \(TP\) is the number of samples that are correctly assigned to the goal class, \(TN\) is the number of samples that are correctly not assigned to the goal class, \(FN\) is the number of samples that are wrongly assigned to the goal class, and \(FP\) is the number of samples that are wrongly assigned to the other classes. We performed five-fold cross-validation on the dataset and reported the average recognition rate for each mini-batch size in Figure 6. The model converged at 20 epochs and performed best when the mini-batch size is set to 128. For convolution operation on \(P\), we want the size of the sequence before and after convolution operation to be same, so we need to zero-pad the sequence. We designed three padding methods, padding1, which is evenly filled at both ends of the sequence; padding2, which is filled at the head of the sequence; and padding3, padded at the end of the sequence. The change in the recognition rate during the training process is shown in Figure 7. The best recognition rates of the three methods are shown in Table 2. From Figure 7 and Table 2, we can see that padding1 is the best padding method. Similar to using CNN to recognize images, when CNN is used to recognize coordinate sequences, zero padding on the edge can effectively retain the information of the edge position. Compared with method 2 and method 3, method 1 has a higher recognition accuracy by 0.07% and 0.28%. Filling methods 2 and 3 both lose the feature of the edge position to some extent. For the fill method 3, in particular, the header position information of the character sequence is lost, which is quite important to recognize the character. Figure 6: The average recognition accuracy of different batchsizes on the IAHCC-UCAS2016 varied with the training epoch. To verify the effectiveness of the end-to-end CNN, we compared the proposed method with traditional CNN architectures on both datasets. We used the nine-layer CNN presented in [23] as a benchmark (including Cov8d using eight-direction feature maps, CovCd1 using a combination of higher-order direction feature maps and curved feature maps, and CovCd2 using a combination of eight-direction feature maps, high-order eight-direction feature maps and curved feature maps). In addition, we also compared our method with end-to-end RNN (RNN1) [20] and RNN combined with new computing architectures (RNN2) [4] on the IAHCC-UCAS2016 dataset. In Table 3-6, the column \"DA\" indicates whether the data-augmentation technique was adopted during training, and the column \"Ensemble\" indicates whether the recognition decision was made by the ensemble of multiple trained models. As shown in Table 3 and 4, the traditional CNN that recognizes directional features [23] does not directly recognize coordinate sequences, but recognizes the extracted directional feature images. This indirect learning method will affect the recognition accuracy, and it is difficult to obtain a high recognition rate when the amount of data is insufficient, so it is necessary to use data-augmentation techniques to expand the data set during the training process. Our method does not use data augmentation techniques and achieves a recognition accuracy of 96.07% on the IAHCC-UCAS2016 dataset and 98.02% on the GB1 dataset. Although RNN can directly identify the coordinate sequence and extract the time-series features between the coordinates, it is difficult to consider the global spatial features. RNN [4,20] often use multiple models to jointly participate in recognition decisions to improve recognition accuracy.