PaddlePaddle / PaddlePaddle/FastDeploy

db++通过fastdeploy 无法正常部署

Open
#1,797 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版本】: 说明具体的版本,如fastdeploy-'1.0.5'

  • 【编译命令】如果您是自行编译的FastDeploy,请说明您的编译方式(参数命令)

  • 【系统平台】: / Windows x64(Windows10)

  • 【编译语言】: Python(3.10)

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

在部署pp_ocr_v3的过程中,我训练了一个基于det_mv3_db的检测模型,但由于精度有要求,因此我基于r50_db++重新训练了检测模型,但在使用fd部署的时候,基于det_mv3_db的检测模型可以正确的检测出我需要的内容,而db++模型无法正常检测。
`
import fastdeploy.vision as vision

mv3_db
det_model = vision.ocr.DBDetector(r"inference_model/db/inference.pdmodel",r"inference_model/db/inference.pdiparams")

db++
det_model = vision.ocr.DBDetector(r"inference_model/det_db/inference_.pdmodel",r"inference_model/det_db/inference_.pdiparams")

rec_model = vision.ocr.Recognizer("inference_model/rec_ocrv3/inference.pdmodel",
"inference_model/rec_ocrv3/inference.pdiparams",
"inference_model/rec_ocrv3/num.txt",
)

ppocr_v3 = fd.vision.ocr.PPOCRv3(det_model=det_model,cls_model=None,rec_model=rec_model)
`

db++检测结果:
print(result) rec text: 4 rec score:0.999919
mv3_db检测结果
print(result) det boxes: [[99,32],[309,30],[310,118],[100,119]]rec text: 4 rec score:0.999997
但是我通过命令行直接推理的能够得出正常结果
python3 tools/infer/predict_det.py --image_dir="/home/aistudio/data/images_split_paddle/ae90bb62-1185-470d-87d8-341c7c5c8ee8__33.jpg" --det_model_dir="./inference/det_db++/" --det_algorithm="DB++"

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 by comparing the FastDeploy DBDetector setup with the command-line path in tools/infer/predict_det.py, using the provided DB and DB++ model directories and the DB++ algorithm setting. Reproduce the differing detection results on the referenced image, then identify whether FastDeploy supports the DB++ model configuration and add a regression test or documentation once the expected output is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.