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
160bb06e
Unverified
Commit
160bb06e
authored
Jun 23, 2020
by
MissPenguin
Committed by
GitHub
Jun 23, 2020
Browse files
add config.enable_memory_optim()
parent
f051be86
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
tools/infer/utility.py
tools/infer/utility.py
+2
-1
No files found.
tools/infer/utility.py
View file @
160bb06e
...
@@ -88,6 +88,7 @@ def create_predictor(args, mode):
...
@@ -88,6 +88,7 @@ def create_predictor(args, mode):
if
args
.
use_gpu
:
if
args
.
use_gpu
:
config
.
enable_use_gpu
(
args
.
gpu_mem
,
0
)
config
.
enable_use_gpu
(
args
.
gpu_mem
,
0
)
config
.
enable_memory_optim
()
else
:
else
:
config
.
disable_gpu
()
config
.
disable_gpu
()
...
@@ -310,4 +311,4 @@ if __name__ == '__main__':
...
@@ -310,4 +311,4 @@ if __name__ == '__main__':
new_img
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
draw_txt
=
True
)
new_img
=
draw_ocr
(
image
,
boxes
,
txts
,
scores
,
draw_txt
=
True
)
cv2
.
imwrite
(
img_name
,
new_img
)
cv2
.
imwrite
(
img_name
,
new_img
)
\ No newline at end of file
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