OpenALPR - cloud vs local - accuracy?

Andrew F

Getting the hang of it
Joined
Mar 29, 2019
Messages
33
Reaction score
25
Location
USA
Hi everyone,

I have OpenALPR up and running, and it's scary-amazing how much data it gathers. I decided to try to run it locally to avoid putting all that data on someone else's server.

Accuracy with my local install is HORRIBLE, compared to the spot-on accuracy of their cloud solution.

For you folks who are running this locally, what are you doing to improve accuracy? Mine is so terrible that it's not even worth running OpenALPR. Are there some hacks I'm missing?

Or is everyone just using the commercial cloud version?

Andrew
 

Fubduck

Getting the hang of it
Joined
Jul 10, 2018
Messages
109
Reaction score
72
Location
colorado
I tried the local for a bit but it used way too much processor on my headless linux server. 1 or 2 cores maxed all the time was just a waste. I use the windows OpenALPR client with nvidia GPU integration to the cloud. I tried to get the OpenALPR Tool setup on a spare laptop but couldn't get it to work so I rolled my own database and web server on my linux server. I download the csv file from OpenALPR every 5 minutes and incorporate into my local database.
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
I have the commercial version, but the actual plate processing is still done locally, so I'm wondering if your accuracy is suffering due to other reasons. Can you show some sample images from your system?

Here are a couple samples, a bad one (blurry, shutter speed too low) and a couple good ones where the OpenALPR agent has good images to read the characters from.
 

Attachments

Laserray

Pulling my weight
Joined
Sep 14, 2018
Messages
113
Reaction score
113
Location
Cookeville, TN
There are many adjustments for good LPR. Assuming you did the angle, pre-warp, camera adjustments, and lighting conditions, there are large difference between the free, and commercial version.
.
I run both version concurrently to reduce the number of hits to the commercial version.
Using Python and CV2, I do NOT send video to the commercial version. Rather I pre-test the picture with the free version first, sending it frame by frame video. The frame is cropped to further expand the plate picture.
You also need to adjust the openalpr config file for each camera on the free version. Since my angle of attack is less than 30 degrees, I use a flat pre-warp. Once the software decides the best picture I send it to the commercial version if the plate data is not yet correctly stored in the plate database. The web API is used to transfer information back and forth from OpenALPR and the server.
Your Pictures needs cropping, at least %50 of the picture data is useless, and the angle of attack needs a "pre-warp" setup.
BTW the commercial version is wasteful as hell. Sending video resulted in 3-5 duplicate plates each event, and lots of bad plate numbers as well. However the vehicle color, make, etc is useful. So that information is stored away. If that plate shows up again, the program pulls the old data, and skips the commercial check.
 

Laserray

Pulling my weight
Joined
Sep 14, 2018
Messages
113
Reaction score
113
Location
Cookeville, TN
First picture is the full view of the plate camera, pretty much maxed out at 90% of 60mm zoom. Second picture is cropped and sent to OpenALPR.
The overlay, stop sign, and the property signs interfere with the LPR detection.
Not perfectly centered but it works.This angle needs no pre-warp.


 
Last edited:

Andrew F

Getting the hang of it
Joined
Mar 29, 2019
Messages
33
Reaction score
25
Location
USA
Thanks for the replies!

Here are two samples from the local setup that I'm running.

This plate was stored as "F5309":

cam2.jpg

This one saved as "0LQD":

cam3.jpg

I set up a mask to ignore the time code at the top.

You also need to adjust the openalpr config file for each camera on the free version.
How do I do a different prewarp for two different camera streams? I can't figure out where to put that in the config files... The above images have no prewarp.
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
For me, the normal views of vehicles result in plate images about 120 pixels wide in the farther lane. My previous cam got plates at about 100 pixels horizontally (and good accuracy). If your snips are at 100% scale, they're coming out around 75 pixels wide and the font is also small and harder to read. Would your camera be able to zoom in further to increase the effective size of the plates? Also, could you check if you can boost your camera's bitrate? That day photo looks like it might benefit from more bitrate.

I think dewarp may have gotten automated, my OpenALPR doesn't have a GUI option for dewarp anymore and I think the release notes said something like that. I attached a sample of mine at about a 70-degree crossangle. At that angle, conditions have to be pretty good (vehicle nearly stopped, decent light, non-recessed plate, etc) but it will OCR it very well in those cases.

Also, how fast does traffic usually go in your area?
 

Attachments

Laserray

Pulling my weight
Joined
Sep 14, 2018
Messages
113
Reaction score
113
Location
Cookeville, TN
Pre-warp instuctions

openalpr/openalpr

Path to config file, free version

C:\openalpr_64\config\openalpr.conf

You send camera snapshots to adjust pre-warp.
I do have a python program I made to use raw camera video but it's clunky as I just learned Python.
 
Last edited:

Andrew F

Getting the hang of it
Joined
Mar 29, 2019
Messages
33
Reaction score
25
Location
USA
Would your camera be able to zoom in further to increase the effective size of the plates? Also, could you check if you can boost your camera's bitrate?
I can't really zoom in more, or else I'll miss part of the road I think. I did increase the bitrate. We'll see if that helps.

Also, how fast does traffic usually go in your area?
It's a 25 mph road, but traffic is probably about 35 mph on average.

Path to config file, free version

C:\openalpr_64\config\openalpr.conf
I'm running the Linux daemon in a virtual Ubuntu instance... I was able to add prewarp to /etc/openalpr/openalpr.conf, but I don't see any way to specify the prewarp for each of my streams individually... Same issue for the image mask. Maybe I'm doing the config wrong.

I do have a python program I made to use raw camera video but it's clunky as I just learned Python
I would love to see what you're using. It sounds awesome! I'm at the point where I'm frustrated enough to keep working on this and not let a machine beat me. :D
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
You should move to a state with better license plates :D Or perhaps a camera upgrade would help, if it would let you get the coverage you need and still improve the size of the plate images. What camera is that?

Our state's plates are pretty legible, but the closest neighboring state (Idaho) has small non-embossed letters and the software has a tough time with some of the characters you'd expect, like B versus 8.
 

Andrew F

Getting the hang of it
Joined
Mar 29, 2019
Messages
33
Reaction score
25
Location
USA
The camera hardware is definitely not the problem. These are HFW5231E-Z12E. They're focused out about 80-90 feet away.

This has to be user error on my part. These cameras are amazing.
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
I have one of those too, it was able to effectively LPR two lanes at a distance of over 150feet shooting at full resolution (when in focus). I'll see if I can track down some samples (it got ousted by a different camera in the end).
 

mech

Getting comfortable
Joined
May 18, 2019
Messages
326
Reaction score
427
Location
United States
1.jpg 2.jpg
Here's a couple samples from my trial run with the Z12E. The plate sizes are a little bigger than your config is giving you, and the font on the plates is more LPR-friendly, so I bet if you had your alpr analyze these photos, it would get the plates right.
 
Top