Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
652beeab
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "fdef2abdfbeb68342d7245a36f4d95ed2ca92e3a"
Commit
652beeab
authored
Dec 07, 2021
by
WenmuZhou
Browse files
update readme
parent
b1ae9136
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
ppstructure/vqa/README.md
ppstructure/vqa/README.md
+4
-4
ppstructure/vqa/data_collator.py
ppstructure/vqa/data_collator.py
+4
-5
No files found.
ppstructure/vqa/README.md
View file @
652beeab
# 文档视觉问答(DOC-VQA)
# 文档视觉问答(DOC-VQA)
DOC-VQA是VQA任务中的一种,DOC-VQA主要针对文本图像的文字内容提出问题。
VQA指视觉问答,主要针对图像内容进行提问和回答,
DOC-VQA是VQA任务中的一种,DOC-VQA主要针对文本图像的文字内容提出问题。
PP-Structure 里的 DOC-VQA算法基于PaddleNLP自然语言处理算法库进行开发。
PP-Structure 里的 DOC-VQA算法基于PaddleNLP自然语言处理算法库进行开发。
主要特性如下:
主要特性如下:
-
集成
[
LayoutXLM
](
https://arxiv.org/pdf/2104.08836.pdf
)
模型以及PP-OCR预测引擎。
-
集成
[
LayoutXLM
](
https://arxiv.org/pdf/2104.08836.pdf
)
模型以及PP-OCR预测引擎。
-
支持基于多模态方法的语义实体识别 (Semantic Entity Recognition, SER) 以及关系抽取 (Relation Extraction, RE) 任务。基于 SER 任务,可以完成对图像中的文本识别与分类;基于 RE 任务,可以完成对图象中的文本内容的关系提取,如判断问题对
-
支持基于多模态方法的语义实体识别 (Semantic Entity Recognition, SER) 以及关系抽取 (Relation Extraction, RE) 任务。基于 SER 任务,可以完成对图像中的文本识别与分类;基于 RE 任务,可以完成对图象中的文本内容的关系提取,如判断问题对
(pair)。
-
支持SER任务和RE任务的自定义训练
-
支持SER任务和RE任务的自定义训练
。
-
支持OCR+SER的端到端系统预测与评估。
-
支持OCR+SER的端到端系统预测与评估。
-
支持OCR+SER+RE的端到端系统预测。
-
支持OCR+SER+RE的端到端系统预测。
...
@@ -20,7 +20,7 @@ PP-Structure 里的 DOC-VQA算法基于PaddleNLP自然语言处理算法库进
...
@@ -20,7 +20,7 @@ PP-Structure 里的 DOC-VQA算法基于PaddleNLP自然语言处理算法库进
我们在
[
XFUN
](
https://github.com/doc-analysis/XFUND
)
评估数据集上对算法进行了评估,性能如下
我们在
[
XFUN
](
https://github.com/doc-analysis/XFUND
)
评估数据集上对算法进行了评估,性能如下
|任务|
Hmean
| 模型下载地址|
|任务|
f1
| 模型下载地址|
|:---:|:---:| :---:|
|:---:|:---:| :---:|
|SER|0.9056|
[
链接
](
https://paddleocr.bj.bcebos.com/pplayout/PP-Layout_v1.0_ser_pretrained.tar
)
|
|SER|0.9056|
[
链接
](
https://paddleocr.bj.bcebos.com/pplayout/PP-Layout_v1.0_ser_pretrained.tar
)
|
|RE|0.7113|
[
链接
](
https://paddleocr.bj.bcebos.com/pplayout/PP-Layout_v1.0_re_pretrained.tar
)
|
|RE|0.7113|
[
链接
](
https://paddleocr.bj.bcebos.com/pplayout/PP-Layout_v1.0_re_pretrained.tar
)
|
...
...
ppstructure/vqa/data_collator.py
View file @
652beeab
...
@@ -18,6 +18,10 @@ import numpy as np
...
@@ -18,6 +18,10 @@ import numpy as np
class
DataCollator
:
class
DataCollator
:
"""
data batch
"""
def
__call__
(
self
,
batch
):
def
__call__
(
self
,
batch
):
data_dict
=
{}
data_dict
=
{}
to_tensor_keys
=
[]
to_tensor_keys
=
[]
...
@@ -32,8 +36,3 @@ class DataCollator:
...
@@ -32,8 +36,3 @@ class DataCollator:
for
k
in
to_tensor_keys
:
for
k
in
to_tensor_keys
:
data_dict
[
k
]
=
paddle
.
to_tensor
(
data_dict
[
k
])
data_dict
[
k
]
=
paddle
.
to_tensor
(
data_dict
[
k
])
return
data_dict
return
data_dict
class
DataCollatorNoBatch
:
def
__call__
(
self
,
batch
):
return
batch
[
0
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment