PaddlePaddle / PaddlePaddle/FastDeploy
小程序替换模型失败
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 756
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 4
Description
环境
- 【FastDeploy版本】: FastDeploy-develop
- 【系统平台】: Linux x64(Ubuntu 16.04)
- 【硬件】: Nvidia GPU 2080TI, CUDA 10.1 CUDNN 7.6
- 【编译语言】:Python(3.7)
- 【Paddle环境】:padlepaddle2.5.0,paddlelite2.7,Paddle.js-release-v2.2.3
问题日志及出现问题的操作流程
- 【替换模型后跑不通】
-
- 按照官方给出的步骤在小程序可以跑通ocrXcx示例,检测模型和识别模型都能正常工作(https://github.com/PaddlePaddle/FastDeploy/tree/develop/examples/application/js/mini_program/ocrXcx)
-
- paddlejs-converters转换模型有提示错误,如下转换ch_PP-OCRv3_rec模型:
- paddlejs-converters转换模型有提示错误,如下转换ch_PP-OCRv3_rec模型:
-
- 转换模型后,把model.json以及所有chunk_x.dat文件放到OSS链接后替换官方地址,可以正常下载:
-
- 小程序替换识别模型后运行报错:
-
-
- 提供复现问题的 代码+模型+错误log,供工程师快速定位问题
1,查询了其他issue,如Web Demo替换模型失败,修改检测模型的infer_shape = [3, 960, 960]之后,检测模型可以正常跑通,但是chunk_1.dat文件有2.25MB,官网只有467KB,可能也是检测模型推理较官方慢的原因?
2,识别模型修改infer_shape = [3, 48, 320],修改前后都无法正常推理,且自己转换的识别模型有三个chunk分片,共有10.1MB,官方模型只有一个分片3.38MB
3,也有issue说是版本问题,使用虚拟环境分别尝试了(py3.7+paddlepaddle2.5.5+paddlelite2.7.1+paddlejsconverter1.0.7)、(py3.7+padlepaddle2.5.0,paddlelite2.7,Paddle.js-release-v2.2.3)、(py3.8+paddlepaddle2.6.0+paddlelite没有源),也都不行
4,个人猜测,在模型转换时无法使用paddlejslite优化,或者具体的量化步骤缺失,导致上述问题,希望能给出转换模型的详细步骤(paddlepaddle、paddlejslite、paddle.js、pp-OCRV3等等)
- 提供复现问题的 代码+模型+错误log,供工程师快速定位问题
-
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the examples/application/js/mini_program/ocrXcx example and compare its official model.json and chunk files with the converted recognition model. Read the attached conversion output and runtime log, then trace the model replacement path in the mini-program entry point. Done means the converted recognition model downloads and runs successfully in the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- machine-learning, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100