FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

自训练了ocr的det模型,用的v3,但是在Android中运行报错,直接用demo能够正常运行,求解答

Open mozeqiu123 opened this issue 1 year ago • 3 comments


温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度


环境

Windows

  • 【FastDeploy版本】: 说明具体的版本,如fastdeploy-develop
  • 【编译命令】如果您是自行编译的FastDeploy,请说明您的编译方式(参数命令)
  • 【系统平台】: Windows x64(Windows10)
  • 【硬件】: 说明具体硬件型号,如 Nvidia GPU 4090
  • 【编译语言】: Python(3.6)

问题日志及出现问题的操作流程

  • 附上详细的问题日志有助于快速定位分析
  • 【模型跑不通】
    • examples下的小程序部分的代码可以运行,但自己的模型,不能运行 模型如下,转换后的json,另外.dat不知道是什么用(只单独训练了det模型): model.json
      • 错误log `WAServiceMainContext.js:2 WebGL: INVALID_OPERATION: texImage2D: ArrayBufferView not big enough for request index.js? [sm]:497 [Violation] 'load' handler took 1204ms WAServiceMainContext.js:2 WebGL: INVALID_OPERATION: texImage2D: ArrayBufferView not big enough for request index.js? [sm]:497 [Violation] 'load' handler took 1026ms WAServiceMainContext.js:2 WebGL: INVALID_OPERATION: texImage2D: ArrayBufferView not big enough for request index.js? [sm]:497 [Violation] 'load' handler took 1020ms WAServiceMainContext.js:2 WebGL: INVALID_OPERATION: texImage2D: ArrayBufferView not big enough for request index.js? [sm]:497 [Violation] 'load' handler took 1021ms worker.js?libName=WA…celerateWorker.js:1 [worker] reportRealtimeAction:fail not support WAServiceMainContext.js:2 Invalid context type [webgl2] for Canvas#getContext (env: macOS,mp,1.06.2303220; lib: 2.23.4) WAServiceMainContext.js:2 Invalid context type [webgl2] for Canvas#getContext (env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: conv2d -- Error: Error: compile: ERROR: 0:186: 'undefined' : undeclared identifier ERROR: 0:186: '' : boolean expression expected

(env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: conv2d_depthwise -- Error: Error: compile: ERROR: 0:186: 'undefined' : undeclared identifier ERROR: 0:186: '' : boolean expression expected

(env: macOS,mp,1.06.2303220; lib: 2.23.4) 2 index.js? [sm]:1 webgl createProgram: elementwise_mul -- Error: Error: compile: ERROR: 0:131: '[]' : vector field selection out of range

(env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: conv2d -- Error: Error: compile: ERROR: 0:186: 'undefined' : undeclared identifier ERROR: 0:186: '' : boolean expression expected

(env: macOS,mp,1.06.2303220; lib: 2.23.4) 2 index.js? [sm]:1 webgl createProgram: elementwise_mul -- Error: Error: compile: ERROR: 0:131: '[]' : vector field selection out of range

(env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: conv2d_depthwise -- Error: Error: compile: ERROR: 0:186: 'undefined' : undeclared identifier ERROR: 0:186: '' : boolean expression expected

(env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: elementwise_mul -- Error: Error: compile: ERROR: 0:131: '[]' : vector field selection out of range

(env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: conv2d -- Error: Error: compile: ERROR: 0:186: 'undefined' : undeclared identifier ERROR: 0:186: '' : boolean expression expected

(env: macOS,mp,1.06.2303220; lib: 2.23.4) 2 index.js? [sm]:1 webgl createProgram: elementwise_mul -- Error: Error: compile: ERROR: 0:131: '[]' : vector field selection out of range

(env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: conv2d_depthwise -- Error: Error: compile: ERROR: 0:186: 'undefined' : undeclared identifier ERROR: 0:186: '' : boolean expression expected

(env: macOS,mp,1.06.2303220; lib: 2.23.4) 2 index.js? [sm]:1 webgl createProgram: elementwise_mul -- Error: Error: compile: ERROR: 0:131: '[]' : vector field selection out of range

(env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: conv2d -- Error: Error: compile: ERROR: 0:186: 'undefined' : undeclared identifier ERROR: 0:186: '' : boolean expression expected

(env: macOS,mp,1.06.2303220; lib: 2.23.4) 2 index.js? [sm]:1 webgl createProgram: elementwise_mul -- Error: Error: compile: ERROR: 0:131: '[]' : vector field selection out of range

(env: macOS,mp,1.06.2303220; lib: 2.23.4) index.js? [sm]:1 webgl createProgram: conv2d_depthwise -- Error: Error: compile: ERROR: 0:186: 'undefined' : undeclared identifier ERROR: 0:186: '' : boolean expression expected `

  • 【模型精度问题】
    • 先执行examples下的部署示例,包括使用examples提供的模型,确认是否可以正确执行
    • 如若examples下的代码可以运行,但自己的模型,或自己的代码不能运行
      • 提供复现问题的 代码+模型+错误log,供工程师快速定位问题
  • 【性能问题】描述清楚对比的方式
    • 注意性能测试,循环跑N次,取后80%的用时平均(模型启动时,刚开始受限于资源分配,速度会较慢)
    • FastDeploy的Predict包含模型本身之外的数据前后处理用时
      • 提供复现问题的 代码+模型+错误log,供工程师快速定位问题

mozeqiu123 avatar Oct 22 '24 06:10 mozeqiu123

你可能用的模型是最新版本Paddle导出的,而先前的代码适配的是2.3或者2.4版本的Paddle。

你可以试下将Paddle版本降级,重新导出后再部署

Jiang-Jia-Jun avatar Oct 28 '24 04:10 Jiang-Jia-Jun

你可能用的模型是最新版本Paddle导出的,而先前的代码适配的是2.3或者2.4版本的Paddle。

你可以试下将Paddle版本降级,重新导出后再部署

好的。我再试试

mozeqiu123 avatar Oct 29 '24 05:10 mozeqiu123

你可能用的模型是最新版本Paddle导出的,而先前的代码适配的是2.3或者2.4版本的Paddle。

你可以试下将Paddle版本降级,重新导出后再部署

大哥你好。我训练用的是paddle的最新代码,训练出的v3模型。然后转换我是用的FastDeploy\examples\application\js\converter 下面的python .\convertToPaddleJSModel.py --modelPath=recmodels/inference.pdmodel --paramPath=recmodels/inference.pdiparams --outputDir=recmodels 我需要降版本重新训练么

mozeqiu123 avatar Nov 01 '24 01:11 mozeqiu123