Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
a8c8f485
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看板
提交
a8c8f485
编写于
4月 07, 2022
作者:
L
LDOUBLEV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete debug
上级
22b57e6e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
4 deletion
+3
-4
ppocr/modeling/heads/rec_ctc_head.py
ppocr/modeling/heads/rec_ctc_head.py
+0
-2
ppocr/postprocess/rec_postprocess.py
ppocr/postprocess/rec_postprocess.py
+2
-1
test_tipc/configs/ch_PP-OCRv2_rec_PACT/train_infer_python.txt
..._tipc/configs/ch_PP-OCRv2_rec_PACT/train_infer_python.txt
+1
-1
未找到文件。
ppocr/modeling/heads/rec_ctc_head.py
浏览文件 @
a8c8f485
...
@@ -80,9 +80,7 @@ class CTCHead(nn.Layer):
...
@@ -80,9 +80,7 @@ class CTCHead(nn.Layer):
result
=
(
x
,
predicts
)
result
=
(
x
,
predicts
)
else
:
else
:
result
=
predicts
result
=
predicts
print
(
"self.training: "
,
self
.
training
)
if
not
self
.
training
:
if
not
self
.
training
:
print
(
"self.training, "
,
self
.
training
)
predicts
=
F
.
softmax
(
predicts
,
axis
=
2
)
predicts
=
F
.
softmax
(
predicts
,
axis
=
2
)
result
=
predicts
result
=
predicts
...
...
ppocr/postprocess/rec_postprocess.py
浏览文件 @
a8c8f485
...
@@ -89,10 +89,11 @@ class CTCLabelDecode(BaseRecLabelDecode):
...
@@ -89,10 +89,11 @@ class CTCLabelDecode(BaseRecLabelDecode):
use_space_char
)
use_space_char
)
def
__call__
(
self
,
preds
,
label
=
None
,
*
args
,
**
kwargs
):
def
__call__
(
self
,
preds
,
label
=
None
,
*
args
,
**
kwargs
):
if
isinstance
(
preds
,
tuple
):
if
isinstance
(
preds
,
tuple
)
or
isinstance
(
preds
,
list
)
:
preds
=
preds
[
-
1
]
preds
=
preds
[
-
1
]
if
isinstance
(
preds
,
paddle
.
Tensor
):
if
isinstance
(
preds
,
paddle
.
Tensor
):
preds
=
preds
.
numpy
()
preds
=
preds
.
numpy
()
print
(
preds
.
shape
)
preds_idx
=
preds
.
argmax
(
axis
=
2
)
preds_idx
=
preds
.
argmax
(
axis
=
2
)
preds_prob
=
preds
.
max
(
axis
=
2
)
preds_prob
=
preds
.
max
(
axis
=
2
)
text
=
self
.
decode
(
preds_idx
,
preds_prob
,
is_remove_duplicate
=
True
)
text
=
self
.
decode
(
preds_idx
,
preds_prob
,
is_remove_duplicate
=
True
)
...
...
test_tipc/configs/ch_PP-OCRv2_rec_PACT/train_infer_python.txt
浏览文件 @
a8c8f485
===========================train_params===========================
===========================train_params===========================
model_name:ch_PPOCRv2_rec_PACT
model_name:ch_PPOCRv2_rec_PACT
python:python3.7
python:python3.7
gpu_list:
6
gpu_list:
0|0,1
Global.use_gpu:True|True
Global.use_gpu:True|True
Global.auto_cast:fp32
Global.auto_cast:fp32
Global.epoch_num:lite_train_lite_infer=6|whole_train_whole_infer=300
Global.epoch_num:lite_train_lite_infer=6|whole_train_whole_infer=300
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录