MRZ Recognition - Paraguay

637 views
Skip to first unread message

Facundo Roldan

unread,
Sep 1, 2023, 11:06:21 AM9/1/23
to doubango-ai
Hello.

I'm trying to scan document image from Paraguay. 

It is a new version with a new mrz structure.

For Example:

Document Number: 5352431

image-20230816-151650.png

Result from the duobango app: https://www.doubango.org/webapps/mrz/

duobango1.jpg


duobango12.jpg

Document Number provided by Duobango: AA0012890 (its not correct)

Is it possible to fix this?

Thanks.

Regards.


Mamadou DIOP

unread,
Sep 1, 2023, 11:08:50 AM9/1/23
to Facundo Roldan, doubango-ai
Hello, 

This is private code and you don't have access to it. You don't need to worry if it's not correct. 
The public sdk do not parse the mrz. 



Sent from my Galaxy
--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/810860fe-c62d-4ea4-9d16-c4ac54a33bf1n%40googlegroups.com.

Facundo Roldan

unread,
Sep 1, 2023, 11:27:45 AM9/1/23
to doubango-ai
Hello,

I have an application with a Duobango license, and the result is the same.

I am using the web app as an example to write this ticket.

Thanks.

Mamadou DIOP

unread,
Sep 1, 2023, 11:29:40 AM9/1/23
to Facundo Roldan, doubango-ai

Nope, as I already said the SDK do *not* return any field. You shared a JSON in private and it's not from us.

I guess is someone else developed the app and you're new on it. Check with your colleagues.

Mamadou DIOP

unread,
Sep 1, 2023, 11:30:00 AM9/1/23
to Facundo Roldan, doubango-ai

When I try with https://www.doubango.org/webapps/kyc-documents-verif/ I see that what you're referring as being document number is returned as personal number.

For me what we're  returning is correct:

    Document number: AA0012890

    Personal number: 5352431

You have shared the Side B, we look at the Side A (front) below the portrait you'll see "5352431" which is the personal number.

I'd say your assertion is not correct unless you can share an official document.

Mamadou DIOP

unread,
Sep 1, 2023, 12:57:00 PM9/1/23
to Facundo Roldan, doubango-ai
I have tried with 3 different applications from different companies and they return the same result as us. What you say is the document number is returned as personal number by all of us. The personal number is also on the side A (front), below the portrait (photo). If you check the side A you'll see it.
Previous Paraguayan id cards had same layout. 
Why do you think we are wrong? Do you have official document?

Mamadou DIOP

unread,
Sep 1, 2023, 12:57:27 PM9/1/23
to Facundo Roldan, doubango-ai
I have tried with 3 different applications from different companies and they return the same result as us. What you say is the document number is returned as personal number by all of us. The personal number is also on the side A (front), below the portrait (photo). If you check the side A you'll see it.
Previous Paraguayan id cards had same layout. 
Why do you think we are wrong? Do you have official document?



Sent from my Galaxy


-------- Original message --------
From: Mamadou DIOP <diopm...@doubango.org>
Date: 9/1/23 17:30 (GMT+01:00)
To: Facundo Roldan <fro...@bitsion.com>, doubango-ai <douba...@googlegroups.com>
Subject: Re: MRZ Recognition - Paraguay

Mamadou DIOP

unread,
Sep 1, 2023, 1:08:12 PM9/1/23
to Facundo Roldan, doubango-ai
I have tried with 3 different applications from different companies and they return the same result as us. What you say is the document number is returned as personal number by all of us. The personal number is also on the side A (front), below the portrait (photo). If you check the side A you'll see it.
Previous Paraguayan id cards had same layout. 
Why do you think we are wrong? Do you have official document?



Sent from my Galaxy


-------- Original message --------
From: Mamadou DIOP <diopm...@doubango.org>
Date: 9/1/23 17:30 (GMT+01:00)
To: Facundo Roldan <fro...@bitsion.com>, doubango-ai <douba...@googlegroups.com>
Subject: Re: MRZ Recognition - Paraguay

Mamadou DIOP

unread,
Sep 1, 2023, 5:45:47 PM9/1/23
to Facundo Roldan, doubango-ai

- "Paraguay - Id Card (2023).jpg" is Side A of Paraguayan newest Id card

- "Paraguay - Id Card (2023)-result.png" is the result you get when you try with https://www.doubango.org/webapps/kyc-documents-verif

- The #7-digits (0000000) below the portrait is the unique number (personal number)

- You haven't shared your Side A but if you check it you should see "5352431" which corresponds to what https://www.doubango.org/webapps/mrz returns

- "Paraguay - Passport #3-result.png" is the result you get went you try with a Paraguayan passport. "3122656" is the personal number (also #7-digits). Above you have "Q568928" which is the Document/Passport number. The #7-digits number is referenced as "cedula de identidad / Identity number".

if you think we're wrong, then switch 'DocumentNumber' and 'PersonalNumber'

Paraguay - Id Card (2023).jpg
Paraguay - Id Card (2023)-result.png
Paraguay - Passport #3-result.png

Facundo Roldan

unread,
Sep 4, 2023, 9:53:31 AM9/4/23
to doubango-ai
Hello.

I'm providing you with two comparative images. 

Old Document Image

docOld.jpg

New Document Image

docNew.jpg


The first one is the previous version of the Paraguayan document, so you can see how it's processed correctly. The second one is the new version that I'm reporting, which is not being read correctly in the MRZ. My application, as per the client's request, only validates the MRZ and not the front image of the document. 

Nevertheless, I'm sharing the front image of the document as well. I need to address this issue as I can't process these images. Additionally, I need to implement certain validations to check if the document number is returned in the 'documentNumber' or 'personalNumber' field, which may require development to avoid impacting the processing of images with the previous version of the document. 

If there is no solution, could you please explain what the values '0207' at the end of the field mean? 


Thanks.


Mamadou DIOP

unread,
Sep 4, 2023, 1:30:44 PM9/4/23
to Facundo Roldan, doubango-ai

Ok, let's do this: go to https://github.com/DoubangoTelecom/ultimateMRZ-SDK/tree/master/samples/c%2B%2B/recognizer, read how to run the sample recognizer and try it on your machine. You can also use the recognizer with other languages (Python, Java, C#...). Use the recognizer with your images and share the console outputs with me.

You can also check the console outputs by yourself and you'll notice that THERE IS NO "PersonalNumber" or "DocumentNumber".

We told you in public and in private several times, again and again and again... the JSON response you're getting isn't from us.

Your license was activated on 27 Oct 2021 (2 years ago), I guess the person who developed the module is no longer working there and you're new on it.

Our company is based in Paris (France) and we've many customers there. If you try the french id card (https://en.wikipedia.org/wiki/National_identity_card_(France)#/media/File:French_Identity_card_1988_-_1994.jpg) with https://www.doubango.org/webapps/mrz/ you'll see that the result is *not* correct. We know it and we don't fix it on purpose. The result is correct with https://www.doubango.org/webapps/kyc-documents-verif on purpose.

To make is simple: The SDK returns the raw MRZ without parsing any field. It's up to you to parse the fields.

Since version 0.1 we decided NOT to include MRZ field parsing in the SDK to avoid nightmares. The MRZ format can change depending on the card type, country, version.... and most importantly the date of release. UltimateMRZ is a one-time payment license with a very low price, we cannot afford to send too much time on maintenance without being paid. So, this is why we do not return any field when you use the SDK.

This said, we wanted to help our customers and to do it:

    1/ we added documentation explaining how to parse the fields: https://www.doubango.org/SDKs/mrz/docs/MRZ_parser.html

    2/ we added a standalone sample app (outside the sdk): https://github.com/DoubangoTelecom/ultimateMRZ-SDK/tree/master/samples/c++/parser

The parser at https://www.doubango.org/SDKs/mrz/docs/MRZ_parser.html strictly follow the standard and we will not change it to make it work with Paraguayan or French id cards. Because if we do so, we'll have requests from Belgians, Senegalese, Brazilians... and that's exactly what we don't want for this project. Our new product (https://www.doubango.org/webapps/kyc-documents-verif) will correctly parse and return the fields because it has monthly based support.

Quote from https://www.doubango.org/SDKs/mrz/docs/MRZ_parser.html: "If you’re dealing with non-standard formats and struggling to write the right regular expressions then, don’t hesitate to contact us via our dev-group and we’ll help you."

This is exactly your case, you're dealing with non-standard format but the big issue is that you seem to not know where your parser comes from. I can help you but you MUST provide info and code from your parser. I can't help you if I don't know where your parser comes from. Again, the SDK do *not* return any fields and the JSON you showed us in private IS NOT from us.

Mamadou DIOP

unread,
Sep 4, 2023, 4:50:50 PM9/4/23
to Facundo Roldan, doubango-ai, gov...@bitsion.com
Ok mystery solved. I found these entries from your colleague Gonzalo Oviedo:

this parser is not from us. I provided the link to your colleague in 2021 as he was looking for a C# parser but I’m (we're) not the author of the code.
The anonymous code has the exact same field names as what you shared with us in private (“DocumentNumber”, “PersonalNumber”…)

Your “issue” is easy to fix. Just switch the “PersonalNumber” and the  “DocumentNumber”. You need to distinguish the old and new card to know when to switch. The old card doesn’t have a personal number. In MRZ, ‘<‘ means empty, the old card has.
Summary:
1/ process the card using your C# code
2/ if there is no personal number, then it’s an old card. Do nothing
3/ if there are both document number and personal number, then it’s the new one. Pick the personal number as being the document number. Pick the first 7 digits only. You can also pick up to the first space.

Reply all
Reply to author
Forward
0 new messages