-
Notifications
You must be signed in to change notification settings - Fork 35
/
install_data.py
executable file
·97 lines (80 loc) · 2.76 KB
/
install_data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env python
import multiprocessing
import os
import jsk_data
import rospkg
PKG = 'jsk_arc2017_common'
try:
rp = rospkg.RosPack()
PKG_PATH = rp.get_path(PKG)
except rospkg.ResourceNotFound as e:
print('ROS package [%s] is not found. '
'Skipping by assuming we are in build.ros.org.' % PKG)
quit(0)
def download_data(path, url, md5):
p = multiprocessing.Process(
target=jsk_data.download_data,
kwargs=dict(
pkg_name=PKG,
path=path,
url=url,
md5=md5,
),
)
p.start()
def main():
# # dataset: v1
# # augmentation: standard
# download_data(
# path='data/models/fcn32s_arc2017_dataset_v1_20170326_005.pth',
# url='https://drive.google.com/uc?id=0B9P1L--7Wd2vT1pnWnVsNERHTVk',
# md5='ae9d13c126389bd63bccf0db1551f31e',
# )
# # dataset: v1
# # augmentation: stack
# download_data(
# path='data/models/fcn32s_arc2017_dataset_v1_20170417.pth',
# url='https://drive.google.com/uc?id=0B9P1L--7Wd2vYWloN0FGeEhlcGs',
# md5='a098399a456de29ef8d4feaa8ae795e9',
# )
# dataset: v2
# augmentation: stack
download_data(
path='data/models/fcn32s_arc2017_datasetv2_cfg003_20170612.npz',
url='https://drive.google.com/uc?id=0B9P1L--7Wd2vS1VaWWVFNDVFQ1k',
md5='e4e07b66ebeaf6b33a79eb1b605ee3a3',
)
# dataset: v2 (improved)
# augmentation: stack
download_data(
path='data/models/fcn32s_arc2017_datasetv2_cfg003_20170721.npz',
url='https://drive.google.com/uc?id=0B9P1L--7Wd2vNG5KcmxkWWN6Zk0',
md5='980d3c6f0b3ef5e541f4db5280233c33',
)
# # dataset: v2
# # augmentation: stack
# # unknown_objects: apc2016
# download_data(
# path='data/models/fcn32s_arc2017_datasetv2_cfg003_20170704.npz',
# url='https://drive.google.com/uc?id=0B9P1L--7Wd2vcEZMbVR0eHlVdDg',
# md5='606d2f6bc0c701e79b64466c73c83a72',
# )
# dataset: v3 (natural dataset)
# augmentation: stack
download_data(
path='data/models/fcn32s_arc2017_datasetv3_cfg009_20170724.npz',
url='https://drive.google.com/uc?id=0B9P1L--7Wd2vWXRNa3BpeWlqcFE',
md5='17536436262487185740e186e39651bf',
)
symlink_src = os.path.join(
PKG_PATH, 'data/models/fcn32s_arc2017_datasetv3_cfg009_20170724.npz')
symlink_dst = os.path.join(PKG_PATH, 'data/models/fcn32s.npz')
if os.path.exists(symlink_dst):
print('[%s] File already exists, so skipping.' % symlink_dst)
else:
if os.path.islink(symlink_dst):
os.remove(symlink_dst)
print('[%s] Creating symlink to: %s' % (symlink_dst, symlink_src))
os.symlink(symlink_src, symlink_dst)
if __name__ == '__main__':
main()