yuandong513
commited on
Commit
•
88a95b5
1
Parent(s):
2d447d6
Delete download_HQ_renderings.py
Browse files- download_HQ_renderings.py +0 -28
download_HQ_renderings.py
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
# Copyright (c) Alibaba, Inc. and its affiliates.
|
2 |
-
# Authors: muyuan.zq@alibaba-inc.com
|
3 |
-
|
4 |
-
import os, sys, json
|
5 |
-
from multiprocessing import Pool
|
6 |
-
|
7 |
-
def download_url(item):
|
8 |
-
end = 40 # hard-coded
|
9 |
-
copy_items = ['.json','.png','_albedo.png','_hdr.exr','_mr.png','_nd.exr','_ng.exr'] # hard-coded
|
10 |
-
global save_dir
|
11 |
-
oss_base_dir = os.path.join("https://virutalbuy-public.oss-cn-hangzhou.aliyuncs.com/share/aigc3d/objaverse", item, "campos_512_v4")
|
12 |
-
for index in range(end):
|
13 |
-
index = "{:05d}".format(index)
|
14 |
-
for copy_item in copy_items:
|
15 |
-
postfix = index + "/" + index + copy_item
|
16 |
-
oss_full_dir = os.path.join(oss_base_dir, postfix)
|
17 |
-
print(oss_full_dir)
|
18 |
-
os.system("wget -P {} {}".format(os.path.join(save_dir, item, index + "/"), oss_full_dir))
|
19 |
-
|
20 |
-
if __name__=="__main__":
|
21 |
-
assert len(sys.argv) == 3, "eg: python download_objaverse_data.py ./data /path/to/json_file 10"
|
22 |
-
save_dir = str(sys.argv[1])
|
23 |
-
json_file = str(sys.argv[2])
|
24 |
-
n_threads = int(sys.argv[3])
|
25 |
-
|
26 |
-
data = json.load(open(json_file))
|
27 |
-
p = Pool(n_threads)
|
28 |
-
p.map(download_url, data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|