Quellcode durchsuchen

Fix rename `utils.google_utils` to `utils.downloads` (#4393)

modifyDataloader
Glenn Jocher GitHub vor 3 Jahren
Ursprung
Commit
3e7c59ad3b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. +1
    -1
      data/scripts/download_weights.sh
  2. +2
    -2
      utils/downloads.py

+ 1
- 1
data/scripts/download_weights.sh Datei anzeigen

@@ -9,7 +9,7 @@
# └── ...

python - <<EOF
from utils.google_utils import attempt_download
from utils.downloads import attempt_download

for x in ['s', 'm', 'l', 'x']:
attempt_download(f'yolov5{x}.pt')

+ 2
- 2
utils/downloads.py Datei anzeigen

@@ -36,7 +36,7 @@ def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''):
print('')


def attempt_download(file, repo='ultralytics/yolov5'): # from utils.google_utils import *; attempt_download()
def attempt_download(file, repo='ultralytics/yolov5'): # from utils.downloads import *; attempt_download()
# Attempt file download if does not exist
file = Path(str(file).strip().replace("'", ''))

@@ -74,7 +74,7 @@ def attempt_download(file, repo='ultralytics/yolov5'): # from utils.google_util


def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zip'):
# Downloads a file from Google Drive. from yolov5.utils.google_utils import *; gdrive_download()
# Downloads a file from Google Drive. from yolov5.utils.downloads import *; gdrive_download()
t = time.time()
file = Path(file)
cookie = Path('cookie') # gdrive cookie

Laden…
Abbrechen
Speichern