-
-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rapidocr_onnxruntime): 优化单字符坐标及返回单字符置信度 (#293)
* 1、utils.py:优化单字符坐标计算。根据CTC解码特点,增加每个字符长度列表作为判断条件,一般非中文字符2-3个解码宽度,中文3-4个解码宽度,当某个字符与上一字符距离大于4个解码宽度,表示中间有空白,此时进行字段拆分,这样可以减少文字间空白对坐标计算的影响;同时返回每个字符值信度,以方便应用使用 2、cal_rec_boxes/main.py: 配合返回单字符值信度列表的修改 修改计算单字符宽度的分母为总字符数减1,与分母一致,这样计算出的值更加准确 3.main.py: 修复主程序没有传递命令行参数的问题 * 优化文本行检测优化,当limit_type为max,根据图片大小动态设置limit_side_len,以减少漏检 --------- Co-authored-by: jesse01 <jesse01.163.com>
- Loading branch information
Showing
4 changed files
with
31 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,6 +334,7 @@ def main(): | |
use_det=use_det, | ||
use_cls=use_cls, | ||
use_rec=use_rec, | ||
**vars(args) | ||
) | ||
logger.info(result) | ||
|
||
|