Giter VIP home page Giter VIP logo

tensorflow-license-plate-detection's Introduction

TensorFlow-ALPR

The project developed using TensorFlow to detect the License Plate from a car and uses the Tesseract Engine to recognize the charactes from the detected plate.

Software Packs Needed

  • Anaconda 3 (Tool comes with most of the required python packages along with python3 & spyder IDE)
  • Tesseract Engine (Must need to be installed)

Python Packages Needed

ABOUT PROJECT

  • TensorFlow is an open-source software library (Deep learning) for dataflow programming across a range of tasks. It is a symbolic math library, and also used for machine learning applications such as neural networks. So we have planned to use it for number plate detection.

TRAINING PHASE -- IMAGE LABELING

  • Collected the set of 100 images (Cars along with number plate) from the sources such as Google Images and Flickr. Then annotated the set of images by drawing the boundary box over the number plates to send it for the training phase.
    • The Annoation gives the co-ordinates of license plates such as (xmin, ymin, xmax, ymax)
    • Then the co-ordinates are saved into a XML file
    • All the XML files are grouped and the Co-ordinates are saved in CSV file.
    • Then the CSV file is converted into TensorFlow record format.
  • The set of other separate 10 images also gone through the above steps and saved as Test Record file

GPU TRAINING

  • By using the Tensorflow-gpu version, the set of annotated images were sent into the Convolutional neural network called as ssd-mobilenet where the metrics such as model learning rate, batch of images sent into the network and evaluation configurations were set. The training phase of the model took several days. At last the model came around with the positive result and detected the number plate over the input images.

OCR PART

  • Then the detected number plate is cropped using Tensorflow, By using the Google Tesseract-OCR (Package originally developed to scan hard copy documents to filter out the characters from it) the picture undergoes some coversions using computer vision package then the charcters are filtered out.

CROP

CONVERSION

MOTION DETECTION PART

  • The basic motion capturing has been implemented to capture the picture of moving vehicle by using the openCV where the threshold of the camera is fixed (threshold value changes in according to frame's boundary area). If the vehicle touches the boundary the picture is captured. (In progress)

tensorflow-license-plate-detection's People

Contributors

dharun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tensorflow-license-plate-detection's Issues

GUI

I have no GUI, how can I run this without GUI

cannot import name 'label_map_util' from 'utils'

python .\numplate_recognition_detection.py
2021-02-01 15:07:20.916974: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2021-02-01 15:07:20.917460: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File ".\numplate_recognition_detection.py", line 18, in
from utils import label_map_util
ImportError: cannot import name 'label_map_util' from 'utils' (C:\Program Files (x86)\Python 3.8\lib\site-packages\utils_init_.py)

Training for new Country

Thanks for this repository, can I use this to train my own model, for example I have two model for our country and train it using this?

Will this program be able to make it real time using IP Camera?

No such file / folder training\object-detection.pbtxt

Line 34 in your code : label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
No such file / folder training\object-detection.pbtxt ?
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: training\object-detection.pbtxt : The system cannot find the file specified.
; No such file or directory

NameError: name 'get_ipython' is not defined

/Tensorflow-License-Plate-Detection-master/numplate_recognition_detection.py", line 13, in
get_ipython().magic('matplotlib inline')

where can get_ipython be defined?
the file has not been changed, I just installed the packages.
greetings!

EMPTY PACKAGE OR MODULE

HI, I am a new student researcher in python, I downloaded your projects and installed all the dependables but on running your code I got error "ModuleNotFoundError: No module named 'object_detection.utils'". I went and pip install utils and tried again but same error. i checked in your project and saw object_detedtion as a folder (more like a package) and it is literally empty. please guide me on how to fix this.

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 12: invalid start byte

Traceback (most recent call last):
File "numplate_recognition_detection.py", line 81, in
text = pytesseract.image_to_string(Image.open(filename),lang=None)
File "D:\Anaconda3\envs\tensorflow_gpu\lib\site-packages\pytesseract\pytesseract.py", line 294, in image_to_string
return run_and_get_output(*args)
File "D:\Anaconda3\envs\tensorflow_gpu\lib\site-packages\pytesseract\pytesseract.py", line 202, in run_and_get_output
run_tesseract(**kwargs)
File "D:\Anaconda3\envs\tensorflow_gpu\lib\site-packages\pytesseract\pytesseract.py", line 178, in run_tesseract
raise TesseractError(status_code, get_errors(error_string))
File "D:\Anaconda3\envs\tensorflow_gpu\lib\site-packages\pytesseract\pytesseract.py", line 79, in get_errors
line for line in error_string.decode('utf-8').splitlines()

Excuse me! I meet this problem when I run the code. Do you know how to solve it?

Need Requirement File

Hello, I hope you are doing well. I want to train your repo. I want to know the requirements for this.

Missing utils

Hi Dharun,

I am trying to run your code for car plate recognition but get an error for missing utils. Could you also share you utils file?

ModuleNotFoundError: No module named 'object_detection

Hi, I downloaded repository and tried to run numplate_recognition_detection, I'm running it with anaconda IPython 7.8.0. First I got error message: "UnknownBackend: No event loop integration for 'inline'. Supported event loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx". According to tensorflow discussion I replaced matplotlib inline for matplotlib tk. but then I got error message: ModuleNotFoundError: No module named 'utils'. I downloaded utils file from previous issue but than this showed up: ModuleNotFoundError: No module named 'object_detection_evaluation'. Any idea on what am I doing wrong? (note, first time using IPython O:) )

object-detection.pbtxt can not be found.

Do i have to train the model again to obtain object-detection.pbtxt? This error occured when i run numberplate_recognition_detection.py:

Traceback (most recent call last):
  File "C:\Users\DELL\Downloads\Tensorflow-License-Plate-Detection-master\Tensorflow-License-Plate-Detection-master\numplate_recognition_detection.py", line 34, in <module>
    label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
  File "C:\Users\DELL\Downloads\Tensorflow-License-Plate-Detection-master\Tensorflow-License-Plate-Detection-master\object_detection\utils\label_map_util.py", line 117, in load_labelmap
    label_map_string = fid.read()
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 120, in read
    self._preread_check()
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 80, in _preread_check
    compat.as_bytes(self.__name), 1024 * 512, status)
  File "C:\Users\DELL\AppData\Local\Programs\Python\Python36-32\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 519, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: training\object-detection.pbtxt : The system cannot find the path specified.

; No such process

Tesseract model

pytesseract.tesseract_cmd = '/home/tensorflow-cuda/dharun_custom/models/research/object_detection/tessdata/'

I don't find this folder inside this repository, maybe you can refactor this repository to make it more understandable? thank you!

Missing file in Proto or Util


ImportError Traceback (most recent call last)
in
2 sys.path.append("/Users/jivira/Tensorflow-License-Plate-Detection-master/object_detection")
3
----> 4 from utils import label_map_util
5 from utils import visualization_utils as vis_util
6

~/Tensorflow-License-Plate-Detection-master/object_detection/utils/label_map_util.py in
24 import tensorflow as tf
25 from google.protobuf import text_format
---> 26 from object_detection.protos import string_int_label_map_pb2
27
28

ImportError: cannot import name 'string_int_label_map_pb2'

Can you please help me in this....

Motion detection

Hey! I am just curious is the motion detection part done or is it still in progress?

Pbtxt file

can you provide object_detection.pbtxt file ?? i shall be thankful...

NameError: name 'get_ipython' is not defined

Traceback (most recent call last):
File "numplate_recognition_detection.py", line 13, in
get_ipython().magic('matplotlib inline')
NameError: name 'get_ipython' is not defined

I have received above error.
How to run it properly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.