You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/xxxx/miniconda3/envs/py310/lib/python3.10/site-packages/paddle/utils/cpp_extension/extension_utils.py:711: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
85
-
warnings.warn(warning_message)
86
-
[Paddle2ONNX] Start parsing the Paddle model file...
87
-
[Paddle2ONNX] Use opset_version = 14 for ONNX export.
88
-
[Paddle2ONNX] PaddlePaddle model is exported as ONNX format now.
89
-
2025-05-26 11:20:46 [INFO] Try to perform constant folding on the ONNX model with Polygraphy.
90
-
[W] 'colored' module is not installed, will not use colors when logging. To enable colors, please install the 'colored' module: python3 -m pip install colored
91
-
[I] Folding Constants | Pass 1
92
-
[W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored
93
-
[W] Inference failed. You may want to try enabling partitioning to see better results. Note: Error was:
94
-
[ONNXRuntimeError] : 1 : FAIL : /Users/runner/work/1/s/onnxruntime/core/graph/model.cc:182 onnxruntime::Model::Model(ModelProto &&, const PathString &, const IOnnxRuntimeOpSchemaRegistryList *, const logging::Logger &, const ModelOptions &) Unsupported model IR version: 11, max supported IR version: 10
95
-
[I] Total Nodes | Original: 925, After Folding: 612 | 313 Nodes Folded
96
-
[I] Folding Constants | Pass 2
97
-
[W] colored module is not installed, will not use colors when logging. To enable colors, please install the colored module: python3 -m pip install colored
98
-
[W] Inference failed. You may want to try enabling partitioning to see better results. Note: Error was:
99
-
[ONNXRuntimeError] : 1 : FAIL : /Users/runner/work/1/s/onnxruntime/core/graph/model.cc:182 onnxruntime::Model::Model(ModelProto &&, const PathString &, const IOnnxRuntimeOpSchemaRegistryList *, const logging::Logger &, const ModelOptions &) Unsupported model IR version: 11, max supported IR version: 10
100
-
[I] Total Nodes | Original: 612, After Folding: 612 | 0 Nodes Folded
101
-
2025-05-26 11:20:52 [INFO] ONNX model saved in models/PP-OCRv5_mobile_det/inference.onnx.
[Paddle2ONNX] Start parsing the Paddle model file...
91
+
[Paddle2ONNX] Use opset_version = 14 for ONNX export.
92
+
[Paddle2ONNX] PaddlePaddle model is exported as ONNX format now.
93
+
2025-05-26 21:53:00 [INFO] Try to perform constant folding on the ONNX model with Polygraphy.
94
+
[W] 'colored' module is not installed, will not use colors when logging. To enable colors, please install the 'colored' module: python3 -m pip install colored
95
+
[I] Folding Constants | Pass 1
96
+
[I] Total Nodes | Original: 925, After Folding: 502 | 423 Nodes Folded
97
+
[I] Folding Constants | Pass 2
98
+
[I] Total Nodes | Original: 502, After Folding: 502 | 0 Nodes Folded
99
+
2025-05-26 21:53:08 [INFO] ONNX model saved in models/PP-OCRv5_mobile_det/inference.onnx.
100
+
Paddle2ONNX conversion succeeded
101
+
Copied models/official_models/PP-OCRv5_mobile_det/inference.yml to models/PP-OCRv5_mobile_det/inference.yml
File "/Users/xxxx/miniconda3/envs/py310/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 550, in _create_inference_session
[Paddle2ONNX] Start parsing the Paddle model file...
123
+
[Paddle2ONNX] Use opset_version = 14 for ONNX export.
124
+
[Paddle2ONNX] PaddlePaddle model is exported as ONNX format now.
125
+
2025-05-26 21:43:10 [INFO] Try to perform constant folding on the ONNX model with Polygraphy.
126
+
[W] 'colored' module is not installed, will not use colors when logging. To enable colors, please install the 'colored' module: python3 -m pip install colored
127
+
[I] Folding Constants | Pass 1
128
+
[I] Total Nodes | Original: 1306, After Folding: 596 | 710 Nodes Folded
129
+
[I] Folding Constants | Pass 2
130
+
[I] Total Nodes | Original: 596, After Folding: 596 | 0 Nodes Folded
131
+
2025-05-26 21:43:21 [INFO] ONNX model saved in models/PP-OCRv5_server_det/inference.onnx.
132
+
Paddle2ONNX conversion succeeded
133
+
Copied models/official_models/PP-OCRv5_server_det/inference.yml to models/PP-OCRv5_server_det/inference.yml
134
+
Done
135
+
```
140
136
141
-
=== 方案一
137
+
### 3. 模型推理验证
142
138
143
-
安装`onnx==1.16.0`,然后再次尝试转换。我这里实际测过,的确可以成功转换。
139
+
=== "验证PP-OCRv5_mobile_det模型"
144
140
145
-
=== 方案二
141
+
该部分主要是在RapidOCR项目中测试能否直接使用onnx模型。要点主要是确定模型前后处理是否兼容。从PaddleOCR config文件中比较[PP-OCRv4](https://github.com/PaddlePaddle/PaddleOCR/blob/549d83a88b7c75144120e6ec03de80d3eb9e48a5/configs/det/PP-OCRv4/PP-OCRv4_mobile_det.yml)和[PP-OCRv5 mobile det](https://github.com/PaddlePaddle/PaddleOCR/blob/549d83a88b7c75144120e6ec03de80d3eb9e48a5/configs/det/PP-OCRv5/PP-OCRv5_mobile_det.yml)文件差异:
该部分主要是在RapidOCR项目中测试能否直接使用onnx模型。要点主要是确定模型前后处理是否兼容。从PaddleOCR config文件中比较[PP-OCRv4](https://github.com/PaddlePaddle/PaddleOCR/blob/549d83a88b7c75144120e6ec03de80d3eb9e48a5/configs/det/PP-OCRv4/PP-OCRv4_mobile_det.yml)和[PP-OCRv5 mobile det](https://github.com/PaddlePaddle/PaddleOCR/blob/549d83a88b7c75144120e6ec03de80d3eb9e48a5/configs/det/PP-OCRv5/PP-OCRv5_mobile_det.yml)文件差异:
0 commit comments