Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

图片文本方向预处理 #10205

Closed
Carson-688 opened this issue Jun 19, 2023 · 9 comments
Closed

图片文本方向预处理 #10205

Carson-688 opened this issue Jun 19, 2023 · 9 comments
Assignees
Labels

Comments

@Carson-688
Copy link

20230619154001
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

  • 系统环境/System Environment:
  • 版本号/Version:Paddle: PaddleOCR: 问题相关组件/Related components:
  • 运行指令/Command Code:
  • 完整报错/Complete Error Message:
    请问能够对图片进行预处理吗,图片可能是90度,这样在识别前纠正
@ToddBear ToddBear added the good first issue Good for newcomers label Jun 30, 2023
@livingbody
Copy link
Contributor

有方向识别的。

@shiyutang
Copy link
Collaborator

@livingbody 需要进一步提供方向识别设置~

@livingbody
Copy link
Contributor

参考方向识别文档,从训练到预测全流程都有:

PaddleOCR/doc/doc_ch/angle_class.md at release/2.6 · PaddlePaddle/PaddleOCR · GitHub
https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/angle_class.md

360截图20230703170754037

@livingbody
Copy link
Contributor

识别角度后,可以用opencv等rotate进行矫正。

@Carson-688
Copy link
Author

识别角度后,可以用opencv等rotate进行矫正。
图片识别出来只有0度和180度,如果是90度或者270度,识别出来还是0度和180度,这种情况下我怎么知道要旋转多少度

@livingbody
Copy link
Contributor

识别角度后,可以用opencv等rotate进行矫正。
图片识别出来只有0度和180度,如果是90度或者270度,识别出来还是0度和180度,这种情况下我怎么知道要旋转多少度

文本方向分类器主要用于图片非0度的场景下,在这种场景下需要对图片里检测到的文本行进行一个转正的操作。在PaddleOCR系统内, 文字检测之后得到的文本行图片经过仿射变换之后送入识别模型,此时只需要对文字进行一个0和180度的角度分类,因此PaddleOCR内置的 文本方向分类器只支持了0和180度的分类。如果想支持更多角度,可以自己修改算法进行支持。

@shiyutang
Copy link
Collaborator

shiyutang commented Jul 4, 2023

@EasyIsAllYouNeed
Copy link

EasyIsAllYouNeed commented Jul 6, 2023

这个问题是文档方向识别问题,还不是文本方向识别;
文档方向识别参考 https://github.com/PaddlePaddle/PaddleClas/blob/release/2.5/docs/zh_CN/models/PULC/PULC_text_image_orientation.md

@UserWangZz
Copy link
Collaborator

该issue长时间未更新,暂将此issue关闭,如有需要可重新开启。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants