'Is there a tool to generate different passport images with synthetic data?

We need to train and test machine learning solutions for data extraction from passports.
Extraction is done from the page containing MRZ, like the one below:

enter image description here

Is there any tool to generate passport images of different types (country of issuance, version of the document) containing synthetic data? Photo of the passport holder and the content of the fields is less relevant than the layout and the format of the document.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source