gpu_id is None when args.use_gpu as False

This commit is contained in:
LDOUBLEV 2021-08-17 02:46:18 +00:00
parent 5bb6ae05c4
commit 49c4a3a7ed
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class TextDetector(object):
inference_config=self.config,
pids=pid,
process_name=None,
gpu_ids=gpu_id,
gpu_ids=gpu_id if args.use_gpu else None,
time_keys=[
'preprocess_time', 'inference_time', 'postprocess_time'
],