Skip to main content

License Plate Detector and Recognizer

Project description

License Plate Detector & Recognizer (lpdr)

:heavy_check_mark: Low code

:heavy_check_mark: Scalable

:heavy_check_mark: Easy to modify

:heavy_check_mark: Independable

License plate extractor with optical character recognition.

:arrow_forward: If you want to understand all the underlying processes please read my paper on it. :arrow_backward:

:rocket: How it works

diagram

:rocket: Installation

Use the package manager pip to install lpdr.

pip install lpdr

or

Recommended: Clone this repo for direct lpdr usage.

git clone https://github.com/szachovy/lpdr.git

Warning! Tested on Python 3.7.4

:rocket: Usage

Case 1: LPDR as a module

import lpdr

If you only want to extract license plate from an image.

lpdr.LPD().Y # returns numpy.ndarray

If you want to get license plate numbers from an image.

lpdr.LPR().output # returns string

Case 2 Recommended: LPDR as a microservice

# in main directory
python lpdr/lpdr.py [-h] [-c CAPTURE] [-i IMAGE_PATH] # returns stdout/stderr

where:

  • -h, --help show this help message and exit
  • -c CAPTURE, --capture CAPTURE Captures image from camera after run (0/1 or True/False), False by default
  • -i IMAGE_PATH, --image_path IMAGE_PATH Defines input/output path for image (relative or absolute path to the image) 'image.png' or 'image.jpg' by default

Example of CLI usage:

python lpdr/lpdr.py -c True -i image.png
# captures the picture from a given
# optical source and saves it as image.png for lpdr program execution operations.

Why it is better to use recommended choices?

You may need to personalize the settings for more specified tasks, as a python package you would first need to find the package path.

Here are the options available, you can change them as you wish.:

  • Add tesseract utility for Windows (absolute path to tesseract.exe), it sometimes causes the problems on Windows machines if you do not add it.
  • Defaults for argparser (capture / image_path)
  • Input camera source
  • Width of the image to be captured
  • Height of the image to be captured
  • Wpod-net path (or different one if you have .h5 and .json files after training)
  • IOU threshold
  • Confidence if the detected object is a license plate
  • Alpha normalization parameter
  • Confidence with plate sizing parameters
  • Loss function
  • OEM
  • PSM

Warning! Depending on the tensorflow version there might be some issues with keras. Upgrade TF to 2.0 or higher if you can.

:rocket: Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the tests as appropriate.

:rocket: References

License Plate Detection ECCV 2018 paper Sergio Montazzolli Silva, Claudio Rosito Jung

ALPR for unconstrained scenarious

Optical Character Recognition by Open source OCR Tool Tesseract: A Case Study Chirag Patel, Atul Patel, PhD, Dharmendra Patel

An Overview of the Tesseract OCR Engine Ray Smith, Google Inc.

Wrapper for Google's Tesseract-OCR Engine.

:rocket: Author

  • Wiktor Jakub Maj

If you use lpdr in your work please cite my paper!

@article{article,
author = {Maj, Wiktor},
year = {2020},
month = {09},
pages = {1-13},
title = {Matrix operations on License Plate Detector and Recognizer (LPDR)}
}

:rocket: License

MIT

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

lpdr-0.2-py3.7.egg (6.2 MB view details)

Uploaded Source

File details

Details for the file lpdr-0.2-py3.7.egg.

File metadata

  • Download URL: lpdr-0.2-py3.7.egg
  • Upload date:
  • Size: 6.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4

File hashes

Hashes for lpdr-0.2-py3.7.egg
Algorithm Hash digest
SHA256 98a7e6eccf1aa0abc846435e5fe72ad42e15146eed9a26800f1548c31ca8b0fd
MD5 5bf809b2cd42ef78f2ab0af34e7f0325
BLAKE2b-256 ff3cf65dae84ecf918bde156daeced3d4da6151b3d8a5c854fcac553caaf6631

See more details on using hashes here.

Supported by

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