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
3f824f00
Commit
3f824f00
authored
Jul 10, 2020
by
LDOUBLEV
Browse files
modify normalization of db_process to speed up
parent
244a06d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
ppocr/data/det/db_process.py
ppocr/data/det/db_process.py
+6
-2
No files found.
ppocr/data/det/db_process.py
View file @
3f824f00
...
@@ -194,8 +194,12 @@ class DBProcessTest(object):
...
@@ -194,8 +194,12 @@ class DBProcessTest(object):
img_std
=
[
0.229
,
0.224
,
0.225
]
img_std
=
[
0.229
,
0.224
,
0.225
]
im
=
im
.
astype
(
np
.
float32
,
copy
=
False
)
im
=
im
.
astype
(
np
.
float32
,
copy
=
False
)
im
=
im
/
255
im
=
im
/
255
im
-=
img_mean
im
[:,
:,
0
]
-=
img_mean
[
0
]
im
/=
img_std
im
[:,
:,
1
]
-=
img_mean
[
1
]
im
[:,
:,
2
]
-=
img_mean
[
2
]
im
[:,
:,
0
]
/=
img_std
[
0
]
im
[:,
:,
1
]
/=
img_std
[
1
]
im
[:,
:,
2
]
/=
img_std
[
2
]
channel_swap
=
(
2
,
0
,
1
)
channel_swap
=
(
2
,
0
,
1
)
im
=
im
.
transpose
(
channel_swap
)
im
=
im
.
transpose
(
channel_swap
)
return
im
return
im
...
...
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