# Pointer Meter Recognition Method Based on Yolov7 and Hough Transform
## 4 Experiment
### Analysis of Experimental Results
#### 4.4.2 Image Segmentation Evaluation Index  
In the field of image segmentation, the evaluation model quality is mainly judged by three indicators, accuracy rate (acc), average intersection over union (mean Intersection over Union, referred to as mIoU), and Kappa coefficient. The accuracy rate refers to the proportion of the pixels with correct category predictions to the total pixels. The higher the accuracy rate, the better the model quality [39]. The average intersection ratio is calculated separately for each data set category, the calculated intersection of the predicted area and the actual area is divided by the union of the predicted area and the actual area, and then the results obtained for all categories are averaged [40]. The Kappa coefficient, also known  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Map50** & **FPS** & **Params** & **Gflops** & **Map5095** \\ \hline Yolov5-s & 99.5 & 204.08 & 7.03 m & 15.8 & 99.1 \\ Yolov5-m & 99.5 & 85.47 & 20.87 m & 47.9 & 99.2 \\ Yolov5-l & 99.3 & 51.02 & 46.14 m & 107.7 & 99.2 \\ Yolov-s & 96.7 & 25.63 & 8.94 m & 26.77 & 94.51 \\ Yolov7 & 99.8 & 92.59 & 36.51 m & 103.2 & 99.5 \\ \hline \hline \end{tabular}
\end{table}
Table 3: The comparison of different models on the meter dataset.  
as Cohen's kappa, is used to measure the accuracy of a classifier. The Kappa coefficient takes into account the agreement between the classifier and the random classifier, and its value ranges from \(-1\) to \(1\), where \(1\) indicates complete agreement, \(0\) indicates agreement with the random classifier, and \(-1\) indicates no agreement at all. The higher the Kappa coefficient, the better the model quality.  
The formulas of accuracy rate, average intersection ratio and Kappa coefficient are shown in Formulas (10)-(13) [33].  
\[\text{Acc}=\frac{(\text{TP}+\text{TN})}{(\text{TP}+\text{TN}+\text{FP}+\text{ FN})}, \tag{10}\]  
\[\text{mIOU}=\frac{1}{\text{n}}\times\sum\frac{\text{TP}}{(\text{TP}+\text{FP}+ \text{FN})}, \tag{11}\]  
\[\text{e}=\frac{(\text{TP}+\text{FP})\times(\text{TP}+\text{FN})+(\text{FN}+ \text{TN})\times(\text{FP}+\text{TN})}{\left(\text{TP}+\text{FP}+\text{TN}+ \text{FN}\right)^{2}}, \tag{12}\]  
\[\text{kappa}=\frac{\text{acc}-\text{e}}{1-\text{e}}, \tag{13}\]  
Different models for image segmentation on the pointer dataset are shown in Table 4:  
In the image segmentation experiments, we used the models in Table 4 to train and evaluate on the pointer dataset. The results show that the deplabv3p model has excellent performance in all aspects. The mIoU (mean Intersection over Union ratio), acc (pixel accuracy), Kappa coefficient, and Dice coefficient of the model are 0.8773, 0.9981, 0.8604, and 0.9302, respectively. In addition, the category IoU index of the model is [0.998, 0.7565], indicating the performance difference of the model on different categories; the category precision is [0.9991, 0.8577], reflecting the classification accuracy of the model for each category, and the category recall rate is [0.999, 0.865], indicating the recognition ability of the model for each category. These evaluation indicators show that the deplabv3p model has high mIoU, acc, Kappa coefficient, and Dice coefficient when performing image segmentation tasks, and can also achieve high IoU, precision, and recall on different categories. This shows that the model has high accuracy and stability when dealing with image segmentation tasks and can play a role in a variety of practical application scenarios.