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
4ea0ec20
"docs/source/en/vscode:/vscode.git/clone" did not exist on "79c380bc80051d8f82a38c3a7df6f8f4efd1633d"
Commit
4ea0ec20
authored
Apr 28, 2022
by
andyjpaddle
Browse files
Merge branch 'dygraph' of
https://github.com/PaddlePaddle/PaddleOCR
into dygraph
parents
9a22ef03
6a8a8f7a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
8 deletions
+10
-8
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+1
-1
applications/多模态表单识别.md
applications/多模态表单识别.md
+1
-1
deploy/slim/quantization/export_model.py
deploy/slim/quantization/export_model.py
+4
-5
ppocr/modeling/architectures/base_model.py
ppocr/modeling/architectures/base_model.py
+4
-1
No files found.
PPOCRLabel/PPOCRLabel.py
View file @
4ea0ec20
...
...
@@ -1733,7 +1733,7 @@ class MainWindow(QMainWindow):
width
,
height
=
self
.
image
.
width
(),
self
.
image
.
height
()
for
shape
in
self
.
canvas
.
lockedShapes
:
box
=
[[
int
(
p
[
0
]
*
width
),
int
(
p
[
1
]
*
height
)]
for
p
in
shape
[
'ratio'
]]
assert
len
(
box
)
==
4
#
assert len(box) == 4
result
=
[(
shape
[
'transcription'
],
1
)]
result
.
insert
(
0
,
box
)
self
.
result_dic_locked
.
append
(
result
)
...
...
applications/多模态表单识别.md
View file @
4ea0ec20
...
...
@@ -16,7 +16,7 @@
<center><img
src=
'https://ai-studio-static-online.cdn.bcebos.com/9bd844b970f94e5ba0bc0c5799bd819ea9b1861bb306471fabc2d628864d418e'
></center>
<center>
图1 多模态表单识别流程图
</center>
注:欢迎再AIStudio领取免费算力体验线上实训,项目链接: 多模态表单识别](https://aistudio.baidu.com/aistudio/projectdetail/3815918)(配备Tesla V100、A100等高级算力资源)
注:欢迎再AIStudio领取免费算力体验线上实训,项目链接:
[
多模态表单识别
](
https://aistudio.baidu.com/aistudio/projectdetail/3815918
)(
配备Tesla
V100、A100等高级算力资源)
...
...
deploy/slim/quantization/export_model.py
View file @
4ea0ec20
...
...
@@ -17,9 +17,9 @@ import sys
__dir__
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
sys
.
path
.
append
(
__dir__
)
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
__dir__
,
'..'
,
'..'
,
'..'
)))
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
__dir__
,
'..'
,
'..'
,
'..'
,
'tools'
)))
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
os
.
path
.
join
(
__dir__
,
'..'
,
'..'
,
'..'
)))
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
os
.
path
.
join
(
__dir__
,
'..'
,
'..'
,
'..'
,
'tools'
)))
import
argparse
...
...
@@ -129,7 +129,6 @@ def main():
quanter
.
quantize
(
model
)
load_model
(
config
,
model
)
model
.
eval
()
# build metric
eval_class
=
build_metric
(
config
[
'Metric'
])
...
...
@@ -142,6 +141,7 @@ def main():
# start eval
metric
=
program
.
eval
(
model
,
valid_dataloader
,
post_process_class
,
eval_class
,
model_type
,
use_srn
)
model
.
eval
()
logger
.
info
(
'metric eval ***************'
)
for
k
,
v
in
metric
.
items
():
...
...
@@ -156,7 +156,6 @@ def main():
if
arch_config
[
"algorithm"
]
in
[
"Distillation"
,
]:
# distillation model
archs
=
list
(
arch_config
[
"Models"
].
values
())
for
idx
,
name
in
enumerate
(
model
.
model_name_list
):
model
.
model_list
[
idx
].
eval
()
sub_model_save_path
=
os
.
path
.
join
(
save_path
,
name
,
"inference"
)
export_single_model
(
model
.
model_list
[
idx
],
archs
[
idx
],
sub_model_save_path
,
logger
,
quanter
)
...
...
ppocr/modeling/architectures/base_model.py
View file @
4ea0ec20
...
...
@@ -92,6 +92,9 @@ class BaseModel(nn.Layer):
else
:
y
[
"head_out"
]
=
x
if
self
.
return_all_feats
:
return
y
if
self
.
training
:
return
y
else
:
return
{
"head_out"
:
y
[
"head_out"
]}
else
:
return
x
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