执行通用模型识别时报错
Created by: thugbobby
当我使用如下命令时:
python3 tools/infer/predict_system.py --image_dir="/opt/tmp/fb_1100.jpg" --det_model_dir="./inference/ch_det_r50_vd_db/" --rec_model_dir="./inference/ch_rec_r34_vd_crnn/" --use_gpu=False
报如下错误:
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
dt_boxes num : 39, elapse : 5.222558975219727
Traceback (most recent call last):
File "tools/infer/predict_system.py", line 172, in <module>
main(utility.parse_args())
File "tools/infer/predict_system.py", line 137, in main
dt_boxes, rec_res = text_sys(img)
File "tools/infer/predict_system.py", line 94, in __call__
rec_res, elapse = self.text_recognizer(img_crop_list)
File "/home/PaddleOCR/tools/infer/predict_rec.py", line 114, in __call__
self.predictor.run([norm_img_batch])
paddle.fluid.core_avx.EnforceNotMet:
--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
0 std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&, char const*, int)
1 paddle::memory::detail::AlignedMalloc(unsigned long)
2 paddle::memory::detail::CPUAllocator::Alloc(unsigned long*, unsigned long)
3 paddle::memory::detail::BuddyAllocator::RefillPool(unsigned long)
4 paddle::memory::detail::BuddyAllocator::Alloc(unsigned long)
5 void* paddle::memory::legacy::Alloc<paddle::platform::CPUPlace>(paddle::platform::CPUPlace const&, unsigned long)
6 paddle::memory::allocation::NaiveBestFitAllocator::AllocateImpl(unsigned long)
7 paddle::memory::allocation::AllocatorFacade::Alloc(paddle::platform::Place const&, unsigned long)
8 paddle::memory::allocation::AllocatorFacade::AllocShared(paddle::platform::Place const&, unsigned long)
9 paddle::memory::AllocShared(paddle::platform::Place const&, unsigned long)
10 paddle::framework::Tensor::mutable_data(paddle::platform::Place const&, paddle::framework::proto::VarType_Type, unsigned long)
11 paddle::operators::ElementwiseAddKernel<paddle::platform::CPUDeviceContext, float>::Compute(paddle::framework::ExecutionContext const&) const
12 std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<paddle::platform::CPUPlace, false, 0ul, paddle::operators::ElementwiseAddKernel<paddle::platform::CPUDeviceContext, float>, paddle::operators::ElementwiseAddKernel<paddle::platform::CPUDeviceContext, double>, paddle::operators::ElementwiseAddKernel<paddle::platform::CPUDeviceContext, int>, paddle::operators::ElementwiseAddKernel<paddle::platform::CPUDeviceContext, long> >::operator()(char const*, char const*, int) const::{lambda(paddle::framework::ExecutionContext const&)#1}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&)
13 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&, paddle::framework::RuntimeContext*) const
14 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const
15 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&)
16 paddle::framework::NaiveExecutor::Run()
17 paddle::AnalysisPredictor::Run(std::vector<paddle::PaddleTensor, std::allocator<paddle::PaddleTensor> > const&, std::vector<paddle::PaddleTensor, std::allocator<paddle::PaddleTensor> >*, int)
----------------------
Error Message Summary:
----------------------
Error: Alloc 129253632 error!
[Hint: Expected posix_memalign(&p, alignment, size) == 0, but received posix_memalign(&p, alignment, size):12 != 0:0.] at (/paddle/paddle/fluid/memory/detail/system_allocator.cc:59)
请问怎么解决?谢谢。