QZFantasies
commited on
Commit
•
da7e660
1
Parent(s):
ce94cc2
upload downloading script
Browse files- README.md +9 -1
- download_HQ_renderings.py +28 -0
README.md
CHANGED
@@ -5,4 +5,12 @@ license: mit
|
|
5 |
|
6 |
## [Project page](https://aigc3d.github.io/richdreamer/) | [Paper](https://arxiv.org/abs/2311.16918) | [YouTube](https://youtu.be/6gQ1VWiKoc0)
|
7 |
|
8 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
## [Project page](https://aigc3d.github.io/richdreamer/) | [Paper](https://arxiv.org/abs/2311.16918) | [YouTube](https://youtu.be/6gQ1VWiKoc0)
|
7 |
|
8 |
+
## Download Our High-Quality Renderings through Alibaba OSS Services
|
9 |
+
|
10 |
+
```bash
|
11 |
+
wget https://virutalbuy-public.oss-cn-hangzhou.aliyuncs.com/share/aigc3d/valid_paths_v4_cap_filter_thres_28.json
|
12 |
+
# Example: python ./scripts/data/download_objaverse.py ./mvs_objaverse ./valid_paths_v4_cap_filter_thres_28.json 50
|
13 |
+
python ./scripts/data/download_objaverse.py /path/to/savedata /path/to/valid_paths_v4_cap_filter_thres_28.json nthreads(eg. 10)
|
14 |
+
# caption file
|
15 |
+
wget https://virutalbuy-public.oss-cn-hangzhou.aliyuncs.com/share/aigc3d/text_captions_cap3d.json
|
16 |
+
```
|
download_HQ_renderings.py
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) Alibaba, Inc. and its affiliates.
|
2 |
+
# Authors: [email protected]
|
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)
|