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

Add RecResizeNormImg in Rec Transform to manage padding and norm in resize, add yaml of crnn for server version [WIP] #428

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

hqkate
Copy link
Collaborator

@hqkate hqkate commented Jun 20, 2023

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

Motivation

Develop landable version of CRNN.

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)

return data


# TODO: remove infer_mode and character_dict_path if they are not necesary
Copy link
Collaborator

Choose a reason for hiding this comment

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

那个character_dict_pathinfer_mode 要不顺便清了,这两个argument很ambiguous而且容易忘记

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

好,我看下

那个character_dict_pathinfer_mode 要不顺便清了,这两个argument很ambiguous而且容易忘记

imgH, imgW = image_shape
# todo: change to 0 and modified image shape
max_wh_ratio = imgW * 1.0 / imgH
h, w = img.shape[0], img.shape[1]
c = img.shape[2]
ratio = w * 1.0 / h

max_wh_ratio = min(max(max_wh_ratio, ratio), max_wh_ratio)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这一步是多余的。 等价于 max_wh_ratio=max_wh_ratio

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这一步是多余的。 等价于 max_wh_ratio=max_wh_ratio

嗯嗯fixed

@hqkate hqkate marked this pull request as ready for review June 21, 2023 08:18
@SamitHuang
Copy link
Collaborator

Please report the results for crnn server version and upload the checkpoint and mindir.

@SamitHuang SamitHuang changed the title Add RecResizeNormImg in Rec Transform to manage padding and norm in resize, add yaml of crnn for server version Add RecResizeNormImg in Rec Transform to manage padding and norm in resize, add yaml of crnn for server version [WIP] Jun 26, 2023
@hqkate
Copy link
Collaborator Author

hqkate commented Jul 4, 2023

Please report the results for crnn server version and upload the checkpoint and mindir.

因為server version model暫時只有一個,沒有單獨開一個section去描述,目前是把結果append在原來的表格後面,用num_classes予以區分。

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.

3 participants