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
e884da9e
Commit
e884da9e
authored
May 19, 2020
by
tink2123
Browse files
fix use_gpu=False
parent
f806d8d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
doc/recognition.md
doc/recognition.md
+2
-2
tools/export_model.py
tools/export_model.py
+2
-2
No files found.
doc/recognition.md
View file @
e884da9e
...
@@ -184,7 +184,7 @@ python3 tools/eval.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkp
...
@@ -184,7 +184,7 @@ python3 tools/eval.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkp
```
```
# 预测英文结果
# 预测英文结果
python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_word/en/word_1.jpg
python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_word
s
/en/word_1.jpg
```
```
预测图片:
预测图片:
...
@@ -204,7 +204,7 @@ infer_img: doc/imgs_words/en/word_1.png
...
@@ -204,7 +204,7 @@ infer_img: doc/imgs_words/en/word_1.png
```
```
# 预测中文结果
# 预测中文结果
python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_word/ch/word_1.jpg
python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_word
s
/ch/word_1.jpg
```
```
预测图片:
预测图片:
...
...
tools/export_model.py
View file @
e884da9e
...
@@ -31,7 +31,7 @@ def set_paddle_flags(**kwargs):
...
@@ -31,7 +31,7 @@ def set_paddle_flags(**kwargs):
# NOTE(paddle-dev): All of these flags should be
# NOTE(paddle-dev): All of these flags should be
# set before `import paddle`. Otherwise, it would
# set before `import paddle`. Otherwise, it would
# not take any effect.
# not take any effect.
set_paddle_flags
(
set_paddle_flags
(
FLAGS_eager_delete_tensor_gb
=
0
,
# enable GC to save memory
FLAGS_eager_delete_tensor_gb
=
0
,
# enable GC to save memory
)
)
...
@@ -52,7 +52,7 @@ def main():
...
@@ -52,7 +52,7 @@ def main():
# check if set use_gpu=True in paddlepaddle cpu version
# check if set use_gpu=True in paddlepaddle cpu version
use_gpu
=
config
[
'Global'
][
'use_gpu'
]
use_gpu
=
config
[
'Global'
][
'use_gpu'
]
program
.
check_gpu
(
True
)
program
.
check_gpu
(
use_gpu
)
alg
=
config
[
'Global'
][
'algorithm'
]
alg
=
config
[
'Global'
][
'algorithm'
]
assert
alg
in
[
'EAST'
,
'DB'
,
'Rosetta'
,
'CRNN'
,
'STARNet'
,
'RARE'
]
assert
alg
in
[
'EAST'
,
'DB'
,
'Rosetta'
,
'CRNN'
,
'STARNet'
,
'RARE'
]
...
...
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