
Building a license plate reader from scratch with deep learning - ole_gooner
https://nanonets.com/blog/attention-ocr-for-text-recogntion/
======
jlarocco
Great article, misleading title. It's not "from scratch" if it's using OpenCV,
TensorFlow, and a web service to do all of the work.

Imagine, "Bake Cookies From Scratch," and step one is remove the Pillsbury
cookie dough from the freezer...

~~~
markdown
"If you wish to make an apple pie from scratch, you must first buy Pillsbury
Deep Dish Pie Crust" \- Carl Sagan

~~~
kjeetgill
For those not in the know, the joke here is a play on the real quote from Carl
Sagan:

If you wish to make an apple pie from scratch, you must first invent the
universe.

------
bredren
I work on EasyALPR which I’m putting through Startup School.

One thing often missed in license plate reading is that the tech is really
well solved now using an open source stack.

There is always room for improvement so I welcome new technological approaches
like this.

However when thinking about license plate data, the real trouble is in what
you do with the data, how you handle duplication, and create rules and
interface to make the collection useful.

~~~
aidenn0
My uncle is a cop in DC and he says >90% of the hits on plates are for the
same number but a different state. Is there any work in identifying the state
a license plate is from? Just the style is often enough to narrow it down,
despite the fact that most license plate frames partially or totally cover up
the state name.

~~~
thaumasiotes
> My uncle is a cop in DC and he says >90% of the hits on plates are for the
> same number but a different state. Is there any work in identifying the
> state a license plate is from?

As is so often the case, it seems like it'd be easier to move ourselves to the
machine, by including the state information in the code. If a code can only
belong to one state, this problem just can't arise.

~~~
stevewodil
Perhaps each new plate issued should include the state abbreviation in one of
the corners (such as CA for California)

~~~
thaumasiotes
It's possible but not necessary. License plates already feature non-overlap --
a standard California plate is 2AAA222, while a New Mexico plate is AAA222.
Neither template can be confused for the other.

~~~
dragonwriter
> License plates already feature non-overlap

No, they don't.

> a standard California plate is 2AAA222, while a New Mexico plate is AAA222.

And the New Mexico AAA222 pattern is currently shared with Arkansas, Indiana,
Iowa, one of the optional Michigan designs, Mississippi, one of the Montana
designs, some Nebraska plates, North Carolina, the Northern Mariana Islands,
Oklahoma, Puerto Rico, South Carolina, Vermont, and the US Virgin Islands.

To be fair, only NC, OK, and PR share NMs use of a dash between the alpha and
numeric portion.

~~~
aidenn0
Virginia used to issue in that pattern, with a dash between. Then they ran out
and added a 4th digit. However, there are plenty of VA plates still around
with the old pattern.

------
ole_gooner
Hey,

This is an a DIY Article on building a license plate detector using attention
OCR.

We deep dive in with this article on how you can automate your data entry work
with the help of deep learning based OCR. It speaks about attention
mechanisms, spatial transformer networks and how they are applied for any text
recognition task.

~~~
eggoa
This seems like an item for "Show HN".

[https://news.ycombinator.com/show](https://news.ycombinator.com/show)

(Not trying to scold or anything, but seems like this would fit well with that
convention.)

~~~
capableweb
I always seen Show HN for interactive things, not articles (which I would say
this is), thinking specifically about this part from the Show HN Guidelines:

> Show HN is for something you've made that other people can play with. HN
> users can try it out, give you feedback, and ask questions in the thread.

------
rpmisms
Nice primer on how the tech works. The visuals for weighted relationships
especially made it click for me.

------
dpflan
_Musings_ : I've seen more articles on license plate readers (or perhaps been
more aware/paying more attention to these). I understand YC has invested in a
LPR-tech company Flock Safety. I'm intrigued by the rise in LPR related
articles. Such technology has been around for a while, but perhaps properly
modularizing it (each camera unit is wireless, etc) and making it SaaS-backed
is innovative. Has anyone else noticed this trend in activity for LPR ML tech
(care to explain or to discuss the trend)?

~~~
atwebb
I've been mulling over trying to build one for our cove/neighborhood.

Ring/security cameras are fine but being able to pinpoint a handful of plates
to the wee hours of the morning would allow theft issues to be handled pretty
easily when cross referenced with camera tech.

Ex. Right now you get a description like "Older white 4 door" or "White Nissan
Sentra"

Bounce that against plates from that time and you've got a good match to work
off of, especially if the owner matches descriptions from cameras.

~~~
scottlamb
You don't need automated license plate recognition for that, though. If you
find the motion events in the wee hours, and have a sufficiently high-quality
video frame [1], you can easily check the type of car and then know the
license plate by reading it with the neural network that was preinstalled
between your ears rather than a software one.

I've been writing my own home surveillance camera network video recorder
software, so I've thought about plugging in something like this, but I don't
think it's really necessary. The one time I might use it is if there's a car
that was likely involved in a burglary, I might scan the previous few weeks to
find previous times they were in-frame. Then I might see their scoping the
place out, potentially revealing more about themselves. It's too labor-
intensive to look through that many motion events by hand.

[1] My understanding is this requires some care. You have to select the right
kind of camera, place/aim/zoom it carefully, and tune it for license plate
recognition, particularly at night. I think the cameras typically come tuned
for slow-moving, not-very-reflective-to-IR objects. License plates on a moving
car are the opposite, so you want to say decrease the aperture and increase
the shutter speed from the default, position it carefully as I said, maybe
tweak some other settings, and test it.

------
colechristensen
I cannot think of a use of license-plate reader technology which is not
immoral.

With the rise of this kind of tech and its prevalence, I think the privacy-
focused among us should start pushing to outlaw the use of this tech and
eliminate the need for external identification on vehicles.

~~~
lopmotr
Huh? The whole reason license plates exist is to be read. What makes a machine
reading it always immoral compared to a human? Particularly the police
identifying vehicles they're searching for. Why shouldn't they use technology
to help find criminals instead of sitting around watching cars go by with
their own eyes?

I once had a problem with my car in a big carpark. I asked the security guard
for help and he wanted my license plate number. He typed it into the computer
and the camera found my car and panned and zoomed onto it. Amazing! Much
easier than trying to explain the location. So there's your non-immoral
example and you can stop worrying.

As for privacy. So what? Where are people going in public that's such a
secret? If you want to do something secretly, do it in private. If it involves
using the public streets, then accept that it's public.

~~~
0987651
> Where are people going in public that'a such a secret?

It really doesn't take much of an imagination to come up with places people
might not want others to know they go to.

STD clinics, abortion clinics, AA/NA meetings and gay bars would be some low
hanging fruit if you really can't think of any on your own.

> If it involves using the public streets, then accept that it's public.

"If you didn't want your violent ex husband to track you down, you shouldn't
have used public streets to get to the shelter"

~~~
lopmotr
None of those things are really private anyway. Private investigators, police,
or stalkers can follow people from their house to wherever they go, and can
identify you by your car's appearance even without the license plate. The
difference here could be in the scale and ease of access to such data though.

Nobody seems to mind that Google Streetview shows cars. My sister visited her
mother in another city at the time they drove past so now there's a permanent
record that she was there at that time to anyone who knows what her car looks
like. Is that a problem too?

~~~
partialrecall
> _" Private investigators, police, or stalkers can follow people from their
> house to wherever they go, and can identify you by your car's appearance
> even without the license plate."_

Quantity has a quality all of it's own.

