glenn-jocher
commited on
Commit
β’
3e7c59a
1
Parent(s):
a4e4553
Fix rename `utils.google_utils` to `utils.downloads` (#4393)
Browse files- data/scripts/download_weights.sh +1 -1
- utils/downloads.py +2 -2
data/scripts/download_weights.sh
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
# βββ ...
|
10 |
|
11 |
python - <<EOF
|
12 |
-
from utils.
|
13 |
|
14 |
for x in ['s', 'm', 'l', 'x']:
|
15 |
attempt_download(f'yolov5{x}.pt')
|
|
|
9 |
# βββ ...
|
10 |
|
11 |
python - <<EOF
|
12 |
+
from utils.downloads import attempt_download
|
13 |
|
14 |
for x in ['s', 'm', 'l', 'x']:
|
15 |
attempt_download(f'yolov5{x}.pt')
|
utils/downloads.py
CHANGED
@@ -36,7 +36,7 @@ def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''):
|
|
36 |
print('')
|
37 |
|
38 |
|
39 |
-
def attempt_download(file, repo='ultralytics/yolov5'): # from utils.
|
40 |
# Attempt file download if does not exist
|
41 |
file = Path(str(file).strip().replace("'", ''))
|
42 |
|
@@ -74,7 +74,7 @@ def attempt_download(file, repo='ultralytics/yolov5'): # from utils.google_util
|
|
74 |
|
75 |
|
76 |
def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zip'):
|
77 |
-
# Downloads a file from Google Drive. from yolov5.utils.
|
78 |
t = time.time()
|
79 |
file = Path(file)
|
80 |
cookie = Path('cookie') # gdrive cookie
|
|
|
36 |
print('')
|
37 |
|
38 |
|
39 |
+
def attempt_download(file, repo='ultralytics/yolov5'): # from utils.downloads import *; attempt_download()
|
40 |
# Attempt file download if does not exist
|
41 |
file = Path(str(file).strip().replace("'", ''))
|
42 |
|
|
|
74 |
|
75 |
|
76 |
def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zip'):
|
77 |
+
# Downloads a file from Google Drive. from yolov5.utils.downloads import *; gdrive_download()
|
78 |
t = time.time()
|
79 |
file = Path(file)
|
80 |
cookie = Path('cookie') # gdrive cookie
|