Skip to content
Discussion options

You must be logged in to vote

你反馈本地调用 ch_PP-OCRv4_server_det 检测文字时有明显漏检,线上体验非常准确,怀疑线上是否有特殊预处理。结合你提供的现象和官方相关讨论,这种情况目前有不少用户反馈,通常与参数设置和预处理流程有关,具体分析建议如下:


1. 线上和线下模型一致性

百度AI Studio在线体验通常会集成更完善的预处理、后处理,且可能针对实测样本做过微调,而本地部署则完全依赖于你的前处理和参数设置。模型本身理论一致,差异多在数据流和参数。


2. 关键参数影响

请重点关注以下检测参数,漏检多数与其设置不合适有关:

  • det_db_thresh(默认0.3):阈值偏高会漏检;尝试调低,如0.2甚至0.15。
  • det_db_box_thresh(默认0.6):同理,调低可减少漏检,试试0.4到0.5。
  • det_limit_side_len:如果图片较大或文字很小,建议调高到1280或更大,保证输入图不被压得太小导致细节丢失。
  • det_db_unclip_ratio:增大(如2.0~2.5)可让检测框更“大方”,对小字、间距小的行检出有帮助。
  • drop_score:留意最终识别过滤阈值,可适当调低。

参数调整示例

ocr = PaddleOCR(
    use_angle_cls=True, 
    lang="ch",
    det_db_thresh=0.2,
    det_db_box_thresh=0.4,
    det_limit_side_len=1280,
    det_db_unclip_ratio=2.0
)

3. 预处理细节

线上通常有更…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Lipurple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants