TextRecognitionDataGenerator
                                
                                 TextRecognitionDataGenerator copied to clipboard
                                
                                    TextRecognitionDataGenerator copied to clipboard
                            
                            
                            
                        Can I specify to generate a certain symbol?
Can I specify to generate a certain symbol? For example, I want to generate pictures with English and numbers and two symbols "/" and "-".
Looking forward to your reply。
From a clean pull, no, there is no option to do this. There are two possibilities
- Create a random string generator and build a dictionary built from "/" and "-".
_STRING_COUNT = 10000
_ALPHABET = "/-"
with open('my_dict.txt', 'w') as f:
    for i in range(_STRING_COUNT):
        ostr = ""
        for j in range(10):
            ostr += _ALPHABET[random.randint(0, 1)]
        f.write(ostr + "\n")
Then call it with -i my_dict.txt
- Edit the random symbol parameter string to have only the ones you want.
Then call python3 run.py -c 1000 -rs -sym