Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files- .gitignore +165 -0
- README.md +9 -122
.gitignore
ADDED
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# find ./ -type f -name '*.pyc' -exec git rm -f {} \;
|
2 |
+
# Byte-compiled / optimized / DLL files
|
3 |
+
__pycache__/
|
4 |
+
*.py[cod]
|
5 |
+
*$py.class
|
6 |
+
|
7 |
+
# C extensions
|
8 |
+
*.so
|
9 |
+
|
10 |
+
# Distribution / packaging
|
11 |
+
.Python
|
12 |
+
build/
|
13 |
+
develop-eggs/
|
14 |
+
dist/
|
15 |
+
downloads/
|
16 |
+
eggs/
|
17 |
+
.eggs/
|
18 |
+
# lib/
|
19 |
+
lib64/
|
20 |
+
parts/
|
21 |
+
sdist/
|
22 |
+
var/
|
23 |
+
wheels/
|
24 |
+
share/python-wheels/
|
25 |
+
*.egg-info/
|
26 |
+
.installed.cfg
|
27 |
+
*.egg
|
28 |
+
MANIFEST
|
29 |
+
|
30 |
+
# PyInstaller
|
31 |
+
# Usually these files are written by a python script from a template
|
32 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
33 |
+
*.manifest
|
34 |
+
*.spec
|
35 |
+
|
36 |
+
# Installer logs
|
37 |
+
pip-log.txt
|
38 |
+
pip-delete-this-directory.txt
|
39 |
+
|
40 |
+
# Unit test / coverage reports
|
41 |
+
htmlcov/
|
42 |
+
.tox/
|
43 |
+
.nox/
|
44 |
+
.coverage
|
45 |
+
.coverage.*
|
46 |
+
.cache
|
47 |
+
nosetests.xml
|
48 |
+
coverage.xml
|
49 |
+
*.cover
|
50 |
+
*.py,cover
|
51 |
+
.hypothesis/
|
52 |
+
.pytest_cache/
|
53 |
+
cover/
|
54 |
+
|
55 |
+
# Translations
|
56 |
+
*.mo
|
57 |
+
*.pot
|
58 |
+
|
59 |
+
# Django stuff:
|
60 |
+
*.log
|
61 |
+
local_settings.py
|
62 |
+
db.sqlite3
|
63 |
+
db.sqlite3-journal
|
64 |
+
|
65 |
+
# Flask stuff:
|
66 |
+
instance/
|
67 |
+
.webassets-cache
|
68 |
+
|
69 |
+
# Scrapy stuff:
|
70 |
+
.scrapy
|
71 |
+
|
72 |
+
# Sphinx documentation
|
73 |
+
docs/_build/
|
74 |
+
|
75 |
+
# PyBuilder
|
76 |
+
.pybuilder/
|
77 |
+
target/
|
78 |
+
|
79 |
+
# Jupyter Notebook
|
80 |
+
.ipynb_checkpoints
|
81 |
+
|
82 |
+
# IPython
|
83 |
+
profile_default/
|
84 |
+
ipython_config.py
|
85 |
+
|
86 |
+
# pyenv
|
87 |
+
# For a library or package, you might want to ignore these files since the code is
|
88 |
+
# intended to run in multiple environments; otherwise, check them in:
|
89 |
+
# .python-version
|
90 |
+
|
91 |
+
# pipenv
|
92 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
93 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
94 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
95 |
+
# install all needed dependencies.
|
96 |
+
#Pipfile.lock
|
97 |
+
|
98 |
+
# poetry
|
99 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
100 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
101 |
+
# commonly ignored for libraries.
|
102 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
103 |
+
#poetry.lock
|
104 |
+
|
105 |
+
# pdm
|
106 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
107 |
+
#pdm.lock
|
108 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
109 |
+
# in version control.
|
110 |
+
# https://pdm.fming.dev/#use-with-ide
|
111 |
+
.pdm.toml
|
112 |
+
|
113 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
114 |
+
__pypackages__/
|
115 |
+
|
116 |
+
# Celery stuff
|
117 |
+
celerybeat-schedule
|
118 |
+
celerybeat.pid
|
119 |
+
|
120 |
+
# SageMath parsed files
|
121 |
+
*.sage.py
|
122 |
+
|
123 |
+
# Environments
|
124 |
+
.env
|
125 |
+
.venv
|
126 |
+
env/
|
127 |
+
venv/
|
128 |
+
ENV/
|
129 |
+
env.bak/
|
130 |
+
venv.bak/
|
131 |
+
|
132 |
+
# Spyder project settings
|
133 |
+
.spyderproject
|
134 |
+
.spyproject
|
135 |
+
|
136 |
+
# Rope project settings
|
137 |
+
.ropeproject
|
138 |
+
|
139 |
+
# mkdocs documentation
|
140 |
+
/site
|
141 |
+
|
142 |
+
# mypy
|
143 |
+
.mypy_cache/
|
144 |
+
.dmypy.json
|
145 |
+
dmypy.json
|
146 |
+
|
147 |
+
# Pyre type checker
|
148 |
+
.pyre/
|
149 |
+
|
150 |
+
# pytype static type analyzer
|
151 |
+
.pytype/
|
152 |
+
|
153 |
+
# Cython debug symbols
|
154 |
+
cython_debug/
|
155 |
+
|
156 |
+
*.npy
|
157 |
+
.vscode
|
158 |
+
training
|
159 |
+
# *.txt
|
160 |
+
*.log
|
161 |
+
|
162 |
+
core*
|
163 |
+
|
164 |
+
tmp
|
165 |
+
logs
|
README.md
CHANGED
@@ -1,122 +1,9 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
Then, install pytorch3d with
|
12 |
-
```bash
|
13 |
-
pip install git+https://github.com/facebookresearch/pytorch3d.git@stable
|
14 |
-
```
|
15 |
-
|
16 |
-
|
17 |
-
### :dromedary_camel: TODO
|
18 |
-
|
19 |
-
- [x] Release inference code and checkpoints.
|
20 |
-
- [x] Release Training code.
|
21 |
-
- [x] Release pre-extracted latent codes for 3D diffusion training.
|
22 |
-
- [ ] Release Gradio Demo.
|
23 |
-
- [ ] Release the evaluation code.
|
24 |
-
- [ ] Lint the code.
|
25 |
-
|
26 |
-
|
27 |
-
# Inference
|
28 |
-
|
29 |
-
Be aware to change the $logdir in the bash file accordingly.
|
30 |
-
|
31 |
-
To load the checkpoint automatically: please replace ```/mnt/sfs-common/yslan/open-source``` with ```yslan/GaussianAnything/ckpts/checkpoints```.
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
## Text-2-3D:
|
36 |
-
|
37 |
-
Please update the caption for 3D generation in ```datasets/caption-forpaper.txt```. T o change the number of samples to be generated, please change ```$num_samples``` in the bash file.
|
38 |
-
|
39 |
-
**stage-1**:
|
40 |
-
```
|
41 |
-
bash shell_scripts/release/inference/t23d/stage1-t23d.sh
|
42 |
-
```
|
43 |
-
then, set the ```$stage_1_output_dir``` to the ```$logdir``` of the above stage.
|
44 |
-
|
45 |
-
**stage-2**:
|
46 |
-
```
|
47 |
-
bash shell_scripts/release/inference/t23d/stage2-t23d.sh
|
48 |
-
```
|
49 |
-
|
50 |
-
The results will be dumped to ```./logs/t23d/stage-2```
|
51 |
-
|
52 |
-
## I23D (requires two stage generation):
|
53 |
-
|
54 |
-
set the $data_dir accordingly. For some demo image, please download from [huggingfac.co/yslan/GaussianAnything/demo-img](https://huggingface.co/yslan/GaussianAnything/tree/main/demo-img).
|
55 |
-
|
56 |
-
**stage-1**:
|
57 |
-
```
|
58 |
-
bash shell_scripts/release/inference/i23d/i23d-stage1.sh
|
59 |
-
```
|
60 |
-
|
61 |
-
then, set the $stage_1_output_dir to the $logdir of the above stage.
|
62 |
-
|
63 |
-
**stage-2**:
|
64 |
-
```
|
65 |
-
bash shell_scripts/release/inference/i23d/i23d-stage1.sh
|
66 |
-
```
|
67 |
-
|
68 |
-
## 3D VAE Reconstruction:
|
69 |
-
|
70 |
-
To encode a 3D asset into the latent point cloud, please download the pre-trained VAE checkpoint from [huggingfac.co/yslan/gaussiananything/ckpts/vae/model_rec1965000.pt](https://huggingface.co/yslan/GaussianAnything/blob/main/ckpts/vae/model_rec1965000.pt) to ```./checkpoint/model_rec1965000.pt```.
|
71 |
-
|
72 |
-
Then, run the inference script
|
73 |
-
|
74 |
-
```bash
|
75 |
-
bash shell_scripts/release/inference/vae-3d.sh
|
76 |
-
```
|
77 |
-
|
78 |
-
This will encode the mulit-view 3D renderings in ```./assets/demo-image-for-i23d/for-vae-reconstruction/Animals/0``` into the point-cloud structured latent code, and export them (along with the 2dgs mesh) in ```./logs/latent_dir/```. The exported latent code will be used for efficient 3D diffusion training.
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
# Training (Flow Matching 3D Generation)
|
83 |
-
All the training is conducted on 8 A100 (80GiB) with BF16 enabled. For training on V100, please use FP32 training by setting ```--use_amp``` False in the bash file. Feel free to tune the ```$batch_size``` in the bash file accordingly to match your VRAM.
|
84 |
-
|
85 |
-
To facilitate reproducing the performance, we have uploaded the pre-extracted poind cloud-structured latent codes to the [huggingfac.co/yslan/gaussiananything/dataset/latent.tar.gz](https://huggingface.co/yslan/GaussianAnything/blob/main/dataset/latent.tar.gz) (34GiB required). Please download the pre extracted point cloud latent codes, unzip and set the ```$mv_latent_dir``` in the bash file accordingly.
|
86 |
-
|
87 |
-
|
88 |
-
## Text to 3D:
|
89 |
-
Please donwload the 3D caption from hugging face [huggingfac.co/yslan/GaussianAnything/dataset/text_captions_3dtopia.json](https://huggingface.co/yslan/GaussianAnything/blob/main/dataset/text_captions_3dtopia.json), and put it under ```dataset```.
|
90 |
-
|
91 |
-
|
92 |
-
Note that if you want to train a specific class of Objaverse, just manually change the code at ```datasets/g_buffer_objaverse.py:3043```.
|
93 |
-
|
94 |
-
**stage-1 training (point cloud generation)**:
|
95 |
-
|
96 |
-
```
|
97 |
-
bash shell_scripts/release/train/stage2-t23d/t23d-pcd-gen.sh
|
98 |
-
```
|
99 |
-
|
100 |
-
**stage-2 training (point cloud-conditioned KL feature generation)**:
|
101 |
-
|
102 |
-
```
|
103 |
-
bash shell_scripts/release/train/stage2-t23d/t23d-klfeat-gen.sh
|
104 |
-
```
|
105 |
-
|
106 |
-
## (single-view) Image to 3D
|
107 |
-
Please download g-buffer dataset first.
|
108 |
-
|
109 |
-
**stage-1 training (point cloud generation)**:
|
110 |
-
|
111 |
-
```
|
112 |
-
bash shell_scripts/release/train/stage2-i23d/i23d-pcd-gen.sh
|
113 |
-
```
|
114 |
-
|
115 |
-
**stage-2 training (point cloud-conditioned KL feature generation)**:
|
116 |
-
|
117 |
-
```
|
118 |
-
bash shell_scripts/release/train/stage2-i23d/i23d-klfeat-gen.sh
|
119 |
-
```
|
120 |
-
|
121 |
-
<!-- # Training (3D-aware VAE)
|
122 |
-
Since the -->
|
|
|
1 |
+
title: GaussianAnything-AIGC3D
|
2 |
+
emoji: π
|
3 |
+
colorFrom: green
|
4 |
+
colorTo: green
|
5 |
+
sdk: gradio
|
6 |
+
sdk_version: 4.43.0
|
7 |
+
app_file: app.py
|
8 |
+
pinned: true
|
9 |
+
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|