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
9a8f5d08
Commit
9a8f5d08
authored
Apr 22, 2021
by
Jethong
Browse files
fix name
parent
2365c70e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
configs/e2e/e2e_r50_vd_pg.yml
configs/e2e/e2e_r50_vd_pg.yml
+5
-5
ppocr/data/imaug/label_ops.py
ppocr/data/imaug/label_ops.py
+5
-5
ppocr/data/imaug/pg_process.py
ppocr/data/imaug/pg_process.py
+1
-1
No files found.
configs/e2e/e2e_r50_vd_pg.yml
View file @
9a8f5d08
...
...
@@ -72,13 +72,13 @@ Train:
dataset
:
name
:
PGDataSet
data_dir
:
./train_data/total_text/train
label_file_list
:
[
./train_data/total_text/train/
]
label_file_list
:
[
./train_data/total_text/train/
total_text.txt
]
ratio_list
:
[
1.0
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
BGR
channel_first
:
False
-
E2ELabelEncode
_t
rain
:
-
E2ELabelEncode
T
rain
:
-
PGProcessTrain
:
batch_size
:
14
# same as loader: batch_size_per_card
min_crop_size
:
24
...
...
@@ -96,12 +96,12 @@ Eval:
dataset
:
name
:
PGDataSet
data_dir
:
./train_data/total_text/test
label_file_list
:
[
./train_data/total_text/test/
]
label_file_list
:
[
./train_data/total_text/test/
total_text.txt
]
transforms
:
-
DecodeImage
:
# load image
img_mode
:
RGB
channel_first
:
False
-
E2ELabelEncode
_t
est
:
-
E2ELabelEncode
T
est
:
-
E2EResizeForTest
:
max_side_len
:
768
-
NormalizeImage
:
...
...
@@ -111,7 +111,7 @@ Eval:
order
:
'
hwc'
-
ToCHWImage
:
-
KeepKeys
:
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
texts'
,
'
tags'
,
'
img_id'
]
keep_keys
:
[
'
image'
,
'
shape'
,
'
polys'
,
'
texts'
,
'
ignore_
tags'
,
'
img_id'
]
loader
:
shuffle
:
False
drop_last
:
False
...
...
ppocr/data/imaug/label_ops.py
View file @
9a8f5d08
...
...
@@ -187,14 +187,14 @@ class CTCLabelEncode(BaseRecLabelEncode):
return
dict_character
class
E2ELabelEncode
_t
est
(
BaseRecLabelEncode
):
class
E2ELabelEncode
T
est
(
BaseRecLabelEncode
):
def
__init__
(
self
,
max_text_length
,
character_dict_path
=
None
,
character_type
=
'EN'
,
use_space_char
=
False
,
**
kwargs
):
super
(
E2ELabelEncode
_t
est
,
super
(
E2ELabelEncode
T
est
,
self
).
__init__
(
max_text_length
,
character_dict_path
,
character_type
,
use_space_char
)
...
...
@@ -217,7 +217,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
boxes
=
np
.
array
(
boxes
,
dtype
=
np
.
float32
)
txt_tags
=
np
.
array
(
txt_tags
,
dtype
=
np
.
bool
)
data
[
'polys'
]
=
boxes
data
[
'tags'
]
=
txt_tags
data
[
'
ignore_
tags'
]
=
txt_tags
temp_texts
=
[]
for
text
in
txts
:
text
=
text
.
lower
()
...
...
@@ -231,7 +231,7 @@ class E2ELabelEncode_test(BaseRecLabelEncode):
return
data
class
E2ELabelEncode
_t
rain
(
object
):
class
E2ELabelEncode
T
rain
(
object
):
def
__init__
(
self
,
**
kwargs
):
pass
...
...
@@ -255,7 +255,7 @@ class E2ELabelEncode_train(object):
data
[
'polys'
]
=
boxes
data
[
'texts'
]
=
txts
data
[
'tags'
]
=
txt_tags
data
[
'
ignore_
tags'
]
=
txt_tags
return
data
...
...
ppocr/data/imaug/pg_process.py
View file @
9a8f5d08
...
...
@@ -750,7 +750,7 @@ class PGProcessTrain(object):
input_size
=
512
im
=
data
[
'image'
]
text_polys
=
data
[
'polys'
]
text_tags
=
data
[
'tags'
]
text_tags
=
data
[
'
ignore_
tags'
]
text_strs
=
data
[
'texts'
]
h
,
w
,
_
=
im
.
shape
text_polys
,
text_tags
,
hv_tags
=
self
.
check_and_validate_polys
(
...
...
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