# Research on Digital Meter Reading Method of Inspection Robot Based on Deep Learning
## 4 Experiments and Discussion
### Reading Experiment of LED Digit Meter  
Experimentally, 300 image data were collected and expanded to 900 via data enhancement for training the YOLOv5s model and Polygon-YOLOv5 model. In order to ensure the training effect of the CRNN model, this paper used the TRG (text recognition data generator, TRG) algorithm to randomly generate analog numbers. The algorithm generates digital images in a specific context and adjusts the tilt angle, blur and digit size attributes of the generated digits based on the actual digital image. The digital image generated using the TRG algorithm can be closer to the digital image in the real scene. The digital image generated using the simulation is shown in Figure 11.  
To verify the effectiveness of the method in this paper, 500 images with LED digital meters collected in different time periods were tested. The experiments included the detection and reading recognition of LED digital meters. Table 2 shows the miss detection rate and error rate of our method with YOLOv5s for LED digital meter detection. Figure 12 shows the effect of digital meter detection and recognition in different time periods. Additionally, it can be seen from Figure 12 that the experimental method can read the meter accurately in different time periods. To verify the effectiveness of the meter detection recognition, this paper compared SVM and the YOLOv5s and Polygon-YOLOv5 methods for digital meter detection. From Table 2, it is clear that the Polygon-YOLOv5 meter miss detection rate is 1% and the false recognition rate is 0%. Its performance is much better than SVM and YOLOv5s. Meanwhile, to verify the effect of different positioning methods on the final digital meter readings, different positioning methods were chosen for experimental comparison in the paper. It can be seen from Table 3 that the reading accuracy using the SVM method is only 79%; the reading accuracy using YOLOv5s is 85%, and the reading accuracy using the YOLOv5s+ minimum circumscribed rectangle method is 89%. The positioning method proposed in this paper has a reading accuracy of 98%. It is not difficult to see that the positioning method adopted in this paper performs far better than the other positioning methods in terms of reading accuracy. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **DeblurGAN** & **Improved DeblurGAN** \\ \hline PSNR & 25.534 & 26.562 \\ SSIM & 0.770 & 0.861 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: PSNR and SSIM of DeblurGAN and the improved DeblurGAN in this paper. Figure 11: Analog generated digital image. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Missing Rate of Meter Region** & **Error Rate of Meter Region** \\ \hline SVM & 4.5\% & 2.5\% \\ YOLOv5s & 3\% & 1.5\% \\ Our method & 1\% & 0\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The detection results of the digital meter with different detection algorithms. In the actual inspection environment, the recognition accuracy of the CRNN model for numbers is easily affected by changes in illumination. Figure 13 shows the original image and its BGR three-channel image under three different lighting conditions of the digital image. In order to obtain more effective digital features as much as possible and ensure the accuracy of the readings, this paper preprocessed the digital images. It can be seen from Figure 13b that when the digital image is overexposed, the gray level of the red channel image is too high, and the gray levels of the other two channels are normal. It can be seen from Figure 13a,c that when the digital image is normal or weakly exposed, the gray value of the green channel image is almost negligible, and the gray value of the other two channel images is slightly lower. Based on the above situation, this paper calculated the standard deviation of the gray value of the red channel of the image. If the standard deviation was greater than the set threshold, the blue and green channel images were superimposed.