Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleOCR
提交
5d27610e
P
PaddleOCR
项目概览
PaddlePaddle
/
PaddleOCR
大约 1 年 前同步成功
通知
1528
Star
32962
Fork
6643
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
108
列表
看板
标记
里程碑
合并请求
7
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
108
Issue
108
列表
看板
标记
里程碑
合并请求
7
合并请求
7
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5d27610e
编写于
4月 14, 2021
作者:
T
tink2123
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix some typo
上级
3f215a15
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
11 deletion
+9
-11
configs/rec/multi_language/generate_multi_language_configs.py
...igs/rec/multi_language/generate_multi_language_configs.py
+0
-1
doc/doc_ch/multi_languages.md
doc/doc_ch/multi_languages.md
+4
-5
doc/doc_en/multi_languages_en.md
doc/doc_en/multi_languages_en.md
+2
-3
paddleocr.py
paddleocr.py
+1
-0
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+1
-1
ppocr/postprocess/rec_postprocess.py
ppocr/postprocess/rec_postprocess.py
+1
-1
未找到文件。
configs/rec/multi_language/generate_multi_language_configs.py
浏览文件 @
5d27610e
...
@@ -118,7 +118,6 @@ class ArgsParser(ArgumentParser):
...
@@ -118,7 +118,6 @@ class ArgsParser(ArgumentParser):
return
config
return
config
def
_set_language
(
self
,
type
):
def
_set_language
(
self
,
type
):
print
(
"type:"
,
type
)
lang
=
type
[
0
]
lang
=
type
[
0
]
assert
(
type
),
"please use -l or --language to choose language type"
assert
(
type
),
"please use -l or --language to choose language type"
assert
(
assert
(
...
...
doc/doc_ch/multi_languages.md
浏览文件 @
5d27610e
...
@@ -134,7 +134,7 @@ paddleocr --image_dir PaddleOCR/doc/imgs/11.jpg --rec false
...
@@ -134,7 +134,7 @@ paddleocr --image_dir PaddleOCR/doc/imgs/11.jpg --rec false
<a
name=
"python_脚本运行"
></a>
<a
name=
"python_脚本运行"
></a>
### 2.2 python 脚本运行
### 2.2 python 脚本运行
ppocr 也支持在python脚本中运行,便于嵌入到您自己的代码中:
ppocr 也支持在python脚本中运行,便于嵌入到您自己的代码中
:
*
整图预测(检测+识别)
*
整图预测(检测+识别)
...
@@ -155,7 +155,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -155,7 +155,7 @@ image = Image.open(img_path).convert('RGB')
boxes = [line[0] for line in result]
boxes = [line[0] for line in result]
txts = [line[1][0] for line in result]
txts = [line[1][0] for line in result]
scores = [line[1][1] for line in result]
scores = [line[1][1] for line in result]
im_show = draw_ocr(image, boxes, txts, scores, font_path='/path/to/PaddleOCR/doc/korean.ttf')
im_show = draw_ocr(image, boxes, txts, scores, font_path='/path/to/PaddleOCR/doc/
fonts/
korean.ttf')
im_show = Image.fromarray(im_show)
im_show = Image.fromarray(im_show)
im_show.save('result.jpg')
im_show.save('result.jpg')
```
```
...
@@ -240,7 +240,7 @@ ppocr 支持使用自己的数据进行自定义训练或finetune, 其中识别
...
@@ -240,7 +240,7 @@ ppocr 支持使用自己的数据进行自定义训练或finetune, 其中识别
|德文|german|german|
|德文|german|german|
|日文|japan|japan|
|日文|japan|japan|
|韩文|korean|korean|
|韩文|korean|korean|
|中文繁体|chinese traditional |ch
_tra
|
|中文繁体|chinese traditional |ch
inese_cht
|
|意大利文| Italian |it|
|意大利文| Italian |it|
|西班牙文|Spanish |es|
|西班牙文|Spanish |es|
|葡萄牙文| Portuguese|pt|
|葡萄牙文| Portuguese|pt|
...
@@ -259,10 +259,9 @@ ppocr 支持使用自己的数据进行自定义训练或finetune, 其中识别
...
@@ -259,10 +259,9 @@ ppocr 支持使用自己的数据进行自定义训练或finetune, 其中识别
|乌克兰文|Ukranian|uk|
|乌克兰文|Ukranian|uk|
|白俄罗斯文|Belarusian|be|
|白俄罗斯文|Belarusian|be|
|泰卢固文|Telugu |te|
|泰卢固文|Telugu |te|
|卡纳达文|Kannada |kn|
|泰米尔文|Tamil |ta|
|泰米尔文|Tamil |ta|
|南非荷兰文 |Afrikaans |af|
|南非荷兰文 |Afrikaans |af|
|阿塞拜疆文 |Azerbaijani
|az|
|阿塞拜疆文 |Azerbaijani |az|
|波斯尼亚文|Bosnian|bs|
|波斯尼亚文|Bosnian|bs|
|捷克文|Czech|cs|
|捷克文|Czech|cs|
|威尔士文 |Welsh |cy|
|威尔士文 |Welsh |cy|
...
...
doc/doc_en/multi_languages_en.md
浏览文件 @
5d27610e
...
@@ -153,7 +153,7 @@ image = Image.open(img_path).convert('RGB')
...
@@ -153,7 +153,7 @@ image = Image.open(img_path).convert('RGB')
boxes = [line[0] for line in result]
boxes = [line[0] for line in result]
txts = [line[1][0] for line in result]
txts = [line[1][0] for line in result]
scores = [line[1][1] for line in result]
scores = [line[1][1] for line in result]
im_show = draw_ocr(image, boxes, txts, scores, font_path='/path/to/PaddleOCR/doc/korean.ttf')
im_show = draw_ocr(image, boxes, txts, scores, font_path='/path/to/PaddleOCR/doc/
fonts/
korean.ttf')
im_show = Image.fromarray(im_show)
im_show = Image.fromarray(im_show)
im_show.save('result.jpg')
im_show.save('result.jpg')
```
```
...
@@ -232,7 +232,7 @@ For functions such as data annotation, you can read the complete [Document Tutor
...
@@ -232,7 +232,7 @@ For functions such as data annotation, you can read the complete [Document Tutor
|german|german|
|german|german|
|japan|japan|
|japan|japan|
|korean|korean|
|korean|korean|
|chinese traditional |ch
_tra
|
|chinese traditional |ch
inese_cht
|
| Italian |it|
| Italian |it|
|Spanish |es|
|Spanish |es|
| Portuguese|pt|
| Portuguese|pt|
...
@@ -251,7 +251,6 @@ For functions such as data annotation, you can read the complete [Document Tutor
...
@@ -251,7 +251,6 @@ For functions such as data annotation, you can read the complete [Document Tutor
|Ukranian|uk|
|Ukranian|uk|
|Belarusian|be|
|Belarusian|be|
|Telugu |te|
|Telugu |te|
|Kannada |kn|
|Tamil |ta|
|Tamil |ta|
|Afrikaans |af|
|Afrikaans |af|
|Azerbaijani |az|
|Azerbaijani |az|
...
...
paddleocr.py
浏览文件 @
5d27610e
...
@@ -30,6 +30,7 @@ from ppocr.utils.logging import get_logger
...
@@ -30,6 +30,7 @@ from ppocr.utils.logging import get_logger
logger
=
get_logger
()
logger
=
get_logger
()
from
ppocr.utils.utility
import
check_and_read_gif
,
get_image_file_list
from
ppocr.utils.utility
import
check_and_read_gif
,
get_image_file_list
from
tools.infer.utility
import
draw_ocr
__all__
=
[
'PaddleOCR'
]
__all__
=
[
'PaddleOCR'
]
...
...
ppocr/data/imaug/label_ops.py
浏览文件 @
5d27610e
...
@@ -96,7 +96,7 @@ class BaseRecLabelEncode(object):
...
@@ -96,7 +96,7 @@ class BaseRecLabelEncode(object):
'ch'
,
'en'
,
'EN_symbol'
,
'french'
,
'german'
,
'japan'
,
'korean'
,
'ch'
,
'en'
,
'EN_symbol'
,
'french'
,
'german'
,
'japan'
,
'korean'
,
'EN'
,
'it'
,
'xi'
,
'pu'
,
'ru'
,
'ar'
,
'ta'
,
'ug'
,
'fa'
,
'ur'
,
'rs'
,
'EN'
,
'it'
,
'xi'
,
'pu'
,
'ru'
,
'ar'
,
'ta'
,
'ug'
,
'fa'
,
'ur'
,
'rs'
,
'oc'
,
'rsc'
,
'bg'
,
'uk'
,
'be'
,
'te'
,
'ka'
,
'chinese_cht'
,
'hi'
,
'oc'
,
'rsc'
,
'bg'
,
'uk'
,
'be'
,
'te'
,
'ka'
,
'chinese_cht'
,
'hi'
,
'mr'
,
'ne'
'mr'
,
'ne'
,
'latin'
,
'arabic'
,
'cyrillic'
,
'devanagari'
]
]
assert
character_type
in
support_character_type
,
"Only {} are supported now but get {}"
.
format
(
assert
character_type
in
support_character_type
,
"Only {} are supported now but get {}"
.
format
(
support_character_type
,
character_type
)
support_character_type
,
character_type
)
...
...
ppocr/postprocess/rec_postprocess.py
浏览文件 @
5d27610e
...
@@ -28,7 +28,7 @@ class BaseRecLabelDecode(object):
...
@@ -28,7 +28,7 @@ class BaseRecLabelDecode(object):
'ch'
,
'en'
,
'EN_symbol'
,
'french'
,
'german'
,
'japan'
,
'korean'
,
'ch'
,
'en'
,
'EN_symbol'
,
'french'
,
'german'
,
'japan'
,
'korean'
,
'it'
,
'xi'
,
'pu'
,
'ru'
,
'ar'
,
'ta'
,
'ug'
,
'fa'
,
'ur'
,
'rs'
,
'oc'
,
'it'
,
'xi'
,
'pu'
,
'ru'
,
'ar'
,
'ta'
,
'ug'
,
'fa'
,
'ur'
,
'rs'
,
'oc'
,
'rsc'
,
'bg'
,
'uk'
,
'be'
,
'te'
,
'ka'
,
'chinese_cht'
,
'hi'
,
'mr'
,
'rsc'
,
'bg'
,
'uk'
,
'be'
,
'te'
,
'ka'
,
'chinese_cht'
,
'hi'
,
'mr'
,
'ne'
,
'EN'
'ne'
,
'EN'
,
'latin'
,
'arabic'
,
'cyrillic'
,
'devanagari'
]
]
assert
character_type
in
support_character_type
,
"Only {} are supported now but get {}"
.
format
(
assert
character_type
in
support_character_type
,
"Only {} are supported now but get {}"
.
format
(
support_character_type
,
character_type
)
support_character_type
,
character_type
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录