crnn.pytorch icon indicating copy to clipboard operation
crnn.pytorch copied to clipboard

crnn实现水平和垂直方向中文文字识别, 提供在3w多个中文字符训练的水平识别和垂直识别的预训练模型; 欢迎关注,试用和反馈问题... ...

Results 21 crnn.pytorch issues
Sort by recently updated
recently updated
newest added

字符集中有的字符例如\u3000在python下没法显示报错,怎么去掉?微信nlanguage File "F:\pycharm2020.2\crnn\utils\aftertreatment.py", line 26, in text = [self.dict[char] for [char] in text] KeyError: ' '

win10直接运行train.py 报错。微信nlanguage C:\Users\Ni\AppData\Local\Programs\Python\Python38\python.exe F:/pycharm2020.2/crnn.pytorch_generator/train_Sentence.py Namespace(batch_size=32, device='cuda', direction='horizontal', dist_backend='nccl', dist_url='env://', distributed=False, epochs=1, init_epoch=0, local_rank=0, lr=0.01, lr_gamma=0.1, lr_step_size=30, momentum=0.9, output_dir='./output', sync_bn=False, weight_decay=1e-05, workers=4, world_size=1) 0%| | 0/95804 [00:47

我在all words.txt里放了10个汉字,尝试运行generator.py,报了以下错误,怎么解决?微信nlanguage Traceback (most recent call last): File "F:/pycharm2020.2/crnn.pytorch_generator/generator.py", line 227, in test_image_gen('horizontal') File "F:/pycharm2020.2/crnn.pytorch_generator/generator.py", line 207, in test_image_gen im, indices, target_len = gen.gen_image() File "F:/pycharm2020.2/crnn.pytorch_generator/generator.py", line 158, in gen_image...

我尝试用cpu训练。报错了,怎么解决?微信nlanguage 。 py -3 train.py --direction horizontal L:\trocr\crnn.pytorch-master>py -3 train.py --direction horizontal Namespace(batch_size=64, device='cpu', direction='horizontal', dist_backend='nccl', dist_url='env://', distributed=False, epochs=90, init_epoch=0, local_rank=0, lr=0.01, lr_gamma=0.1, lr_step_size=30, momentum=0.9, output_dir='./output', sync_bn=False, weight_decay=1e-05, workers=4, world_size=1)...

有同学接着楼主的模型训练吗?为啥我训练后一直是INF呀。。。调小了学习率也没用。。。

楼主楼主 报错如下: 90 x = self.cnn(x) # [B,512,W/16,1] 91 x = torch.squeeze(x, 3) # [B,512,W] ---> 92 x = x.permute([0, 2, 1]) # [B,W,512] 93 x, h1 = self.rnn1(x) 94...

印刷体图片二值化后,数字识别效果不是很好,请问有解决办法吗?

请教个问题:eth0这里指的是第一块网卡的IP吗?

hi,great code. Thanks for sharing. 在训练过程中,发现了一个地方有些疑问。 在数据生成的代码中有一些疑问, 在gernerator.py 的 line 180,这里需要随机生成文字。但是看到这里的逻辑确实从所有font文件中加载所有字符,而不是使用Generaotr初始化时传入的字典(self.alpha)。这个可能会导致不能更换字符集的问题。 ` def gen_image(self): idx = np.random.randint(len(self.max_len_list)) image = self.gen_background() image = image.astype(np.uint8) target_len = int(np.random.uniform(self.min_len, self.max_len_list[idx], size=1)) # 随机选择size,font...