Firstly, we sort the predicted boxes according to the confidence level and select the
predicted box with the highest confidence. Secondly, set an overlap threshold and
traverse other adjacent predicted boxes. When the overlap between the adjacent predicted box and the highest confidence predicted box is higher than the threshold we set,
the adjacent predicted box is removed, and when it is lower than the threshold we set,
the adjacent predicted box is retained. Then repeat the above steps by selecting one of
the most confident predicted boxes in the unprocessed predicted boxes.
3 Experiment Result
The water meter reading area detection method in this paper is mainly evaluated from
two aspects. One is the overlap between the predicted area and the real area, and the
other is the accuracy of the reading recognition combined with the three-layer BP
neural network. And in terms of accuracy, the method of this paper is compared with
other methods. In addition, because there is currently no authoritative dataset for water
meter readings, this paper is based on our own dataset for evaluation.
3.1 Dataset
The acquisition and labeling of image datasets is the basis of neural network training.
The size of datasets and the quality of data annotation directly affect the training effects
and prediction results of neural networks. The images required for training and testing
the model are randomly divided into training set, verification set, and test set. The ratio
of the three data sets can be in the range of 4:1:1–8:1:1. We use the camera to directly
shoot the water meter dial, and adjust the position of the camera and the reading of the
water meter, and mark the acquired picture, including the coordinate values of the two
endpoints of the diagonal of the reading area and the reading of the water meter value.
For the size of the water meter image, the neural network of this paper does not
have strict requirements for this and can use different sizes of pictures. For the color
channel of the water meter picture, RGB three color channels and grayscale images can
be used. For the tilt problem of the image, there is no need to tilt the image. We only
need to tilt a part of the image at an appropriate angle. This part of the image can be
randomly placed into the training set, verification set, and test set, which can increase
robustness of the model. In addition, in order to better simulate the real application
scenario, we can also grayscale and blur the image, add noise, light spots to the image,
which can enhance the generalization of the model.
This paper collected 6000 water meters, randomly divided the pictures into three
parts according to the ratio of 4:1:1, 4000 pictures as the training set, 1000 pictures as
the verification set, and 1000 pictures as the test set.
3.2 The Overlap Between Predicted Area and Real Area
The degree of overlap between the predicted area and the real area (IoU) is a criterion
for measuring the accuracy of detecting the corresponding object in a specific data set.
The calculation method is the area where the two regions overlap and the area where
176
J. Wu et al.
predicted box with the highest confidence. Secondly, set an overlap threshold and
traverse other adjacent predicted boxes. When the overlap between the adjacent predicted box and the highest confidence predicted box is higher than the threshold we set,
the adjacent predicted box is removed, and when it is lower than the threshold we set,
the adjacent predicted box is retained. Then repeat the above steps by selecting one of
the most confident predicted boxes in the unprocessed predicted boxes.
3 Experiment Result
The water meter reading area detection method in this paper is mainly evaluated from
two aspects. One is the overlap between the predicted area and the real area, and the
other is the accuracy of the reading recognition combined with the three-layer BP
neural network. And in terms of accuracy, the method of this paper is compared with
other methods. In addition, because there is currently no authoritative dataset for water
meter readings, this paper is based on our own dataset for evaluation.
3.1 Dataset
The acquisition and labeling of image datasets is the basis of neural network training.
The size of datasets and the quality of data annotation directly affect the training effects
and prediction results of neural networks. The images required for training and testing
the model are randomly divided into training set, verification set, and test set. The ratio
of the three data sets can be in the range of 4:1:1–8:1:1. We use the camera to directly
shoot the water meter dial, and adjust the position of the camera and the reading of the
water meter, and mark the acquired picture, including the coordinate values of the two
endpoints of the diagonal of the reading area and the reading of the water meter value.
For the size of the water meter image, the neural network of this paper does not
have strict requirements for this and can use different sizes of pictures. For the color
channel of the water meter picture, RGB three color channels and grayscale images can
be used. For the tilt problem of the image, there is no need to tilt the image. We only
need to tilt a part of the image at an appropriate angle. This part of the image can be
randomly placed into the training set, verification set, and test set, which can increase
robustness of the model. In addition, in order to better simulate the real application
scenario, we can also grayscale and blur the image, add noise, light spots to the image,
which can enhance the generalization of the model.
This paper collected 6000 water meters, randomly divided the pictures into three
parts according to the ratio of 4:1:1, 4000 pictures as the training set, 1000 pictures as
the verification set, and 1000 pictures as the test set.
3.2 The Overlap Between Predicted Area and Real Area
The degree of overlap between the predicted area and the real area (IoU) is a criterion
for measuring the accuracy of detecting the corresponding object in a specific data set.
The calculation method is the area where the two regions overlap and the area where
176
J. Wu et al.
