PaddlePaddle / Paddle-Lite

PaddlePaddle High Performance Deep Learning Inference Engine for Mobile and Edge (飞桨高性能深度学习端侧推理引擎)
https://www.paddlepaddle.org.cn/lite
Apache License 2.0
6.89k stars 1.6k forks source link

android,将ch_PP-OCRv4模型转为nb后,运行报错 #10467

Open gaotianzeng opened 3 months ago

gaotianzeng commented 3 months ago
MuShangCC commented 3 months ago

报错信息上看不出有用的信息,麻烦提供一下完整的报错日志。另外请问使用的android-ndk是什么版本?

gaotianzeng commented 3 months ago

android-ndk版本:21.1.6352462

Install successfully finished in 1 s 703 ms. $ adb shell am start -n "com.baidu.paddle.lite.demo.ocr/com.baidu.paddle.lite.demo.ocr.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 2940 on device 'xiaomi-mi_9-ffff2cf7'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar I/Perf: Connecting to perf service. D/NetworkSecurityConfig: No Network Security Config specified, using platform default I/ContentProviderMonitor: PerfMonitor installContentProviders : before publish content providers D/NetworkSecurityConfig: No Network Security Config specified, using platform default D/DecorView[]: getWindowModeFromSystem windowmode is 1 W/e.lite.demo.oc: Accessing hidden method Lmiui/contentcatcher/sdk/Token;->(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V (greylist, linking, allowed) Accessing hidden method Lmiui/contentcatcher/InterceptorProxy;->getWorkThread()Landroid/os/HandlerThread; (greylist, linking, allowed) D/ViewContentFactory: initViewContentFetcherClass getInterceptorPackageInfo W/e.lite.demo.oc: Accessing hidden method Landroid/app/AppGlobals;->getInitialApplication()Landroid/app/Application; (greylist, linking, allowed) D/ViewContentFactory: getInitialApplication took 0ms packageInfo.packageName: com.miui.catcherpatch D/ViewContentFactory: initViewContentFetcherClass took 8ms I/ContentCatcher: ViewContentFetcher : ViewContentFetcher D/ViewContentFactory: createInterceptor took 8ms W/e.lite.demo.oc: Accessing hidden method Lmiui/contentcatcher/sdk/injector/IContentDecorateCallback$Stub;->()V (greylist, linking, allowed) Accessing hidden method Lmiui/contentcatcher/sdk/ContentCatcherManager;->getInstance()Lmiui/contentcatcher/sdk/ContentCatcherManager; (greylist, linking, allowed) Accessing hidden method Lmiui/contentcatcher/sdk/ContentCatcherManager;->registerContentInjector(Lmiui/contentcatcher/sdk/Token;Lmiui/contentcatcher/sdk/injector/IContentDecorateCallback;)V (greylist, linking, allowed) W/e.lite.demo.oc: Accessing hidden method Lmiui/contentcatcher/sdk/ContentCatcherManager;->getPageConfig(Lmiui/contentcatcher/sdk/Token;)Lmiui/contentcatcher/sdk/data/PageConfig; (greylist, linking, allowed) W/e.lite.demo.oc: Accessing hidden method Lmiui/contentcatcher/sdk/data/PageConfig;->getFeatures()Ljava/util/ArrayList; (greylist, linking, allowed) Accessing hidden method Lmiui/contentcatcher/sdk/data/PageConfig;->getCatchers()Ljava/util/ArrayList; (greylist, linking, allowed) W/e.lite.demo.oc: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) W/Looper: PerfMonitor looperActivity : package=com.baidu.paddle.lite.demo.ocr/.MainActivity time=0ms latency=311ms running=0ms procState=2 ClientTransaction{ callbacks=[android.app.servertransaction.TopResumedActivityChangeItem] } historyMsgCount=2 (msgIndex=1 wall=71ms seq=3 running=54ms runnable=8ms binder=14ms late=1ms h=android.app.ActivityThread$H w=110) (msgIndex=2 wall=252ms seq=4 running=223ms runnable=9ms binder=30ms late=60ms h=android.app.ActivityThread$H w=159) V/MiuiFrameworkFactory: get AllImpl object = android.common.MiuiFrameworkFactoryImpl@b0b78d9 I/AdrenoGLES-0: QUALCOMM build : 3142bdd, I7afe4835b7 Build Date : 09/22/20 OpenGL ES Shader Compiler Version: EV031.32.02.00 Local Branch : mybrancheafcbb65-f91c-f1f0-b516-1458d0b52af0 Remote Branch : quic/gfx-adreno.lnx.1.0.r99-rel Remote Branch : NONE Reconstruct Branch : NOTHING Build Config : S P 10.0.6 AArch64 Driver Path : /vendor/lib64/egl/libGLESv2_adreno.so I/AdrenoGLES-0: PFP: 0x016ee190, ME: 0x00000000 I/Predictor: model path/data/user/0/com.baidu.paddle.lite.demo.ocr/cache/models/ch_PP-OCRv4/det_db.nb ; /data/user/0/com.baidu.paddle.lite.demo.ocr/cache/models/ch_PP-OCRv4/rec_crnn.nb;/data/user/0/com.baidu.paddle.lite.demo.ocr/cache/models/ch_PP-OCRv4/cls.nb I/Paddle-Lite: [I 3/15 16:44:49. 43 ...and/Paddle-Lite/lite/core/device_info.cc:1308 Setup] ARM multiprocessors name: HARDWARE : QUALCOMM TECHNOLOGIES, INC SM8150 _CEPHEUSMSMNILE I/Paddle-Lite: [I 3/15 16:44:49. 43 ...and/Paddle-Lite/lite/core/device_info.cc:1309 Setup] ARM multiprocessors number: 8 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1311 Setup] ARM multiprocessors ID: 0, max freq: 1785, min freq: 1785, cluster ID: 1, CPU ARCH: A55 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1311 Setup] ARM multiprocessors ID: 1, max freq: 1785, min freq: 1785, cluster ID: 1, CPU ARCH: A55 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1311 Setup] ARM multiprocessors ID: 2, max freq: 1785, min freq: 1785, cluster ID: 1, CPU ARCH: A55 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1311 Setup] ARM multiprocessors ID: 3, max freq: 1785, min freq: 1785, cluster ID: 1, CPU ARCH: A55 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1311 Setup] ARM multiprocessors ID: 4, max freq: 2419, min freq: 2419, cluster ID: 0, CPU ARCH: A76 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1311 Setup] ARM multiprocessors ID: 5, max freq: 2419, min freq: 2419, cluster ID: 0, CPU ARCH: A76 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1311 Setup] ARM multiprocessors ID: 6, max freq: 2419, min freq: 2419, cluster ID: 0, CPU ARCH: A76 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1311 Setup] ARM multiprocessors ID: 7, max freq: 2841, min freq: 2841, cluster ID: 0, CPU ARCH: A76 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1317 Setup] L1 DataCache size is: [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1319 Setup] 32 KB I/chatty: uid=10335(com.baidu.paddle.lite.demo.ocr) Predictor Worke identical 2 lines I/Paddle-Lite: [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1319 Setup] 32 KB [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1319 Setup] 64 KB I/chatty: uid=10335(com.baidu.paddle.lite.demo.ocr) Predictor Worke identical 2 lines I/Paddle-Lite: [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1319 Setup] 64 KB [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1321 Setup] L2 Cache size is: [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1323 Setup] 128 KB I/chatty: uid=10335(com.baidu.paddle.lite.demo.ocr) Predictor Worke identical 2 lines I/Paddle-Lite: [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1323 Setup] 128 KB [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1323 Setup] 256 KB I/chatty: uid=10335(com.baidu.paddle.lite.demo.ocr) Predictor Worke identical 2 lines I/Paddle-Lite: [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1323 Setup] 256 KB [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1325 Setup] L3 Cache size is: [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1327 Setup] 2048 KB I/chatty: uid=10335(com.baidu.paddle.lite.demo.ocr) Predictor Worke identical 6 lines I/Paddle-Lite: [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1327 Setup] 2048 KB [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1329 Setup] Total memory: 7678820KB [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1330 Setup] SVE2 support: 0 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1331 Setup] SVE2 f32mm support: 0 [I 3/15 16:44:49. 44 ...and/Paddle-Lite/lite/core/device_info.cc:1332 Setup] SVE2 i8mm support: 0 [I 3/15 16:44:49. 44 ...sland/Paddle-Lite/lite/api/paddle_api.cc:44 IsOpenCLBackendValid] need to check fp16 valid:0 I/OCR_NDK: ocr cpp device: running on cpu. I/OCR_NDK: ocr cpp paddle instance created A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8b255a463c in tid 2997 (Predictor Worke), pid 2940 (e.lite.demo.ocr) W/ActivityThread: PerfMonitor Activity : running com.baidu.paddle.lite.demo.ocr/.MainActivity [95, r=171ms, a=8ms, w=672ms]

MuShangCC commented 3 months ago

这个从日志上看在 OpenCL 初始化的时候就已经挂了。请检查当前运行环境是否和 Paddle-Lite 编译环境一致以及当前设备 OpenCL 环境配置等等。

gaotianzeng commented 3 months ago

运行环境和编译环境都使用2.10版本的话,转化出来的v2和v3模型都可以使用 但是使用2.10以上的环境的话,生成的模型无论v3还是v4在运行时,都会报上面那个错误 用的是官方demo,路径https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.7/deploy/android_demo

MuShangCC commented 3 months ago

运行环境和编译环境都使用2.10版本的话,转化出来的v2和v3模型都可以使用 但是使用2.10以上的环境的话,生成的模型无论v3还是v4在运行时,都会报上面那个错误 用的是官方demo,路径https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.7/deploy/android_demo

那建议先用2.10版本吧,这个demo当时也是基于2.10版本去构建的。

luomo-pro commented 2 weeks ago

现在友什么进展吗?是否可以用paddle lite运行paddle ocr v4 模型了呢

MuShangCC commented 2 weeks ago

现在友什么进展吗?是否可以用paddle lite运行paddle ocr v4 模型了呢

不支持