|
@@ -93,6 +93,9 @@ class UniversalPaddleToPyTorchConverter:
|
|
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
|
|
|
|
|
|
if result.returncode != 0:
|
|
if result.returncode != 0:
|
|
|
|
|
+ print(f"命令: {cmd}")
|
|
|
|
|
+ print(f"输出stdout: {result.stdout}\n")
|
|
|
|
|
+ print(f"输出stderr: {result.stderr}\n")
|
|
|
raise RuntimeError(f"Paddle2ONNX 转换失败:\n{result.stderr}")
|
|
raise RuntimeError(f"Paddle2ONNX 转换失败:\n{result.stderr}")
|
|
|
|
|
|
|
|
print(f" ✅ ONNX已保存: {onnx_output_path}")
|
|
print(f" ✅ ONNX已保存: {onnx_output_path}")
|
|
@@ -163,8 +166,9 @@ def batch_convert_all_models():
|
|
|
|
|
|
|
|
MODELS = [
|
|
MODELS = [
|
|
|
# ("PicoDet_layout_1x", "Layout"),
|
|
# ("PicoDet_layout_1x", "Layout"),
|
|
|
- ("PP-LCNet_x1_0_doc_ori", "Layout"),
|
|
|
|
|
- ("RT-DETR-H_layout_17cls", "Layout"),
|
|
|
|
|
|
|
+ # ("PP-LCNet_x1_0_doc_ori", "Layout"),
|
|
|
|
|
+ # ("RT-DETR-H_layout_17cls", "Layout"),
|
|
|
|
|
+ ("PP-DocLayout_plus-L", "Layout"),
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
base_dir = Path("~/.paddlex/official_models").expanduser()
|
|
base_dir = Path("~/.paddlex/official_models").expanduser()
|