PaddlePaddle / PaddlePaddle/FastDeploy

web demo替换自训练det模型出问题,求大佬解答(看过issue里的关于web demo的问题,没有解决)

Open
#2,546 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.7k
Forks
756
Avg merge
19h 28m
Merged PRs (30d)
4

Description


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


环境

  • 【FastDeploy版本】: 训练:使用的是paddleOCR最新版训练det模型,验证测试没问题。转换inference:根据webdemo以及issue,修改了tools/export_model.py中infer_shape = [3, 960, 960],然后转换了det模型。转换paddlejs:在本项目中通过以下命令(FastDeploy\examples\application\js\converter> paddlejsconverter --modelPath=det_20241101_new/inference.pdmodel --paramPath=det_20241101_new/inference.pdiparams --outputDir=det_20241101_new)生成了model.json和chunk_1.dat
  • 【编译命令】如果您是自行编译的FastDeploy,请说明您的编译方式(参数命令)
  • 【系统平台】: Windows x64(Windows10)
  • 【硬件】: 训练:4090。webdemo:集显
  • 【编译语言】: nodejs:v22.11.0 npm:10.9.0

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

  • 附上详细的问题日志有助于快速定位分析
  • 【操作流程】
    • 我先把模型上传阿里云的oss存储,开启了跨域访问(我不确定是否的是必须要百度的存储才行)
    • 然后修改代码配置参数和模型路径:
      const detConfig = {mean: [0.485, 0.456, 0.406], std: [0.229, 0.224, 0.225]};
      await ocr.init({modelPath:"https://***/paddlejs/model.json"},detConfig);
  • 【运行】
    • 运行没有报错
  • -点击文本识别一直显示模型加载中,F12 console信息如下:
    image
    在network里面我没看到下载model.json模型成功。可能必须要用百度的云存储??

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the web demo configuration and the generated files in FastDeploy\examples\application\js\converter, then inspect the browser Network and console output while loading model.json from the OSS URL. Check whether the model request is made and whether the configured path and cross-origin access work. Done means the custom detection model finishes loading and text recognition proceeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.