Comments (5)
The real problem is the documentation being out of date. The --input_shape_dict
is a deprecated argument. The instructions here show how to do this with current versions of paddle and paddle2onnx.
To summarise the following steps worked for me for converting the Japanese text model.
Install Paddle2ONNX.
pip3 install paddlepaddle
pip3 install paddle2onnx
Convert to ONNX.
paddle2onnx --model_dir ./japan_PP-OCRv3_rec_infer/ \
--model_filename inference.pdmodel \
--params_filename inference.pdiparams \
--save_file ./japanv3-rec.onnx
Change the Input shape parameters.
python3 -m paddle2onnx.optimize --input_model japanv3-rec.onnx \
--output_model japanv3-rec.onnx --input_shape_dict "{'x':[1,3,48,320]}"
from paddleocr.
The quantitative export will quantize or prune the model parameters, making the model smaller. What is the specific error in question 4 ?
from paddleocr.
我也是 编译之后还是存在找不到参数paddle2onnx: error: unrecognized arguments: --input_shape_dict={'x':[-1,3,-1,-1]}
from paddleocr.
I get same error about unrecognized arguments on --input_shape_dict
by following the docs here
$ paddle2onnx --version
2024-05-15 17:17:51 [INFO] paddle2onnx-1.2.1 with python>=3.6, paddlepaddle>=2.0.0
$ paddle2onnx --model_dir ./japan_PP-OCRv3_rec_infer/ --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file ./japanv3-rec.onnx --opset_version 11 --input_shape_dict="{'x':[-1,3,-1,-1]}" --enable_onnx_checker True
usage: paddle2onnx [-h] [--model_dir MODEL_DIR] [--model_filename MODEL_FILENAME] [--params_filename PARAMS_FILENAME] [--save_file SAVE_FILE] [--opset_version OPSET_VERSION]
[--deploy_backend {onnxruntime,tensorrt,rknn,others}] [--save_calibration_file SAVE_CALIBRATION_FILE] [--enable_onnx_checker ENABLE_ONNX_CHECKER] [--enable_paddle_fallback ENABLE_PADDLE_FALLBACK]
[--version] [--enable_auto_update_opset ENABLE_AUTO_UPDATE_OPSET] [--external_filename EXTERNAL_FILENAME] [--export_fp16_model EXPORT_FP16_MODEL] [--custom_ops CUSTOM_OPS]
paddle2onnx: error: unrecognized arguments: --input_shape_dict={'x':[-1,3,-1,-1]}
from paddleocr.
您好,问题超过一周未回复将关闭。如有问题可重开issue.
from paddleocr.
Related Issues (20)
- svtr UIM:无标注数据挖掘方案吗,这个在训练时是要怎么弄?如果我用普通图片+label有什么影响吗?
- paddleocr Out of memory error HOT 4
- 使用paddle-ocr和PyMuPDF识别PDF文件的问题 HOT 4
- 表格识别的几个问题,希望有负责的这部分功能的大佬可以帮忙解答!!! HOT 1
- PaddleOCR not working in a multiprocessing scenario HOT 5
- Could not load library libcublasLt.so.12. Error: libcublasLt.so.12: cannot open shared object file: No such file or directory HOT 1
- 版面分析文本块未识别 HOT 2
- 有没有更多印章数据集下载链接?能分享一下吗?谢谢 HOT 1
- Predict SER, RE KIE with my ocr HOT 3
- rec_svtrnet_ch.yml 配置训练的图片,识别报错 HOT 1
- 运行示例代码报错:FatalError: `Segmentation fault` is detected by the operating system. HOT 3
- resnet34 rec模型如何修改ctcloss以改善识别结果
- Android PP-OCRv3 HOT 2
- 按照示例Python代码。进行PDF类型的版面识别报错,但是使用命令行正常 HOT 4
- paddle2onnx现已不支持--input_shape_dict="{'x':[-1,3,x,x}"参数使用 HOT 3
- 打开TensorRT不使用动态Shape的情况下 识别速度越来越慢 HOT 2
- 运行PaddleOCR示例代码报错 TypeError: TextSystem.call() takes from 2 to 3 positional arguments but 4 were given HOT 2
- Cannot run "only" text detection HOT 1
- 自己数据集训练效果很差
- Support to load model in a local directory
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.