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
3b646d4f
Unverified
Commit
3b646d4f
authored
Dec 22, 2021
by
littletomatodonkey
Committed by
GitHub
Dec 22, 2021
Browse files
fix vq utils (#5001)
* fix vq utils * fix bs
parent
8fe1b8d3
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
17 additions
and
9 deletions
+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
No files found.
ppstructure/vqa/eval_re.py
View file @
3b646d4f
...
...
@@ -24,7 +24,7 @@ import paddle
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
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
metric
import
re_score
...
...
ppstructure/vqa/eval_ser.py
View file @
3b646d4f
...
...
@@ -33,7 +33,7 @@ from paddlenlp.transformers import LayoutLMModel, LayoutLMTokenizer, LayoutLMFor
from
xfun
import
XFUNDataset
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
...
...
ppstructure/vqa/infer_re.py
View file @
3b646d4f
...
...
@@ -15,7 +15,7 @@ import paddle
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
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
ppocr.utils.logging
import
get_logger
...
...
ppstructure/vqa/infer_ser.py
View file @
3b646d4f
...
...
@@ -14,6 +14,10 @@
import
os
import
sys
__dir__
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
sys
.
path
.
append
(
__dir__
)
import
json
import
cv2
import
numpy
as
np
...
...
@@ -22,7 +26,7 @@ from copy import deepcopy
import
paddle
# 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
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
...
...
ppstructure/vqa/infer_ser_e2e.py
View file @
3b646d4f
...
...
@@ -14,6 +14,10 @@
import
os
import
sys
__dir__
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
sys
.
path
.
append
(
__dir__
)
import
json
import
cv2
import
numpy
as
np
...
...
@@ -25,9 +29,9 @@ from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLM
from
paddlenlp.transformers
import
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
# 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
=
{
'LayoutXLM'
:
...
...
ppstructure/vqa/infer_ser_re_e2e.py
View file @
3b646d4f
...
...
@@ -24,7 +24,7 @@ import paddle
from
paddlenlp.transformers
import
LayoutXLMModel
,
LayoutXLMTokenizer
,
LayoutXLMForRelationExtraction
# 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
...
...
ppstructure/vqa/train_re.py
View file @
3b646d4f
...
...
@@ -27,7 +27,7 @@ import paddle
from
paddlenlp.transformers
import
LayoutXLMTokenizer
,
LayoutXLMModel
,
LayoutXLMForRelationExtraction
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
eval_re
import
evaluate
...
...
ppstructure/vqa/train_ser.py
View file @
3b646d4f
...
...
@@ -32,7 +32,7 @@ from paddlenlp.transformers import LayoutXLMModel, LayoutXLMTokenizer, LayoutXLM
from
paddlenlp.transformers
import
LayoutLMModel
,
LayoutLMTokenizer
,
LayoutLMForTokenClassification
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
losses
import
SERLoss
from
ppocr.utils.logging
import
get_logger
...
...
ppstructure/vqa/utils.py
→
ppstructure/vqa/
vqa_
utils.py
View file @
3b646d4f
File moved
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