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
c01e3267
Unverified
Commit
c01e3267
authored
May 13, 2020
by
dyning
Committed by
GitHub
May 13, 2020
Browse files
Merge pull request #8 from LDOUBLEV/fixocr
update det process code, +32 -> -32
parents
50225030
2a298fa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
ppocr/data/det/db_process.py
ppocr/data/det/db_process.py
+6
-2
ppocr/data/det/east_process.py
ppocr/data/det/east_process.py
+4
-0
No files found.
ppocr/data/det/db_process.py
View file @
c01e3267
...
...
@@ -143,12 +143,16 @@ class DBProcessTest(object):
resize_w
=
int
(
resize_w
*
ratio
)
if
resize_h
%
32
==
0
:
resize_h
=
resize_h
elif
resize_h
//
32
<=
1
:
resize_h
=
32
else
:
resize_h
=
(
resize_h
//
32
+
1
)
*
32
resize_h
=
(
resize_h
//
32
-
1
)
*
32
if
resize_w
%
32
==
0
:
resize_w
=
resize_w
elif
resize_w
//
32
<=
1
:
resize_w
=
32
else
:
resize_w
=
(
resize_w
//
32
+
1
)
*
32
resize_w
=
(
resize_w
//
32
-
1
)
*
32
try
:
if
int
(
resize_w
)
<=
0
or
int
(
resize_h
)
<=
0
:
return
None
,
(
None
,
None
)
...
...
ppocr/data/det/east_process.py
View file @
c01e3267
...
...
@@ -485,10 +485,14 @@ class EASTProcessTest(object):
resize_w
=
int
(
resize_w
*
ratio
)
if
resize_h
%
32
==
0
:
resize_h
=
resize_h
elif
resize_h
//
32
<=
1
:
resize_h
=
32
else
:
resize_h
=
(
resize_h
//
32
-
1
)
*
32
if
resize_w
%
32
==
0
:
resize_w
=
resize_w
elif
resize_w
//
32
<=
1
:
resize_w
=
32
else
:
resize_w
=
(
resize_w
//
32
-
1
)
*
32
im
=
cv2
.
resize
(
im
,
(
int
(
resize_w
),
int
(
resize_h
)))
...
...
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