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
42d2f7af
Unverified
Commit
42d2f7af
authored
Jul 17, 2020
by
dyning
Committed by
GitHub
Jul 17, 2020
Browse files
Merge pull request #366 from BeyondYourself/develop
add the missing improt for east_process.py and format some codes
parents
455769b1
2f87ed81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ppocr/data/det/east_process.py
ppocr/data/det/east_process.py
+3
-3
No files found.
ppocr/data/det/east_process.py
View file @
42d2f7af
...
@@ -16,7 +16,7 @@ import math
...
@@ -16,7 +16,7 @@ import math
import
cv2
import
cv2
import
numpy
as
np
import
numpy
as
np
import
json
import
json
import
sys
class
EASTProcessTrain
(
object
):
class
EASTProcessTrain
(
object
):
def
__init__
(
self
,
params
):
def
__init__
(
self
,
params
):
...
@@ -78,7 +78,7 @@ class EASTProcessTrain(object):
...
@@ -78,7 +78,7 @@ class EASTProcessTrain(object):
dst_polys
=
[]
dst_polys
=
[]
rand_degree_ratio
=
np
.
random
.
rand
()
rand_degree_ratio
=
np
.
random
.
rand
()
rand_degree_cnt
=
1
rand_degree_cnt
=
1
if
rand_degree_ratio
>
0.333
and
rand_degree_ratio
<
0.666
:
if
0.333
<
rand_degree_ratio
<
0.666
:
rand_degree_cnt
=
2
rand_degree_cnt
=
2
elif
rand_degree_ratio
>
0.666
:
elif
rand_degree_ratio
>
0.666
:
rand_degree_cnt
=
3
rand_degree_cnt
=
3
...
@@ -138,7 +138,7 @@ class EASTProcessTrain(object):
...
@@ -138,7 +138,7 @@ class EASTProcessTrain(object):
continue
continue
if
p_area
>
0
:
if
p_area
>
0
:
#'poly in wrong direction'
#'poly in wrong direction'
if
tag
==
False
:
if
not
tag
:
tag
=
True
#reversed cases should be ignore
tag
=
True
#reversed cases should be ignore
poly
=
poly
[(
0
,
3
,
2
,
1
),
:]
poly
=
poly
[(
0
,
3
,
2
,
1
),
:]
validated_polys
.
append
(
poly
)
validated_polys
.
append
(
poly
)
...
...
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