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

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

Open
mozeqiu123 opened this issue Oct 22, 2024 · 3 comments
Assignees

Comments

@mozeqiu123
Copy link


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


环境

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,供工程师快速定位问题
@Jiang-Jia-Jun
Copy link
Collaborator

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

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

@mozeqiu123
Copy link
Author

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

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

好的。我再试试

@mozeqiu123
Copy link
Author

mozeqiu123 commented Nov 1, 2024

你可能用的模型是最新版本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
我需要降版本重新训练么

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