Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yolov5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
yolov5
Commits
4346b13a
Unverified
提交
4346b13a
authored
10月 13, 2020
作者:
Glenn Jocher
提交者:
GitHub
10月 13, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dataset download bash script updates (#1132)
上级
00917a62
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
75 行删除
+22
-75
get_coco.sh
data/scripts/get_coco.sh
+10
-7
get_voc.sh
data/scripts/get_voc.sh
+12
-68
没有找到文件。
data/scripts/get_coco.sh
浏览文件 @
4346b13a
...
...
@@ -8,14 +8,17 @@
# /yolov5
# Download/unzip labels
echo
'Downloading COCO 2017 labels ...'
d
=
'../'
# unzip directory
f
=
'coco2017labels.zip'
&&
curl
-L
https://github.com/ultralytics/yolov5/releases/download/v1.0/
$f
-o
$f
unzip
-q
$f
-d
$d
&&
rm
$f
url
=
https://github.com/ultralytics/yolov5/releases/download/v1.0/
f
=
'coco2017labels.zip'
# 68 MB
echo
'Downloading'
$url$f
' ...'
&&
curl
-L
$url$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
# download, unzip, remove
# Download/unzip images
echo
'Downloading COCO 2017 images ...'
d
=
'../coco/images'
# unzip directory
f
=
'train2017.zip'
&&
curl http://images.cocodataset.org/zips/
$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
# 19G, 118k images
f
=
'val2017.zip'
&&
curl http://images.cocodataset.org/zips/
$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
# 1G, 5k images
# f='test2017.zip' && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f -d $d && rm $f # 7G, 41k images
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
echo
'Downloading'
$url$f
' ...'
&&
curl
-L
$url$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
# download, unzip, remove
done
data/scripts/get_voc.sh
浏览文件 @
4346b13a
...
...
@@ -8,79 +8,23 @@
# /yolov5
start
=
$(
date
+%s
)
# handle optional download dir
if
[
-z
"
$1
"
]
;
then
# navigate to ~/tmp
echo
"navigating to ../tmp/ ..."
mkdir
-p
../tmp
cd
../tmp/
else
# check if is valid directory
if
[
!
-d
$1
]
;
then
echo
$1
"is not a valid directory"
exit
0
fi
echo
"navigating to"
$1
"..."
cd
$1
fi
echo
"Downloading VOC2007 trainval ..."
# Download data
curl
-LO
http://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar
echo
"Downloading VOC2007 test data ..."
curl
-LO
http://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar
echo
"Done downloading."
# Extract data
echo
"Extracting trainval ..."
tar
-xf
VOCtrainval_06-Nov-2007.tar
echo
"Extracting test ..."
tar
-xf
VOCtest_06-Nov-2007.tar
echo
"removing tars ..."
rm
VOCtrainval_06-Nov-2007.tar
rm
VOCtest_06-Nov-2007.tar
end
=
$(
date
+%s
)
runtime
=
$((
end
-
start
))
echo
"Completed in"
$runtime
"seconds"
start
=
$(
date
+%s
)
# handle optional download dir
if
[
-z
"
$1
"
]
;
then
# navigate to ~/tmp
echo
"navigating to ../tmp/ ..."
mkdir
-p
../tmp
cd
../tmp/
else
# check if is valid directory
if
[
!
-d
$1
]
;
then
echo
$1
"is not a valid directory"
exit
0
fi
echo
"navigating to"
$1
"..."
cd
$1
fi
echo
"Downloading VOC2012 trainval ..."
# Download data
curl
-LO
http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
echo
"Done downloading."
# Extract data
echo
"Extracting trainval ..."
tar
-xf
VOCtrainval_11-May-2012.tar
echo
"removing tar ..."
rm
VOCtrainval_11-May-2012.tar
mkdir
-p
../tmp
cd
../tmp/
# Download/unzip images and labels
d
=
'.'
# unzip directory
url
=
https://github.com/ultralytics/yolov5/releases/download/v1.0/
f1
=
VOCtrainval_06-Nov-2007.zip
# 446MB, 5012 images
f2
=
VOCtest_06-Nov-2007.zip
# 438MB, 4953 images
f3
=
VOCtrainval_11-May-2012.zip
# 1.95GB, 17126 images
for
f
in
$f1
$f2
$f3
;
do
echo
'Downloading'
$url$f
' ...'
&&
curl
-L
$url$f
-o
$f
&&
unzip
-q
$f
-d
$d
&&
rm
$f
# download, unzip, remove
done
end
=
$(
date
+%s
)
runtime
=
$((
end
-
start
))
echo
"Completed in"
$runtime
"seconds"
cd
../tmp
echo
"Spliting dataset..."
python3 -
"
$@
"
<<
END
import xml.etree.ElementTree as ET
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论