Skip to content

rapid_layout运行出现的问题 #26

@superstyle

Description

@superstyle

请提供下述完整信息以便快速定位问题
(Please provide the following information to quickly locate the problem)

lib\site-packages\rapid_layout\utils\vis_res.py", line 35, in draw_detections
    det_img = image.copy()
AttributeError: 'str' object has no attribute 'copy'
  • 系统环境/System Environment

  • windows 10,python 3.8. 10 或3.10.11 rapid-layout 0.4.2

  • 使用的是哪门语言的程序/Which programing language

  • python

  • 所使用语言相关版本信息/Version
    python 3.8. 10 或3.10.11

  • OnnxRuntime版本/OnnxRuntime Version

  • Name: onnxruntime Version: 1.22.0

  • 可复现问题的demo/Demo of reproducible problems

import cv2
from rapid_layout import RapidLayout, VisLayout

layout_engine = RapidLayout(model_type="doclayout_docstructbench")
img="s:/temp/demo.jpg"
boxes, scores, class_names, elapse = layout_engine(img)
ploted_img = VisLayout.draw_detections(img, boxes, scores, class_names)
if ploted_img is not None:
    cv2.imwrite("layout_res.png", ploted_img)
  • 完整报错/Complete Error Message

  • 可能的解决方案/Possible solutions:

Metadata

Metadata

Assignees

No one assigned

    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