chenjun2hao / Bert_OCR.pytorch

Unofficial PyTorch implementation of 2D Attentional Irregular Scene Text Recognizer
130 stars 34 forks source link

a small question #5

Open ustczhouyu opened 4 years ago

ustczhouyu commented 4 years ago

hello, thank you for sharing the codes. I cannot understand the following line in dataset.py: out_of_char = f'[^{self.opt.character}]' self.opt.character is 0123456789abcdefghijklmnopqrstuvwxyz out_of_char is [^0123456789abcdefghijklmnopqrstuvwxyz] can you tell me what the three new characters [ ,^, and ] mean?

GaoXinJian-USTC commented 3 years ago

hello, thank you for sharing the codes. I cannot understand the following line in dataset.py: out_of_char = f'[^{self.opt.character}]' self.opt.character is 0123456789abcdefghijklmnopqrstuvwxyz out_of_char is [^0123456789abcdefghijklmnopqrstuvwxyz] can you tell me what the three new characters [ ,^, and ] mean?

This means only focu on the characters in 0123456789abcdefghijklmnopqrstuvwxyz, dont care other characters. I also study in ustc and do some research in OCR. Can I add your wechat?