RapidOCR icon indicating copy to clipboard operation
RapidOCR copied to clipboard

单字符识别时,det结果旋转了90度导致rec错误

Open Alex37882388 opened this issue 1 year ago • 3 comments

问题描述 / Problem Description

单字符识别时,det结果旋转了90度导致rec错误

运行环境 / Runtime Environment

win11

复现条件

如下图片可以复现: 34

问题代码 / Reproduction Code

# main.py line 167、168行
if dst_img_height * 1.0 / dst_img_width >= 1.5:
    dst_img = np.rot90(dst_img)

det检测到文本框之后,经过以上代码旋转之后,图片变成了这样: det_main90_2 导致最终识别奕成了字母O

可能解决方案 / Possible solutions

这里不需要判断宽高比例使其旋转90度

Alex37882388 avatar Nov 18 '24 07:11 Alex37882388

这个发现很有趣,需要仔细考虑一下了

SWHL avatar Nov 18 '24 13:11 SWHL

关掉paddle的cls就好了

zzk2021 avatar Apr 16 '25 03:04 zzk2021

paddle的cls仅能检测 0、180度的图片角度,并不能处理90度、270度,如上问题还是代码/ main.py line 167、168行 判断导致的。

Alex37882388 avatar Oct 09 '25 02:10 Alex37882388