Giter Site home page Giter Site logo

hustvl / gaussiandreamer Goto Github PK

View Code? Open in Web Editor NEW
611.0 15.0 33.0 76.52 MB

GaussianDreamer: Fast Generation from Text to 3D Gaussians by Bridging 2D and 3D Diffusion Models (CVPR 2024)

Home Page: https://taoranyi.com/gaussiandreamer/

License: Apache License 2.0

Python 89.00% CMake 0.13% C++ 1.97% Cuda 8.10% C 0.11% Shell 0.69%
aigc computer-vision diffusion-models dreamfusion gaussian-splatting nerf radiance-field text-to-3d smpl cvpr2024

gaussiandreamer's Introduction

block

GaussianDreamer: Fast Generation from Text to 3D Gaussians by Bridging 2D and 3D Diffusion Models (CVPR 2024)

GaussianDreamer: Fast Generation from Text to 3D Gaussians by Bridging 2D and 3D Diffusion Models

Taoran Yi1, Jiemin Fang2‡, Junjie Wang2, Guanjun Wu3, Lingxi Xie2,
Xiaopeng Zhang2,Wenyu Liu1, Qi Tian2 , Xinggang Wang1‡✉

1School of EIC, HUST  2Huawei Inc.   3School of CS, HUST  

Project lead. Corresponding author.

block In recent times, the generation of 3D assets from text prompts has shown impressive results. Both 2D and 3D diffusion models can help generate decent 3D objects based on prompts. 3D diffusion models have good 3D consistency, but their quality and generalization are limited as trainable 3D data is expensive and hard to obtain. 2D diffusion models enjoy strong abilities of generalization and fine generation, but 3D consistency is hard to guarantee. This paper attempts to bridge the power from the two types of diffusion models via the recent explicit and efficient 3D Gaussian splatting representation. A fast 3D object generation framework, named as GaussianDreamer, is proposed, where the 3D diffusion model provides priors for initialization and the 2D diffusion model enriches the geometry and appearance. Operations of noisy point growing and color perturbation are introduced to enhance the initialized Gaussians. Our GaussianDreamer can generate a high-quality 3D instance or 3D avatar within 15 minutes on one GPU, much faster than previous methods, while the generated instances can be directly rendered in real time. block

🦾 Updates

  • 6/26/2024: We have released GaussianDreamerPro with highly enhanced quality which can be seamlessly integrated into animation/simulation pipelines🚀.
  • 5/14/2024: We update the results of our method on T3Bench, refer to arxiv paper for details.
  • 3/8/2024: We also provide a GaussianDreamer extension for threestudio. Thanks for the contribution of Xinhua Cheng.
  • 2/27/2024: Accepted by CVPR 2024.
  • 12/6/2023: Update arxiv paper.
  • 11/27/2023: Update colab and huggingface demo.
  • 11/27/2023: Release the results initialized using point clouds with ground. And now we support importing the generated 3D assets into the Unity game engine with the help of UnityGaussianSplatting. See the Project Page for details.
  • 10/24/2023: Release the results initialized using SMPL. See the Project Page for details.
  • 10/21/2023: Fixed some installation issues, thanks to Sikuang Li, Tawfik Boujeh, and ashawkey. You can view the detailed information in branch diff.
  • 10/16/2023: The rough code has been released, and there may still be some issues. Please feel free to raise issues.

😀 Demo

Huggingface demo:

Colab demo: Open In Colab (Thanks camenduru.)

🚀 Get Started

Installation Install 3D Gaussian Splatting and Shap-E as fellow:

pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu117
pip install ninja
pip install -r requirements.txt

git clone https://github.com/hustvl/GaussianDreamer.git 
cd GaussianDreamer

pip install ./gaussiansplatting/submodules/diff-gaussian-rasterization
pip install ./gaussiansplatting/submodules/simple-knn

git clone https://github.com/openai/shap-e.git
cd shap-e
pip install -e .

Download finetuned Shap-E by Cap3D, and put it in ./load

Quickstart

Text-to-3D Generation

python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="a fox"

# if you want to import the generated 3D assets into the Unity game engine.
python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="a fox" system.sh_degree=3 

Text-to-Avatar Generation

python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="Spiderman stands with open arms" system.load_type=1

# if you want to import the generated 3D assets into the Unity game engine.
python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="Spiderman stands with open arms" system.load_type=1 system.sh_degree=3 

Application

Import the generated 3D assets into the Unity game engine to become materials for games and designs with the help of UnityGaussianSplatting. block

🏁 Evaluation

We evaluate our model using the ViT similarity and T3Bench, and the results are as follows.

ViT similarity

Methods ViT-L/14 $\uparrow$ ViT-bigG-14 $\uparrow$ Generation Time $\downarrow$
Shap-E 20.51 32.21 6 seconds
DreamFusion 23.60 37.46 1.5 hours
ProlificDreamer 27.39 42.98 10 hours
Instant3D 26.87 41.77 20 seconds
Ours 27.23 $\pm$ 0.06 41.88 $\pm$ 0.04 15 minutes
Methods Time Single Obj. Single w/ Surr. Multi Obj. Average
SJC -- 24.7 19.8 11.7 18.7
DreamFusion 6 hours 24.4 24.6 16.1 21.7
Fantasia3D 6 hours 26.4 27.0 18.5 24.0
LatentNeRF 15 minutes 33.1 30.6 20.6 28.1
Magic3D 5.3 hours 37.0 35.4 25.7 32.7
ProlificDreamer 10 hours 49.4 44.8 35.8 43.3
Ours 15 minutes 54.0 48.6 34.5 45.7

📑 Citation

If you find this repository/work helpful in your research, welcome to cite the paper and give a ⭐. Some source code of ours is borrowed from Threestudio, 3DGS, depth-diff-gaussian-rasterization. We sincerely appreciate the excellent works of these authors.

@inproceedings{yi2023gaussiandreamer,
  title={GaussianDreamer: Fast Generation from Text to 3D Gaussians by Bridging 2D and 3D Diffusion Models},
  author={Yi, Taoran and Fang, Jiemin and Wang, Junjie and Wu, Guanjun and Xie, Lingxi and Zhang, Xiaopeng and Liu, Wenyu and Tian, Qi and Wang, Xinggang},
  year = {2024},
  booktitle = {CVPR}
}

gaussiandreamer's People

Contributors

jaminfong avatar taoranyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gaussiandreamer's Issues

stand.obj

Hi, could you provide the file in load/shapes/stand.obj?

ply sotre the color info?

I have run through the demo. however, it seems all 3 types of ply file do not store the color info. I would like to ask if it is intentionally hided or the color information is stored in another place

image_720

Colab example broken due to mismatched dependencies

When running the colab example the import and installation steps fail at multiple steps

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xformers 0.0.22.post4+cu118 requires torch==2.1.0, but you have torch 2.3.0 which is incompatible.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchaudio 2.3.0+cu121 requires torch==2.3.0, but you have torch 2.1.0 which is incompatible.
torchtext 0.18.0 requires torch>=2.3.0, but you have torch 2.1.0 which is incompatible.
torchvision 0.18.0+cu121 requires torch==2.3.0, but you have torch 2.1.0 which is incompatible.

The first issue arises when trying to install !pip install -q git+https://github.com/openai/shap-e.git is there a possibility to pin the examples to a working version?

When forcing version 2.3.0 to be installed a different dependency won't work anymore.

Assistance Requested for Replicating CLIP Score Calculations from Your Paper

Dear Author,

I hope this message finds you well.

Firstly, I would like to extend my sincere compliments on your remarkable work. It has greatly assisted us in our research endeavors. However, I have encountered some challenges regarding the computational method used for the values in Table 1, specifically titled "Quantitative comparisons on CLIP [55] similarity with other methods."

In my attempt to replicate the results for the GaussianDreamer using CLIP, I was unable to achieve the reported score of 27.23 ± 0.06, 41.88 ± 0.04 as presented in your paper. My approach involved generating 10 random images based on the camera angles described in your paper, post which I utilized ViT-L/14 and ViT-bigG-14 models to compute the CLIP scores. I successfully generated results for 411 out of 415 prompts provided in the Dreamfusion project for this computation.

The outcomes of my calculations are illustrated in the attached image.
image

Could you kindly offer any guidance or share the specific code used for computing the CLIP scores as per your study? It would be incredibly helpful in understanding how to replicate the results you have achieved in your paper.

Thank you very much for your time and consideration. I am looking forward to your valuable response.

Best regards.

How to test it out-of-the-box ?

Hi I want to test the library without having to train it.. How can I do that?
--test in the following command throws an error.

Command:
python launch.py --config configs/gaussiandreamer-sd.yaml --test --gpu 0 system.prompt_processor.prompt="a fox"

Error:

 Tracebacks
 .....
 .....
 File "/content/GaussianDreamer/threestudio/systems/GaussianDreamer.py", line 240, in forward
   render_pkg = render(viewpoint_cam, self.gaussian, self.pipe, renderbackground)
 File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1614, in __getattr__
   raise AttributeError("'{}' object has no attribute '{}'".format(
 AttributeError: 'GaussianDreamer' object has no attribute 'pipe'

export?

this is great! is there any way to export as a density field / volume data / point cloud?

T3Bench score calculation

Thanks for your brilliant work!
I'm now trying to reproduce the T3Bench score of GaussianDreamer.
Since T3Bench use unified 3D represetation (mesh).
Did you also turn 3D Gaussian into mesh before calculate the score?

Generating quality

Thanks open source for such an awesome job! I was just wondering if anyone has reproduced this work? I tried to generate "a fox" with this code, but the quality of the generation (“./output/.../save/it1200-text.mp4”) is very different from what is shown in the demo. What are the factors that might be contributing to the final generation quality. I have not changed any code and all dependencies are configured.

How to render the image with white background?

Hi, in the test stage, the rendered image usually has a black background. How to set the background to white (e.g., the examples in the paper have the white background)? Thanks in advance.

GPU Not Called

Hi, thank you for your work!
When running the python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="a fox", it turns out that the server didn't use the GPU for computing. I waited a few hours but the training didn't stop and the epoch stay zero.
2
However the server has RTX4090 and the terminal logs as follow.
QQ图片20240321233110

Question about the final result

Thanks for your work for 3D generation, and I have learned a lot from your project. However, after I followed the README, and optimized 'a fox',
'''
python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="a fox" system.sh_degree=3
'''
I got a collapse result. There's noting rendered in ./output/a_fox@.../save/it1200-test.mp4 (the video is pure black) and I cannot open the ./output/a_fox@.../save/it1200-test-color.ply by MeshLab (It warns me that mesh contains 63539 vertices with NAN coords and 0 degenerated faces Corrected.). So may there anything wrong for my operations? I'll appreciate it if you reply!

type error

when run the code in colab:
!python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="a fox" data.batch_size=2

there is a probelm:
TypeError:
GaussianRasterizationSettings.new() missing 1 required positional argument: 'debug'

CUDA incompatibility

There seems to be some CUDA incompatibility with diff-gaussian-rasterization.

` File "C:\Users\xxx\Programs\miniconda\envs\gau_env\lib\site-packages\torch\utils\cpp_extension.py", line 1909, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for diff-gaussian-rasterization
Running setup.py clean for diff-gaussian-rasterization
Failed to build diff-gaussian-rasterization
ERROR: Could not build wheels for diff-gaussian-rasterization, which is required to install pyproject.toml-based projects`

About initializing point clouds

Hi,
in your project page,your use the point clouds with the added ground to initialize the 3D Gaussians.
If I want to modify the initialized point cloud similarly, how should I import the point cloud?

Regards

Install Error

First of all, thank you so much for revealing this wonderful work!

I tried setting up the environment following the instructions in the ReadMe, but the same error as shown here appears.
However, the solutions on that page will not solve my problem. This is because that solution requires the latest torch and the latest diff-gaussian-rasterization, while GaussianDreamer does not use the latest diff-gaussian-rasterization(There are some modules whose input/output is different from the latest version).

My environment
GPU : A5000
CUDA : 11.8 or 11.7
torch : 1.12.1 or 2.0.0 or 2.0.1 (I am getting the same error while installing diff-gaussian-rasterization in all versions.)

Could you please give me some advice?
Thanks.

Failing to install through the steps mentioned in the ReadMe

Hi I tried to follow the installation steps that you mentioned in hte Get Started section. I ran the commands one after another, but I get an error saying no requirements.txt found. So I decided to clone the repo first and try the installations again.

However I was facing some issue installing diff-gaussian-rasterization through this command:
pip install ./gaussiansplatting/submodules/diff-gaussian-rasterization

I was getting an error, so I decided to manually install it using cmake. It was successfully installed then.

Next when I ran this command:
python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="a fox"

It started to train which I guess will take a huge time to complete.

Right now I only need to test the library and how it performs by testing with different prompts. Could you tell me what is the command to do that?

Ply Compatibility

I was able to run the process without issue, but the PLYs that are being generated don't seem to be working for me in any of the Gaussian splat viewers.

Is the structure unique in some way?

I tested in the Unity Viewer as well as on Poly.cam.

The error I get in the unity viewer is that there is a "PLY vertex size mismatch, expected 248 but file has 27".
That is after running the example train in your readme.

I've attached them for your review.
plyfiles.zip

Regards,
Caz

Halfway through the execution, there was no response

I encountered this situation when running this code on both RTX3090 and RTX3080. When I reached this state, there was no next step. At most, I ran it for almost 4 hours without taking any further steps, and my memory status did not change during the run.
1712131905660
1
2

Initialization of 3D Gaussians

Hi,I'm wondering which files or part have took part in the initializatiob of 3D Gaussians(point clouds) and the logic to use them,I want to use this part only and futher update the 3D Gaussian using my own method.Thanks!

training time

15mins for 3090 is true? I train the model with the default setting and get 10 times the training time.

ERROR: Could not build wheels for pysdf, which is required to install pyproject.toml-based projects

Building wheel for pysdf (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [62 lines of output]
Couldn't find Eigen locally, downloading...
Download failed, failed to find Eigen
/root/miniconda3/envs/gsdreamer/lib/python3.8/site-packages/setuptools/dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!

          ********************************************************************************
          Usage of dash-separated 'description-file' will not be supported in future
          versions. Please use the underscore name 'description_file' instead.
  
          This deprecation is overdue, please update your project and remove deprecated
          calls to avoid build errors in the future.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    opt = self.warn_dash_deprecation(opt, section)
  /root/miniconda3/envs/gsdreamer/lib/python3.8/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
  !!
  
          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************
  
  !!
    dist.fetch_build_eggs(dist.setup_requires)
  /root/miniconda3/envs/gsdreamer/lib/python3.8/site-packages/setuptools/dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
  !!
  
          ********************************************************************************
          Usage of dash-separated 'description-file' will not be supported in future
          versions. Please use the underscore name 'description_file' instead.
  
          This deprecation is overdue, please update your project and remove deprecated
          calls to avoid build errors in the future.
  
          See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
          ********************************************************************************
  
  !!
    opt = self.warn_dash_deprecation(opt, section)
  running bdist_wheel
  running build
  running build_ext
  creating tmp
  gcc -pthread -B /root/miniconda3/envs/gsdreamer/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/miniconda3/envs/gsdreamer/include/python3.8 -c /tmp/tmp7w08eov2.cpp -o tmp/tmp7w08eov2.o -std=c++17
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  gcc -pthread -B /root/miniconda3/envs/gsdreamer/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/miniconda3/envs/gsdreamer/include/python3.8 -c /tmp/tmpfr8_j62z.cpp -o tmp/tmpfr8_j62z.o -fvisibility=hidden
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  building 'pysdf' extension
  creating build
  creating build/temp.linux-x86_64-cpython-38
  creating build/temp.linux-x86_64-cpython-38/src
  gcc -pthread -B /root/miniconda3/envs/gsdreamer/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DVERSION_INFO=\"0.1.9\" -Iinclude -I/tmp/pip-install-vcdmzce5/pysdf_3724183e41c94b2daf0a27b5ffd821c7/.eggs/pybind11-2.12.0-py3.8.egg/pybind11/include -INone -I/root/miniconda3/envs/gsdreamer/include/python3.8 -c pybind.cpp -o build/temp.linux-x86_64-cpython-38/pybind.o -std=c++17 -fvisibility=hidden
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  In file included from pybind.cpp:2:
  include/sdf/sdf.hpp:30:10: fatal error: Eigen/Core: No such file or directory
     30 | #include <Eigen/Core>
        |          ^~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pysdf
Running setup.py clean for pysdf
Building wheel for envlight (setup.py) ... done
Created wheel for envlight: filename=envlight-0.1.0-py3-none-any.whl size=40356 sha256=53a786eff12886c57c4b7fc41e178a6dc5167bcebf39985ff7a2771b481dc0de
Stored in directory: /tmp/pip-ephem-wheel-cache-j5iar851/wheels/d8/70/df/657fc3444e6c70f214ea65eddcd49a9c5536b1ee738829ccc3
Building wheel for clip (setup.py) ... done
Created wheel for clip: filename=clip-1.0-py3-none-any.whl size=1369497 sha256=a9470bb8449ab0f0af314b3b7be0be3a0604694c89e8faf21ff28997bea290a1
Stored in directory: /tmp/pip-ephem-wheel-cache-j5iar851/wheels/ab/4f/3a/5e51521b55997aa6f0690e095c08824219753128ce8d9969a3
Successfully built nerfacc tinycudann nvdiffrast envlight clip
Failed to build pysdf
ERROR: Could not build wheels for pysdf, which is required to install pyproject.toml-based projects

compilation issue

I was able to installe everything without error, moving to a new issue.

question about training

Hello, I successfully ran the code, but when the training reached normal level, the program did not continue. Is there any error?
There is stabilityai/stable-diffusion-2-1-base in gaussiandreamer-sd.yaml. Is it because I did not download the pre-trained model?
image

ValueError: not enough values to unpack (expected 3, got 2)

Thank you for your nice work!
I was using wsl2 in win11, CUDA11.7+pytorch2.0.1, and I got the error...
noticed that in the original 3D GS code it looked like this in /gaussiansplatting/gaussian_renderer/init.py",

rendered_image, radii = rasterizer(

but there is an extra depth in your work, here

rendered_image, radii, depth= rasterizer(

do I miss anything?
here is the error:

/home/jx/miniconda3/bin/conda run -n gsdrm --no-capture-output python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt=a fox
Seed set to 0
[INFO] Using 16bit Automatic Mixed Precision (AMP)
[INFO] GPU available: True (cuda), used: True
[INFO] TPU available: False, using: 0 TPU cores
[INFO] IPU available: False, using: 0 IPUs
[INFO] HPU available: False, using: 0 HPUs
[INFO] You are using a CUDA device ('NVIDIA GeForce RTX 3060') that has Tensor Cores. To properly utilize them, you should set torch.set_float32_matmul_precision('medium' | 'high') which will trade-off precision for performance. For more details, read https://pytorch.org/docs/stable/generated/torch.set_float32_matmul_precision.html#torch.set_float32_matmul_precision
[INFO] LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
prompt a fox
100%|██████████| 64/64 [00:19<00:00, 3.24it/s]
/mnt/c/Programs/PyCharmWorkplace/GaussianDreamer/shap-e/shap_e/models/stf/renderer.py:286: UserWarning: exception rendering with PyTorch3D: No module named 'pytorch3d'
warnings.warn(f"exception rendering with PyTorch3D: {exc}")
/mnt/c/Programs/PyCharmWorkplace/GaussianDreamer/shap-e/shap_e/models/stf/renderer.py:287: UserWarning: falling back on native PyTorch renderer, which does not support full gradients
warnings.warn(
Number of points at initialisation : 69972
[INFO]
| Name | Type | Params



0 Trainable params
0 Non-trainable params
0 Total params
0.000 Total estimated model params size (MB)
[INFO] Validation results will be saved to outputs/gaussiandreamer-sd/a_fox@20240123-193108/save
[INFO] Using prompt [a fox] and negative prompt [ugly, bad anatomy, blurry, pixelated obscure, unnatural colors, poor lighting, dull, and unclear, cropped, lowres, low quality, artifacts, duplicate, morbid, mutilated, poorly drawn face, deformed, dehydrated, bad proportions, unfocused]
[INFO] Using view-dependent prompts [side]:[a fox, side view] [front]:[a fox, front view] [back]:[a fox, back view] [overhead]:[a fox, overhead view]
[INFO] Loading Stable Diffusion ...
Loading pipeline components...: 100%|██████████| 4/4 [00:16<00:00, 4.04s/it]
[INFO] Loaded Stable Diffusion!
/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:441: The 'train_dataloader' does not have many workers which may be a bottleneck. Consider increasing the value of the num_workers argumenttonum_workers=15in theDataLoaderto improve performance. /home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:441: The 'val_dataloader' does not have many workers which may be a bottleneck. Consider increasing the value of thenum_workers argument to num_workers=15 in the DataLoader to improve performance.
Epoch 0: | | 0/? [00:00<?, ?it/s] Traceback (most recent call last):
File "/mnt/c/Programs/PyCharmWorkplace/GaussianDreamer/launch.py", line 239, in
main(args, extras)
File "/mnt/c/Programs/PyCharmWorkplace/GaussianDreamer/launch.py", line 182, in main
trainer.fit(system, datamodule=dm, ckpt_path=cfg.resume)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 544, in fit
call._call_and_handle_interrupt(
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/call.py", line 44, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 580, in _fit_impl
self._run(model, ckpt_path=ckpt_path)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 989, in _run
results = self._run_stage()
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 1035, in _run_stage
self.fit_loop.run()
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/fit_loop.py", line 202, in run
self.advance()
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/fit_loop.py", line 359, in advance
self.epoch_loop.run(self._data_fetcher)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/training_epoch_loop.py", line 136, in run
self.advance(data_fetcher)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/training_epoch_loop.py", line 240, in advance
batch_output = self.automatic_optimization.run(trainer.optimizers[0], batch_idx, kwargs)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/optimization/automatic.py", line 187, in run
self._optimizer_step(batch_idx, closure)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/optimization/automatic.py", line 265, in _optimizer_step
call._call_lightning_module_hook(
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/call.py", line 157, in _call_lightning_module_hook
output = fn(*args, **kwargs)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/core/module.py", line 1291, in optimizer_step
optimizer.step(closure=optimizer_closure)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/core/optimizer.py", line 151, in step
step_output = self._strategy.optimizer_step(self._optimizer, closure, **kwargs)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/strategies/strategy.py", line 230, in optimizer_step
return self.precision_plugin.optimizer_step(optimizer, model=model, closure=closure, **kwargs)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/plugins/precision/amp.py", line 77, in optimizer_step
closure_result = closure()
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/optimization/automatic.py", line 140, in call
self._result = self.closure(*args, **kwargs)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/optimization/automatic.py", line 126, in closure
step_output = self._step_fn()
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/loops/optimization/automatic.py", line 315, in _training_step
training_step_output = call._call_strategy_hook(trainer, "training_step", *kwargs.values())
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/trainer/call.py", line 309, in _call_strategy_hook
output = fn(*args, **kwargs)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/pytorch_lightning/strategies/strategy.py", line 382, in training_step
return self.lightning_module.training_step(*args, **kwargs)
File "/mnt/c/Programs/PyCharmWorkplace/GaussianDreamer/threestudio/systems/GaussianDreamer.py", line 291, in training_step
out = self(batch)
File "/home/jx/miniconda3/envs/gsdrm/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/mnt/c/Programs/PyCharmWorkplace/GaussianDreamer/threestudio/systems/GaussianDreamer.py", line 240, in forward
render_pkg = render(viewpoint_cam, self.gaussian, self.pipe, renderbackground)
File "/mnt/c/Programs/PyCharmWorkplace/GaussianDreamer/gaussiansplatting/gaussian_renderer/init.py", line 86, in render
rendered_image, radii ,depth= rasterizer(
ValueError: not enough values to unpack (expected 3, got 2)
Epoch 0: | | 0/? [00:02<?, ?it/s]
ERROR conda.cli.main_run:execute(124): conda run python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt=a fox failed. (See above for error)

threestudio import error

I was able to installe everything without error, but am now getting this error when launching:

S:\GitHub\GaussianDreamer>python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="a fox"
Traceback (most recent call last):
File "S:\GitHub\GaussianDreamer\launch.py", line 239, in
main(args, extras)
File "S:\GitHub\GaussianDreamer\launch.py", line 74, in main
import threestudio
File "S:\GitHub\GaussianDreamer\threestudio_init_.py", line 36, in
from . import data, models, systems
File "S:\GitHub\GaussianDreamer\threestudio\data_init_.py", line 1, in
from . import co3d, image, multiview, uncond
File "S:\GitHub\GaussianDreamer\threestudio\data\co3d.py", line 17, in
from threestudio.data.uncond import (
File "S:\GitHub\GaussianDreamer\threestudio\data\uncond.py", line 13, in
from threestudio.utils.base import Updateable
File "S:\GitHub\GaussianDreamer\threestudio\utils_init_.py", line 1, in
from . import base
File "S:\GitHub\GaussianDreamer\threestudio\utils\base.py", line 7, in
from threestudio.utils.misc import get_device, load_module_weights
File "S:\GitHub\GaussianDreamer\threestudio\utils\misc.py", line 5, in
import tinycudann as tcnn
File "C:\Users\admin\anaconda3\Lib\site-packages\tinycudann_init_.py", line 9, in
from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding
File "C:\Users\admin\anaconda3\Lib\site-packages\tinycudann\modules.py", line 51, in
C = importlib.import_module(f"tinycudann_bindings.{cc}C")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\admin\anaconda3\Lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing _86_C: The specified procedure could not be found.

any idea where to start? seems to be a threestudio issue, no?

I am on Windows 11
Anaconda 3
CUDA 11.7
Geforce RTX 3070 8GB

Question about config file

First thank you for your great work!

What is the role of the parameter "camera distance" in the config file? Is it used to adjust the position of the camera(the distance between the camera and the target object)? Why it seems to be a uniform variable in this file?

Thank you for your reply in advance.

About another similar paper

想请教一下你们怎么看待另一篇同样利用3D Gaussian Spaltting来进行3D生成,但是文中声称只需要2min的。
翻译版本:I would like to ask what you think of another paper that also uses 3D Gaussian Spaltting for 3D generation, but the paper claims that it only takes 2 minutes.
Paper title: DREAMGAUSSIAN: GENERATIVE GAUSSIAN SPLATTING FOR EFFICIENT 3D CONTENT CREATION
Paper address:https://arxiv.org/abs/2309.16653

执行代码遇到的一些问题

FileNotFoundError: Text embedding file . threestudio_ cache/text_embeddins/f609948898277275297.pt for model stabilityai/stable-diffusion-2-1-base and prompt [a fox] not found

questions about training time

hi there,

In Figure 1 of your paper, you mentioned that training of DreamFusion takes more than 8 hours, and Magic3D takes more than 5 hours. But DreamFusion mentioned that their training time is about 1.5 hours, and Magic3D about 40 minutes. Why your reported training time of other approaches are much longer?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.