Skip to main content

About

This libary is developed for recognizing utility meter digits by using neural network classifier (see the image). The neural network is implemented in Pytorch and the details are available in the code.

The datset (from here + self-made images) has 959 images that are classified into eleven categories: digits "0"-"9" and "10" for cases where digit is not recognizable.

Installation

Install from PyPI:

pip install meter-digits-recognizer

Usage

Minimal example:

import cv2
from meter_digits_recognizer import MeterDigitsRecognizer

# Read image, must be in BGR format (standard in OpenCV)
image = cv2.imread("images/0/1_hot_water_meter_20210212_065239.jpg")

# Run recognizer
dr = MeterDigitsRecognizer()
predictions, confidences = dr.run([image]) # Accepts list of images

# Print
print("Prediction %d (confidence %.1f %%)" % (predictions[0], confidences[0]))

Expected output:

Prediction 0 (confidence 100.0 %)

For additional examples see example.ipynb

Traing

To retrain the neural network follow the steps in the train_neural_net.ipynb notebook.

Credits

Metadata

Release files for meter-digits-recognizer 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meter-digits-recognizer 0.2.3
File Size Uploaded
meter-digits-recognizer-0.2.3.tar.gz 2.2 MB Details

Release files / meter-digits-recognizer-0.2.3.tar.gz

Download URL meter-digits-recognizer-0.2.3.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
d402541d7885756204e4801eacd21789e2913d67e04bc29c0e04a5eebe592835
BLAKE2b-256 checksum
How to use checksums
15387843cce5cb2f1e14a3ac07bac12f4751f72390e3290d74bd5806abd805a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.2.3 This release

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.13

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page