DayBreak-u / chineseocr_lite

超轻量级中文ocr,支持竖排文字识别, 支持ncnn、mnn、tnn推理 ( dbnet(1.8M) + crnn(2.5M) + anglenet(378KB)) 总模型仅4.7M
GNU General Public License v2.0
11.84k stars 2.26k forks source link

图片识别找不到'仿宋_GB2312.ttf' #258

Open 1826013782 opened 4 years ago

1826013782 commented 4 years ago

File "C:\Users\86157\AppData\Local\Programs\Python\Python36\lib\site-packages\PIL\ImageFont.py", line 190, in init with open(font, "rb") as f: FileNotFoundError: [Errno 2] No such file or directory: '仿宋_GB2312.ttf' ERROR:tornado.access:500 POST /api/tr-run/ (10.201.114.46) 1634.62ms

znsoftm commented 4 years ago

自己找一个嘛,目录下不是有一个吗?

znsoftm commented 4 years ago

代码根目录下就有,放到正确的位置即可。

1826013782 commented 4 years ago

嗯嗯,好的,感谢

------------------ 原始邮件 ------------------ 发件人: "ouyanghuiyu/chineseocr_lite" <notifications@github.com>; 发送时间: 2020年10月6日(星期二) 上午8:11 收件人: "ouyanghuiyu/chineseocr_lite"<chineseocr_lite@noreply.github.com>; 抄送: "迹"<1826013782@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [ouyanghuiyu/chineseocr_lite] 图片识别找不到'仿宋_GB2312.ttf' (#258)

代码根目录下就有,放到正确的位置即可。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Cylinder1 commented 3 years ago

请问是把ttf文件放到哪个位置呢

tz61 commented 3 years ago

修改 chineseocr_lite\backend\webInterface\tr_run.py 156行为字体绝对路径

ATang007 commented 3 years ago

修改 chineseocr_lite\backend\webInterface\tr_run.py 156行为字体绝对路径

请问具体的做法是什么呢?