From 45432648c22d6de722937157361ce76284371c26 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Sun, 1 Sep 2024 22:31:34 +0100 Subject: [PATCH] detection: Make model dir before downloading --- detection/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/detection/utils.py b/detection/utils.py index c5c5fa6..1292e40 100644 --- a/detection/utils.py +++ b/detection/utils.py @@ -2,6 +2,7 @@ import os import oss2 def get_model(name): + os.makedirs(os.path.join(os.path.dirname(__file__), "model"), exist_ok=True) fn = os.path.join(os.path.dirname(__file__), "model", name) if os.path.exists(fn): return fn