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
6024fc9f
Unverified
Commit
6024fc9f
authored
May 12, 2022
by
Double_V
Committed by
GitHub
May 12, 2022
Browse files
Update label_ops.py
parent
40098932
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+6
-1
No files found.
ppocr/data/imaug/label_ops.py
View file @
6024fc9f
...
...
@@ -438,7 +438,12 @@ class KieLabelEncode(object):
texts
.
append
(
ann
[
'transcription'
])
text_ind
=
[
self
.
dict
[
c
]
for
c
in
text
if
c
in
self
.
dict
]
text_inds
.
append
(
text_ind
)
if
'label'
in
ann
.
keys
():
labels
.
append
(
ann
[
'label'
])
elif
'key_cls'
in
ann
.
keys
():
labels
.
append
(
ann
[
'key_cls'
])
else
:
raise
ValueError
(
"Cannot found 'key_cls' in ann.keys(), please check your training annotation."
)
edges
.
append
(
ann
.
get
(
'edge'
,
0
))
ann_infos
=
dict
(
image
=
data
[
'image'
],
...
...
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