|
|
@ -119,7 +119,7 @@ class YOLO:
|
|
|
|
def is_hub_model(model):
|
|
|
|
def is_hub_model(model):
|
|
|
|
"""Check if the provided model is a HUB model."""
|
|
|
|
"""Check if the provided model is a HUB model."""
|
|
|
|
return any((
|
|
|
|
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(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
|
|
|
|
len(model) == 20 and not Path(model).exists() and all(x not in model for x in './\\'))) # MODELID
|
|
|
|
|
|
|
|
|
|
|
|