-
Notifications
You must be signed in to change notification settings - Fork 8k
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
文字识别后返回单字识别坐标 #10377
Comments
任务已经完成 |
@shiyutang 此功能,如何使用?有对应的说明文档不?谢谢 -- 刚找到了 --return_word_box true,只是需安装最新2.6.1版本 |
请问在 2.6.1 哪个子版本,试了都没看到 --return_word_box 这个参数 |
你好 请问有办法了嘛 我也是想识别单个字符位置 请问老哥你实现了嘛 |
没有找到这个:unrecognized arguments: --return_word_box true |
@gongdj 试试 main 分支的最新版本
|
@GreatV 试了不行,我的依赖是: anyio 4.4.0 |
@GreatV |
报错:paddleocr: error: unrecognized arguments: --return_word_box=true |
我用的代码也许你可以参考一下,2.8.0 现在2024-6-14的master分支。
[[[26.0, 37.0], [304.0, 37.0], [304.0, 73.0], [26.0, 73.0]], ('纯臻营养护发素', 0.9946897625923157, [46.085826210826205, [['纯', '臻', '营', '养', '护', '发', '素']], [[3, 10, 16, 23, 30, 36, 43]], ['cn']])] |
对着图片看了下,[[3, 10, 16, 23, 30, 36, 43]]这个不像偏移量,位置对不上 |
@Alanhzl 你好,你了解到这个数值代表的含义了吗?不知道这个怎么对应到像素的位置坐标 |
这个数值是CTC切片后的识别内容的位置,字符大概的位置:每个切片的宽度是(图片总宽width/46.085826210826205),然后乘[[3, 10, 16, 23, 30, 36, 43]]这里面的值,就是每一个字符相对文本行的位置。这个位置不是特别准确,如果要精确框出每一个字符的话是不行的,只能有个大概的位置。 |
因为多batch处理时,会把图片按照max_wh_ratio进行pad,所以* (wh_ratio / max_wh_ratio)就相当于对应回原始图片宽度,这样用图片总宽width/46.085826210826205,就可以得到每个cell的宽度 |
细节:根据源码分析,这里提到的坐标,中文是中心坐标,而英文是左侧坐标。 |
背景
经过需求征集#10334 和每周技术研讨会 #10223 讨论,我们确定了文字识别后返回单字识别坐标的任务,该任务在文档比对、关键字提取、合同篡改确认等重要场景发挥作用。本任务的完成能显著OCR结果的细粒度,并有众多场景应用。
解决步骤
The text was updated successfully, but these errors were encountered: