diff --git a/docs/help/privacy.md b/docs/help/privacy.md index 2ff2854d0cb..44325577ade 100644 --- a/docs/help/privacy.md +++ b/docs/help/privacy.md @@ -78,8 +78,8 @@ To gain insight into the current configuration of your settings, you can view th # View all settings print(settings) - # Return a specific setting - value = settings['runs_dir'] + # Return analytics and crash reporting setting + value = settings['sync'] ``` === "CLI" @@ -109,14 +109,14 @@ Ultralytics allows users to easily modify their settings. Changes can be perform === "CLI" If you prefer using the command-line interface, the following commands will allow you to modify your settings: ```bash - # Update a setting - yolo settings sync=false + # Disable analytics and crash reporting + yolo settings sync=False # Reset settings to default values yolo settings reset ``` -This will prevent any data from being sent to Google Analytics or Snyk. Your settings will be respected across all sessions using the Ultralytics package. +The `sync=False` setting will prevent any data from being sent to Google Analytics or Snyk. Your settings will be respected across all sessions using the Ultralytics package and saved to disk for future sessions. ## Commitment to Privacy diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index 2fc3061b884..45a338a47df 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = '8.0.204' +__version__ = '8.0.205' from ultralytics.models import RTDETR, SAM, YOLO from ultralytics.models.fastsam import FastSAM diff --git a/ultralytics/utils/__init__.py b/ultralytics/utils/__init__.py index 1363e333b9a..8292e472144 100644 --- a/ultralytics/utils/__init__.py +++ b/ultralytics/utils/__init__.py @@ -707,7 +707,7 @@ def remove_colorstr(input_string): >>> remove_colorstr(colorstr('blue', 'bold', 'hello world')) >>> 'hello world' """ - ansi_escape = re.compile(r'\x1B(?:[@-Z\\\-_]|\[[0-9]*[ -/]*[@-~])') + ansi_escape = re.compile(r'\x1B\[[0-9;]*[A-Za-z]') return ansi_escape.sub('', input_string) diff --git a/ultralytics/utils/downloads.py b/ultralytics/utils/downloads.py index f5c4fe6d979..843764e8d90 100644 --- a/ultralytics/utils/downloads.py +++ b/ultralytics/utils/downloads.py @@ -278,7 +278,9 @@ def safe_download(url, url, file = get_google_drive_file_info(url) f = Path(dir or '.') / (file or url2file(url)) # URL converted to filename - if not f.is_file(): # URL and file do not exist + if '://' not in str(url) and Path(url).is_file(): # URL exists ('://' check required in Windows Python<3.10) + f = Path(url) # filename + elif not f.is_file(): # URL and file do not exist desc = f"Downloading {url if gdrive else clean_url(url)} to '{f}'" LOGGER.info(f'{desc}...') f.parent.mkdir(parents=True, exist_ok=True) # make directory if missing