Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleOCR
提交
484bf2f7
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看板
提交
484bf2f7
编写于
7月 14, 2022
作者:
xuyang2233
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modified SPINLabelEncode SPINLabelDecode
上级
f6142746
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
12 addition
and
12 deletion
+12
-12
configs/rec/rec_r32_gaspin_bilstm_att.yml
configs/rec/rec_r32_gaspin_bilstm_att.yml
+3
-3
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+2
-2
ppocr/postprocess/__init__.py
ppocr/postprocess/__init__.py
+2
-2
ppocr/postprocess/rec_postprocess.py
ppocr/postprocess/rec_postprocess.py
+2
-2
test_tipc/configs/rec_r32_gaspin_bilstm_att/rec_r32_gaspin_bilstm_att.yml
...s/rec_r32_gaspin_bilstm_att/rec_r32_gaspin_bilstm_att.yml
+3
-3
未找到文件。
configs/rec/rec_r32_gaspin_bilstm_att.yml
浏览文件 @
484bf2f7
...
...
@@ -60,7 +60,7 @@ Loss:
ignore_index
:
0
PostProcess
:
name
:
SPIN
Attn
LabelDecode
name
:
SPINLabelDecode
use_space_char
:
False
...
...
@@ -78,7 +78,7 @@ Train:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
SPIN
Attn
LabelEncode
:
# Class handling label
-
SPINLabelEncode
:
# Class handling label
-
SPINRecResizeImg
:
image_shape
:
[
100
,
32
]
interpolation
:
2
...
...
@@ -101,7 +101,7 @@ Eval:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
SPIN
Attn
LabelEncode
:
# Class handling label
-
SPINLabelEncode
:
# Class handling label
-
SPINRecResizeImg
:
image_shape
:
[
100
,
32
]
interpolation
:
2
...
...
ppocr/data/imaug/label_ops.py
浏览文件 @
484bf2f7
...
...
@@ -1217,7 +1217,7 @@ class ABINetLabelEncode(BaseRecLabelEncode):
dict_character
=
[
'</s>'
]
+
dict_character
return
dict_character
class
SPIN
Attn
LabelEncode
(
AttnLabelEncode
):
class
SPINLabelEncode
(
AttnLabelEncode
):
""" Convert between text-label and text-index """
def
__init__
(
self
,
...
...
@@ -1226,7 +1226,7 @@ class SPINAttnLabelEncode(AttnLabelEncode):
use_space_char
=
False
,
lower
=
True
,
**
kwargs
):
super
(
SPIN
Attn
LabelEncode
,
self
).
__init__
(
super
(
SPINLabelEncode
,
self
).
__init__
(
max_text_length
,
character_dict_path
,
use_space_char
)
self
.
lower
=
lower
def
add_special_char
(
self
,
dict_character
):
...
...
ppocr/postprocess/__init__.py
浏览文件 @
484bf2f7
...
...
@@ -28,7 +28,7 @@ from .fce_postprocess import FCEPostProcess
from
.rec_postprocess
import
CTCLabelDecode
,
AttnLabelDecode
,
SRNLabelDecode
,
\
DistillationCTCLabelDecode
,
NRTRLabelDecode
,
SARLabelDecode
,
\
SEEDLabelDecode
,
PRENLabelDecode
,
ViTSTRLabelDecode
,
ABINetLabelDecode
,
\
SPIN
Attn
LabelDecode
SPINLabelDecode
from
.cls_postprocess
import
ClsPostProcess
from
.pg_postprocess
import
PGPostProcess
from
.vqa_token_ser_layoutlm_postprocess
import
VQASerTokenLayoutLMPostProcess
...
...
@@ -45,7 +45,7 @@ def build_post_process(config, global_config=None):
'SEEDLabelDecode'
,
'VQASerTokenLayoutLMPostProcess'
,
'VQAReTokenLayoutLMPostProcess'
,
'PRENLabelDecode'
,
'DistillationSARLabelDecode'
,
'ViTSTRLabelDecode'
,
'ABINetLabelDecode'
,
'TableMasterLabelDecode'
,
'SPIN
Attn
LabelDecode'
'TableMasterLabelDecode'
,
'SPINLabelDecode'
]
if
config
[
'name'
]
==
'PSEPostProcess'
:
...
...
ppocr/postprocess/rec_postprocess.py
浏览文件 @
484bf2f7
...
...
@@ -668,12 +668,12 @@ class ABINetLabelDecode(NRTRLabelDecode):
dict_character
=
[
'</s>'
]
+
dict_character
return
dict_character
class
SPIN
Attn
LabelDecode
(
AttnLabelDecode
):
class
SPINLabelDecode
(
AttnLabelDecode
):
""" Convert between text-label and text-index """
def
__init__
(
self
,
character_dict_path
=
None
,
use_space_char
=
False
,
**
kwargs
):
super
(
SPIN
Attn
LabelDecode
,
self
).
__init__
(
character_dict_path
,
super
(
SPINLabelDecode
,
self
).
__init__
(
character_dict_path
,
use_space_char
)
def
add_special_char
(
self
,
dict_character
):
...
...
test_tipc/configs/rec_r32_gaspin_bilstm_att/rec_r32_gaspin_bilstm_att.yml
浏览文件 @
484bf2f7
...
...
@@ -61,7 +61,7 @@ Loss:
ignore_index
:
0
PostProcess
:
name
:
SPIN
Attn
LabelDecode
name
:
SPINLabelDecode
use_space_char
:
False
...
...
@@ -79,7 +79,7 @@ Train:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
SPIN
Attn
LabelEncode
:
# Class handling label
-
SPINLabelEncode
:
# Class handling label
-
SPINRecResizeImg
:
image_shape
:
[
100
,
32
]
interpolation
:
2
...
...
@@ -102,7 +102,7 @@ Eval:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
SPIN
Attn
LabelEncode
:
# Class handling label
-
SPINLabelEncode
:
# Class handling label
-
SPINRecResizeImg
:
image_shape
:
[
100
,
32
]
interpolation
:
2
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录