WaterMeter AI
A simple browser-based water meter reading demo using ONNX Runtime Web and a YOLOv8 ONNX model.
Files
index.htmlβ UI and page structurestyle.cssβ app stylingscript.jsβ model loading, image preprocessing, inference, drawing, and reading extractionlabels.jsonβ model class labels referencebest.onnxβ your YOLOv8 ONNX model file (must be added separately)
Setup
- Place your
best.onnxmodel in the same folder asindex.html. - Open the files from a static server or deploy to a static host such as Hugging Face Spaces.
No Python server is required for the repository structure below.
Usage
- Upload or drag a water meter image.
- Press Analyze Image.
- The app will show detected boxes and assemble meter digits into a reading.
Notes
- The app expects a YOLOv8 ONNX model that returns standard detection output:
[x, y, w, h, obj, class01, class02, ...]. - For best results, use a model trained on your meter dataset.
- If
best.onnxis missing, the model load will fail.
Hugging Face Spaces
This project is ready to deploy as a static Space. Upload the repository including best.onnx to the Space root.
If you want to use a remote model URL instead, update MODEL_PATH in script.js.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π 1 Ask for provider support