diff --git a/docs/tasks/pose.md b/docs/tasks/pose.md index 1510a9f..0807b25 100644 --- a/docs/tasks/pose.md +++ b/docs/tasks/pose.md @@ -62,13 +62,13 @@ Train a YOLOv8-pose model on the COCO128-pose dataset. ```bash # Build a new model from YAML and start training from scratch - yolo detect train data=coco128-pose.yaml model=yolov8n-pose.yaml epochs=100 imgsz=640 + yolo pose train data=coco128-pose.yaml model=yolov8n-pose.yaml epochs=100 imgsz=640 # Start training from a pretrained *.pt model - yolo detect train data=coco128-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640 + yolo pose train data=coco128-pose.yaml model=yolov8n-pose.pt epochs=100 imgsz=640 # Build a new model from YAML, transfer pretrained weights to it and start training - yolo detect train data=coco128-pose.yaml model=yolov8n-pose.yaml pretrained=yolov8n-pose.pt epochs=100 imgsz=640 + yolo pose train data=coco128-pose.yaml model=yolov8n-pose.yaml pretrained=yolov8n-pose.pt epochs=100 imgsz=640 ``` ## Val diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index a65e065..83bc5c1 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, GPL-3.0 license -__version__ = '8.0.67' +__version__ = '8.0.68' from ultralytics.hub import start from ultralytics.yolo.engine.model import YOLO diff --git a/ultralytics/hub/auth.py b/ultralytics/hub/auth.py index f39e265..10ee4df 100644 --- a/ultralytics/hub/auth.py +++ b/ultralytics/hub/auth.py @@ -11,7 +11,7 @@ API_KEY_URL = 'https://hub.ultralytics.com/settings?tab=api+keys' class Auth: id_token = api_key = model_key = False - def __init__(self, api_key=''): + def __init__(self, api_key='', verbose=True): """ Initialize the Auth class with an optional API key. @@ -29,7 +29,8 @@ class Auth: # If the provided API key matches the API key in the SETTINGS if self.api_key == SETTINGS.get('api_key'): # Log that the user is already logged in - LOGGER.info(f'{PREFIX}Authenticated ✅') + if verbose: + LOGGER.info(f'{PREFIX}Authenticated ✅') return else: # Attempt to authenticate with the provided API key @@ -46,8 +47,9 @@ class Auth: if success: set_settings({'api_key': self.api_key}) # Log that the new login was successful - LOGGER.info(f'{PREFIX}New authentication successful ✅') - else: + if verbose: + LOGGER.info(f'{PREFIX}New authentication successful ✅') + elif verbose: LOGGER.info(f'{PREFIX}Retrieve API key from {API_KEY_URL}') def request_api_key(self, max_attempts=3): diff --git a/ultralytics/hub/session.py b/ultralytics/hub/session.py index 0f93f50..b90858e 100644 --- a/ultralytics/hub/session.py +++ b/ultralytics/hub/session.py @@ -58,7 +58,7 @@ class HUBTrainingSession: raise ValueError(f'Invalid HUBTrainingSession input: {url}') # Authorize - auth = Auth(key) + auth = Auth(key, verbose=False) self.agent_id = None # identifies which instance is communicating with server self.model_id = model_id self.model_url = f'https://hub.ultralytics.com/models/{model_id}' diff --git a/ultralytics/yolo/utils/downloads.py b/ultralytics/yolo/utils/downloads.py index 8469eeb..fe47042 100644 --- a/ultralytics/yolo/utils/downloads.py +++ b/ultralytics/yolo/utils/downloads.py @@ -126,10 +126,10 @@ def safe_download(url, raise ConnectionError(emojis(f'❌ Download failure for {url}. Retry limit reached.')) from e LOGGER.warning(f'⚠️ Download failure, retrying {i + 1}/{retry} {url}...') - if unzip and f.exists() and f.suffix in ('.zip', '.tar', '.gz'): + if unzip and f.exists() and f.suffix in ('', '.zip', '.tar', '.gz'): unzip_dir = dir or f.parent # unzip to dir if provided else unzip in place LOGGER.info(f'Unzipping {f} to {unzip_dir}...') - if f.suffix == '.zip': + if is_zipfile(f): unzip_dir = unzip_file(file=f, path=unzip_dir) # unzip elif f.suffix == '.tar': subprocess.run(['tar', 'xf', f, '--directory', unzip_dir], check=True) # unzip