From 8ac8ff72ae67f70384418c2519dd693a7e42bd52 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 7 Jun 2023 08:16:31 +0200 Subject: [PATCH] Fix code scanning alert - Incomplete URL substring sanitization (#3054) --- ultralytics/yolo/engine/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/yolo/engine/model.py b/ultralytics/yolo/engine/model.py index 2456638..3529150 100644 --- a/ultralytics/yolo/engine/model.py +++ b/ultralytics/yolo/engine/model.py @@ -119,7 +119,7 @@ class YOLO: def is_hub_model(model): """Check if the provided model is a HUB model.""" return any(( - model.startswith('https://hub.ultra'), # i.e. https://hub.ultralytics.com/models/MODEL_ID + model.startswith('https://hub.ultralytics.com/models/'), # i.e. https://hub.ultralytics.com/models/MODEL_ID [len(x) for x in model.split('_')] == [42, 20], # APIKEY_MODELID len(model) == 20 and not Path(model).exists() and all(x not in model for x in './\\'))) # MODELID