Comments (11)
@daixiangzi 这块之前逻辑是随机选择字体文件,然后从字体中随机选择字符;all_word.txt是全集;晚上修复一下这个问题,修复后给你消息哈。
from crnn.pytorch.
@daixiangzi 已修复此问题
from crnn.pytorch.
@daixiangzi 已修复此问题
ok,看到了,你demo.py里面的load_image处有一个bug,就是你没有考虑w=h的情况,我这边测试当图片尺寸为(75,75,1)的时候报错哟
from crnn.pytorch.
还有就是对于你生成部分代码有点疑问,就是你生成部分的逻辑是先固定背景图大小为32*512,然后再贴字上去,也就是固定尺寸的训练,但是你demo.py评估的时候仅仅只是把resize到了32,然后对w做同比例resize,我在想这是不是和训练不一致哇,难道不应该同样resize到32,512么
from crnn.pytorch.
@daixiangzi 你好,训练时宽度必须固定;模型本身是识别不定长文本的,不是识别固定长度512;
from crnn.pytorch.
@daixiangzi 你好,训练时宽度必须固定;模型本身是识别不定长文本的,不是识别固定长度512;
那识别的时候就只用把h压缩到32,就行吗
from crnn.pytorch.
@daixiangzi 是的
from crnn.pytorch.
@daixiangzi 是的
麻烦看看刚才的错误哇,输入为(75,75,1)的时候报错维度不匹配
from crnn.pytorch.
@daixiangzi 特殊情况,没有考虑到,如果确定是水平或垂直方向,就直接用水平或垂直模型;不使用长度和宽度比例来判断;
from crnn.pytorch.
@daixiangzi 特殊情况,没有考虑到,如果确定是水平或垂直方向,就直接用水平或垂直模型;不使用长度和宽度比例来判断;
ok,知道了,谢谢
from crnn.pytorch.
@daixiangzi 已修复此问题
为什么我运行还是报这个错误?微信nlanguage
C:\Users\Ni\AppData\Local\Programs\Python\Python38\python.exe F:\Pycharm_Community_2020.2.4_Portable\plugins\python-ce\helpers\pydev\pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 57258 --file F:/pycharm2020.2/crnn.pytorch_generator/generator_LineSentence.py
pydev debugger: process 160356 is connecting
Connected to pydev debugger (build 202.8194.15)
嬖ㄕ袄肉论鋈佳②孟袭獍桷怙眚裴㈡睫伯钏奈萃曝
30
660
Traceback (most recent call last):
File "F:\Pycharm_Community_2020.2.4_Portable\plugins\python-ce\helpers\pydev\pydevd.py", line 1448, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "F:\Pycharm_Community_2020.2.4_Portable\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "F:/pycharm2020.2/crnn.pytorch_generator/generator_LineSentence.py", line 233, in
test_image_gen('horizontal')
File "F:/pycharm2020.2/crnn.pytorch_generator/generator_LineSentence.py", line 213, in test_image_gen
im, indices, target_len = gen.gen_image()
File "F:/pycharm2020.2/crnn.pytorch_generator/generator_LineSentence.py", line 176, in gen_image
indices = np.array([self.alpha.index(c) for c in text])
File "F:/pycharm2020.2/crnn.pytorch_generator/generator_LineSentence.py", line 176, in
indices = np.array([self.alpha.index(c) for c in text])
ValueError: substring not found
Process finished with exit code 1
from crnn.pytorch.
Related Issues (20)
- 请教一下如何训练自己的数据集,数据格式以及存放目录怎么配置 HOT 2
- 问下,你验证集上,acc可以大概达到多少 HOT 4
- 下载目录无权限 HOT 2
- hi,thank you for the great codes. But I have met some problems. I just download the code, and run using distribute training mode, HOT 7
- 训练数据怎么生成的? HOT 11
- 请教 HOT 15
- 请教*2 HOT 2
- training data generation HOT 3
- result output confidence
- 单卡和多卡设置问题 HOT 1
- 印刷体纯数字识别效果不是太好,有解决办法吗?
- number of dims don't match in permute HOT 1
- 是否可以修改预训练模型的输出层后进行迁移学习呢?
- 接着预训练模型接着训练一直是inf? HOT 3
- 这个不可以转ONNX测试吧
- 我尝试用cpu训练。报错了,怎么解决?微信nlanguage 。 py -3 train.py --direction horizontal
- 我在all words.txt里放了10个汉字,尝试运行generator.py,报了以下错误,怎么解决?微信nlanguage Traceback (most recent call last): File "F:/pycharm2020.2/crnn.pytorch_generator/generator.py", line 227, in <module> 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 text = np.random.choice(FONT_CHARS_DICT[font_path], target_len) File "mtrand.pyx", line 908, in numpy.random.mtrand.RandomState.choice ValueError: 'a' cannot be empty unless no samples are taken
- win10直接运行train.py 报错。微信nlanguage ForkingPickler(file, protocol).dump(obj) TypeError: cannot pickle 'Font' object HOT 1
- 字符集中有的字符例如\u3000在python下没法显示报错,怎么去掉?微信nlanguage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crnn.pytorch.