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

PaddleOCR C++多线程推理 #11150

Open
yjszyd0813 opened this issue Oct 28, 2023 · 3 comments
Open

PaddleOCR C++多线程推理 #11150

yjszyd0813 opened this issue Oct 28, 2023 · 3 comments
Assignees
Labels

Comments

@yjszyd0813
Copy link

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

  • 系统环境/System Environment:CPU 12th Gen Intel(R) Core(TM) i7-12700H GPU Nvidia 3060 6G
  • 版本号/Version:Paddle:2.4.2 PaddleOCR:2.6.2 问题相关组件/Related components:PaddleOCR C++部署
  • 运行指令/Command Code:
  • 完整报错/Complete Error Message: 使用GPU 多线程推理模型时, paddle_inference.dll 提示错误。

我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide AceIssueSolver to solve issues, do you want it? (Please write yes/no): yes

问题:使用PaddleOCR C++部署,通过多次初始化PPOCR生成多个模型,可以直接用多线程推理多个模型吗? 我目前测试,使用一个模型推理,是正常可以的。初始化多个PPOCR对象,生成的多个模型,进行多线程推理,只有一个线程是可以用的。其他线程,都是无法正常推理的。怎么样修改PaddleOCR C++的源码,可以快速用于多线程推理。还是只能用Paddle_inference中的提到的Clone(),复制多份模型,重写推理函数Run()。

@yjszyd0813
Copy link
Author

我使用Paddle的FastDeploy中的多线程Demo,直接多线程运行,也报错呀。是Demo有问题,还是我的问题。有没有多线程的解决方案?

@XiaoDongGuoGuo
Copy link

我也遇到了多线程推理报错,单线程正常,请问您最后是怎么解决的?

Copy link
Contributor

github-actions bot commented Jan 8, 2025

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants