The MeterReader system is based on the deep learning, which consists of object detection, semantic segmentation and OCR. It can automatically recognize the meter value.
The whole system is under PaddlePaddle framework. To getting start, you should go to three repositories below and install the relative dependence.
-
Install PaddlePaddle
-
Install PaddleX
-
Install PaddleOCR
- Download the code and pretrained Models
git clone http://gitlab.devops.intelab.cloud/b.tao/meter_reader.git
- Enter project dir
cd MeterProject
- Predict in the command line
python main.py --image_dir='./image_dir'
- Object Detection: The meters are detected by pretrained object detection model YoloV3.
- Semantic Segmentation: The mask of pointer and scales was predicted by pretrained segmentation model DeepLapv3.
- OCR: The digits on the meter are recognized by PaddleOCR
- Whole Process :
- Crop and resize the images of meters detected by the YoloV3.
- Read the digits from OCR output, and filter digits on the inner side of meter.
- Erode the binary mask image predicted by Deeplabv3 in order to shrink the scales and remove the noise.
- Transform the mask image from XY Cartesian Coordinates to Polar Coordinates (rows for degree; cols for radius)
- Read the relative positions between pointer, scales and digits. Calculate the value of the meter.