Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleOCR
提交
aedeb28a
P
PaddleOCR
项目概览
PaddlePaddle
/
PaddleOCR
大约 1 年 前同步成功
通知
1528
Star
32962
Fork
6643
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
108
列表
看板
标记
里程碑
合并请求
7
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
108
Issue
108
列表
看板
标记
里程碑
合并请求
7
合并请求
7
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
aedeb28a
编写于
8月 22, 2022
作者:
littletomatodonkey
提交者:
GitHub
8月 22, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix re bug (#7288)
上级
dff52225
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
15 deletion
+16
-15
tools/infer/utility.py
tools/infer/utility.py
+15
-14
tools/infer_kie_token_ser_re.py
tools/infer_kie_token_ser_re.py
+1
-1
未找到文件。
tools/infer/utility.py
浏览文件 @
aedeb28a
...
@@ -225,23 +225,24 @@ def create_predictor(args, mode, logger):
...
@@ -225,23 +225,24 @@ def create_predictor(args, mode, logger):
min_subgraph_size
,
# skip the minmum trt subgraph
min_subgraph_size
,
# skip the minmum trt subgraph
use_calib_mode
=
False
)
use_calib_mode
=
False
)
# collect shape
# collect shape
if
args
.
shape_info_filename
is
not
None
:
if
args
.
shape_info_filename
is
not
None
:
if
not
os
.
path
.
exists
(
args
.
shape_info_filename
):
if
not
os
.
path
.
exists
(
args
.
shape_info_filename
):
config
.
collect_shape_range_info
(
args
.
shape_info_filename
)
config
.
collect_shape_range_info
(
logger
.
info
(
args
.
shape_info_filename
)
f
"collect dynamic shape info into :
{
args
.
shape_info_filename
}
"
logger
.
info
(
)
f
"collect dynamic shape info into :
{
args
.
shape_info_filename
}
"
)
else
:
logger
.
info
(
f
"dynamic shape info file(
{
args
.
shape_info_filename
}
) already exists, not need to generate again."
)
config
.
enable_tuned_tensorrt_dynamic_shape
(
args
.
shape_info_filename
,
True
)
else
:
else
:
logger
.
info
(
logger
.
info
(
f
"
dynamic shape info file(
{
args
.
shape_info_filename
}
) already exists, not need to generate again.
"
f
"
when using tensorrt, dynamic shape is a suggested option, you can use '--shape_info_filename=shape.txt' for offline dygnamic shape tuning
"
)
)
config
.
enable_tuned_tensorrt_dynamic_shape
(
args
.
shape_info_filename
,
True
)
else
:
logger
.
info
(
f
"when using tensorrt, dynamic shape is a suggested option, you can use '--shape_info_filename=shape.txt' for offline dygnamic shape tuning"
)
elif
args
.
use_xpu
:
elif
args
.
use_xpu
:
config
.
enable_xpu
(
10
*
1024
*
1024
)
config
.
enable_xpu
(
10
*
1024
*
1024
)
...
...
tools/infer_kie_token_ser_re.py
浏览文件 @
aedeb28a
...
@@ -39,7 +39,7 @@ from ppocr.utils.visual import draw_re_results
...
@@ -39,7 +39,7 @@ from ppocr.utils.visual import draw_re_results
from
ppocr.utils.logging
import
get_logger
from
ppocr.utils.logging
import
get_logger
from
ppocr.utils.utility
import
get_image_file_list
,
load_vqa_bio_label_maps
,
print_dict
from
ppocr.utils.utility
import
get_image_file_list
,
load_vqa_bio_label_maps
,
print_dict
from
tools.program
import
ArgsParser
,
load_config
,
merge_config
from
tools.program
import
ArgsParser
,
load_config
,
merge_config
from
tools.infer_
vqa
_token_ser
import
SerPredictor
from
tools.infer_
kie
_token_ser
import
SerPredictor
class
ReArgsParser
(
ArgsParser
):
class
ReArgsParser
(
ArgsParser
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录