Support cpu for ocr demo (#227)

Signed-off-by: lizz <lizz@sensetime.com>
pull/234/head
lizz 2021-05-22 15:51:21 +08:00 committed by GitHub
parent 0bd32889d4
commit 5121b9fd94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -113,6 +113,8 @@ def main():
help='Whether show image with OpenCV.')
args = parser.parse_args()
if args.device == 'cpu':
args.device = None
# build detect model
detect_model = init_detector(
args.det_config, args.det_ckpt, device=args.device)