Digitize utility meter readings from photos using AI model.
Can be used with Home Assistant to digitize utility meter readings from camera. Integration component.
Also can be used with standalone ESP32-Cam which submits images directly to the digitizer.
This project is inspired by AI on the Edge device project, but the goal is a bit different:
- Take picture from any camera (even the cheapest ESP32CAM).
- No need for preselecting number positions or aligning - AI model detects automatically.
python demo.py
Start server
gunicorn app:app
POST image using curl
curl -X POST --data-binary @samples/watermeter1.jpg http://localhost:8000/digitize
You can start the server on Docker like this:
docker run -p 8000:8000 kurmisrainas/utility-meter-digitizer
Also you can use docker-compose:
services:
utility-meter-digitizer:
image: kurmisrainas/utility-meter-digitizer
ports:
- 8000:8000
Model was trained using YOLOv8 open source utility meters dataset from Roboflow.
yolo task=detect mode=train model=yolov8n.pt data=data.yaml epochs=100 imgsz=640 device=mps
device=mps
enables GPU usage on MacBook for faster training.
Converting to onnx format
yolo export model=best.pt format=onnx
ESP32-Cam device configuration examples.
- Utility meters dataset from Roboflow
- ONNX YOLOv8 Object Detection by Ibai Gorordo