From 3b4908e5c7ee862058c96091efa2cdc38b9a04d7 Mon Sep 17 00:00:00 2001 From: Symbiomatrix Date: Fri, 2 Jun 2023 15:29:27 +0300 Subject: [PATCH] Logical sorting error. --- python-package/insightface/app/face_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-package/insightface/app/face_analysis.py b/python-package/insightface/app/face_analysis.py index 6c3dfcbd2..63a4d011b 100644 --- a/python-package/insightface/app/face_analysis.py +++ b/python-package/insightface/app/face_analysis.py @@ -26,7 +26,7 @@ def __init__(self, name=DEFAULT_MP_NAME, root='~/.insightface', allowed_modules= self.models = {} self.model_dir = ensure_available('models', name, root=root) onnx_files = glob.glob(osp.join(self.model_dir, '*.onnx')) - onnx_files = sorted(onnx_files) + onnx_files = sorted(onnx_files, key = lambda x: osp.splitext(x)[0]) for onnx_file in onnx_files: model = model_zoo.get_model(onnx_file, **kwargs) if model is None: