Attention-OCR icon indicating copy to clipboard operation
Attention-OCR copied to clipboard

Does it support special ascii characters ?

Open hskzlj opened this issue 7 years ago • 2 comments

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?

hskzlj avatar Jun 08 '18 04:06 hskzlj

Hey did you find the solution?

rahuladream avatar Feb 13 '20 11:02 rahuladream

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"

vadimen avatar Feb 04 '21 10:02 vadimen