Belval / TextRecognitionDataGenerator

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

OSError: [Errno 22] Invalid argument: 'out/megaphotographic Okarche angiotonase inevitableness it"ll_3955.jpg' #196

Open nithinreddyy opened 3 years ago

nithinreddyy commented 3 years ago

trdg -c 1000000 -w 5 -f 64

When I ran the basic above command line, it's giving error like OSError: [Errno 22] Invalid argument: 'out/megaphotographic Okarche angiotonase inevitableness it"ll_3955.jpg'

Can anyone please help me with this?

Belval commented 3 years ago

This is caused but the " in the filename. You can fix it by using a different output format with -na 2. Here is the description of the format parameter: Define how the produced files will be named. 0: [TEXT]_[ID].[EXT], 1: [ID]_[TEXT].[EXT] 2: [ID].[EXT] + one file labels.txt containing id-to-label mappings.