Skip to main content

A deep learning based library to detect indian number plates

Project description

Indian Number Plate Recognition

An open source Indian Number Plate Recogniton library built using deep learning.

For GUI version please go to this repo.

PyPI version PyTorch Open In Colab

Version and updates

  • v1.0.1: Second release

    • Fixed crashes and errors.
    • Now you can view the list of detected plates using the show_plates parameter in "fetch_details" method.
  • v1.0.0: Initial release

    • Detect number plates and extract the texts from it.
  • Upcomming

    • Docker image comming soon!

Screenshots

App Screenshot 1

App Screenshot 1

App Screenshot 1

App Screenshot 1

Installation

This library can be installed on windows and linux just follow the below steps based on your OS.

for windows

  1. I would suggest before installing please create an anaconda environment.
conda create -n "env-name" python==3.7
  1. Install torch and detectron2
pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

python -m pip install git+https://github.com/facebookresearch/detectron2.git
  1. Then install INPR package
pip install INPR

for linux

  1. install torch and detectron2
pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.7/index.html
  1. Then simply install the INPR package
pip install INPR

Usage

To detect the plates here is an example

    from INPR.inpr import detect_plates
    import matplotlib.pyplot as plt

    im = 'test_img/kia.jpg'
    grap,op,img = detect_plates(im)
    plt.imshow(grap)

In the above example the method "detect_plates" returns three values which are:-

1. the image along with detected plates
2. the bounding boxes of the detected plates
3. the passed image iteself

Optionally you can also try to extract the text present inside the detected plates by the following example:

    from INPR.inpr import fetch_details, detect_plates

    im = 'test_img/kia.jpg'

    grap,op,img = detect_plates(im)
    num_plate_text = fetch_details(op,img)
    
    print(num_plate_text)   

Note:- getting the number plates text won't work for every image as it depends upon multiple factors like resolution, distance of the object, lighting,etc. But still you can give it a try.

Feedback and queries

If you have any feedback, bugs, queries please reach out to me on Linkedin and also raise an GitHub issue about the same.

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

INPR-1.0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

INPR-1.0.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file INPR-1.0.1.tar.gz.

File metadata

  • Download URL: INPR-1.0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.0

File hashes

Hashes for INPR-1.0.1.tar.gz
Algorithm Hash digest
SHA256 be38e5bc527ae423f81ef2f150cd31218d6b606a893c79cc04777e228466adff
MD5 9ed90c7eaf9018a0ec447fd073656907
BLAKE2b-256 db0f7e6df18f203910c2509cc799f33346292860b92a52f524e71e3a305617b4

See more details on using hashes here.

File details

Details for the file INPR-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: INPR-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.0

File hashes

Hashes for INPR-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a448fd5fcc468565f29a6dc7c5e9c9ecd345c75115de5c635a003e3c8ccca779
MD5 4ad5898464890ca1f3d0d94286f512dd
BLAKE2b-256 38a160294479aee185ab1b973919e83eb3e7fa9a65edc2c20f8f8b7ba1ec7b4f

See more details on using hashes here.

Supported by

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