Skip to content

PP-DoclayoutV2模型报错 #16970

@LinSueyu

Description

@LinSueyu

🔎 Search before asking

  • I have searched the PaddleOCR Docs and found no similar bug report.
  • I have searched the PaddleOCR Issues and found no similar bug report.
  • I have searched the PaddleOCR Discussions and found no similar bug report.

🐛 Bug (问题描述)

a100环境中可以下载模型但是运行不了官方样例
拉的官方镜像 ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0-gpu-cuda12.6-cudnn9.5-trt10.5

λ localhost /workspace/code python paddleocr_test_1103.py
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
Model files already exist. Using cached files. To redownload, please delete the directory manually: /root/.paddlex/official_models/PP-DocLayoutV2.
Traceback (most recent call last):
File "/workspace/code/paddleocr_test_1103.py", line 4, in
model = LayoutDetection(model_name="PP-DocLayoutV2")
File "/usr/local/lib/python3.10/dist-packages/paddleocr/_models/_object_detection.py", line 44, in init
super().init(**kwargs)
File "/usr/local/lib/python3.10/dist-packages/paddleocr/_models/base.py", line 46, in init
self.paddlex_predictor = self._create_paddlex_predictor()
File "/usr/local/lib/python3.10/dist-packages/paddleocr/_models/base.py", line 76, in _create_paddlex_predictor
return create_predictor(
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/init.py", line 84, in create_predictor
return BasePredictor.get(model_name)(
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/object_detection/predictor.py", line 112, in init
self.pre_ops, self.infer, self.post_op = self._build()
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/object_detection/predictor.py", line 143, in _build
infer = self.create_static_infer()
File "/usr/local/lib/python3.10/dist-packages/paddlex/inference/models/base/predictor/base_predictor.py", line 302, in create_static_infer
self.model_name, self.model_dir, self.MODEL_FILE_PREFIX, self._pp_option
AttributeError: 'DetPredictor' object has no attribute '_pp_option'. Did you mean: 'pp_option'?

🏃‍♂️ Environment (运行环境)

ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:3.0.0-gpu-cuda12.6-cudnn9.5-trt10.5
PaddlePaddle 3.0.0
PaddleX 3.3.6
paddleocr 3.3.1

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

from paddleocr import LayoutDetection

model = LayoutDetection(model_name="PP-DocLayoutV2")

output = model.predict("./demo.jpg", batch_size=1, layout_nms=True)
for res in output:
res.print()
res.save_to_img(save_path="/workspace/")
res.save_to_json(save_path="/workspace/paddleocr_test.json")

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions