PP-StructureV3 开启高性能模式转onnx 报错和找不到hpi_model_info_collection.json

报错内容:

Model files already exist. Using cached files. To redownload, please delete the directory manually: `/home/fugubiao/.paddlex/official_models/SLANet_plus`.

Bucketed engine_config has no entry for resolved engine 'hpi'; using an empty config for that engine.

Automatically converting PaddlePaddle model to ONNX format

Inference backend: onnxruntime

Inference backend config: cpu_num_threads=10

...

RuntimeError: Node (Loop.0) Op (Loop) TypeInferenceError Graph attribute inferencing failed: Node:Loop.0 Output:p2o.pd_op.logical_and.0.0 ShapeInferenceError Mismatch between number of inferred and declared dimensions. inferred=1 declared=0

因为开启高性能模式enable_hpi=True 时会将模型转为onnx格式,这里的表格模型在转为onnx时候会报错。

我 的做法我在网上找已经转好onnx的模型打补丁。

在RapidTable · 模型库

中存在我需要的模型:slanet-plus.onnx

至于这个模型的名称是你指定的哪一个:

python 复制代码
pipeline = PPStructureV3(
        wired_table_structure_recognition_model_name="SLANet_plus")

你也可以手动复制入C:/Users/你的用户名/.paddlex/official_models/SLANet_plus

我是在docker-compose.yaml直接丢进去。

python 复制代码
volumes:
      - ./patches/models/SLANet_plus/inference.onnx:/root/.paddlex/official_models/SLANet_plus/inference.onnx 

另外我相信有一部分人会遇到缺失hpi_model_info_collection.json的错误:

FileNotFoundError: Errno 2 No such file or directory: '/home/fugubiao/app/anaconda3/envs/paddle310/lib/python3.10/site-packages/paddlex/inference/models/runners/hpi/hpi_model_info_collection.json'

在官方PaddleX将源码down下来,一样打补丁就好了

python 复制代码
volumes:
      - ./patches/runners:/usr/local/lib/python3.10/site-packages/paddlex/inference/models/runners

最后吐槽一下Paddlex 缺失这些文件真的很致命。

相关推荐
开开心心就好8 小时前
超市定时播音软件,免费版支持循环播放
智能手机·ffmpeg·ocr·word·vim·音视频·visual studio
AI视觉网奇1 天前
手写ocr 算法合集
ocr
楚识科技3 天前
合同比对全流程自动化:OCR识别+差异比对+法律风险字段抽取实战指南
运维·自动化·ocr
楚识科技3 天前
手写表格OCR接口接入全指南:实战调用与结构化字段解析
ocr
VidDown3 天前
从视频画面里提取文字:OCR、文字检测与结构化输出
python·网络协议·ocr·音视频·视频编解码·视频
一马平川的大草原3 天前
pdf转md的三种方式
pdf·ocr·md
zhoupenghui1683 天前
复杂PDF与扫描件解析存储实战:文本、图片OCR、表格识别及RAG向量入库全流程
pdf·ocr·复杂pdf解析
楚识科技10 天前
电力电网 OCR 落地实践:轻量级模型 CPU 推理与鲲鹏 + 昇腾信创适配
ocr
巡山小钻风来也12 天前
【保姆级教程】自定义数据集微调PP-OCRv6文本检测模型
python·ocr·paddlepaddle
山顶夕景13 天前
【文档解析】2026年技术发展和趋势
ocr·文档解析·agentic