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
f6d6249c
Commit
f6d6249c
authored
Jul 06, 2020
by
tink2123
Browse files
change name for jitter
parent
8d849cfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
ppocr/data/rec/img_tools.py
ppocr/data/rec/img_tools.py
+5
-5
No files found.
ppocr/data/rec/img_tools.py
View file @
f6d6249c
...
...
@@ -119,9 +119,9 @@ def blur(img):
return
img
def
doudong
(
img
):
def
jitter
(
img
):
"""
doudong
jitter
"""
w
,
h
,
_
=
img
.
shape
if
h
>
10
and
w
>
10
:
...
...
@@ -198,7 +198,7 @@ class Config:
self
.
affine
=
False
self
.
reverse
=
True
self
.
noise
=
True
self
.
dou
=
Fals
e
self
.
jitter
=
Tru
e
self
.
blur
=
True
self
.
color
=
True
...
...
@@ -323,8 +323,8 @@ def warp(img, ang):
tp
=
random
.
randint
(
1
,
100
)
if
tp
>=
50
:
new_img
=
cvtColor
(
new_img
)
if
config
.
dou
:
new_img
=
doudong
(
new_img
)
if
config
.
jitter
:
new_img
=
jitter
(
new_img
)
if
config
.
noise
:
tp
=
random
.
randint
(
1
,
100
)
if
tp
>=
50
:
...
...
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