Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleOCR
提交
52c4d5b4
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看板
未验证
提交
52c4d5b4
编写于
5月 07, 2022
作者:
X
xiaoting
提交者:
GitHub
5月 07, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update multi-models and fix pdserving (#6160)
上级
364817f3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
27 deletion
+28
-27
deploy/pdserving/config.yml
deploy/pdserving/config.yml
+4
-4
deploy/pdserving/ocr_reader.py
deploy/pdserving/ocr_reader.py
+12
-9
deploy/pdserving/web_service.py
deploy/pdserving/web_service.py
+1
-1
deploy/pdserving/web_service_det.py
deploy/pdserving/web_service_det.py
+1
-1
doc/doc_ch/models_list.md
doc/doc_ch/models_list.md
+10
-12
未找到文件。
deploy/pdserving/config.yml
浏览文件 @
52c4d5b4
...
...
@@ -36,8 +36,8 @@ op:
#det模型路径
model_config
:
./ppocr_det_v3_serving
#Fetch结果列表,以client_config中fetch_var的alias_name为准
fetch_list
:
[
"
sigmoid_0.tmp_0"
]
#Fetch结果列表,以client_config中fetch_var的alias_name为准
,不设置默认取全部输出变量
#
fetch_list: ["sigmoid_0.tmp_0"]
#计算硬件ID,当devices为""或不写时为CPU预测;当devices为"0", "0,1,2"时为GPU预测,表示使用的GPU卡
devices
:
"
0"
...
...
@@ -62,8 +62,8 @@ op:
#rec模型路径
model_config
:
./ppocr_rec_v3_serving
#Fetch结果列表,以client_config中fetch_var的alias_name为准
fetch_list
:
[
"
softmax_5.tmp_0"
]
#Fetch结果列表,以client_config中fetch_var的alias_name为准
, 不设置默认取全部输出变量
#fetch_list:
#计算硬件ID,当devices为""或不写时为CPU预测;当devices为"0", "0,1,2"时为GPU预测,表示使用的GPU卡
devices
:
"
0"
...
...
deploy/pdserving/ocr_reader.py
浏览文件 @
52c4d5b4
...
...
@@ -393,7 +393,7 @@ class OCRReader(object):
return
norm_img_batch
[
0
]
def
postprocess
(
self
,
outputs
,
with_score
=
False
):
preds
=
outputs
[
"softmax_5.tmp_0"
]
preds
=
list
(
outputs
.
values
())[
0
]
try
:
preds
=
preds
.
numpy
()
except
:
...
...
@@ -404,8 +404,11 @@ class OCRReader(object):
preds_idx
,
preds_prob
,
is_remove_duplicate
=
True
)
return
text
from
argparse
import
ArgumentParser
,
RawDescriptionHelpFormatter
from
argparse
import
ArgumentParser
,
RawDescriptionHelpFormatter
import
yaml
class
ArgsParser
(
ArgumentParser
):
def
__init__
(
self
):
super
(
ArgsParser
,
self
).
__init__
(
...
...
@@ -441,16 +444,16 @@ class ArgsParser(ArgumentParser):
s
=
s
.
strip
()
k
,
v
=
s
.
split
(
'='
)
v
=
self
.
_parse_helper
(
v
)
print
(
k
,
v
,
type
(
v
))
print
(
k
,
v
,
type
(
v
))
cur
=
config
parent
=
cur
for
kk
in
k
.
split
(
"."
):
if
kk
not
in
cur
:
cur
[
kk
]
=
{}
parent
=
cur
cur
=
cur
[
kk
]
cur
[
kk
]
=
{}
parent
=
cur
cur
=
cur
[
kk
]
else
:
parent
=
cur
cur
=
cur
[
kk
]
parent
=
cur
cur
=
cur
[
kk
]
parent
[
k
.
split
(
"."
)[
-
1
]]
=
v
return
config
\ No newline at end of file
return
config
deploy/pdserving/web_service.py
浏览文件 @
52c4d5b4
...
...
@@ -56,7 +56,7 @@ class DetOp(Op):
return
{
"x"
:
det_img
[
np
.
newaxis
,
:].
copy
()},
False
,
None
,
""
def
postprocess
(
self
,
input_dicts
,
fetch_dict
,
data_id
,
log_id
):
det_out
=
fetch_dict
[
"sigmoid_0.tmp_0"
]
det_out
=
list
(
fetch_dict
.
values
())[
0
]
ratio_list
=
[
float
(
self
.
new_h
)
/
self
.
ori_h
,
float
(
self
.
new_w
)
/
self
.
ori_w
]
...
...
deploy/pdserving/web_service_det.py
浏览文件 @
52c4d5b4
...
...
@@ -55,7 +55,7 @@ class DetOp(Op):
return
{
"x"
:
det_img
[
np
.
newaxis
,
:].
copy
()},
False
,
None
,
""
def
postprocess
(
self
,
input_dicts
,
fetch_dict
,
data_id
,
log_id
):
det_out
=
fetch_dict
[
"sigmoid_0.tmp_0"
]
det_out
=
list
(
fetch_dict
.
values
())[
0
]
ratio_list
=
[
float
(
self
.
new_h
)
/
self
.
ori_h
,
float
(
self
.
new_w
)
/
self
.
ori_w
]
...
...
doc/doc_ch/models_list.md
浏览文件 @
52c4d5b4
...
...
@@ -107,18 +107,16 @@ PaddleOCR提供的可下载模型包括`推理模型`、`训练模型`、`预训
|模型名称|字典文件|模型简介|配置文件|推理模型大小|下载地址|
| --- | --- | --- | --- |--- | --- |
| korean_PP-OCRv3_rec | ppocr/utils/dict/korean_dict.txt |韩文识别|
[
korean_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/korean_PP-OCRv3_rec.yml
)
|11M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/korean_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/korean_PP-OCRv3_rec_train.tar
)
|
| japan_PP-OCRv3_rec | ppocr/utils/dict/japan_dict.txt |日文识别|
[
japan_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/japan_PP-OCRv3_rec.yml
)
|11M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/japan_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/japan_PP-OCRv3_rec_train.tar
)
|
| chinese_cht_PP-OCRv3_rec | ppocr/utils/dict/chinese_cht_dict.txt | 中文繁体识别|
[
chinese_cht_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/chinese_cht_PP-OCRv3_rec.yml
)
|12M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/chinese_cht_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/chinese_cht_PP-OCRv3_rec_train.tar
)
|
| te_PP-OCRv3_rec | ppocr/utils/dict/te_dict.txt | 泰卢固文识别|
[
te_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/te_PP-OCRv3_rec.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/te_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/te_PP-OCRv3_rec_train.tar
)
|
| ka_PP-OCRv3_rec | ppocr/utils/dict/ka_dict.txt |卡纳达文识别|
[
ka_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/ka_PP-OCRv3_rec.yml
)
|9.9M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/ka_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/ka_PP-OCRv3_rec_train.tar
)
|
| ta_PP-OCRv3_rec | ppocr/utils/dict/ta_dict.txt |泰米尔文识别|
[
ta_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/ta_PP-OCRv3_rec.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/ta_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/ta_PP-OCRv3_rec_train.tar
)
|
| latin_PP-OCRv3_rec | ppocr/utils/dict/latin_dict.txt | 拉丁文识别 |
[
latin_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/latin_PP-OCRv3_rec.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/latin_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/latin_PP-OCRv3_rec_train.tar
)
|
| arabic_PP-OCRv3_rec | ppocr/utils/dict/arabic_dict.txt | 阿拉伯字母 |
[
arabic_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/rec_arabic_lite_train.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/arabic_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/arabic_PP-OCRv3_rec_train.tar
)
|
| cyrillic_PP-OCRv3_rec | ppocr/utils/dict/cyrillic_dict.txt | 斯拉夫字母 |
[
cyrillic_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/cyrillic_PP-OCRv3_rec.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/cyrillic_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/cyrillic_PP-OCRv3_rec_train.tar
)
|
| devanagari_PP-OCRv3_rec | ppocr/utils/dict/devanagari_dict.txt |梵文字母 |
[
devanagari_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/devanagari_PP-OCRv3_rec.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/devanagari_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/dygraph_v2.0/multilingual/devanagari_PP-OCRv3_rec_train.tar
)
|
| korean_PP-OCRv3_rec | ppocr/utils/dict/korean_dict.txt |韩文识别|
[
korean_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/korean_PP-OCRv3_rec.yml
)
|11M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/korean_PP-OCRv3_rec_train.tar
)
|
| japan_PP-OCRv3_rec | ppocr/utils/dict/japan_dict.txt |日文识别|
[
japan_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/japan_PP-OCRv3_rec.yml
)
|11M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/japan_PP-OCRv3_rec_train.tar
)
|
| chinese_cht_PP-OCRv3_rec | ppocr/utils/dict/chinese_cht_dict.txt | 中文繁体识别|
[
chinese_cht_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/chinese_cht_PP-OCRv3_rec.yml
)
|12M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/chinese_cht_PP-OCRv3_rec_train.tar
)
|
| te_PP-OCRv3_rec | ppocr/utils/dict/te_dict.txt | 泰卢固文识别|
[
te_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/te_PP-OCRv3_rec.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/te_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/te_PP-OCRv3_rec_train.tar
)
|
| ka_PP-OCRv3_rec | ppocr/utils/dict/ka_dict.txt |卡纳达文识别|
[
ka_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/ka_PP-OCRv3_rec.yml
)
|9.9M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ka_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ka_PP-OCRv3_rec_train.tar
)
|
| ta_PP-OCRv3_rec | ppocr/utils/dict/ta_dict.txt |泰米尔文识别|
[
ta_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/ta_PP-OCRv3_rec.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ta_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/ta_PP-OCRv3_rec_train.tar
)
|
| latin_PP-OCRv3_rec | ppocr/utils/dict/latin_dict.txt | 拉丁文识别 |
[
latin_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/latin_PP-OCRv3_rec.yml
)
|9.7M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/latin_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/latin_PP-OCRv3_rec_train.tar
)
|
| arabic_PP-OCRv3_rec | ppocr/utils/dict/arabic_dict.txt | 阿拉伯字母 |
[
arabic_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/rec_arabic_lite_train.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/arabic_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/arabic_PP-OCRv3_rec_train.tar
)
|
| cyrillic_PP-OCRv3_rec | ppocr/utils/dict/cyrillic_dict.txt | 斯拉夫字母 |
[
cyrillic_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/cyrillic_PP-OCRv3_rec.yml
)
|9.6M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/cyrillic_PP-OCRv3_rec_train.tar
)
|
| devanagari_PP-OCRv3_rec | ppocr/utils/dict/devanagari_dict.txt |梵文字母 |
[
devanagari_PP-OCRv3_rec.yml
](
../../configs/rec/PP-OCRv3/multi_language/devanagari_PP-OCRv3_rec.yml
)
|9.9M|
[
推理模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_infer.tar
)
/
[
训练模型
](
https://paddleocr.bj.bcebos.com/PP-OCRv3/multilingual/devanagari_PP-OCRv3_rec_train.tar
)
|
更多支持语种请参考:
[
多语言模型
](
./multi_languages.md
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录