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
f4094b97
Commit
f4094b97
authored
Jun 16, 2020
by
LDOUBLEV
Browse files
fix issue #206
parent
1abb0e4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
ppocr/modeling/architectures/det_model.py
ppocr/modeling/architectures/det_model.py
+16
-3
No files found.
ppocr/modeling/architectures/det_model.py
View file @
f4094b97
...
...
@@ -32,6 +32,7 @@ class DetModel(object):
params (dict): the super parameters for detection module.
"""
global_params
=
params
[
'Global'
]
self
.
global_params
=
global_params
self
.
algorithm
=
global_params
[
'algorithm'
]
backbone_params
=
deepcopy
(
params
[
"Backbone"
])
...
...
@@ -64,11 +65,23 @@ class DetModel(object):
if
mode
==
"train"
:
if
self
.
algorithm
==
"EAST"
:
score
=
fluid
.
layers
.
data
(
name
=
'score'
,
shape
=
[
1
,
128
,
128
],
dtype
=
'float32'
)
name
=
'score'
,
shape
=
[
1
,
int
(
image_shape
[
1
]
//
4
),
int
(
image_shape
[
2
]
//
4
)
],
dtype
=
'float32'
)
geo
=
fluid
.
layers
.
data
(
name
=
'geo'
,
shape
=
[
9
,
128
,
128
],
dtype
=
'float32'
)
name
=
'geo'
,
shape
=
[
9
,
int
(
image_shape
[
1
]
//
4
),
int
(
image_shape
[
2
]
//
4
)
],
dtype
=
'float32'
)
mask
=
fluid
.
layers
.
data
(
name
=
'mask'
,
shape
=
[
1
,
128
,
128
],
dtype
=
'float32'
)
name
=
'mask'
,
shape
=
[
1
,
int
(
image_shape
[
1
]
//
4
),
int
(
image_shape
[
2
]
//
4
)
],
dtype
=
'float32'
)
feed_list
=
[
image
,
score
,
geo
,
mask
]
labels
=
{
'score'
:
score
,
'geo'
:
geo
,
'mask'
:
mask
}
elif
self
.
algorithm
==
"DB"
:
...
...
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