Comments (10)
- 建议安装paddle1.7 吧,目前还没适配paddle1.8
安装请参考:https://paddlepaddle.org.cn/install/quick - 报错信息在 tools/export_model.py, 这个是生成inference 模型的脚本,是不是生成的model和params文件有问题,也麻烦提供下你运行的指令吧
from paddleocr.
@LDOUBLEV 我的运行指令如下:
python3 tools/export_model.py -c configs/rec/rec_r34_vd_tps_bilstm_ctc.yml -o Global.checkpoints=./ch_lite/ec_r34_vd_tps_bilstm_ctc/best_accuracy
Global.save_inference_dir=./inference/rec/rec_r34_vd_tps_bilstm_ctc/
在/inference/rec/rec_r34_vd_tps_bilstm_ctc/ 成功生成了model和params文件。
from paddleocr.
在使用带tps的模型进行预测时,请添加参数 --rec_image_shape="3, 32, 100" --rec_char_type="en"
后续我们会优化模型,简化预测过程,感谢使用
from paddleocr.
@tink2123 你好 我已经设置了相同的参数,并且更换了预测图片(英文),安装了paddlepaddle1.7.2,但是还是报了相同的错误。按照相同的方法下载了rec_crnn.tar,转化成iinference的model和params之后,就能预测成功。
from paddleocr.
预测时添加参数也报错吗? 预测时的命令可以发一下吗?
from paddleocr.
@tink2123 这是我预测命令。帖子的错误就是加载rec_r34_vd_tps_bilstm_ctc模型的时候报错的,但是加载rec_crnn就能预测成功。
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/" --det_model_dir="./inference/det/" --rec_model_dir="./inference/rec/"
from paddleocr.
在使用带tps的模型进行预测时,请添加参数 --rec_image_shape="3, 32, 100" --rec_char_type="en"
请试一下这个命令:
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/" --det_model_dir="./inference/det/" --rec_model_dir="./inference/rec/" --rec_image_shape="3, 32, 100" --rec_char_type="en"
rec_crnn 模型中没有grid_sampler这个op,所以没有影响。
from paddleocr.
@tink2123 已经成功了,谢谢你!我原本只是在rec_r34_vd_tps_bilstm_ctc.yml中修改参数,并且在utility中的 parser.add_argument中添加default路径,直接运行predict_system的,没注意修改rec_image_shape和rec_char_type的默认值。另外多问一句,这个模型只能预测英文小写字母和数字,是吧?
from paddleocr.
是的,目前发布的模型中,除了9m轻量级模型外,都只能预测英文。需要的话,您可以使用自己的中文数据训练后进行预测。
from paddleocr.
@tink2123 好的 非常感谢!
from paddleocr.
Related Issues (20)
- ppocrv4 检测模型转tensorrt性能下降严重(着急) HOT 5
- ModuleNotFoundError: No module named 'paddle' HOT 2
- 手写数学公式识别算法-CAN-使用样例代码也无法识别 HOT 9
- paddleocr模型训练 HOT 2
- 字符间距大跟空格很像,造成空白区域被误识别成错误字符,如何解决? HOT 1
- pdf中原文放到txt中会比普通字符矮一些的非正常字符是什么字符?怎么转换成正常字符? HOT 2
- hubserving部署structure_table效果比通用表格识别差不少 HOT 1
- PP-OCRv4在线体验版使用离线推理的效果不一致 HOT 4
- 使用GPU时检测不到文字但CPU可以 HOT 9
- paddle 开启GPU以后 速度比 use-gpu=false更慢 HOT 3
- PPOCRv4_det检测模型训练,已经跑了350个epoch,hmean仍然维持在0.05-0.1不上升 HOT 8
- 运行demo报错 HOT 4
- batch 推理文本检测 HOT 4
- Mimalloc引起ppocr推理崩溃 HOT 2
- [Announcement] PaddleOCR PMC Officially Established
- How to disable .paddleocr directory creation? HOT 1
- GPU运行版面恢复未正常运行 HOT 4
- 使用合成数据集进行训练,数据集标注全数字训练,识别出汉字 HOT 5
- GPU运行版面恢复未正常运行 HOT 1
- Server-side C++ Inference error
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 paddleocr.