Belval / TextRecognitionDataGenerator

A synthetic data generator for text recognition
MIT License
3.24k stars 966 forks source link

rupee symbol not appearing properly #159

Open ashit12 opened 4 years ago

ashit12 commented 4 years ago

i was trying to generate images that have the rupee symbol(₹) in them. However, the symbol does not appear properly in the images. Sometimes the symbol is there, sometimes there is a box, and other times there is nothing.

Belval commented 4 years ago

Hi!

This is caused by the rupee symbol not being part of most fonts. I would suggest building your own set of fonts and using the --font_dir option.

Hopefully that helps.

ashit12 commented 4 years ago

in the TRDG directory, as a test, I selected Aller_Bd.ttf font and generated images having the rupee symbol. How is it that for the same font, three different outcomes are seen? Should it not be the same for all cases? I am attaching the images I generated. 0 2 5

Belval commented 4 years ago

This is not the same font, can you paste the command you used to generate these?

Thank you.

ashit12 commented 4 years ago

This is the command I used - python3 run.py -c 100 -i price_inp -fd fonts/latin -ft Aller_Bd.ttf -f 60 -na 2 --output_dir sk

Belval commented 4 years ago

The -fdparameter overrides the -ft one so you want either:

-ft fonts/latin/Aller_Bd.ttf

OR

-fd fonts/your_directorywhere your_directory contains only the fonts you know support the rupee symbol.