Skip to content

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

@super-tian

Description

@super-tian

环境

  • 【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++"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions