Visualize and evaluate 3D meshes
mainkire command (short for python -m kiui.render) to visualize meshes, save videos, or export images. You can also evaluate CLIP-similarity for the generated mesh.repository·main·Indexed 26 days ago
https://github.com/dreamgaussian/dreamgaussianA framework for efficient 3D content creation using Generative Gaussian Splatting. DreamGaussian supports Image-to-3D, Text-to-3D, and hybrid Image+Text-to-3D workflows via a three-step pipeline of preprocessing, Gaussian training, and mesh refinement. It includes a Gradio demo, a DearPyGui interface for interactive training, and tools for visualizing meshes and exporting geometry and textures.
kire command (short for python -m kiui.render) to visualize meshes, save videos, or export images. You can also evaluate CLIP-similarity for the generated mesh.Image-to-3D generation follows a three-step pipeline: preprocessing, Gaussian training, and mesh refinement.
main.py.main2.py.The gaussian-splatting software (owned by Inria and MPII) is provided under a specific license for research and evaluation purposes.
You may only redistribute the work if:
For any unauthorized or commercial use, you must contact Inria at: stip-sophia.transfert@inria.fr.
If using the software for a publication or results, users are strongly encouraged to cite the corresponding publications as specified in the software's documentation.
To set up DreamGaussian, install the core requirements and several specialized dependencies including a modified Gaussian Splatting rasterizer, simple-knn, nvdiffrast, and kiuikit. If you intend to use MVDream or ImageDream, additional installations are required.
# Core requirements
pip install -r requirements.txt
# Modified gaussian splatting
git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterization
pip install ./diff-gaussian-rasterization
# simple-knn
pip install ./simple-knn
# nvdiffrast
pip install git+https://github.com/NVlabs/nvdiffrast/
# kiuikit
pip install git+https://github.com/ashawkey/kiuikit
# Optional: For MVDream
pip install git+https://github.com/bytedance/MVDream
# Optional: For ImageDream
pip install git+https://github.com/bytedance/ImageDream/#subdirectory=extern/ImageDreamThe main.py script serves as the entrypoint for the DreamGaussian pipeline. You can run it in two modes:
--gui flag is present in your configuration, a DearPyGui interface will launch, allowing for interactive training, camera manipulation, and model saving.--gui is not enabled, the script runs a headless training loop for a specified number of iterations and saves the resulting models.To run the pipeline, you must provide a YAML configuration file using the --config flag. You can also override any configuration parameter via command-line arguments.
[F glutil.cpp:338] eglInitialize() failed, you can bypass the standard rasterizer by using the force_cuda_rast flag.To launch the web-based Gradio interface for DreamGaussian, run the gradio_app.py script.
python gradio_app.pyThe save_model method allows you to export the results of the generation process. It supports different output formats based on the mode argument:
mode='geo'): Extracts a mesh from the Gaussians and saves it as a .ply file using the path specified in opt.save_path + _mesh.ply.mode='geo+tex'): Extracts the mesh, performs automatic UV unwrapping and normal calculation, and then uses a multi-view rendering approach to bake an albedo texture onto the mesh. The file format is determined by opt.mesh_format.mode='model'): Saves the raw Gaussian splatting data to a .ply file using the path specified in opt.save_path + _model.ply.The GUI class manages the entire lifecycle of the DreamGaussian process, including input loading, training, rendering, and model extraction.
Key Methods:
train(iters=500): Runs the training loop for a fixed number of iterations in headless mode. It automatically performs a final prune and saves both the .ply model and the geo+tex (geometry + texture) model.render(): Starts the interactive GUI loop (only if self.gui is True).save_model(mode='geo', texture_size=1024): Extracts and saves the generated assets.mode='geo': Saves only the mesh as a .ply file.mode='geo+tex': Performs UV unwrapping and texture extraction to save a textured mesh.mode='model': Saves the raw Gaussian splatting model as a .ply file.load_input(file): Loads an image from a file, automatically removes the background using rembg, and attempts to load a corresponding _caption.txt file for text guidance.