Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleOCR
提交
fa1a1256
P
PaddleOCR
项目概览
s920243400
/
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看板
未验证
提交
fa1a1256
编写于
10月 26, 2021
作者:
M
MissPenguin
提交者:
GitHub
10月 26, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4436 from WenmuZhou/fx_pse
add windows support of pse
上级
3a67e560
85352c93
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
12 deletion
+9
-12
ppocr/postprocess/__init__.py
ppocr/postprocess/__init__.py
+1
-4
ppocr/postprocess/pse_postprocess/pse/__init__.py
ppocr/postprocess/pse_postprocess/pse/__init__.py
+8
-3
tools/program.py
tools/program.py
+0
-5
未找到文件。
ppocr/postprocess/__init__.py
浏览文件 @
fa1a1256
...
@@ -29,10 +29,7 @@ from .rec_postprocess import CTCLabelDecode, AttnLabelDecode, SRNLabelDecode, Di
...
@@ -29,10 +29,7 @@ from .rec_postprocess import CTCLabelDecode, AttnLabelDecode, SRNLabelDecode, Di
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
if
platform
.
system
()
!=
"Windows"
:
# pse is not support in Windows
from
.pse_postprocess
import
PSEPostProcess
def
build_post_process
(
config
,
global_config
=
None
):
def
build_post_process
(
config
,
global_config
=
None
):
...
...
ppocr/postprocess/pse_postprocess/pse/__init__.py
浏览文件 @
fa1a1256
...
@@ -17,7 +17,12 @@ import subprocess
...
@@ -17,7 +17,12 @@ import subprocess
python_path
=
sys
.
executable
python_path
=
sys
.
executable
if
subprocess
.
call
(
'cd ppocr/postprocess/pse_postprocess/pse;{} setup.py build_ext --inplace;cd -'
.
format
(
python_path
),
shell
=
True
)
!=
0
:
ori_path
=
os
.
getcwd
()
raise
RuntimeError
(
'Cannot compile pse: {}'
.
format
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))))
os
.
chdir
(
'ppocr/postprocess/pse_postprocess/pse'
)
if
subprocess
.
call
(
'{} setup.py build_ext --inplace'
.
format
(
python_path
),
shell
=
True
)
!=
0
:
raise
RuntimeError
(
'Cannot compile pse: {}'
.
format
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))))
os
.
chdir
(
ori_path
)
from
.pse
import
pse
from
.pse
import
pse
\ No newline at end of file
tools/program.py
浏览文件 @
fa1a1256
...
@@ -496,11 +496,6 @@ def preprocess(is_train=False):
...
@@ -496,11 +496,6 @@ def preprocess(is_train=False):
'CLS'
,
'PGNet'
,
'Distillation'
,
'NRTR'
,
'TableAttn'
,
'SAR'
,
'PSE'
,
'CLS'
,
'PGNet'
,
'Distillation'
,
'NRTR'
,
'TableAttn'
,
'SAR'
,
'PSE'
,
'SEED'
'SEED'
]
]
windows_not_support_list
=
[
'PSE'
]
if
platform
.
system
()
==
"Windows"
and
alg
in
windows_not_support_list
:
logger
.
warning
(
'{} is not support in Windows now'
.
format
(
windows_not_support_list
))
sys
.
exit
()
device
=
'gpu:{}'
.
format
(
dist
.
ParallelEnv
().
dev_id
)
if
use_gpu
else
'cpu'
device
=
'gpu:{}'
.
format
(
dist
.
ParallelEnv
().
dev_id
)
if
use_gpu
else
'cpu'
device
=
paddle
.
set_device
(
device
)
device
=
paddle
.
set_device
(
device
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录