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

Bug:输入图像没有参数可以限制其最大和最小尺寸 #265

Open
SWHL opened this issue Nov 22, 2024 · 0 comments
Open

Bug:输入图像没有参数可以限制其最大和最小尺寸 #265

SWHL opened this issue Nov 22, 2024 · 0 comments
Assignees

Comments

@SWHL
Copy link
Member

SWHL commented Nov 22, 2024

设定最小尺寸和最大尺寸。如果超出,则直接返回,避免OOM。这一点是从CnOCR项目源码中看到的。

if min(img.shape[0], img.shape[1]) < 2:
    return []

当前代码中并没有此类限制。

  • min_height参数是用来决定图像进入检测前是否padding。
  • min_side_lenmax_side_len:用来缩放图像使用。最大边超出尺寸,则拉到minmax尺寸
  • width_height_ratio: 只计算了宽高比,同样用来决定文本检测是否padding的。只限制的很宽的图像类型。缺少了限制很长的类型。
@SWHL SWHL self-assigned this Nov 22, 2024
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

1 participant