Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yolov5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
yolov5
Commits
42812fcb
Unverified
提交
42812fcb
authored
8月 14, 2022
作者:
Glenn Jocher
提交者:
GitHub
8月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add bash script arguments (#8962)
上级
7639e4c7
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
35 行增加
和
6 行删除
+35
-6
get_coco.sh
data/scripts/get_coco.sh
+35
-6
get_coco128.sh
data/scripts/get_coco128.sh
+0
-0
没有找到文件。
data/scripts/get_coco.sh
浏览文件 @
42812fcb
...
...
@@ -7,21 +7,50 @@
# └── datasets
# └── coco ← downloads here
# Arguments (optional) Usage: bash data/scripts/get_coco.sh --train --val --test --segments
if
[
"$#"
-gt
0
]
;
then
for
opt
in
"
$@
"
;
do
case
"
${
opt
}
"
in
--train
)
train
=
true
;;
--val
)
val
=
true
;;
--test
)
test
=
true
;;
--segments
)
segments
=
true
;;
esac
done
else
train
=
true
val
=
true
test
=
false
segments
=
false
fi
# Download/unzip labels
d
=
'../datasets'
# unzip directory
url
=
https://github.com/ultralytics/yolov5/releases/download/v1.0/
f
=
'coco2017labels.zip'
# or 'coco2017labels-segments.zip', 68 MB
if
[
"
$segments
"
==
"true"
]
;
then
f
=
'coco2017labels-segments.zip'
# 168 MB
else
f
=
'coco2017labels.zip'
# 168 MB
fi
echo
'Downloading'
$url$f
' ...'
curl
-L
$url$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
&
# Download/unzip images
d
=
'../datasets/coco/images'
# unzip directory
url
=
http://images.cocodataset.org/zips/
f1
=
'train2017.zip'
# 19G, 118k images
f2
=
'val2017.zip'
# 1G, 5k images
f3
=
'test2017.zip'
# 7G, 41k images (optional)
for
f
in
$f1
$f2
;
do
if
[
"
$train
"
==
"true"
]
;
then
f
=
'train2017.zip'
# 19G, 118k images
echo
'Downloading'
$url$f
'...'
curl
-L
$url$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
&
fi
if
[
"
$val
"
==
"true"
]
;
then
f
=
'val2017.zip'
# 1G, 5k images
echo
'Downloading'
$url$f
'...'
curl
-L
$url$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
&
fi
if
[
"
$test
"
==
"true"
]
;
then
f
=
'test2017.zip'
# 7G, 41k images (optional)
echo
'Downloading'
$url$f
'...'
curl
-L
$url$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
&
done
fi
wait
# finish background tasks
data/scripts/get_coco128.sh
100644 → 100755
浏览文件 @
42812fcb
File mode changed from 100644 to 100755
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论