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

armv7hf lite部署,使用1.1模型只能检测无法识别。使用2.0模型,运行segmentfault #2064

Closed
zsun14 opened this issue Feb 22, 2021 · 3 comments

Comments

@zsun14
Copy link

zsun14 commented Feb 22, 2021

环境:
paddleocr develop版本
paddle-lite 使用2.8的release, inference_lite_lib.armlinux.armv7hf.gcc.with_extra.with_cv.tar

崩溃步骤:
1 编译paddle-ocr deploy lite
按照readme操作
由于要运行在树莓上,所以剥离了对NDK的依赖,重新编译了opencv4.1,生成ocr_db_crnn

2 使用linux_opt 对分别对det cls rec模型优化
模型使用pp-orc 2.0的ch_ppocr_mobile_v2.0_det ch_ppocr_mobile_v2.0_rec ch_ppocr_mobile_v2.0_cls
./opt_linux
--model_file=./ch_ppocr_mobile_v2.0_det_infer/inference.pdmodel
--param_file=./ch_ppocr_mobile_v2.0_det_infer/inference.pdiparams
--optimize_out_type=naive_buffer
--optimize_out=./det --valid_targets=arm

rec和cls同上

3 执行崩溃
image
`(gdb) r
Starting program: /home/pi/paddle_lite_28/demo/cxx/ocr/debug/ocr_db_crnn ./det.nb ./rec.nb ./cls.nb ./1.jpg ./ppocr_keys_v1.txt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1097 Setup] ARM multiprocessors name: MODEL NAME : ARMV7 PROCESSOR REV 3 (V7L)
HARDWARE : BCM2711

[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1098 Setup] ARM multiprocessors number: 4
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1100 Setup] ARM multiprocessors ID: 0, max freq: 1500, min freq: 1500, cluster ID: 0, CPU ARCH: A72
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1100 Setup] ARM multiprocessors ID: 1, max freq: 1500, min freq: 1500, cluster ID: 0, CPU ARCH: A72
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1100 Setup] ARM multiprocessors ID: 2, max freq: 1500, min freq: 1500, cluster ID: 0, CPU ARCH: A72
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1100 Setup] ARM multiprocessors ID: 3, max freq: 1500, min freq: 1500, cluster ID: 0, CPU ARCH: A72
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1106 Setup] L1 DataCache size is:
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1108 Setup] 32 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1108 Setup] 32 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1108 Setup] 32 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1108 Setup] 32 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1110 Setup] L2 Cache size is:
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1112 Setup] 512 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1112 Setup] 512 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1112 Setup] 512 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1112 Setup] 512 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1114 Setup] L3 Cache size is:
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1116 Setup] 0 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1116 Setup] 0 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1116 Setup] 0 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1116 Setup] 0 KB
[I 2/22 13:10:14.772 ...ild/Paddle-Lite/lite/core/device_info.cc:1118 Setup] Total memory: 1729820KB
[New Thread 0xb5f693a0 (LWP 19361)]
[New Thread 0xb57683a0 (LWP 19362)]
[New Thread 0xb4bff3a0 (LWP 19363)]

Thread 1 "ocr_db_crnn" received signal SIGSEGV, Segmentation fault.
0x0006111c in std::vector<unsigned long long, std::allocator >::operator[](unsigned int) ()
(gdb) bt
#0 0x0006111c in std::vector<unsigned long long, std::allocator >::operator[](unsigned int) ()
#1 0x00059f7c in RunRecModel(std::vector<std::vector<std::vector<int, std::allocator >, std::allocator<std::vector<int, std::allocator > > >, std::allocator<std::vector<std::vector<int, std::allocator >, std::allocator<std::vector<int, std::allocator > > > > >, cv::Mat, std::shared_ptrpaddle::lite_api::PaddlePredictor, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&, std::vector<float, std::allocator >&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::shared_ptrpaddle::lite_api::PaddlePredictor, int) ()
#2 0x0005c058 in main ()
(gdb)
`

无法识别步骤:
1 使用此前编译程序

2 下载1.1模型,使用2.8的opt进行优化

3 执行,可以定位文字区域,但无识别结果。

@LDOUBLEV
Copy link
Collaborator

LDOUBLEV commented Feb 23, 2021

1.1 模型,建议用paddle lite 2.7分支,在arm8上测试是可以的

2.0模型,建议用paddle lite 2.8分支,而且2.0模型的lite代码还没上传,和1.1模型的lite代码有些不一样,所以用2.0的模型会出现段错误

有部署问题可以加这个群:
image

@paddle-bot-old
Copy link

Since you haven't replied for more than 3 months, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
It is recommended to pull and try the latest code first.
由于您超过三个月未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。

@xuxiaobao-3
Copy link

1.1 模型,建议用paddle lite 2.7分支,在arm8上测试是可以的

2.0模型,建议用paddle lite 2.8分支,而且2.0模型的lite代码还没上传,和1.1模型的lite代码有些不一样,所以用2.0的模型会出现段错误

有部署问题可以加这个群:
image
群二维码失效了 重发一下可以么

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

3 participants