Using multiple cameras to improve accuracy.

Robert G.

Pulling my weight
Joined
Oct 6, 2018
Messages
139
Reaction score
105
Location
North America
Wondering if anyone is using multiple cameras to improve the recognition of plates?

We have both front and rear plates where I am, often the front pates can be damaged and difficult to fully read.

In other cases, when looking at a vehicle from the rear they may have a trailer hitch or bike mounting equipment that partly blocks the plate.

Here is a sample of another trouble plate.

plate1.jpg


I am using OpenALPR and it got this plate incorrect. It identified the plate as AE7988. Certainly understandable.

Here is the same plate from the back.


plate2.jpg


From the back it gets the plate correctly.

These are two photos of the same vehicle, but using a single camera.

If I had two cameras, one that caught the vehicle as it approached and one camera that caught the back as it drove past then I think OpenALPR would have more data to work with.

I noticed under the advanced settings of OpenALPR, it uses plate grouping. It does this by default so it does not have tons of matches to a single plate.

The part that stands out to me is:

plate_groups_span_cameras: combine all reads from all cameras on this agent to one group. this is useful when the cameras are viewing the same vehicles at the same time.


This sounds great to me, so if I had a two camera setup watching traffic on the road then it should be able to supplement data from both angles to get improve plate accuracy.

Has anyone tried this?
 

wittaj

Getting comfortable
Joined
Apr 28, 2019
Messages
582
Reaction score
335
Location
USA
I have multiple LPR cams for that very reason, or if one decides to be acting up at the exact moment, or a moth flies by one at night.

I am not using any plate recognition software yet, but I did just try Plate Recognizer as it is integrated with BI. But I do not like the pricing as I need more than the free.

I haven't tried the OpenALPR route yet, but what you are saying above sounds like it would be incredible in improving accuracy if you have two cams!
 

looney2ns

IPCT Contributor
Joined
Sep 25, 2016
Messages
9,294
Reaction score
8,188
Location
Evansville, In. USA
Wondering if anyone is using multiple cameras to improve the recognition of plates?

We have both front and rear plates where I am, often the front pates can be damaged and difficult to fully read.

In other cases, when looking at a vehicle from the rear they may have a trailer hitch or bike mounting equipment that partly blocks the plate.

Here is a sample of another trouble plate.

View attachment 64780


I am using OpenALPR and it got this plate incorrect. It identified the plate as AE7988. Certainly understandable.

Here is the same plate from the back.


View attachment 64781


From the back it gets the plate correctly.

These are two photos of the same vehicle, but using a single camera.

If I had two cameras, one that caught the vehicle as it approached and one camera that caught the back as it drove past then I think OpenALPR would have more data to work with.

I noticed under the advanced settings of OpenALPR, it uses plate grouping. It does this by default so it does not have tons of matches to a single plate.

The part that stands out to me is:

plate_groups_span_cameras: combine all reads from all cameras on this agent to one group. this is useful when the cameras are viewing the same vehicles at the same time.


This sounds great to me, so if I had a two camera setup watching traffic on the road then it should be able to supplement data from both angles to get improve plate accuracy.

Has anyone tried this?
I would suggest reducing the angle the camera has to the plates. That's part of the issue.
 

Robert G.

Pulling my weight
Joined
Oct 6, 2018
Messages
139
Reaction score
105
Location
North America
I would suggest reducing the angle the camera has to the plates. That's part of the issue.
Yes, soon I will be redoing the placement of the camera... and getting a 2nd camera. But there are always issues that are not going to be corrected by the angle, such as damaged or blocked plates. If OpenALPR works like I think it will, my accuracy should go up. Not complaining, even with my current angle I believe the system is well over 95% accurate.

With a few tweaks of my own coding, I also have vehicle make/model that works at 90% or better as well (nothing to do with OpenALPR, as I don't pay for that feature with them).

I think I am an ALPR addict. I'm trying to find someone else in the city to install cameras at their business/house so I can collect the data!
 
Last edited:

wittaj

Getting comfortable
Joined
Apr 28, 2019
Messages
582
Reaction score
335
Location
USA
Oh - do explain your coding in more detail!

And what about developing coding so we don't have to rely on OpenALPR lol.
 

Robert G.

Pulling my weight
Joined
Oct 6, 2018
Messages
139
Reaction score
105
Location
North America
Here is a perfect example where I'm hopeful that dual cameras would be able to piece together the available pixels and come up with the best answer.

Difficult to read a plate when it is only 1/2 there!

plate1.jpg


Looking at the back end, there are a few more bits of data.

plate2.jpg
 

wrybread

Getting the hang of it
Joined
Sep 12, 2018
Messages
165
Reaction score
53
Location
San Francisco
With a few tweaks of my own coding, I also have vehicle make/model that works at 90% or better as well (nothing to do with OpenALPR, as I don't pay for that feature with them).
I'm curious about this too. Are you using an external database like findbyplate.com?
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
1,911
Reaction score
744
Yes! I have LPR cams looking in both directions up & down the street (we're in the middle of the block). comes in handy, even in a state where cars are supposed to have both front & back plates... I get 'em coming & going, so to speak. usually have 4 shots at getting good plate for every drive-by...
 

Robert G.

Pulling my weight
Joined
Oct 6, 2018
Messages
139
Reaction score
105
Location
North America
I'm curious about this too. Are you using an external database like findbyplate.com?
I'm doing quite a few things to improve accuracy.

* I import download and import plate data from OpenALPR. When importing I use regular expression filters to determine what nearby state is a possible match to the plate format. OpenAlpr does this as well but I have done a lot more research. For example if my state plate format is ABC 123, OpenAlpr will use that as a filter to identify the state. However, I know that plates may use the format ABC 123 but the state is so far only using the starting letters A - D. So if the plate starts with G then I know it can't be from my state. Also, my state might exclude letters I O and all numbers 1 0 etc.

* After applying my much more detailed regular expressions to the plates I end up with a list of possible states based on format only. If OpenAlpr and I agree, I use the matching state. If my calculated state does not match OpenALPR then I query my database and see if I have that matching plate before. If I do I will use that. If I have never seen the plate before then I will use the closest state, since my local state will be the one seen most often.

* Refining the state like this works well and has resulted in almost perfect state identification. As an example, it is VERY unlikely that we would see a plate from Mexico here. If OpenAlpr thinks the plate is from Mexico, which it often does, it is almost certainly wrong.


I'm doing similar techniques for the make/model. I'm not using OpenAlpr for identification of make/model, but rather a few different API's that are available online.

I pass images to an online API. If it comes back with a confidence score of less than 80%, I ignore it. If the score is more than 80%, I store the plate match with the vehicle that the AI thinks it is.

After the same plate/vehicle has been seen a couple of times, often from the front & back side I have multiple samples.

Lets say I've seen the same vehicle drive past 10 times.

Four times the confidence score was < 80 - ignore those.

Four times it thought the vehicle was a Ford F-150, one time it thought it was a Honda Civic and one time it thought it was a GMC Pickup.

So I have 10 samples, of which the system could consider the vehicle a Ford F-150.

Essentially I am using multiple samples to figure out what the vehicle is. If the AI gets it wrong sometimes, that is OK.

If I only see the vehicle 1 time, I use any value but after seeing the vehicle a few times the accurate identification 'floats to the top'. It is usually right when doing it this way.

The part that is still often wrong is color. The AI has a hard time telling if a vehicle is black, dark blue, dark green etc.
 

wrybread

Getting the hang of it
Joined
Sep 12, 2018
Messages
165
Reaction score
53
Location
San Francisco
Nice. I guess I should pay more attention to the "confidence" score for it's vehicle guesses. They've been so out in left field I've mostly stopped looking at them, but maybe when it has higher confidence it's accurate.

Interestingly this has been pretty accurate for the few tests I've done:

findbyplate.com

Really expensive to use their API though, starts at 2 cents a lookup, which would be about $10 a day for me.
 

Robert G.

Pulling my weight
Joined
Oct 6, 2018
Messages
139
Reaction score
105
Location
North America
findbyplate.com

Really expensive to use their API though, starts at 2 cents a lookup, which would be about $10 a day for me.
findbyplate does not work for me, I'm outside the USA.

How many plates do you get a day? $10 gives you 500 plates. You get 500 NEW plates every day on your LPR system?

Don't forget you don't need to check every plate, you only need to check a plate that is unknown to you. Once you query that system and get the make/model then you have it and don't need to check it again.
 

pozzello

Known around here
Joined
Oct 7, 2015
Messages
1,911
Reaction score
744
don't you have to 'process' the images first in order to determine if you've seen the car or plate before?
 

Robert G.

Pulling my weight
Joined
Oct 6, 2018
Messages
139
Reaction score
105
Location
North America
don't you have to 'process' the images first in order to determine if you've seen the car or plate before?
Yes, the first level of processing is the license plates. I currently use OpenALPR, after that getting the make & model is the next process. That you can either do, or not do, based on the license plate data that ALPR returns to you and what you have stored locally in your own database.
 

wittaj

Getting comfortable
Joined
Apr 28, 2019
Messages
582
Reaction score
335
Location
USA
@Robert G. - you seem to have the hang of this - any thoughts on how to do this that I posted in another thread?

 

wrybread

Getting the hang of it
Joined
Sep 12, 2018
Messages
165
Reaction score
53
Location
San Francisco
The number of new plates might subside over time since I've only had LPR running for a few weeks, but most days I'm getting around 300 new plates and some days I get more than 500 new plates. I'm using it at a fairly high traffic campground.
@Robert G. - you seem to have the hang of this - any thoughts on how to do this that I posted in another thread?

MySQL is your friend. Or any other similar database. But most definitely not Excel (or, in my opinion, anything from Microsoft).
 
Last edited:

Robert G.

Pulling my weight
Joined
Oct 6, 2018
Messages
139
Reaction score
105
Location
North America
The number of new plates might subside over time since I've only had LPR running for a few weeks, but most days I'm getting around 300 new plates and some days I get more than 500 new plates. I'm using it at a fairly high traffic campground.
Oh yea, in your case you really are going to get a lot of unique plates. In my case, it is a town of about 40,000 people. I see about 1,000 plates per day, with 100 of them being new daily.

I'm trying to develop my own vehicle make/model AI so I do not have to rely on a 3rd party. The problem of course, is always time to develop it. What I've got now works, but would not scale up well.
 

th182

BIT Beta Team
Joined
Sep 11, 2018
Messages
346
Reaction score
305
Location
Minnesota
I have two cameras, one facing West and one facing east. We are a two-plate state but some don't properly display the front or one is obstructed. I'm just using the open source daemon dumping to MySQL. It has no filtering so I get every attempt at deciphering the image so a ton of junk data and a couple true hits. (i.e. ABC, ABCI23, ABC123). I have been running for a little over a year and occasionally sanitize by dumping all plates less than 4 characters or confidences under a certain score.

Its been a long day so maybe I missed in your explanations but what are you using for your advanced filtering and accuracy stats? Is it a python script ran on the database or something more? I've been meaning to improve the "stock" alprd script that just dumps the data and actually do some filtering before it hits MySQL but never got around to thinking about it.


Sent from my iPhone using Tapatalk
 

Robert G.

Pulling my weight
Joined
Oct 6, 2018
Messages
139
Reaction score
105
Location
North America
I'm using PHP to import data from ALPR. The scrips clean the verify data before it gets stored into mysql. Like what you are planning, if the plate does not fit the correct format I can try and fix it or I send an alter that it needs to be verified.

In my area for example, no plate can be all numeric (not even personal plates). My camera system will often pickup 7777777, which it picks up from a deck railing that is sometimes in the images! So I exclude anything all numeric as it can't possibly be valid.

Just by trial and error I have made tweaks that cleans things up.
 

th182

BIT Beta Team
Joined
Sep 11, 2018
Messages
346
Reaction score
305
Location
Minnesota
I'm using PHP to import data from ALPR. The scrips clean the verify data before it gets stored into mysql. Like what you are planning, if the plate does not fit the correct format I can try and fix it or I send an alter that it needs to be verified.

In my area for example, no plate can be all numeric (not even personal plates). My camera system will often pickup 7777777, which it picks up from a deck railing that is sometimes in the images! So I exclude anything all numeric as it can't possibly be valid.

Just by trial and error I have made tweaks that cleans things up.
I have been having the 77777 occasionally too! Would you be willing to share your files/code? My custom 'front end' local website to view data is in PHP. Nothing fancy. Just gives a list and option to filter by date/time or plate.


Sent from my iPhone using Tapatalk
 
Top