# Table Recognition for Sensitive Data Perception in an IoT Vision Environment
## 4 Experiments and Analysis  
### Evaluation Metric and Dataset  
It is difficult to determine an accurate evaluation metric for table recognition at present [34]. This paper proposes a more comprehensive metric which takes table-cell importance degrees and error types into consideration.  
First, all table cells are not the same because the content importance degree of table cells are different. Table cells can be divided into fixed fields and entry fields. Entry fields aim at collecting information while fixed fields aim at recoding fixed contents, like the item that tells you what should be collected. If entry fields occur error during the table-recognition process, the major table information will be missed, and the table will be meaningless. Therefore, errors occurring in entry fields will be more severe than that in the fixed fields. As Figure 1 shows, the table cells labeled in blue belong to entry fields, and table cells labeled in yellow belong to fixed fields. Because of the different roles that the two fields play, different weights should be given to them during the computing accuracy stage. The weights can be manually labeled by observing features of the dataset, and they can be computed by Equation (13),  
\[\begin{split}\omega_{1}&=\frac{n_{1}}{n}\\ \omega_{2}&=\frac{n_{2}}{n}\end{split} \tag{13}\]  
where \(\omega_{1}\) and \(\omega_{2}\) represent the weights of the non-local region and local region, respectively, \(n_{1}\) and \(n_{2}\) represent the number of table cells in non-local region and local region, respectively, and \(n\) represents the total number of table cells.  
Secondly, errors occurring in table recognition include miss, fault, merge, and split at the table-cell level [9], and they should be taken into consideration during evaluation process, too. Miss means miss of cells in a table. Fault means wrong recognition of objects that are not in the table. Merge means mergence of several table cells. Split means division of a table cell. Merge and split are the most common errors because they themselves are table cells. But miss and fault are the more severe errors, because table cells at fault are themselves not table cells, and miss means cells in a table completely disappear. Therefore, different penalty coefficients should be given to these errors in evaluation.  
Based on the above two considerations, a more comprehensive evaluation metric is proposed as below:  
\[F^{\prime}=\omega_{1}F_{1}+\omega_{2}F_{2}\]  
\[F_{1}=max((1-\sum_{n=1}^{4}\frac{\theta_{i}n_{1i}}{n_{1}})\times 100\%,0) \tag{14}\]\[F_{2}=max((1-\sum_{n=1}^{4}\frac{\theta_{i}n_{2i}}{n_{2}})\times 100\%,0)\]  
where \(\theta_{i}\) represents penalty coefficient of error i, \(n_{1i}\) represents the number of table cells with error i in the non-local region, and \(n_{2i}\) represents the number of table cells with error i in the local region.  
Because of the lack of a relevant dataset, this paper proposes a dataset with 603 intelligent IoT vision device-captured tables which are in Chinese, English, or with stamps. In addition, the non-local region and local region are labeled in the proposed dataset, and they are classified by the angles of perspective transformation. According to the rotation angle when capturing using the intelligent IoT vision device [35], perspective transformation [36] can be classified into three categories:  
1. The general rotation made by rotating the intelligent IoT vision device around the z-axis only;
2. The table becomes trapezoid by rotating the intelligent IoT vision device around x-axis or y-axis;
3. The table becomes an arbitrary quadrilateral by rotating the intelligent IoT vision device around both x-axis and z-axis, or y-axis and z-axis;  
Furthermore, each category mentioned above can also be divided into three cases: slight, obvious, and serious.