Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
39ac3b5a
P
PaddleOCR
项目概览
weixin_41840029
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
39ac3b5a
编写于
11月 02, 2021
作者:
W
WenmuZhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pse post-processing is only compiled when needed
上级
85352c93
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
11 addition
and
8 deletion
+11
-8
ppocr/postprocess/__init__.py
ppocr/postprocess/__init__.py
+8
-6
ppocr/postprocess/pse_postprocess/pse/__init__.py
ppocr/postprocess/pse_postprocess/pse/__init__.py
+3
-2
未找到文件。
ppocr/postprocess/__init__.py
浏览文件 @
39ac3b5a
...
@@ -18,7 +18,6 @@ from __future__ import print_function
...
@@ -18,7 +18,6 @@ from __future__ import print_function
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
import
copy
import
copy
import
platform
__all__
=
[
'build_post_process'
]
__all__
=
[
'build_post_process'
]
...
@@ -26,21 +25,24 @@ from .db_postprocess import DBPostProcess, DistillationDBPostProcess
...
@@ -26,21 +25,24 @@ from .db_postprocess import DBPostProcess, DistillationDBPostProcess
from
.east_postprocess
import
EASTPostProcess
from
.east_postprocess
import
EASTPostProcess
from
.sast_postprocess
import
SASTPostProcess
from
.sast_postprocess
import
SASTPostProcess
from
.rec_postprocess
import
CTCLabelDecode
,
AttnLabelDecode
,
SRNLabelDecode
,
DistillationCTCLabelDecode
,
\
from
.rec_postprocess
import
CTCLabelDecode
,
AttnLabelDecode
,
SRNLabelDecode
,
DistillationCTCLabelDecode
,
\
TableLabelDecode
,
NRTRLabelDecode
,
SARLabelDecode
,
SEEDLabelDecode
TableLabelDecode
,
NRTRLabelDecode
,
SARLabelDecode
,
SEEDLabelDecode
from
.cls_postprocess
import
ClsPostProcess
from
.cls_postprocess
import
ClsPostProcess
from
.pg_postprocess
import
PGPostProcess
from
.pg_postprocess
import
PGPostProcess
from
.pse_postprocess
import
PSEPostProcess
def
build_post_process
(
config
,
global_config
=
None
):
def
build_post_process
(
config
,
global_config
=
None
):
support_dict
=
[
support_dict
=
[
'DBPostProcess'
,
'
PSEPostProcess'
,
'EASTPostProcess'
,
'SASTPostProcess
'
,
'DBPostProcess'
,
'
EASTPostProcess'
,
'SASTPostProcess'
,
'CTCLabelDecode
'
,
'
CTCLabelDecode'
,
'AttnLabelDecode'
,
'ClsPostProcess'
,
'SRNLabelDecode
'
,
'
AttnLabelDecode'
,
'ClsPostProcess'
,
'SRNLabelDecode'
,
'PGPostProcess
'
,
'
PGPostProcess'
,
'
DistillationCTCLabelDecode'
,
'TableLabelDecode'
,
'DistillationCTCLabelDecode'
,
'TableLabelDecode'
,
'DistillationDBPostProcess'
,
'NRTRLabelDecode'
,
'SARLabelDecode'
,
'DistillationDBPostProcess'
,
'NRTRLabelDecode'
,
'SARLabelDecode'
,
'SEEDLabelDecode'
'SEEDLabelDecode'
]
]
if
config
[
'name'
]
==
'PSEPostProcess'
:
from
.pse_postprocess
import
PSEPostProcess
support_dict
.
append
(
'PSEPostProcess'
)
config
=
copy
.
deepcopy
(
config
)
config
=
copy
.
deepcopy
(
config
)
module_name
=
config
.
pop
(
'name'
)
module_name
=
config
.
pop
(
'name'
)
if
global_config
is
not
None
:
if
global_config
is
not
None
:
...
...
ppocr/postprocess/pse_postprocess/pse/__init__.py
浏览文件 @
39ac3b5a
...
@@ -21,8 +21,9 @@ ori_path = os.getcwd()
...
@@ -21,8 +21,9 @@ ori_path = os.getcwd()
os
.
chdir
(
'ppocr/postprocess/pse_postprocess/pse'
)
os
.
chdir
(
'ppocr/postprocess/pse_postprocess/pse'
)
if
subprocess
.
call
(
if
subprocess
.
call
(
'{} setup.py build_ext --inplace'
.
format
(
python_path
),
shell
=
True
)
!=
0
:
'{} setup.py build_ext --inplace'
.
format
(
python_path
),
shell
=
True
)
!=
0
:
raise
RuntimeError
(
'Cannot compile pse: {}'
.
format
(
raise
RuntimeError
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))))
'Cannot compile pse: {}, if your system is windows, you need to install all the default components of `desktop development using C++` in visual studio 2019+'
.
format
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))))
os
.
chdir
(
ori_path
)
os
.
chdir
(
ori_path
)
from
.pse
import
pse
from
.pse
import
pse
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录