Home

Awesome

<div align="center"> <h1>ScaleDreamer: Scalable Text-to-3D Synthesis with Asynchronous Score Distillation</h1> <div> <a href='https://scholar.google.com/citations?user=F15mLDYAAAAJ&hl=en' target='_blank'>Zhiyuan Ma</a>&emsp; <a href='https://scholar.google.com/citations?user=hORhL7YAAAAJ&hl=en' target='_blank'>Yuxiang Wei</a>&emsp; <a href='https://scholar.google.com/citations?user=p0GLwtoAAAAJ&hl=en' target='_blank'>Yabin Zhang</a>&emsp; <a href='https://scholar.google.com/citations?user=1rbNk5oAAAAJ&hl=zh-CN' target='_blank'>Xiangyu Zhu</a>&emsp; <a href='https://scholar.google.com/citations?user=cuJ3QG8AAAAJ&hl=en' target='_blank'>Zhen Lei</a>&emsp; <a href='https://scholar.google.com/citations?user=tAK5l1IAAAAJ&hl=en' target='_blank'>Lei Zhang</sup></a> </div>

[Paper] | [Project Page]


</div>

đŸ”Ĩ News

⚙ī¸ Dependencies and Installation

<details> <summary> Follow threestudio to set up the conda environment, or use our provided instructions as below. </summary>
conda create -n scaledreamer python=3.10
conda activate scaledreamer
# Prefer using the latest version of CUDA and PyTorch 
conda install pytorch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 pytorch-cuda=12.1 -c pytorch -c nvidia
conda install xformers -c xformers
pip install ninja
pip install -r requirements.txt
export PATH="/usr/local/cuda/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
pip install git+https://github.com/KAIR-BAIR/nerfacc.git@v0.5.2

If you encounter errors while installing iNGP, it is recommended to check your gcc version. Follow these instructions to change the gcc version within your conda environment. Then return to the repository directory to install iNGP and NerfAcc âŦ†ī¸ again.

conda install -c conda-forge gxx=9.5.0
cd  $CONDA_PREFIX/lib
ln -s  /usr/lib/x86_64-linux-gnu/libcuda.so ./
cd <your repo directory>
</details> <details> <summary> Download 2D Diffusion Priors. </summary>
python scripts/download_pretrained_models.py
</details>

🌈 Prompt-Specific 3D Generation

sh scripts/single-prompt-benchmark/asd_sd_nerf.sh
sh scripts/single-prompt-benchmark/asd_mv_nerf.sh

🚀 Prompt-Amortized 3D Generator Tranining

The following 3D generator architectures are available:

NetworkDescriptionFile
Hyper-iNGPiNGP with text-conditioned linear layers,adopted from ATT3Dgeometry, background
3DConv-netA StyleGAN generator that outputs voxels with 3D convolution, code adopted from CC3Dgeometry, architecture
Triplane-TransformerTransformer-based 3D Generator, with Triplane as the output structure, adopted from LRMgeometry, architecture

The following corpus datasets are available:

CorpusDescriptionFile
MG1515 text pormpts from Magic3D project pagejson
DF415415 text pormpts from DreamFusion project pagejson
AT25202520 text pormpts from ATT3D experimentsjson
DL17k17k text pormpts from Instant3D releasejson
CP100k110k text pormpts from Cap3D datasetjson

Run the following script to start training

sh scripts/multi-prompt-benchmark/asd_sd_hyper_iNGP_MG15.sh
sh scripts/multi-prompt-benchmark/asd_sd_3dconv_net_DF415.sh
sh scripts/multi-prompt-benchmark/asd_sd_3dconv_net_AT2520.sh
sh scripts/multi-prompt-benchmark/asd_mv_triplane_transformer_DL17k.sh
scripts/multi-prompt-benchmark/asd_sd_3dconv_net_CP100k.sh

📷 Prompt-Amortized 3D Generator Evaluation

Create a directory to save the checkpoints

mkdir pretrained/3d_checkpoints

The checkpoints of the âŦ†ī¸ experiments are available. Save the corresponding .pth file to 3d_checkpoint, then run the scripts as below.

sh scripts/multi_prompts_benchmark_evaluation/asd_sd_hyper_iNGP_MG15.sh
sh scripts/multi_prompts_benchmark_evaluation/asd_sd_3dconv_net_DF415.sh
sh scripts/multi_prompts_benchmark_evaluation/asd_sd_3dconv_net_AT2520.sh
sh scripts/multi_prompts_benchmark_evaluation/asd_mv_triplane_transformer_DL17k.sh
sh scripts/multi_prompts_benchmark_evaluation/asd_sd_3dconv_net_CP100k.sh

The rendered images and videos are saved in outputs/<experiment_name>/save/<num_iter> directory. Compute the metrics with CLIP via

python evaluation/CLIP/evaluation_amortized.py --result_dir <video_dir>

🕹ī¸ Create Your Own Modules

3D Generator

  1. Place the code in custom/amortized/models/geometry, check out the other code in that directory for reference.
  2. Update your <name_of_file> in custom/amortized/models/geometry/__init__.py
  3. Create your own config file, type in your registered module name in the system.geometry_type argument, check out the other code in the configs/multi-prompt_benchmark directory for reference.

2D Diffusion Guidance

  1. Put your code in threestudio/models/guidance, take a look at the other code in that directory or other guidance for reference.
  2. Update your <name_of_file> in threestudio/models/guidance/__init__.py
  3. Create your own config file, type in your registered module name in the system.guidance_type argument, take a look at the other code in the configs/multi-prompt_benchmark directory for reference.

Text corpus

  1. Create a JSON file that lists the training, validation, and test text prompts in the load directory
  2. Enter the name of this JSON file into the system.prompt_processor.prompt_library argument to set up the corpus, take other commands in the scripts directory for reference

You can also add your modules for data, renderer, prompt_processor, etc.

📖 Citation

If you find this paper helpful, please cite

@article{ma2024scaledreamer,
  title={ScaleDreamer: Scalable Text-to-3D Synthesis with Asynchronous Score Distillation},
  author={Ma, Zhiyuan and Wei, Yuxiang and Zhang, Yabin and Zhu, Xiangyu and Lei, Zhen and Zhang, Lei},
  journal={arXiv preprint arXiv:2407.02040},
  year={2024}
}

🙏 Acknowledgement