diff --git a/mmdeploy/backend/rknn/backend_manager.py b/mmdeploy/backend/rknn/backend_manager.py index df7381e1fe..8660aa313c 100644 --- a/mmdeploy/backend/rknn/backend_manager.py +++ b/mmdeploy/backend/rknn/backend_manager.py @@ -50,14 +50,9 @@ def is_available(cls, with_custom_ops: bool = False) -> bool: """ import importlib try: - ret = importlib.util.find_spec('rknn-toolkit2') is not None + ret = importlib.util.find_spec('rknn') is not None except Exception: pass - if ret is None: - try: - ret = importlib.util.find_spec('rknn-toolkit') is not None - except Exception: - pass return ret @classmethod diff --git a/tools/deploy.py b/tools/deploy.py index c1ba9fb3d2..7af2a3c413 100644 --- a/tools/deploy.py +++ b/tools/deploy.py @@ -218,7 +218,8 @@ def main(): dataset_file = tempfile.NamedTemporaryFile(suffix='.txt').name with open(dataset_file, 'w') as f: f.writelines([osp.abspath(args.img)]) - quantization_cfg.setdefault('dataset', dataset_file) + if quantization_cfg.get('dataset', None) is None: + quantization_cfg['dataset'] = dataset_file if backend == Backend.ASCEND: # TODO: Add this to backend manager in the future if args.dump_info: