da03 / Attention-OCR

Visual Attention based OCR
MIT License
1.12k stars 363 forks source link

Does it support special ascii characters ? #82

Open hskzlj opened 6 years ago

hskzlj commented 6 years ago

Traceback (most recent call last):

File "src/launcher.py", line 146, in main(sys.argv[1:], exp_config.ExpConfig) File "src/launcher.py", line 143, in main model.launch() File "/test/data/dl/ocr/Attention-OCR/src/model/model.py", line 224, in launch for batch in self.s_gen.gen(self.batch_size): File "/test/data/dl/ocr/Attention-OCR/src/data_util/data_gen.py", line 71, in gen img_bw, word = self.read_data(img_path, lex) File "/test/data/dl/ocr/Attention-OCR/src/data_util/data_gen.py", line 122, in read_data assert 96 < ord(c) < 123 or 47 < ord(c) < 58 AssertionError

Can it be modified to ignore it?

rahuladream commented 4 years ago

Hey did you find the solution?

vadimen commented 3 years ago

you should find what id your special symbol has in unicode table, then you can do something like: "assert 96 < ord(c) < 123 or 47 < ord(c) < 58 or ord(c) == you_symbol_id"