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
d5f329d0
Unverified
Commit
d5f329d0
authored
May 12, 2022
by
yfzhou
Committed by
GitHub
May 12, 2022
Browse files
the file has no function [self.vector_slope]
self.vector_slope 方法不存在,应该是漏掉了
parent
40098932
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
ppocr/data/imaug/fce_targets.py
ppocr/data/imaug/fce_targets.py
+6
-3
No files found.
ppocr/data/imaug/fce_targets.py
View file @
d5f329d0
...
@@ -22,6 +22,9 @@ from numpy.fft import fft
...
@@ -22,6 +22,9 @@ from numpy.fft import fft
from
numpy.linalg
import
norm
from
numpy.linalg
import
norm
import
sys
import
sys
def
vector_slope
(
vec
):
assert
len
(
vec
)
==
2
return
abs
(
vec
[
1
]
/
(
vec
[
0
]
+
1e-8
))
class
FCENetTargets
:
class
FCENetTargets
:
"""Generate the ground truth targets of FCENet: Fourier Contour Embedding
"""Generate the ground truth targets of FCENet: Fourier Contour Embedding
...
@@ -233,9 +236,9 @@ class FCENetTargets:
...
@@ -233,9 +236,9 @@ class FCENetTargets:
head_inds
=
[
head_start
,
head_end
]
head_inds
=
[
head_start
,
head_end
]
tail_inds
=
[
tail_start
,
tail_end
]
tail_inds
=
[
tail_start
,
tail_end
]
else
:
else
:
if
self
.
vector_slope
(
points
[
1
]
-
points
[
0
])
+
self
.
vector_slope
(
if
vector_slope
(
points
[
1
]
-
points
[
0
])
+
vector_slope
(
points
[
3
]
-
points
[
2
])
<
self
.
vector_slope
(
points
[
points
[
3
]
-
points
[
2
])
<
vector_slope
(
points
[
2
]
-
points
[
1
])
+
self
.
vector_slope
(
points
[
0
]
-
points
[
2
]
-
points
[
1
])
+
vector_slope
(
points
[
0
]
-
points
[
3
]):
3
]):
horizontal_edge_inds
=
[[
0
,
1
],
[
2
,
3
]]
horizontal_edge_inds
=
[[
0
,
1
],
[
2
,
3
]]
vertical_edge_inds
=
[[
3
,
0
],
[
1
,
2
]]
vertical_edge_inds
=
[[
3
,
0
],
[
1
,
2
]]
...
...
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