#259·RapidOCR

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

Author: Alex37882388Created Nov 18, 2024Updated Oct 9, 2025

问题描述 / Problem Description

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

运行环境 / Runtime Environment

win11

复现条件

如下图片可以复现: 34

问题代码 / Reproduction Code

python
# 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度