synthtiger
synthtiger copied to clipboard
synthtiger can't render text that contain '\u200c'
i was trying to generate bangla text recognition synthetic dataset using synthtiger like this : https://github.com/clovaai/synthtiger/issues/25 i was able to generate many samples but sometimes it is failing by giving me this error :
Traceback (most recent call last):
File "/home/apsisdev/.local/lib/python3.8/site-packages/synthtiger/gen.py", line 71, in _generate
data = template.generate()
File "/home/apsisdev/mobassir/bnsynthtiger/examples/synthtiger/template.py", line 109, in generate
fg_image, label = self._generate_fg(fg_color, fg_style)
File "/home/apsisdev/mobassir/bnsynthtiger/examples/synthtiger/template.py", line 182, in _generate_fg
font = self.font.sample({"text": text, "vertical": self.vertical})
File "/home/apsisdev/.local/lib/python3.8/site-packages/synthtiger/components/font/base_font.py", line 51, in sample
path = meta.get("path", self._sample_font(text))
File "/home/apsisdev/.local/lib/python3.8/site-packages/synthtiger/components/font/base_font.py", line 134, in _sample_font
raise RuntimeError(
RuntimeError: There is no font that can render text 'র্যাডিসনে': /home/apsisdev/mobassir/bnsynthtiger/resources/font/bn
few more samples for what i got same error above :
- 'শুনি—বাংলাদেশি'
- 'কর্যা'
- 'জাতীয়'
- 'র্যাম্পের'
- 'র্যাব-পুলিশ'
- 'র্যাগিংয়ের'
text = 'র্যাব-পুলিশ'
[i for i in text]
we checked the failed samples with the code above, seems like synthtiger is not able to render words that contain '\u200c' not sure if there are any other failure cases though.