## 4 Experimental Analysis
### Data Pre-Processing and Evaluation Metrics
#### 4.2.2 Evaluation Metrics  
Inspired by the evaluation metrics of OCR, the proposed network model in this experiment can be also measured by hard metric and soft metric. Hard metric, also known as string-level recognition accuracy (_SRA_), is more rigorous, as it recognizes the predicted reading string as a correct when all the characters in the ground truth label are identified. The _SRA_ is calculated as:  
\[SRA=M_{S}/M, \tag{15}\]  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Layer** & **Input Shape** & **Kerner Size** & **Filter** & **Stride** & **Output Shape** \\ \hline Conv1 & (batch,100,32,1) & 3 \(\times\) 3 & 64 & 2 \(\times\) 2 & (batch,49,15,64) \\ MaxPool1 & (batch,49,15,64) & 2 \(\times\) 2 & - & 1 \(\times\) 2 & (batch,48,7,64) \\ Conv2\_x & (batch,48,7,64) & & 1 \(\times\) 1, 128, 1 \(\times\) 2 & & (batch,48,4,128) \\  & & & 3 \(\times\) 3, 128, 1 \(\times\) 1 & & (batch,48,4,128) \\ Conv3\_x & (batch,48,4,64) & & 1 \(\times\) 1, 256, 1 \(\times\) 2 & & (batch,48,4,128) \\  & & & 3 \(\times\) 3, 256, 1 \(\times\) 1 & & \\ Conv4\_x & (batch,48,2,128) & & 2 \(\times\) 1, 512, 2 \(\times\) 2 & & (batch,48,4,128) \\  & & & 3 \(\times\) 3, 512, 1 \(\times\) 1 & & \\ Conv5 & (batch,24,1,512) & 1 \(\times\) 1 & 512 & \(1\times\) 1 & (batch,24,1,512) \\ Conv6 & (batch,24,1,512) & 2 \(\times\) 1 & 512 & \(1\times\) 1 & (batch,24,1,512) \\ Bi-BasicRNN & (batch,24,1,512) & Hidden units:256 & & (batch,24,1,512) \\ Bi-BasicRNN & (batch,24,1,512) & & Hidden units:256 & & (batch,24,1,512) \\ CTC Layer & - & & - & - \\ \hline \hline \end{tabular}
\end{table}
Table 2: Parameters of the proposed model. An input instrument image of 100 \(\times\) 32 will generate a feature sequence with the dimensions \(1\times 24\times 512\) after the feature extractor. The outputs from the sequence modeling part have the same dimensions as the inputs.  
where \(M\) is the total number of testing images and \(M_{S}\) is the number of correctly recognized images.  
Soft metric, also known as character-level recognition accuracy (\(CRA\)), is defined based on the edit distance, which is the minimum number of edit operations required to convert from the predicted string to the ground truth string. There are three types of editing operations allowed: substituting one character with another, inserting a character or deleting a character. The smaller the edit distance, the more similar the two reading strings are. In other words, a smaller sum of the edit distance indicates a higher \(CRA\), which is calculated as:  
\[CRA=-\sum d_{e}, \tag{16}\]  
where \(d_{e}\) is the edit distance of each incorrectly recognized character.  
In addition, according to the characteristics of incorrect test results, we divide the mis-recognition into two categories: memorial errors and the other recognition errors. The memorial error refers to a situation where a reading string in the test set does not appear in the training set, and the model recognizes it as a reading string similar to the one in the training set. Some examples of memory errors are shown in Figure 8. The other recognition errors mainly refer to over-recognition, under-recognition and mis-recognition of some characters in the reading string without obvious patterns other than memory errors.