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

关于Serving0.8.3部署OCR模型检测精度下降和识别结果问题 #1786

Closed
Yinyihang857 opened this issue May 21, 2022 · 4 comments
Closed
Assignees
Labels
help wanted Extra attention is needed

Comments

@Yinyihang857
Copy link

python=3.8
paddlepaddle==2.2.2
paddle-serving-server==0.8.3
服务器是centos7,cpu

1.paddle_serving_client.convert转换ch_PP-OCRv3_rec_infer和ch_PP-OCRv3_det_infer模型
2.python3 web_service.py

通过post请求预测接口,同一张图片的预测结果和tools/infer/predict_system.py预测结果不一致,相差在20%

请问这个问题该如何解决

@github-actions
Copy link

Message that will be displayed on users' first issue

@Yinyihang857
Copy link
Author

补充:
图片全部是960x618,200kb左右
压测serving接口100并发平均耗时在40s左右,单次耗时在2~3秒
image

下面图片是serving日志截图:
image

在不损失精度前提下,改如何提升识别速度呢?

@TeslaZhao
Copy link
Collaborator

TeslaZhao commented May 23, 2022

1.精度

使用paddle_serving_client.convert转换ch_PP-OCRv3_rec_infer和ch_PP-OCRv3_det_infer模型后,比较 *.pdmodel 和 *.pdiparams 文件与原始文件的md5 值。如果相同则则不是模型保存问题,建议检查模型前处理

2.提升性能
先补充一下信息:

  1. cpu 推理、GPU 推理 或 TensorRT推理?
  2. 是否开启量化?
  3. 进程或线程模式?
  4. 2个op分别开启的并发数量?

@TeslaZhao TeslaZhao self-assigned this May 23, 2022
@TeslaZhao TeslaZhao added the help wanted Extra attention is needed label May 23, 2022
@Yinyihang857
Copy link
Author

1.精度问题
我核实了下*.pdmodel和源文件的MD5值时不一样,但是*.pdiparams和源文件的MD5值时一样的
这是md5检测结果:
5d4a11ee21b67d1e5dddeef174e33b7

转换方式是按照ocr的文档来的,如何检查模型前处理的问题呢?
image

2.提升性能补充信息如下:
1.cpu推理
2.未使用量化模型
3.进程模式
4.det检测模型时20并发,rec识别模型时10并发
config.yml配置文件如下
9e325b8fe84beb1e1cae7c12df34a2b
28c3f8e3266e5d75a123a200e70dcee

3.目前cpu使用mkldnn加速,会推理失败,日志报错内容如下:
464fdc69507dca955a50a2f0a69d387

@paddle-bot paddle-bot bot closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants