Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PP-Structure 加载其他模型 #7975

Closed
JackMeiLong opened this issue Oct 18, 2022 · 4 comments
Closed

PP-Structure 加载其他模型 #7975

JackMeiLong opened this issue Oct 18, 2022 · 4 comments
Assignees

Comments

@JackMeiLong
Copy link

image

你好,基于PP-Structure 和layout parser 进行版面分析,如何加载其他模型?比如 picodet_lcnet_x1_0_fgd_layout_cdla,
model = lp.PaddleDetectionLayoutModel(model_path="./picodet_lcnet_x1_0_fgd_layout_cdla/",...) 通过这种方式加载本地模型,报错显示 Cannot open file ./picodet_lcnet_x1_0_fgd_layout_cdla/inference.pdmodel,求解答

@an1018
Copy link
Collaborator

an1018 commented Oct 18, 2022

V2版本不再使用lp.*,目前有2种方式,
1)下载PaddleDetection代码,参考这个文档进行推理
2)使用paddllocr whl包预测

@JackMeiLong
Copy link
Author

你好
使用paddleocr whl 包预测, 针对 版面分析, 如何在原图上绘制关键区域,如文字、标题、表格、图片等?
image

@an1018
Copy link
Collaborator

an1018 commented Oct 19, 2022

重新安装paddleocr whl包,运行代码,可视化结果会存储在save_folder子文件夹内

@LeonWang91
Copy link

想请问可以使用CDLA的预训练模型直接去运行版面分析测试的命令吗,我也报了上面类似的错误
错误如下:
image
命令如下:
python3 tools/infer.py -c configs/picodet/legacy_model/application/layout_analysis/picodet_lcnet_x1_0_layout.yml --slim_config configs/picodet/legacy_model/application/layout_analysis/picodet_lcnet_x2_5_layout.yml -o weights='/data_1/wangl/LeiWang/Projects/PaddleOCR/pretrained_model/picodet_lcnet_x1_0_fgd_layout_cdla.pdparams' --infer_img='/data_1/wangl/LeiWang/Projects/PaddleOCR/dataset/1.jpg' --output_dir=/data_1/wangl/LeiWang/Projects/PaddleOCR/output/ --draw_threshold=0.5

我只替换了weights的内容,没有更改配置文件,好像也没有找到CDLA的配置文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants