Skip to content

Commit

Permalink
ObjV1
Browse files Browse the repository at this point in the history
  • Loading branch information
hw-liang committed May 27, 2024
1 parent 4ecda13 commit df9c394
Show file tree
Hide file tree
Showing 4 changed files with 11,502 additions and 8 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ vast 3D data corpus of [Objaverse-1.0](https://objaverse.allenai.org/objaverse-1
3. (To be uploaded) Rendered 4D images by our team to save you GPU time.

## 4D Dataset ID
介绍下下总体统计情况,id的链接,text caption @hanwen
We curated a total of 54K dynamic 3D assets from Objaverse-1.0 and Objaverse-xl. We provide the selected ids from Objaverse-1.0 in `rendering/src/ObjV1_curated.txt`. More about the dataset and curation scrips coming soon!
For text-to-4D generation, the captions are obtained from the work [Cap3D](https://huggingface.co/datasets/tiange/Cap3D).

## 4D Dataset Rendering Script
1. Clone the repository and enter the rendering directory:
Expand All @@ -34,7 +35,7 @@ rm blender-3.2.2-linux-x64.tar.xz

```bash
pip install objaverse
python download.py --id_path curated.txt
python download.py --id_path src/sample.txt
```

Right-click the objaverse package in `download.py` and open the `objaverse/__init__.py` file. Change `BASE_PATH='./obj_data'` at line 14 or another path you prefer. Otherwise, it will download to the default system path.
Expand Down Expand Up @@ -107,7 +108,7 @@ This project is based on numerous outstanding research efforts and open-source c
- https://github.com/graphdeco-inria/diff-gaussian-rasterization
- https://objaverse.allenai.org/objaverse-1.0/
- https://github.com/allenai/objaverse-xl

- https://github.com/crockwell/Cap3D

## If our 4D dataset and rendering script help your work, please consider citing our paper and starring the repository ⭐
```
Expand Down
13 changes: 8 additions & 5 deletions rendering/download.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import argparse
import objaverse
import multiprocessing

import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--id_path", type=str, default="test.txt")
parser.add_argument("--id_path", type=str, default="src/sample.txt")
args = parser.parse_args()
multiprocessing_cpu_count=32
multiprocessing_cpu_count=multiprocessing.cpu_count()

with open(args.id_path, 'r', encoding='utf-8') as file:
lines = file.readlines()
object_uids = [line.strip() for line in lines]
#print(object_uids)
print('file number:',len(object_uids))
# print(object_uids)
print('file number:', len(object_uids))

objaverse.BASE_PATH = '/home/projects/Diffusion4D/rendering/'
objaverse._VERSIONED_PATH = 'objaverse_v1/'
objaverse.load_objects(
uids=object_uids,
download_processes=multiprocessing_cpu_count
Expand Down
Loading

0 comments on commit df9c394

Please sign in to comment.