Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleOCR
提交
3b646d4f
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看板
未验证
提交
3b646d4f
编写于
12月 22, 2021
作者:
littletomatodonkey
提交者:
GitHub
12月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix vq utils (#5001)
* fix vq utils * fix bs
上级
8fe1b8d3
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
17 addition
and
9 deletion
+17
-9
ppstructure/vqa/eval_re.py
ppstructure/vqa/eval_re.py
+1
-1
ppstructure/vqa/eval_ser.py
ppstructure/vqa/eval_ser.py
+1
-1
ppstructure/vqa/infer_re.py
ppstructure/vqa/infer_re.py
+1
-1
ppstructure/vqa/infer_ser.py
ppstructure/vqa/infer_ser.py
+5
-1
ppstructure/vqa/infer_ser_e2e.py
ppstructure/vqa/infer_ser_e2e.py
+6
-2
ppstructure/vqa/infer_ser_re_e2e.py
ppstructure/vqa/infer_ser_re_e2e.py
+1
-1
ppstructure/vqa/train_re.py
ppstructure/vqa/train_re.py
+1
-1
ppstructure/vqa/train_ser.py
ppstructure/vqa/train_ser.py
+1
-1
ppstructure/vqa/vqa_utils.py
ppstructure/vqa/vqa_utils.py
+0
-0
未找到文件。
ppstructure/vqa/eval_re.py
浏览文件 @
3b646d4f
...
@@ -24,7 +24,7 @@ import paddle
...
@@ -24,7 +24,7 @@ import paddle
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
from
xfun
import
XFUNDataset
from
xfun
import
XFUNDataset
from
utils
import
parse_args
,
get_bio_label_maps
,
print_arguments
from
vqa_
utils
import
parse_args
,
get_bio_label_maps
,
print_arguments
from
data_collator
import
DataCollator
from
data_collator
import
DataCollator
from
metric
import
re_score
from
metric
import
re_score
...
...
ppstructure/vqa/eval_ser.py
浏览文件 @
3b646d4f
...
@@ -33,7 +33,7 @@ from paddlenlp.transformers import LayoutLMModel, LayoutLMTokenizer, LayoutLMFor
...
@@ -33,7 +33,7 @@ from paddlenlp.transformers import LayoutLMModel, LayoutLMTokenizer, LayoutLMFor
from
xfun
import
XFUNDataset
from
xfun
import
XFUNDataset
from
losses
import
SERLoss
from
losses
import
SERLoss
from
utils
import
parse_args
,
get_bio_label_maps
,
print_arguments
from
vqa_
utils
import
parse_args
,
get_bio_label_maps
,
print_arguments
from
ppocr.utils.logging
import
get_logger
from
ppocr.utils.logging
import
get_logger
...
...
ppstructure/vqa/infer_re.py
浏览文件 @
3b646d4f
...
@@ -15,7 +15,7 @@ import paddle
...
@@ -15,7 +15,7 @@ import paddle
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
from
xfun
import
XFUNDataset
from
xfun
import
XFUNDataset
from
utils
import
parse_args
,
get_bio_label_maps
,
draw_re_results
from
vqa_
utils
import
parse_args
,
get_bio_label_maps
,
draw_re_results
from
data_collator
import
DataCollator
from
data_collator
import
DataCollator
from
ppocr.utils.logging
import
get_logger
from
ppocr.utils.logging
import
get_logger
...
...
ppstructure/vqa/infer_ser.py
浏览文件 @
3b646d4f
...
@@ -14,6 +14,10 @@
...
@@ -14,6 +14,10 @@
import
os
import
os
import
sys
import
sys
__dir__
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
sys
.
path
.
append
(
__dir__
)
import
json
import
json
import
cv2
import
cv2
import
numpy
as
np
import
numpy
as
np
...
@@ -22,7 +26,7 @@ from copy import deepcopy
...
@@ -22,7 +26,7 @@ from copy import deepcopy
import
paddle
import
paddle
# relative reference
# relative reference
from
utils
import
parse_args
,
get_image_file_list
,
draw_ser_results
,
get_bio_label_maps
from
vqa_
utils
import
parse_args
,
get_image_file_list
,
draw_ser_results
,
get_bio_label_maps
from
paddlenlp.transformers
import
LayoutXLMModel
,
LayoutXLMTokenizer
,
LayoutXLMForTokenClassification
from
paddlenlp.transformers
import
LayoutXLMModel
,
LayoutXLMTokenizer
,
LayoutXLMForTokenClassification
from
paddlenlp.transformers
import
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
from
paddlenlp.transformers
import
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
...
...
ppstructure/vqa/infer_ser_e2e.py
浏览文件 @
3b646d4f
...
@@ -14,6 +14,10 @@
...
@@ -14,6 +14,10 @@
import
os
import
os
import
sys
import
sys
__dir__
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
sys
.
path
.
append
(
__dir__
)
import
json
import
json
import
cv2
import
cv2
import
numpy
as
np
import
numpy
as
np
...
@@ -25,9 +29,9 @@ from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLM
...
@@ -25,9 +29,9 @@ from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLM
from
paddlenlp.transformers
import
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
from
paddlenlp.transformers
import
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
# relative reference
# relative reference
from
utils
import
parse_args
,
get_image_file_list
,
draw_ser_results
,
get_bio_label_maps
from
vqa_
utils
import
parse_args
,
get_image_file_list
,
draw_ser_results
,
get_bio_label_maps
from
utils
import
pad_sentences
,
split_page
,
preprocess
,
postprocess
,
merge_preds_list_with_ocr_info
from
vqa_
utils
import
pad_sentences
,
split_page
,
preprocess
,
postprocess
,
merge_preds_list_with_ocr_info
MODELS
=
{
MODELS
=
{
'LayoutXLM'
:
'LayoutXLM'
:
...
...
ppstructure/vqa/infer_ser_re_e2e.py
浏览文件 @
3b646d4f
...
@@ -24,7 +24,7 @@ import paddle
...
@@ -24,7 +24,7 @@ import paddle
from
paddlenlp.transformers
import
LayoutXLMModel
,
LayoutXLMTokenizer
,
LayoutXLMForRelationExtraction
from
paddlenlp.transformers
import
LayoutXLMModel
,
LayoutXLMTokenizer
,
LayoutXLMForRelationExtraction
# relative reference
# relative reference
from
utils
import
parse_args
,
get_image_file_list
,
draw_re_results
from
vqa_
utils
import
parse_args
,
get_image_file_list
,
draw_re_results
from
infer_ser_e2e
import
SerPredictor
from
infer_ser_e2e
import
SerPredictor
...
...
ppstructure/vqa/train_re.py
浏览文件 @
3b646d4f
...
@@ -27,7 +27,7 @@ import paddle
...
@@ -27,7 +27,7 @@ import paddle
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
from
xfun
import
XFUNDataset
from
xfun
import
XFUNDataset
from
utils
import
parse_args
,
get_bio_label_maps
,
print_arguments
,
set_seed
from
vqa_
utils
import
parse_args
,
get_bio_label_maps
,
print_arguments
,
set_seed
from
data_collator
import
DataCollator
from
data_collator
import
DataCollator
from
eval_re
import
evaluate
from
eval_re
import
evaluate
...
...
ppstructure/vqa/train_ser.py
浏览文件 @
3b646d4f
...
@@ -32,7 +32,7 @@ from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLM
...
@@ -32,7 +32,7 @@ from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLM
from
paddlenlp.transformers
import
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
from
paddlenlp.transformers
import
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
from
xfun
import
XFUNDataset
from
xfun
import
XFUNDataset
from
utils
import
parse_args
,
get_bio_label_maps
,
print_arguments
,
set_seed
from
vqa_
utils
import
parse_args
,
get_bio_label_maps
,
print_arguments
,
set_seed
from
eval_ser
import
evaluate
from
eval_ser
import
evaluate
from
losses
import
SERLoss
from
losses
import
SERLoss
from
ppocr.utils.logging
import
get_logger
from
ppocr.utils.logging
import
get_logger
...
...
ppstructure/vqa/utils.py
→
ppstructure/vqa/
vqa_
utils.py
浏览文件 @
3b646d4f
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录