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

关于有些参数设置并没有起作用的问题 #147

Open
1212zhang opened this issue Aug 23, 2024 · 1 comment
Open

关于有些参数设置并没有起作用的问题 #147

1212zhang opened this issue Aug 23, 2024 · 1 comment

Comments

@1212zhang
Copy link

我在使用'det_db_box_thresh'参数的时候,设置了相应的值,但是输出并没有将小于此置信度的框给过滤掉
argument = {"config_path": "models/config_en.txt",
'det_db_unclip_ratio' : 2.2,
'det_db_box_thresh':0.9} # 指定使用英文库

ocr = GetOcrApi(rf"{script_directory}\PaddleOCR-json_v1.4.0\PaddleOCR-json.exe",
argument=argument, )

det_db_unclip_ratio值可以正常使用, 但det_db_box_thresh设置的值并未起作用

@hiroi-sora
Copy link
Owner

det_db_box_thresh 最终作用于 cpp\src\postprocess_op.cpp288 行:

    if (score < box_thresh)
      continue;

注意它对比的 score 是文本检测的置信度,而不是我们OCR返回结果中的score(文本识别置信度)。文本检测文本识别是两个独立的步骤。

因此,det_db_box_thresh设置的值是过滤掉 不准确的框框 ,而不是 不准确的字符

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