Skip to content

Add unified resize operation for detection and a resize op for recognition inference #294

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

Closed
wants to merge 0 commits into from

Conversation

SamitHuang
Copy link
Collaborator

@SamitHuang SamitHuang commented May 18, 2023

Thank you for your contribution to the MindOCR repo.
Before submitting this PR, please make sure:

Motivation

(Write your motivation for proposed changes here.)

Test Plan

(How should this PR be tested? Do you require special setup to run the test or repro the fixed bug?)

Related Issues and PRs

(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)

@@ -312,7 +317,7 @@ class ValidatePolygons:
Args:
min_area: minimum area below which newly clipped polygons considered as ignored.
"""
def __init__(self, min_area: float = 1.0):
def __init__(self, min_area: float = 1.0, min_poly_points: int=4,):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

min_poly_points has conflict with PR #292

interpoloation: interpolation method

Note:
1. The default choices limit_type=min, padding=False with large `target_limit_side` are recommended for inference in detection for bettr accuracy,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: bettr -> better

assert target_size is not None, f'target_size must be set if aspect ratio changes or limit_type is auto'

if keep_ratio and padding and force_divisable:
print(f'WARNING: `padding` and `force_divisable` are confilicting after aspect-ratio-kept resizing. `force_divisable` will not make effect.')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: confilicting -> conflicting

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

Successfully merging this pull request may close these issues.

2 participants