https://github.com/bytedance/mvdream-threestudio
3D generation code for MVDream
Science Score: 33.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
2 of 25 committers (8.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.5%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
3D generation code for MVDream
Basic Info
Statistics
- Stars: 530
- Watchers: 19
- Forks: 36
- Open Issues: 24
- Releases: 0
Topics
Metadata Files
README.md
MVDream - threestudio
Yichun Shi, Peng Wang, Jianglong Ye, Long Mai, Kejie Li, Xiao Yang
| Project Page | Paper | Gallery | Comparison |
- This code is forked from threestudio for SDS and 3D Generation using MVDream.
- For diffusion model and 2D image generation, check original MVDream repo.
Installation
Install threestudio
This part is the same as original threestudio. Skip it if you already have installed the environment.
See installation.md for additional information, including installation via Docker.
- You must have an NVIDIA graphics card with at least 20GB VRAM and have CUDA installed.
- Install
Python >= 3.8. - (Optional, Recommended) Create a virtual environment:
```sh python3 -m virtualenv venv . venv/bin/activate
Newer pip versions, e.g. pip-23.x, can be much faster than old versions, e.g. pip-20.x.
For instance, it caches the wheels of git packages to avoid unnecessarily rebuilding them later.
python3 -m pip install --upgrade pip ```
- Install
PyTorch >= 1.12. We have tested ontorch1.12.1+cu113andtorch2.0.0+cu118, but other versions should also work fine.
```sh
torch1.12.1+cu113
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
or torch2.0.0+cu118
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118 ```
- (Optional, Recommended) Install ninja to speed up the compilation of CUDA extensions:
sh
pip install ninja
- Install dependencies:
sh
pip install -r requirements.txt
Install MVDream
MVDream multi-view diffusion model is provided in a different codebase. Install it by:
sh
git clone https://github.com/bytedance/MVDream extern/MVDream
pip install -e extern/MVDream
Quickstart
We currently provide two configurations for MVDream, one without soft-shading and one with it. The one without shading is more effecient in both memory and time. You can run it by
```sh
MVDream without shading (memory efficient)
python launch.py --config configs/mvdream-sd21.yaml --train --gpu 0 system.prompt_processor.prompt="an astronaut riding a horse" ```
In the paper, we use the configuration with soft-shading. It would need an A100 GPU in most cases to compute normal: ```sh
MVDream with shading (used in paper)
python launch.py --config configs/mvdream-sd21-shading.yaml --train --gpu 0 system.prompt_processor.prompt="an astronaut riding a horse" ```
Resume from checkpoints
If you want to resume from a checkpoint, do:
```sh
resume training from the last checkpoint, you may replace last.ckpt with any other checkpoints
python launch.py --config path/to/trial/dir/configs/parsed.yaml --train --gpu 0 resume=path/to/trial/dir/ckpts/last.ckpt
if the training has completed, you can still continue training for a longer time by setting trainer.max_steps
python launch.py --config path/to/trial/dir/configs/parsed.yaml --train --gpu 0 resume=path/to/trial/dir/ckpts/last.ckpt trainer.max_steps=20000
you can also perform testing using resumed checkpoints
python launch.py --config path/to/trial/dir/configs/parsed.yaml --test --gpu 0 resume=path/to/trial/dir/ckpts/last.ckpt
note that the above commands use parsed configuration files from previous trials
which will continue using the same trial directory
if you want to save to a new trial directory, replace parsed.yaml with raw.yaml in the command
only load weights from saved checkpoint but dont resume training (i.e. dont load optimizer state):
python launch.py --config path/to/trial/dir/configs/parsed.yaml --train --gpu 0 system.weights=path/to/trial/dir/ckpts/last.ckpt ```
Tips
- Preview. Generating 3D content with SDS would a take a lot of time. So we suggest to use the 2D multi-view image generation MVDream to test if the model can really understand the text before using it for 3D generation.
- Rescale Factor. We introducte rescale adjustment from Shanchuan et al. to alleviate the texture over-saturation from large CFG guidance. However, in some cases, we find it to cause floating noises in the generated scene and consequently OOM issue. Therefore we reduce the rescale factor from 0.7 in original paper to 0.5. However, if you still encounter such a problem, please try to further reduce
system.guidance.recon_std_rescale=0.3.
Credits
This code is built on the threestudio-project. Thanks to the maintainers for their contribution to the community!
Citing
If you find MVDream helpful, please consider citing:
@article{shi2023MVDream,
author = {Shi, Yichun and Wang, Peng and Ye, Jianglong and Mai, Long and Li, Kejie and Yang, Xiao},
title = {MVDream: Multi-view Diffusion for 3D Generation},
journal = {arXiv:2308.16512},
year = {2023},
}
Owner
- Name: Bytedance Inc.
- Login: bytedance
- Kind: organization
- Location: Singapore
- Website: https://opensource.bytedance.com
- Twitter: ByteDanceOSS
- Repositories: 255
- Profile: https://github.com/bytedance
GitHub Events
Total
- Issues event: 1
- Watch event: 49
- Fork event: 6
Last Year
- Issues event: 1
- Watch event: 49
- Fork event: 6
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| bennyguo | b****o@1****m | 185 |
| thuliu-yt16 | l****c@g****m | 40 |
| Vikram Voleti | v****m@i****l | 21 |
| Vikram Voleti | v****i@g****m | 19 |
| Christian Laforte | c****e@g****m | 13 |
| zouzx | n****3@1****m | 10 |
| Yichun Shi | y****i@b****m | 10 |
| Acc-plus | 1****0@q****m | 8 |
| Ruizhi Shao | 2****8@q****m | 7 |
| Yanpei Cao | c****i@g****m | 6 |
| Vikram Voleti | v****m@i****l | 4 |
| ashawkey | a****9@g****m | 4 |
| Yosuke Shinya | 4****y | 3 |
| hbb1 | h****b@s****n | 2 |
| Jaidev Shriram | j****t@g****m | 2 |
| Chen Wang | c****u@g****m | 1 |
| Grace Heseri | 3****L | 1 |
| Guan Luo | 5****1 | 1 |
| Guanying Chen | 4****4@q****m | 1 |
| Ikko Eltociear Ashimine | e****r@g****m | 1 |
| OriginF | 5****F | 1 |
| Ruilong Li(李瑞龙) | r****i@b****u | 1 |
| Souhaib Attaiki | s****i@g****m | 1 |
| Susung Hong | j****9@n****m | 1 |
| yankeesong | 3****g | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 31
- Total pull requests: 1
- Average time to close issues: 3 days
- Average time to close pull requests: N/A
- Total issue authors: 26
- Total pull request authors: 1
- Average comments per issue: 1.32
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- reynoldscem (3)
- HuntZhaozq (2)
- beibeirory (2)
- arcosin (1)
- LiXinghui-666 (1)
- zhengyuf (1)
- youngstu (1)
- TLB-MISS (1)
- KokeCacao (1)
- GandharvMahajan (1)
- GDbbq (1)
- XinYu-Andy (1)
- lakpa-tamang9 (1)
- jk4011 (1)
- longmans (1)
Pull Request Authors
- YuCrazing (2)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- nvidia/cuda 11.8.0-devel-ubuntu22.04 build
- black * development
- mypy * development
- pre-commit * development
- pylint * development
- PyMCubes *
- accelerate *
- bitsandbytes *
- controlnet_aux *
- diffusers *
- einops *
- gradio *
- huggingface_hub *
- imageio *
- imageio >=2.28.0
- jaxtyping *
- kornia *
- libigl *
- lightning ==2.0.0
- matplotlib *
- networkx *
- omegaconf ==2.3.0
- open-clip-torch ==2.7.0
- opencv-python *
- pysdf *
- safetensors *
- sentencepiece *
- taming-transformers-rom1504 *
- tensorboard *
- torchmetrics *
- transformers *
- trimesh *
- typeguard *
- wandb *
- xatlas *
- xformers *