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

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

Open
super-tian opened this issue Apr 11, 2023 · 2 comments
Open

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

super-tian opened this issue Apr 11, 2023 · 2 comments

Comments

@super-tian
Copy link

super-tian commented Apr 11, 2023

环境

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

@Jaccica
Copy link

Jaccica commented Apr 23, 2023

您好,我也部署了自己的模型,发现自己的模型调用服务出错,请问如何解决?谢谢!

@super-tian
Copy link
Author

fd没找到解决方法,用pdserving进行部署了

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

2 participants