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

Update paddleocr.py #10290

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Update paddleocr.py #10290

merged 1 commit into from
Jul 4, 2023

Conversation

livingbody
Copy link
Contributor

解决多次识别pdf,受第一次页面最大数量影响的bug

解决多次识别pdf,受第一次页面最大数量影响的bug
@paddle-bot
Copy link

paddle-bot bot commented Jul 4, 2023

Thanks for your contribution!

Copy link
Collaborator

@shiyutang shiyutang left a comment

Choose a reason for hiding this comment

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

LGTM

当self.page_num > len(img) or self.page_num == 0:

  1. 不修改self.page_num,而是将img赋值给imgs,这和之前逻辑一致;
  2. 此时self.page_num没有跟踪最小的img数量,和之前不一致,但是不会产生影响,因为self.page_num没有再次被使用。

当0<page_num<len(img):

  1. 切分前page_num部分的img赋值给imgs,和之前行为一致,达到指定分割页面的作用。

@shiyutang shiyutang merged commit b888862 into PaddlePaddle:release/2.6 Jul 4, 2023
@ColorfulDick
Copy link

LGTM

当self.page_num > len(img) or self.page_num == 0:

  1. 不修改self.page_num,而是将img赋值给imgs,这和之前逻辑一致;
  2. 此时self.page_num没有跟踪最小的img数量,和之前不一致,但是不会产生影响,因为self.page_num没有再次被使用。

当0<page_num<len(img):

  1. 切分前page_num部分的img赋值给imgs,和之前行为一致,达到指定分割页面的作用。

有具体代码作为例子吗,我也遇到这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants