A synthetic text image pair generator for OCR
install the required dependencies first
pip install -r requirements.txt
Launch the web app interface
streamlit run tig.py
It will automatically launch the instance on the browser, if not click on the local URL in terminal
Below interface will pop up!
Upload the Text/CSV/Excel file containing sentences or words, Below is a sample of text file containing words
Set the image width, image height (in pixels) and the number of image to be generated
The generated images will be stored in the output_images directory and a data.csv file containing the image name, text, font size, font file and word count as shown Below
All languages are supported 🥳 just use the proper font files.
The app will choose the fonts randomly, if you want to use only a single specific font then download and paste it into the font_files directory
supported font formats include: ttf, otf, woff, woff2, eot and pfb
Note: Changing the font also changes the images created per second
Font | Speed |
---|---|
Lohit-Devanagari | 15-16 it/s |
Gargi | 17-18 it/s |
Sura unicode | 11-12 it/s |
akshra unicode | 4-5 it/s |
Kurti dev 010 | 50-55 it/s |
aakar regular | 50-55 it/s |
freesansbold | 9-10 it/s |
Nakula | 8-9 it/s |