Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add paddleocr#83

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
an1018 wants to merge2 commits intoLayout-Parser:main
base:main
Choose a base branch
Loading
froman1018:add_paddleocr
Open

Conversation

an1018
Copy link
Contributor

I'vd added paddleocr model and test code. Please check whether there is anything to be modified, thx.

if return_response:
return res

if return_only_text:

Choose a reason for hiding this comment

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

  1. A score is needed to filter the recognition results and corresponded polys.
  2. The format should be same as other agents


DEPENDENCIES = ["paddleocr"]

def __init__(self, languages="en", use_gpu=True, use_angle_cls=False, det=True, rec=True, cls=False, **kwargs):

Choose a reason for hiding this comment

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

  1. default value ofuse_gpu should be False for better compatibility.

Whether return only the texts in the OCR results.
Defaults to `False`.
"""
image = self.resized_long(image)

Choose a reason for hiding this comment

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

It seems that we can not modifytarget=480, the value is suggested to be an initialization parameter ofPaddleOCRAgent class.


def pad_img_to_longer_edge(self, image):
max_shape = max(image.shape[0], image.shape[1])
out_img = np.ones([max_shape, max_shape, 3]) * 127

Choose a reason for hiding this comment

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

127 is also suggested to be set as fixable for some others special situations.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@littletomatodonkeylittletomatodonkeylittletomatodonkey left review comments

@jumpcutjackalopejumpcutjackalopejumpcutjackalope approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@an1018@littletomatodonkey@jumpcutjackalope

[8]ページ先頭

©2009-2025 Movatter.jp