Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yolov5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
yolov5
Commits
a70e554f
Unverified
提交
a70e554f
authored
11月 20, 2020
作者:
Glenn Jocher
提交者:
GitHub
11月 20, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove redundant downloads mirror (#1461)
上级
46c43b7b
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
4 行增加
和
2 行删除
+4
-2
test.py
test.py
+1
-1
autoanchor.py
utils/autoanchor.py
+1
-1
google_utils.py
utils/google_utils.py
+2
-0
没有找到文件。
test.py
浏览文件 @
a70e554f
...
@@ -322,4 +322,4 @@ if __name__ == '__main__':
...
@@ -322,4 +322,4 @@ if __name__ == '__main__':
y
.
append
(
r
+
t
)
# results and times
y
.
append
(
r
+
t
)
# results and times
np
.
savetxt
(
f
,
y
,
fmt
=
'
%10.4
g'
)
# save
np
.
savetxt
(
f
,
y
,
fmt
=
'
%10.4
g'
)
# save
os
.
system
(
'zip -r study.zip study_*.txt'
)
os
.
system
(
'zip -r study.zip study_*.txt'
)
# utils.
general
.plot_study_txt(f, x) # plot
# utils.
plots
.plot_study_txt(f, x) # plot
utils/autoanchor.py
浏览文件 @
a70e554f
...
@@ -67,7 +67,7 @@ def kmean_anchors(path='./data/coco128.yaml', n=9, img_size=640, thr=4.0, gen=10
...
@@ -67,7 +67,7 @@ def kmean_anchors(path='./data/coco128.yaml', n=9, img_size=640, thr=4.0, gen=10
k: kmeans evolved anchors
k: kmeans evolved anchors
Usage:
Usage:
from utils.
general
import *; _ = kmean_anchors()
from utils.
autoanchor
import *; _ = kmean_anchors()
"""
"""
thr
=
1.
/
thr
thr
=
1.
/
thr
...
...
utils/google_utils.py
浏览文件 @
a70e554f
...
@@ -22,6 +22,7 @@ def attempt_download(weights):
...
@@ -22,6 +22,7 @@ def attempt_download(weights):
msg
=
weights
+
' missing, try downloading from https://github.com/ultralytics/yolov5/releases/'
msg
=
weights
+
' missing, try downloading from https://github.com/ultralytics/yolov5/releases/'
models
=
[
'yolov5s.pt'
,
'yolov5m.pt'
,
'yolov5l.pt'
,
'yolov5x.pt'
]
# available models
models
=
[
'yolov5s.pt'
,
'yolov5m.pt'
,
'yolov5l.pt'
,
'yolov5x.pt'
]
# available models
redundant
=
False
# offer second download option
if
file
in
models
and
not
os
.
path
.
isfile
(
weights
):
if
file
in
models
and
not
os
.
path
.
isfile
(
weights
):
# Google Drive
# Google Drive
...
@@ -40,6 +41,7 @@ def attempt_download(weights):
...
@@ -40,6 +41,7 @@ def attempt_download(weights):
assert
os
.
path
.
exists
(
weights
)
and
os
.
path
.
getsize
(
weights
)
>
1E6
# check
assert
os
.
path
.
exists
(
weights
)
and
os
.
path
.
getsize
(
weights
)
>
1E6
# check
except
Exception
as
e
:
# GCP
except
Exception
as
e
:
# GCP
print
(
'Download error:
%
s'
%
e
)
print
(
'Download error:
%
s'
%
e
)
assert
redundant
,
'No secondary mirror'
url
=
'https://storage.googleapis.com/ultralytics/yolov5/ckpt/'
+
file
url
=
'https://storage.googleapis.com/ultralytics/yolov5/ckpt/'
+
file
print
(
'Downloading
%
s to
%
s...'
%
(
url
,
weights
))
print
(
'Downloading
%
s to
%
s...'
%
(
url
,
weights
))
r
=
os
.
system
(
'curl -L
%
s -o
%
s'
%
(
url
,
weights
))
# torch.hub.download_url_to_file(url, weights)
r
=
os
.
system
(
'curl -L
%
s -o
%
s'
%
(
url
,
weights
))
# torch.hub.download_url_to_file(url, weights)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论