Replies: 8 comments 2 replies
-
|
方便提个PR不
…---- 回复的原邮件 ----
| 发件人 | WangFeng ***@***.***> |
| 发送日期 | 2025年10月23日 00:51 |
| 收件人 | RapidAI/RapidOCR ***@***.***> |
| 抄送人 | Subscribed ***@***.***> |
| 主题 | [RapidAI/RapidOCR] Bug:OCR 返回的结果不符合类型标注,例如 `word_results`。 (Issue #581) |
hwf1324 created an issue (RapidAI/RapidOCR#581)
问题描述 / Problem Description
OCR 返回的结果不符合类型标注,例如 word_results,可能是由于 RapidOCR.filter_by_text_score。
可以观察输出示例,实际为:word_results: Tuple[Tuple[Tuple[str, float, Optional[List[List[int]]]]]]
运行环境 / Runtime Environment
复现代码 / Reproduction Code
python demo.py
...
word_results=((('3F1',0.95909, [[423,15], [476,3], [483,34], [430,45]]),), (('轻',0.99376, [[151,28], [188,22], [196,62], [159,69]]), ('运',0.99919, [[188,22], [223,16], [231,55], [196,62]]), ('动',0.63137, [[223,16], [256,10], [264,49], [231,55]]), ('健',0.9608, [[276,7], [308,1], [316,39], [284,45]])), (('027-88859022',0.99825, [[176,180], [424,121], [432,153], [184,213]]),), (('TM',0.99827, [[388,183], [500,183], [500,216], [388,216]]),))
...
可能解决方案 / Possible solutions
修正类型标注。
我之前还以为是错误,仔细观察后发现原来是有行信息,之前还傻傻的用txts比较判断行。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
可以,我梳理一下。 |
Beta Was this translation helpful? Give feedback.
-
|
有个疑问,在输出结果类中,有些结果是有默认值的,这是特意设计吗?如果不是,是否应该在没有结果时为None? |
Beta Was this translation helpful? Give feedback.
-
|
具体说一下
…---- 回复的原邮件 ----
| 发件人 | WangFeng ***@***.***> |
| 发送日期 | 2025年10月23日 12:12 |
| 收件人 | RapidAI/RapidOCR ***@***.***> |
| 抄送人 | SWHL ***@***.***>,
Comment ***@***.***> |
| 主题 | Re: [RapidAI/RapidOCR] Bug:OCR 返回的结果不符合类型标注,例如 `word_results`。 (Issue #581) |
hwf1324 left a comment (RapidAI/RapidOCR#581)
有个疑问,在输出结果类中,有些结果是有默认值的,这是特意设计吗?如果不是,是否应该在没有结果时为None?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
例如 |
Beta Was this translation helpful? Give feedback.
-
|
有道理,感觉有必要统一 |
Beta Was this translation helpful? Give feedback.
-
|
请问造成#555的原因是什么?现在类型标注存在问题,改成下面这样可以吗? - scores: List[float] = field(default_factory=lambda: [1.0])
+ scores: Optional[Tuple[float, ...]] = None |
Beta Was this translation helpful? Give feedback.
-
|
应考虑:#486 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
问题描述 / Problem Description
OCR 返回的结果不符合类型标注,例如
word_results,可能是由于RapidOCR.filter_by_text_score。可以观察输出示例,实际为:word_results: Tuple[Tuple[Tuple[str, float, Optional[List[List[int]]]]]]
运行环境 / Runtime Environment
复现代码 / Reproduction Code
可能解决方案 / Possible solutions
修正类型标注。
我之前还以为是错误,仔细观察后发现原来是有行信息,之前还傻傻的用txts比较判断行。
Beta Was this translation helpful? Give feedback.
All reactions