
Number plate recognition with Tensorflow - pizza
https://matthewearl.github.io/2016/05/06/cnn-anpr/
======
tgflynn
This is great work for someone who's been _dabbling with deep learning_. I
used to work on OCR systems for postal address recognition and for the most
part this is how I would have approached the problem.

A couple of suggestions:

You will almost certainly get better accuracy with a broader array of input
fonts. I'm not sure how well you can simulate all of the image conditions that
might occur in a real system so adding some real images to the training set
(if you can find them - but I suspect there are OCR type training sets
available these days) would probably help.

For the speed problem I like the idea of using a simpler net, probably with a
course scale image for pre-detection. You can set an appropriate detection
threshold to avoid false negatives and thereby avoid running the full net on
the vast majority of images which won't contain anything that looks like a
plate number.

~~~
PeterisP
Can you elaborate on why a broader array of input fonts would help?

Wouldn't best accuracy come from obtaining the single font that is actually
used for the licence plates (or finding the closest match), since in this
scenario there isn't any variation as all plates are made according to a
single standard?

~~~
tgflynn
Even if all the fonts are rigorously identical the viewing conditions won't
be. There will be plates seen at various angles, bent plates, dented plates,
dirty plates etc.

I think that if you're going to use a net you should try to train it in such a
way that it learns to generalize the fundamental shape characteristics of the
characters, much like the human visual system does, and that requires training
with a wide range of different type of characters, all considered to be of the
same class.

If you're convinced that you only need to deal with identical characters
you're probably better off using some form of template matching. But I think
this is rarely the case for real world systems.

------
aub3bhat
This is current state of the art, not sure if its compared or not
[https://github.com/openalpr/openalpr](https://github.com/openalpr/openalpr)

~~~
ratsbane
The openalpr project is pretty good, but it uses an older approach with lot of
hand-coded logic instead of the convolutional neural net approach of this
project. openalpr is faster than this, at least now, but I think the neural
net has potential to be faster and more accurate.

~~~
visarga
The author could take a camera on the road and shoot pics for a day or two,
then use OpenALPR to predict the plates and check this dataset to see how
accurate it is. If it's good enough, it can be used to train a CNN model with
real images of cars and no manual labeling.

~~~
ratsbane
I started saving file from my dashcam several months ago with that idea - to
use the openalpr results as training data for a neural net, but the results
I'm getting from openalpr aren't good enough to use without a lot of manual
review.

------
anc84
I love posts like that. Detailed, educational and criticising itself. Thanks!

~~~
Mizza
Totally agreed. A lot of ML posts are "I ran this. This happened." \- where
what we actually to read is "This is the problem I had. This is how I broke
that problem down into these components, and this is how and why I solved
those."

------
soperj
If the author sees this. How long did it take to put this together?

------
siscia
The more I read about AI and machine learning the more I realize that I don't
know nearly as much as I would like to know.

Are there any good resources that you would suggest?

------
amelius
What type of hardware is necessary for this type of neural net, and how long
does the training take with that hardware?

~~~
ratsbane
I started training about 24 hours ago with a single i7 860 (2.8ghz) and it's
still running, but I'm watching the loss going down so I think it might wrap
up within a day or two.

The machine I'm using has an Nvidia GTX 970, but I failed to enable CUDA in
the TensorFlow installation so it's not using it. When I noticed that I
decided just to let it run and then, when it finishes, train it again with the
GPU and compare.

~~~
amelius
Ok, thanks. Please post the GPU results as well.

------
RubyPinch
worth noting that this same process works if they did other transforms to the
images (like blurring instead of tilting)

if you blur license plates or text, people will still be able to read it!

