Aller au contenu
ModelPrésentéExterne
Browse files

Rwanda Water Meter Reading Yolov8n

This repository contains the selected model for the Rwanda Water Meter Reading System MVP. It detects the complete meter, the reading window, and digits 0-9. The application keeps digits inside the best window and...

TypeOtherVersionRevision b8e1ef1BClasse

Source du modèle

Type
Other
Taille du fichier
5,96–11,7 MB
Version
vRevision b8e1ef1
Mis à jour
10 oct. 2026
Téléchargements
33
Source
Hugging Face

Description de la source

Rwanda Water Meter Reading YOLOv8n

This repository contains the selected model for the Rwanda Water Meter Reading System MVP. It detects the complete meter, the reading window, and digits 0-9. The application keeps digits inside the best window and orders them from left to right to construct a reading.

Live demonstration

Test the model without installing anything:

https://huggingface.co/spaces/Beni4/rwanda-water-meter-reading-demo

Validation performance

MetricValue
Precision96.52%
Recall94.95%
mAP@5097.21%
mAP@50-9566.88%

Validation was reproduced with Ultralytics 8.4.49 at an image size of 640 on 249 validation images containing 1,589 labeled objects. Class-by-class results are available in per_class_metrics.csv, and validation_metrics.png provides assessment evidence.

Classes

IDClassIDClass
0meter64
1window75
2086
3197
42108
53119

The class order is also stored in classes.yaml.

Unclear digit policy

u is not a trained object class. During post-processing, a detected digit with confidence below 0.40 is returned as u. The same result can be inserted when digit spacing indicates a likely missing position. This prevents uncertain digits from being presented as reliable readings.

Files

  • best.pt: original evaluated Ultralytics YOLOv8n checkpoint.
  • best.onnx: browser and cross-platform export of best.pt.
  • reading_postprocess.py: window filtering and reading reconstruction.
  • classes.yaml: authoritative class order and u policy.
  • training_args.yaml: parameters from the selected training experiment.
  • model_metadata.yaml: dataset, training, and validation provenance.
  • metrics.json: overall validation metrics.
  • per_class_metrics.csv: class-by-class validation metrics.
  • validation_metrics.png: validation evidence.
  • CHECKSUMS.sha256: SHA-256 identities for both model artifacts.

Python usage

Install the same Ultralytics release used for validation:

pip install ultralytics==8.4.49

Run object detection:

from ultralytics import YOLO

model = YOLO("best.pt")
results = model.predict(
    source="water_meter.jpg",
    imgsz=640,
    conf=0.03,
)

for result in results:
    print(result.boxes)

Candidate confidence 0.03 retains weak digit candidates for reading post-processing. It is intentionally different from the 0.40 threshold used to convert an uncertain selected digit to u.

Training data

The selected run used 1,248 images: 329 teacher-provided meter images and a limited 919-image Roboflow digit subset. The private training images are not redistributed in this model repository. Users must verify ownership and source licenses before reusing or publishing the original datasets.

Limitations

  • Performance can decrease with blur, glare, severe perspective, occlusion, or very small digits.
  • Inverted images can change the semantic meaning of digits such as 6 and 9.
  • The ONNX export can move borderline confidence values across the u threshold; the submitted assessment checkpoint is best.pt.
  • A predicted reading should be reviewed whenever it contains u.

Sources

1 source
Hugging FacePrincipalVersion b8e1ef189ad986b21339e10e6917a367d35ddf5f
huggingface.co/Beni4/rwanda-water-meter-reading-yolov8n/tree/b8e1ef189ad986b21339e10e6917a367d35ddf5f

Vérifié 10 oct.

Download files

Artefacts du modèle

2 artefacts

best.onnx

onnx · 11,7 MB · SHA-256 fdf3016d0081…0bd3 · Hugging Face

Download file

best.pt

pt · 5,96 MB · SHA-256 736cff5bc56c…5cca · Hugging Face

Download file

Extraits de sources

3 extraits

--- license: agpl-3.0 library_name: ultralytics pipeline_tag: object-detection tags: - yolo - yolov8 - water-meter - digit-detection - computer-vision - rwanda datasets: - custom model-index: - name: Rwanda Water Meter YOLOv8n results: - task: type: object-detection name: Object Detection dataset: name: Rwanda Water Meter Mixed Validation type: custom split: validation metrics: - type: precision value: 0.9652 name: Precision - type: recall value: 0.9495 name: Recall - type: map value: 0.9721 name: mAP@50 - type: map value: 0.6688 name: mAP@50-95 --- # Rwanda Water Meter Reading YOLOv8n This repository contains the selected model for the Rwanda Water Meter Reading System MVP. It detects the complete meter, the reading window, and digits 0-9. The application keeps digits inside the best window and orders them from left to right to construct a reading. ## Live demonstration Test the model without installing anything: https://huggingface.co/spaces/Beni4/rwanda-water-meter-reading-demo ## Validation performance | Metric | Value | |---|---:| | Precision | 96.52% | | Recall | 94.95% | | mAP@50 | 97.21% | | mAP@50-95 | 66.88% | Validation was reproduced with Ultralytics 8.4.49 at an image size of 640 on 249 validation images containing 1,589 labeled objects. Class-by-class results are available in per_class_metrics.csv, and validation_metrics.png provides assessment evidence. ## Classes | ID | Class | ID | Class | |---:|---|---:|---| | 0 | meter | 6 | 4 | | 1 | window | 7 | 5 | | 2 | 0 | 8 | 6 | | 3 | 1 | 9 | 7 | | 4 | 2 | 10 | 8 | | 5 | 3 | 11 | 9 | The class order is also stored in classes.yaml. ## Unclear digit policy u is not a trained object class. During post-processing, a detected digit with confidence below 0.40 is returned as u. The same result can be inserted when digit spacing indicates a likely missing position. This prevents uncertain digits from being presented as reliable readings. ## Files - best.pt: original evaluated Ultralytics YOLOv8n checkpoint. - best.onnx: browser and cross-platform export of best.pt. - reading_postprocess.py: window filtering and reading reconstruction. - classes.yaml: authoritative class order and u policy. - training_args.yaml: parameters from the selected training experiment. - model_metadata.yaml: dataset, training, and validation provenance. - metrics.json: overall validatio...

Source context: 33 downloads · 0 likes · Pipeline object-detection · Library ultralytics · Repo Beni4/rwanda-water-meter-reading-yolov8n

Source context: 42 downloads · 0 likes · Pipeline object-detection · Library ultralytics · Repo Beni4/rwanda-water-meter-reading-yolov8n