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

推理ocr时候出现错误 #198

Closed
wangning7149 opened this issue Jun 12, 2020 · 3 comments
Closed

推理ocr时候出现错误 #198

wangning7149 opened this issue Jun 12, 2020 · 3 comments

Comments

@wangning7149
Copy link

运行,命令 python tools/infer/predict_system.py --image_dir="./doc/imgs/4.jpg" --det_model_dir="./inference/det_db/" --rec_model_dir="./inference/rec_crnn/"时,出现以下错误:

Traceback (most recent call last):
File "tools/infer/predict_system.py", line 115, in
dt_boxes, rec_res = text_sys(img)
File "tools/infer/predict_system.py", line 78, in call
rec_res, elapse = self.text_recognizer(img_crop_list)
File "/home/wn/projects/PaddleOCR-develop/tools/infer/predict_rec.py", line 82, in call
self.predictor.zero_copy_run()
paddle.fluid.core_avx.EnforceNotMet:


C++ Call Stacks (More useful to developers):

0 std::string paddle::platform::GetTraceBackString<char const*>(char const*&&, char const*, int)
1 paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int)
2 paddle::operators::math::FCFunctor<paddle::platform::CUDADeviceContext, float>::operator()(paddle::platform::CUDADeviceContext const&, int, int, int, float const*, float const*, float*, float const*, bool, bool)
3 paddle::operators::FCOpKernel<paddle::platform::CUDADeviceContext, float>::Compute(paddle::framework::ExecutionContext const&) const
4 std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<paddle::platform::CUDAPlace, false, 0ul, paddle::operators::FCOpKernel<paddle::platform::CUDADeviceContext, float>, paddle::operators::FCOpKernel<paddle::platform::CUDADeviceContext, double> >::operator()(char const*, char const*, int) const::{lambda(paddle::framework::ExecutionContext const&)#1}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&)
5 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&, paddle::framework::RuntimeContext*) const
6 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const
7 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&)
8 paddle::framework::NaiveExecutor::Run()
9 paddle::AnalysisPredictor::ZeroCopyRun()


Error Message Summary:

Error: An error occurred here. There is no accurate error hint for this error yet. We are continuously in the process of increasing hint for this kind of error check. It would be helpful if you could inform us of how this conversion went by opening a github issue. And we will resolve it with high priority.

请问是什么原因呢?

@LDOUBLEV
Copy link
Collaborator

LDOUBLEV commented Jun 12, 2020

像是cuda的问题,可以试下能否在CPU上运行:

python tools/infer/predict_system.py --image_dir="./doc/imgs/4.jpg" --det_model_dir="./inference/det_db/" --rec_model_dir="./inference/rec_crnn/" --use_gpu=False

你安装的是哪个版本的paddle,可否尝试Paddle 1.7.0, Paddle 1.7.2;

另外确认下你的cuda版本和机器的显卡以及cudnn版本是否匹配吧!

如果可以的话,建议直接使用我们提供的docker镜像

@wangning7149
Copy link
Author

像是cuda的问题,可以试下能否在CPU上运行:
python tools/infer/predict_system.py --image_dir="./doc/imgs/4.jpg" --det_model_dir="./inference/det_db/" --rec_model_dir="./inference/rec_crnn/" --use_gpu=False

你安装的是哪个版本的paddle,可否尝试Paddle 1.7.0, Paddle 1.7.2;
另外确认下你的cuda版本和机器的显卡以及cudnn版本是否匹配吧!
如果可以的话,建议直接使用我们提供的docker镜像

cpu 运行是可以的。
paddle版本:paddlepaddle-gpu 1.7.2.post107
CUDA版本:CUDA Version 10.1.243
cudnn版本:
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 4

#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

显卡:RTX-2080

@dyning dyning closed this as completed Jul 30, 2020
@henuliulei
Copy link

请问解决了吗

an1018 pushed a commit to an1018/PaddleOCR that referenced this issue Aug 17, 2022
add libra rcnn, including
  * libra loss
  * libra fpn(bfp)
  * libra sampling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants