Skip to main content

No project description provided

Project description

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

  1. Install PyTorch by following the official guidelines https://pytorch.org/get-started/locally/
  2. 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meter-digits-recognizer-0.1.8.tar.gz (4.9 MB view details)

Uploaded Source

File details

Details for the file meter-digits-recognizer-0.1.8.tar.gz.

File metadata

  • Download URL: meter-digits-recognizer-0.1.8.tar.gz
  • Upload date:
  • Size: 4.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for meter-digits-recognizer-0.1.8.tar.gz
Algorithm Hash digest
SHA256 92c1cc7710314f834a6b9d965461ec16b3e3e836ae73f4a50c6b1bfbd622aae9
MD5 f0a65205ceb76f18f1559aba76f9ecf3
BLAKE2b-256 5db4f1bd825495b41285e3f871ce0e3ab508c3bf33a16605e0b1929317913283

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page