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

Bug: 不能识别单字的图像 #210

Open
SWHL opened this issue Aug 1, 2024 · 1 comment
Open

Bug: 不能识别单字的图像 #210

SWHL opened this issue Aug 1, 2024 · 1 comment
Assignees

Comments

@SWHL
Copy link
Member

SWHL commented Aug 1, 2024

问题描述 / Problem Description

本问题来自RapidVideOCR Discussions #61
对于电影字幕中,存在一帧图像仅有单字的情况。例如下图:

rec.png

0_05_13_400__0_05_14_039_0000009351920011319201080

rapidocr_onnxruntime==1.3.24版本中,可以检测到该文字,但是识别阶段未能成功识别

运行环境 / Runtime Environment

  • rapidocr_onnxruntime: 1.3.24
  • OS: macOS 14.5
  • python: 3.10

复现代码 / Reproduction Code

from rapidocr_onnxruntime import RapidOCR

engine = RapidOCR()

image_path = "rec.png"
with open(image_path, "rb") as f:
    img = f.read()

result, elapse_list = engine(img)
print(result)
# 输出结果
# [['', 0.0]]

可能解决方案 / Possible solutions

尝试将检测到的文字左右扩增,有的可以识别,有的反而识别错误了,需要多造一些测试集来评估该策略有效性。示例如下:

t.png
t

from rapidocr_onnxruntime import RapidOCR

engine = RapidOCR()

image_path = "t.png"
with open(image_path, "rb") as f:
    img = f.read()

result, elapse_list = engine(img, use_cls=False, use_det=False, use_rec=True)
print(result)
# 输出
# [['嗯', 0.4284239]]
@github-actions github-actions bot added the Stale label Aug 31, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2024
@failable
Copy link

image 这个后面的数字也是识别不出来。

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

No branches or pull requests

2 participants