-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
PaddleLite deploy lite core dump #2962
Comments
If modify ocr_db_crnn.cc to:
The detection visualized image saved in ./vis.jpg |
x86 not work export PADDLE_LITE_DIR=/opt/inference_lite_lib/cxx g++ $CXXFLAGS -c ocr_db_crnn.cc -o ocr_db_crnn.o g++ ocr_db_crnn.o crnn_process.o db_post_process.o clipper.o cls_process.o export LD_LIBRARY_PATH=$PADDLE_LITE_DIR/lib:$LD_LIBRARY_PATH Program received signal SIGSEGV, Segmentation fault. |
use cmd like this ./ocr_db_crnn models/ch_ppocr_mobile_v2.0_det_opt.nb models/ch_ppocr_mobile_v2.0_rec_opt.nb models/ch_ppocr_mobile_v2.0_cls_opt.nb data/imgs/11.jpg data/ppocr_keys_v1.txt |
thanks. it works! According to the command usage: please modify this hint. |
@WenmuZhou
thnaks
version 2.9
./ocr_db_crnn models/ch_ppocr_mobile_v2.0_det_opt.nb models/ch_ppocr_mobile_v2.0_cls_opt.nb models/ch_ppocr_mobile_v2.0_rec_opt.nb data/imgs/11.jpg data/ppocr_keys_v1.txt
[W 5/28 17:18:11. 55 ...e-Lite/lite/model_parser/model_parser.cc:882 LoadModelFbsFromFile] warning: the version of opt that transformed this model is not consistent with current Paddle-Lite version. version of opt:6010b5f version of current Paddle-Lite:1e59d1fb [W 5/28 17:18:11. 63 ...e-Lite/lite/model_parser/model_parser.cc:882 LoadModelFbsFromFile] warning: the version of opt that transformed this model is not consistent with current Paddle-Lite version. version of opt:6010b5f version of current Paddle-Lite:1e59d1fb [W 5/28 17:18:11. 70 ...e-Lite/lite/model_parser/model_parser.cc:882 LoadModelFbsFromFile] warning: the version of opt that transformed this model is not consistent with current Paddle-Lite version. version of opt:6010b5f version of current Paddle-Lite:1e59d1fb [I 5/28 17:18:11.113 ...ddle-Lite/lite/kernels/arm/conv_direct.h:207 PrepareForRun] param.filter: [I 5/28 17:18:11.401 ...ddle-Lite/lite/kernels/arm/conv_direct.h:207 PrepareForRun] param.filter: [I 5/28 17:18:11.445 ...ddle-Lite/lite/kernels/arm/conv_direct.h:207 PrepareForRun] param.filter: Segmentation fault (core dumped)
Core was generated by
./ocr_db_crnn models/ch_ppocr_mobile_v2.0_det_opt.nb models/ch_ppocr_mobile_v2.'.Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000558c546d54 in __gnu_cxx::__ops::_Iter_less_iter::operator()<float const*, float const*> (this=0x7fe34e3018, __it1=0x55bfe91bf4, __it2=0x55c0697000)
at /usr/include/c++/7/bits/predefined_ops.h:43
43 { return __it1 < __it2; }
[Current thread is 1 (Thread 0x7f72609010 (LWP 7527))]
(gdb) bt
#0 0x000000558c546d54 in __gnu_cxx::__ops::_Iter_less_iter::operator()<float const, float const> (this=0x7fe34e3018, __it1=0x55bfe91bf4, __it2=0x55c0697000)
at /usr/include/c++/7/bits/predefined_ops.h:43
#1 0x000000558c546dd8 in std::__max_element<float const*, __gnu_cxx::__ops::_Iter_less_iter> (__first=0x55c0697000, __last=0x1acc0eeb580, __comp=...)
at /usr/include/c++/7/bits/stl_algo.h:5653
#2 0x000000558c545178 in std::max_element<float const*> (__first=0x55bfd02e40, __last=0x1acc0eeb580) at /usr/include/c++/7/bits/stl_algo.h:5678
#3 0x000000558c5451c0 in Argmax<float const*> (first=0x55bfd02e40, last=0x1acc0eeb580) at crnn_process.h:37
#4 0x000000558c540f3c in RunRecModel (boxes=std::vector of length 15, capacity 15 = {...}, img=...,
predictor_crnn=std::shared_ptrpaddle::lite_api::PaddlePredictor (use count 2, weak count 0) = {...}, rec_text=std::vector of length 2, capacity 2 = {...},
rec_text_score=std::vector of length 2, capacity 2 = {...}, charactor_dict=std::vector of length 6625, capacity 6625 = {...},
predictor_cls=std::shared_ptrpaddle::lite_api::PaddlePredictor (use count 2, weak count 0) = {...}, use_direction_classify=1) at ocr_db_crnn.cc:209
#5 0x000000558c542a6c in main (argc=6, argv=0x7fe34e3828) at ocr_db_crnn.cc:390
(gdb) f 4
#4 0x000000558c540f3c in RunRecModel (boxes=std::vector of length 15, capacity 15 = {...}, img=...,
predictor_crnn=std::shared_ptrpaddle::lite_api::PaddlePredictor (use count 2, weak count 0) = {...}, rec_text=std::vector of length 2, capacity 2 = {...},
rec_text_score=std::vector of length 2, capacity 2 = {...}, charactor_dict=std::vector of length 6625, capacity 6625 = {...},
predictor_cls=std::shared_ptrpaddle::lite_api::PaddlePredictor (use count 2, weak count 0) = {...}, use_direction_classify=1) at ocr_db_crnn.cc:209
warning: Source file is more recent than executable.
209 argmax_idx = int(Argmax(&predict_batch[n * predict_shape[2]],
(gdb) l
204 float score = 0.f;
205 int count = 0;
206 float max_value = 0.0f;
207
208 for (int n = 0; n < predict_shape[1]; n++) {
209 argmax_idx = int(Argmax(&predict_batch[n * predict_shape[2]],
210 &predict_batch[(n + 1) * predict_shape[2]]));
211 max_value =
212 float(*std::max_element(&predict_batch[n * predict_shape[2]],
213 &predict_batch[(n + 1) * predict_shape[2]]));
(gdb) p predict_shape
$1 = std::vector of length 2, capacity 2 = {1, 2}
`
The text was updated successfully, but these errors were encountered: