From 46f4d6c42640b0ec9e3e4d6cc94b2541da7fbede Mon Sep 17 00:00:00 2001 From: iperov Date: Thu, 28 Feb 2019 14:54:59 +0400 Subject: [PATCH] fix cpu fallback for extractor --- mainscripts/Extractor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mainscripts/Extractor.py b/mainscripts/Extractor.py index d2aa4e5..30e629b 100644 --- a/mainscripts/Extractor.py +++ b/mainscripts/Extractor.py @@ -193,6 +193,9 @@ class ExtractSubprocessor(Subprocessor): io.progress_bar_close() def get_devices_for_type (self, type, multi_gpu, cpu_only): + if 'cpu' in nnlib.device.backend: + cpu_only = True + if not cpu_only and (type == 'rects' or type == 'landmarks'): if type == 'rects' and self.detector == 'mt' and nnlib.device.backend == "plaidML": cpu_only = True