Slovak plates - confusing 0 and O


#1

Hey!

The Slovak license plate pattern is @@###@@, please see: https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Slovakia

OpenALPR API mixes up 0 and O, for example this plate is recognised as ...90X while it should be ...9OX.

Could you please update the Slovak patterns? It would save us the hassle of patching OpenALPR on our side, and bring the benefits to your other customers too.

Best,
Konrad

079142__UTC


#2

Just so I understand, the current pattern is:
sk @@###@@

Is that not correct? From the wiki link that appears to be the right pattern. If it is not, what should it be?


#3

The pattern you give is correct, but OpenALPR Cloud API does not return results according to it!

It gives us a 0 (zero) in the second to last character!

Check out what’s the ALPR result for the attached image.

079142__UTC


#4

Hey @matt – any news on this? Were you able to reproduce the problem?


#5

It looks like the pattern is correct, it just wasn’t sure about that character. When I ran it through locally with a higher top n, we see the patterns match on some of the lower confidence reads. In fact, the “U” scores slightly higher than the “O” in this case:

alpr -c eu test.jpg -n 20
plate0: 20 results
State ID: eu-sk (78% confidence)
    - BL1990X	 confidence: 81.5202	 pattern_match: 0
    - BL1990	 confidence: 70.8651	 pattern_match: 0
    - BL19907	 confidence: 70.1162	 pattern_match: 0
    - BL1990A	 confidence: 70.0307	 pattern_match: 0
    - BL19903	 confidence: 69.961	     pattern_match: 0
    - BL1990K	 confidence: 69.952	     pattern_match: 0
    - BL19901	 confidence: 69.9421	 pattern_match: 0
    - BL19905	 confidence: 69.9364	 pattern_match: 0
    - BL19908	 confidence: 69.9358	 pattern_match: 0
    - BL1990R	 confidence: 69.9293	 pattern_match: 0
    - BL19909	 confidence: 69.9283	 pattern_match: 0
    - BL199X	 confidence: 69.8171	 pattern_match: 0
    - BL990X	 confidence: 69.6747	 pattern_match: 0
    - BL199UX	 confidence: 69.5966	 pattern_match: 1
    - BL199OX	 confidence: 69.5895	 pattern_match: 1
    - BLV990X	 confidence: 69.5566	 pattern_match: 0
    - BL199   	 confidence: 59.162	     pattern_match: 0
    - BL990	     confidence: 59.0196	 pattern_match: 0
    - BL199U	 confidence: 58.9415	 pattern_match: 0
    - BL199O	 confidence: 58.9344	 pattern_match: 0

#6

Thanks for this information!

So, to make sure that I understand it correctly:

  1. The 0X variant scores the highest and is being returned by OpenALPR despite not matching the Slovak country pattern. Why is it possible to return a license plate that doesn’t match the country pattern?

  2. OX scores a very low score. In fact, so low that some incorrect results which match the Slovak pattern are above it. To me, it looks like the raw characters detection component is too opinionated about the character being 0 (digit) as opposed to O (letter). Would you share this view?

  3. Do you think that the 0 vs. O detection problem can be fixed by OpenALPR upstream? Or should we patch it downstream? I know how to patch it (by trying to replace each 0 with O and vice versa, and then matching again against the license plate patterns), but I hesitate to do it, as I believe that it should be fixed upstream.

Best,
Konrad


#7
  1. This is how the software works. Sometimes vanity plates in Europe do not follow a particular format and we must still recognize them. Similarly, sometimes we predict the wrong country and we don’t want to disqualify the correct numbers.

  2. Yes, the O character has some distortion in it near the top. The X character it is most unsure about. I think less pixelation will help with accuracy because it will be more confident.

  3. Yes, we improve accuracy with each version. If you know, for a fact, that all plates will always have a O instead of a 0 at that location, you could swap it out on your side. However, I agree the best solution would be for the engine to know that automatically.


#8

Thanks!

In the case of Slovak (and probably all European) plates, the 0 and O have the exact same width, height and curvature. The only difference is that 0 has a notch. This suggest to me that somehow relying on the patterns to distinguish between them is probably the best idea.

Can I pull from somewhere the list of license plate patters for all countries? I would like to do the post-processing on my side in a generic way. :slight_smile: