Giter Club home page Giter Club logo

gaussianobject's Introduction

GaussianObject: Just Taking Four Images to Get A High-Quality 3D Object with Gaussian Splatting

We propose GaussianObject, a framework to represent and render the 3D object with Gaussian splatting, that achieves high rendering quality with only 4 input images.

refresh.mp4

We first introduce techniques of visual hull and floater elimination which explicitly inject structure priors into the initial optimization process for helping build multi-view consistency, yielding a coarse 3D Gaussian representation. Then we construct a Gaussian repair model based on diffusion models to supplement the omitted object information, where Gaussians are further refined. We design a self-generating strategy to obtain image pairs for training the repair model. Our GaussianObject achives strong reconstruction results from only 4 views and significantly outperforms previous state-of-the-art methods.

pipeline

  • We initialize 3D Gaussians by constructing a visual hull with camera parameters and masked images, optimizing them with the $\mathcal{L}_{\text{gs}}$ and refining through floater elimination.
  • We use a novel `leave-one-out' strategy and add 3D noise to Gaussians to generate corrupted Gaussian renderings. These renderings, paired with their corresponding reference images, facilitate the training of the Gaussian repair model employing $\mathcal{L}_{\text{tune}}$.
  • Once trained, the Gaussian repair model is frozen and used to correct views that need to be rectified. These views are identified through distance-aware sampling. The repaired images and reference images are used to further optimize 3D Gaussians with $\mathcal{L}_{\text{rep}}$ and $\mathcal{L}_{\text{gs}}$.

Colab

Open In Colab

Sang Han provides a Colab script for GaussianObject in #9. Thanks for the contribution of the community! If you are experiencing issues with insufficient GPU VRAM, try this.

Setup

CUDA

GaussianObject is tested with CUDA 11.7. If you are using a different version, you can choose to install nvidia/cuda in a local conda environment or modify the version of PyTorch in requirements.txt.

Cloning the Repository

The repository contains submodules. Please clone it with

git clone https://github.com/GaussianObject/GaussianObject.git --recursive

or update submodules in GaussianObject directory with

git submodule update --init --recursive

Dataset

You can try GaussianObject with the Mip-NeRF360 dataset and OmniObject3D dataset. The data can be downloaded in Google Drive.

The directory structure of the dataset should be

GaussianObject
├── data
│   ├── mip360
│   │   ├── bonsai
│   │   │   ├── images
│   │   │   ├── images_2
│   │   │   ├── images_4
│   │   │   ├── images_8
│   │   │   ├── masks
│   │   │   ├── sparse
│   │   │   ├── zoe_depth
│   │   │   ├── zoe_depth_colored
│   │   │   ├── sparse_4.txt
│   │   │   ├── sparse_6.txt
│   │   │   ├── sparse_9.txt
│   │   │   └── sparse_test.txt
│   │   ├── garden
│   │   └── kitchen
│   └── omni3d
└── ...

images, images_2, images_4, images_8 and sparse are from the original dataset. masks is the object mask generated with segment-anything. zoe_depth and zoe_depth_colored are the depth maps and colored depth maps. sparse_4.txt, sparse_6.txt and sparse_9.txt are train set image ids and sparse_test.txt is the test set.

To test GaussianObject with your own dataset, you can manually prepare the dataset with the same directory structure. The depth maps and colored depth maps are generated with

python pred_monodepth.py -s <YOUR_DATA_DIR>

Python Environment

GaussianObject is tested with Python 3.10. All the required packages are listed in requirements.txt. You can install them with

# setup pip packages
pip install -r requirements.txt

# setup submodules
pip install -e submodules/diff-gaussian-rasterization
pip install -e submodules/simple-knn
pip install -e submodules/pytorch3d
pip install -e submodules/minLoRA
pip install -e submodules/CLIP

Pretrained ControlNet Model

Pretrained weights of Stable Diffusion v1.5 and ControlNet Tile need to be put in models/ following the instruction of ControlNet 1.1 with our given script

python download_hf_models.py

Run the Code

Taking the scene kitchen from mip360 dataset as an example, GaussianObject generate the visual hull of it, train a coarse 3DGS representation, analyze the statistical regularity of the coarse model with leave-one-out strategy, fine-tune the Gaussian Repair Model with LoRA and repair the 3DGS representation step by step.

Visual Hull

python visual_hull.py \
    --sparse_id 4 \
    --data_dir data/mip360/kitchen \
    --reso 2 --not_vis

The visual hull is saved in data/mip360/kitchen/visual_hull_4.ply.

Coarse 3DGS

python train_gs.py -s data/mip360/kitchen \
    -m output/gs_init/kitchen \
    -r 4 --sparse_view_num 4 --sh_degree 2 \
    --init_pcd_name visual_hull_4 \
    --white_background --random_background

You can render the coarse model it with

# render the test set
python render.py \
    -m output/gs_init/kitchen \
    --sparse_view_num 4 --sh_degree 2 \
    --init_pcd_name visual_hull_4 \
    --white_background --skip_all --skip_train

# render the path
python render.py \
    -m output/gs_init/kitchen \
    --sparse_view_num 4 --sh_degree 2 \
    --init_pcd_name visual_hull_4 \
    --white_background --render_path

The rendering results are saved in output/gs_init/kitchen/test/ours_10000 and output/gs_init/kitchen/render/ours_10000.

Leave One Out

python leave_one_out_stage1.py -s data/mip360/kitchen \
    -m output/gs_init/kitchen_loo \
    -r 4 --sparse_view_num 4 --sh_degree 2 \
    --init_pcd_name visual_hull_4 \
    --white_background --random_background

python leave_one_out_stage2.py -s data/mip360/kitchen \
    -m output/gs_init/kitchen_loo \
    -r 4 --sparse_view_num 4 --sh_degree 2 \
    --init_pcd_name visual_hull_4 \
    --white_background --random_background

LoRA Fine-Tuning

python train_lora.py --exp_name controlnet_finetune/kitchen \
    --prompt xxy5syt00 --sh_degree 2 --resolution 4 --sparse_num 4 \
    --data_dir data/mip360/kitchen \
    --gs_dir output/gs_init/kitchen \
    --loo_dir output/gs_init/kitchen_loo \
    --bg_white --sd_locked --train_lora --use_prompt_list \
    --add_diffusion_lora --add_control_lora --add_clip_lora

Gaussian Repair

python train_repair.py \
    --config configs/gaussian-object.yaml \
    --train --gpu 0 \
    tag="kitchen" \
    system.init_dreamer="output/gs_init/kitchen" \
    system.exp_name="output/controlnet_finetune/kitchen" \
    system.refresh_size=8 \
    data.data_dir="data/mip360/kitchen" \
    data.resolution=4 \
    data.sparse_num=4 \
    data.prompt="a photo of a xxy5syt00" \
    data.refresh_size=8 \
    system.sh_degree=2

The final 3DGS representation is saved in output/gaussian_object/kitchen/save/last.ply. You can render it with

# render the test set
python render.py \
    -m output/gs_init/kitchen \
    --sparse_view_num 4 --sh_degree 2 \
    --init_pcd_name visual_hull_4 \
    --white_background --skip_all --skip_train \
    --load_ply output/gaussian_object/kitchen/save/last.ply

# render the path
python render.py \
    -m output/gs_init/kitchen \
    --sparse_view_num 4 --sh_degree 2 \
    --init_pcd_name visual_hull_4 \
    --white_background --render_path \
    --load_ply output/gaussian_object/kitchen/save/last.ply

The rendering results are saved in output/gs_init/kitchen/test/ours_None and output/gs_init/kitchen/render/ours_None.

Acknowledgement

Some code of GaussianObject is based on 3DGS, threestudio and ControlNet. Thanks for their great work!

gaussianobject's People

Contributors

gaussianobject 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gaussianobject's Issues

Mesh extracting

Hi!

Thank you for your great work. Is it possible to extract mesh as a result of the generation. I did't find any method for this.

Super slow LoRA Fine-Tuning with a GeForce RTX 3080 GPU!

Hi, I'm running this project on my laptop with a GeForce RTX 3080 GPU & Windows 11 OS, inside a miniconda environment with all the required packages and following your example command precisely.

From your paper's section 4 [EXPERIMENTS]:

The whole process of GaussianObject takes about 30 minutes on a GeForce RTX 3090 GPU for 4 input images at a 779 × 520 resolution.

But I'm training for more than an hour in the LoRA Fine-Tuning stage already, and the progress is still working at:
Epoch 32: 25%|▎| 1/4 [00:24<01:12, 24.31s/it, loss=0.0371, v_num=0, train/loss_simple_step=0.029, train/loss_vlb_step=9.67e-5, train/loss_step=0.029, global_step=128.0

Have I done something wrong? What I am missing that keeps me from running this project as fast as in your experiment?
Thank you in advance :)

Just to give a little more context, here is a snapshot of the console:

(Wonder3D) C:\Users\reall\Softwares\Miniconda3\envs\Wonder3D\_Projects\GaussianObject>python train_lora.py --exp_name controlnet_finetune/kitchen --prompt xxy5syt00 --sh_degree 2 --resolution 4 --sparse_num 4 --data_dir data/mip360/kitchen --gs_dir output/gs_init/kitchen --loo_dir output/gs_init/kitchen_loo --bg_white --sd_locked --train_lora --use_prompt_list --add_diffusion_lora --add_control_lora --add_clip_lora
A matching Triton is not available, some optimizations will not be enabled
Traceback (most recent call last):
  File "C:\Users\reall\Softwares\Miniconda3\envs\Wonder3D\Lib\site-packages\xformers\__init__.py", line 55, in _is_triton_available
    from xformers.triton.softmax import softmax as triton_softmax  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\reall\Softwares\Miniconda3\envs\Wonder3D\Lib\site-packages\xformers\triton\softmax.py", line 11, in <module>
    import triton
ModuleNotFoundError: No module named 'triton'
ControlLDM: Running in eps-prediction mode
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is 768 and using 8 heads.
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla-xformers' with 512 in_channels
building MemoryEfficientAttnBlock with 512 in_channels...
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla-xformers' with 512 in_channels
building MemoryEfficientAttnBlock with 512 in_channels...
tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 905/905 [00:00<?, ?B/s]
vocab.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 961k/961k [00:00<00:00, 1.28MB/s]
merges.txt: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 525k/525k [00:00<00:00, 3.11MB/s]
special_tokens_map.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 389/389 [00:00<?, ?B/s]
tokenizer.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.22M/2.22M [00:00<00:00, 3.09MB/s]
config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.52k/4.52k [00:00<?, ?B/s]
model.safetensors: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.71G/1.71G [09:03<00:00, 3.15MB/s]
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 320, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 640, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is None and using 8 heads.
Setting up MemoryEfficientCrossAttention. Query dim is 1280, context_dim is 768 and using 8 heads.
Loaded model config from [./models/control_v11f1e_sd15_tile.yaml]
Loaded state_dict from [./models/v1-5-pruned.ckpt]
Loaded state_dict from [./models/control_v11f1e_sd15_tile.pth]
Using resized images in data/mip360/kitchen\images_4...
Load 25 images for leave 14
Load 25 images for leave 70
Load 25 images for leave 171
Load 25 images for leave 196
GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
C:\Users\reall\Softwares\Miniconda3\envs\Wonder3D\Lib\site-packages\pytorch_lightning\trainer\configuration_validator.py:108: PossibleUserWarning: You defined a `validation_step` but have no `val_dataloader`. Skipping val loop.
  rank_zero_warn(
You are using a CUDA device ('NVIDIA GeForce RTX 3080 Laptop GPU') 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  
Missing logger folder: ./output\controlnet_finetune/kitchen\tf_logs\lightning_logs
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]

  | Name              | Type               | Params
---------------------------------------------------------
0 | model             | DiffusionWrapper   | 883 M
1 | first_stage_model | AutoencoderKL      | 83.7 M
2 | cond_stage_model  | FrozenCLIPEmbedder | 136 M
3 | control_model     | ControlNet         | 372 M
---------------------------------------------------------
1.3 B     Trainable params
206 M     Non-trainable params
5,905.375 Total estimated model params size (MB)
C:\Users\reall\Softwares\Miniconda3\envs\Wonder3D\Lib\site-packages\pytorch_lightning\trainer\connectors\data_connector.py:224: PossibleUserWarning: The dataloader, train_dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 16 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
C:\Users\reall\Softwares\Miniconda3\envs\Wonder3D\Lib\site-packages\pytorch_lightning\trainer\trainer.py:1609: PossibleUserWarning: The number of training batches (4) is smaller than the logging interval Trainer(log_every_n_steps=50). Set a lower value for log_every_n_steps if you want to see logs for the training epoch.
  rank_zero_warn(
Epoch 0:   0%|                                                                                                                                                       | 0/4 [00:00<?, ?it/s]C:\Users\reall\Softwares\Miniconda3\envs\Wonder3D\Lib\site-packages\pytorch_lightning\utilities\data.py:83: UserWarning: Trying to infer the `batch_size` from an ambiguous collection. The batch size we found is 1. To avoid any miscalculations, use `self.log(..., batch_size=batch_size)`.
  warning_cache.warn(
C:\Users\reall\Softwares\Miniconda3\envs\Wonder3D\Lib\site-packages\pytorch_lightning\trainer\connectors\logger_connector\result.py:234: UserWarning: You called `self.log('global_step', ...)` in your `training_step` but the value needs to be floating point. Converting it to torch.float32.
  warning_cache.warn(
Epoch 6:   0%| | 0/4 [00:00<?, ?it/s, loss=0.0375, v_num=0, train/loss_simple_step=0.00604, train/loss_vlb_step=2.48e-5, train/loss_step=0.00604, global_step=23.0Epoch 6:  25%|| 1/4 [00:29<01:28, 29.45s/it, loss=0.0375, v_num=0, train/loss_simple_step=0.00604, train/loss_vlb_step=2.48e-5, train/loss_step=0.00604, global_ Epoch 8:  50%|| 2/4 [00:54<00:54, 27.43s/it, loss=0.0Epoch 37:  75%|| 3/4 [01:18<00:26, 26.30s/it, loss=0.0402, v_num=0, train/loss_simple_step=0.00904, train/loss_vlb_step=3.6e-5, train/loss_step=0.00904, global_step=150.0, train/loss_simp

Extra hugging face model need to be downloaded.

In file download_hf_models.py, runwayml/stable-diffusion-v1-5 and lllyasviel/ControlNet-v1-1 is downloaded in advance. But when I ran the script train_lora.py, errors occured like below:

OSError: Can't load tokenizer for 'openai/clip-vit-large-patch14'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'openai/clip-vit-large-patch14' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

So I wonder if I need to download the model 'openai/clip-vit-large-patch14' and where should I put the file.
Thanks a lot for your excellent work and the code sharing!

train_lora doesn't generate .ckpt file

I run the train_lora.py using

#LoRA Fine-Tuning stage
python train_lora.py --exp_name controlnet_finetune/kitchen \
    --prompt xxy5syt00 --sh_degree 2 --resolution 8 --sparse_num 4 \
    --data_dir data/mip360/kitchen \
    --gs_dir output/gs_init/kitchen \
    --loo_dir output/gs_init/kitchen_loo \
    --bg_white --sd_locked --train_lora --use_prompt_list \
    --add_diffusion_lora --add_control_lora --add_clip_lora \
    --image_size 256

Then I try to run the train_repair.py using the following

#Gaussian Repair stage
python train_repair.py \
    --config configs/gaussian-object.yaml \
    --train --gpu 0 \
    tag="kitchen" \
    system.init_dreamer="output/gs_init/kitchen" \
    system.exp_name="output/controlnet_finetune/kitchen" \
    system.refresh_size=8 \
    data.data_dir="data/mip360/kitchen" \
    data.resolution=8 \
    data.sparse_num=4 \
    data.prompt="a photo of a xxy5syt00" \
    data.refresh_size=8 \
    system.sh_degree=2 \
    system.novel_image_size=256

The train_repair.py gave me
FileNotFoundError: [Errno 2] No such file or directory: 'output/controlnet_finetune/kitchen/ckpts-lora/lora-step=1799.ckpt
I think this file is generated by the train_lora step.
May someone know the answer to this question?

about datasets loader

Hello, this is an excellent piece of work and I would love to be able to share the complete data set of this work loading module code

Error running train_lora.py

Traceback (most recent call last):
File "/home/featurize/work/GaussianObject/train_lora.py", line 115, in
trainer.fit(model, dataloader)
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 545, in fit
call._call_and_handle_interrupt(
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/call.py", line 44, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 581, in _fit_impl
self._run(model, ckpt_path=ckpt_path)
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 990, in _run
results = self._run_stage()
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1036, in _run_stage
self.fit_loop.run()
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/loops/fit_loop.py", line 202, in run
self.advance()
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/loops/fit_loop.py", line 359, in advance
self.epoch_loop.run(self._data_fetcher)
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/loops/training_epoch_loop.py", line 136, in run
self.advance(data_fetcher)
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/loops/training_epoch_loop.py", line 259, in advance
call._call_callback_hooks(trainer, "on_train_batch_end", batch_output, batch, batch_idx)
File "/environment/miniconda3/lib/python3.10/site-packages/pytorch_lightning/trainer/call.py", line 208, in _call_callback_hooks
fn(trainer, trainer.lightning_module, *args, **kwargs)
File "/home/featurize/work/GaussianObject/cldm/logger.py", line 75, in on_train_batch_end
self.log_img(pl_module, batch, batch_idx, split="train")
File "/home/featurize/work/GaussianObject/cldm/logger.py", line 56, in log_img
images = pl_module.log_images(batch, split=split, **self.log_images_kwargs)
File "/environment/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/featurize/work/GaussianObject/cldm/cldm.py", line 366, in log_images
log["conditioning"] = log_txt_as_img((512, 512), batch[self.cond_stage_key], size=16) # text
File "/home/featurize/work/GaussianObject/ldm/util.py", line 19, in log_txt_as_img
font = ImageFont.truetype('font/DejaVuSans.ttf', size=size)
File "/environment/miniconda3/lib/python3.10/site-packages/PIL/ImageFont.py", line 791, in truetype
return freetype(font)
File "/environment/miniconda3/lib/python3.10/site-packages/PIL/ImageFont.py", line 788, in freetype
return FreeTypeFont(font, size, index, encoding, layout_engine)
File "/environment/miniconda3/lib/python3.10/site-packages/PIL/ImageFont.py", line 226, in init
self.font = core.getfont(
OSError: cannot open resource
May I ask why such an error occurred and how should it be corrected.

Sparse view selection for dataset.

Hello! Great work!

I'm interested in sparse view selection. I noticed that the indices of selected views are stored in sparse_X.txt files. How do you sample sparse views from a group of original views? What's the principle behind the selection? The selected views are expected to be uniform and cover the object as much as possible, right? And any code to do this?

For scenes?

Can this be used to replicate whole scenes?

data

image
Hello sir, I encountered this error while using my own dataset. Can you tell me a solution.

Extracting Mesh from Point Cloud

Upon completing the Gaussian Repair step, the final outcome yielded a point cloud file named "last.ply." Is it feasible to extract a mesh from this point cloud? Attaching the screenshot of the last.ply.

image

data

image
Why does this error occur when I use my own dataset?

Masking Feature

Hi all,
First of all, thank you very much for this great project.
Is there a masking feature for dynamic objects for GaussianObject?

A doubt about rendering result.

I run the whole experiment, and get some result of official dataset in mip360 and omni3d. But I the results I get are in single color, not looks the same like the result presented in the paper.
微信图片_20240603221342
image
image

Generating Masks from SegAnyGAussians

It seems in order to prepare your own dataset requires generating masks from SegAnyGAussians. However, looking through the repository and running their code, I was not able to find any way to generate the masks directory using their codebase.

Is there something I'm missing in the documentation, or do you guys have special code on top to generate the masks directory?

Having trouble in installation

Device information

  • Graphic driver : RTX 3060 ti, 8GB vram
  • CUDA version : 12.1

Reproduction of the error

  • using conda to configure the environment :
    • conda create -n go python=3.10
    • conda activate go
    • pip install -r requirements.txt
    • conda install -c anaconda -c conda-forge cudatoolkit==11.7
    • conda install -c anaconda cudnn
    • conda list :
      Untitled
    • trying to install the submodules causes the following error :
      • run command : pip install -e submodules/diff-gaussian-rasterization
      • error :
(go) C:\hayoung\work\GaussianObject>pip install -e submodules/diff-gaussian-rasterization
Obtaining file:///C:/hayoung/work/GaussianObject/submodules/diff-gaussian-rasterization
  Preparing metadata (setup.py) ... done
Installing collected packages: diff-gaussian-rasterization
  Running setup.py develop for diff-gaussian-rasterization
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [78 lines of output]
        No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
        running develop
        C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` and ``easy_install``.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://github.com/pypa/setuptools/issues/917 for details.
                ********************************************************************************

        !!
          easy_install.initialize_options(self)
        C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
        !!

                ********************************************************************************
                Please avoid running ``setup.py`` directly.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.

                See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
                ********************************************************************************

        !!
          self.initialize_options()
        running egg_info
        writing diff_gaussian_rasterization.egg-info\PKG-INFO
        writing dependency_links to diff_gaussian_rasterization.egg-info\dependency_links.txt
        writing top-level names to diff_gaussian_rasterization.egg-info\top_level.txt
        C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
          warnings.warn(msg.format('we could not find ninja.'))
        reading manifest file 'diff_gaussian_rasterization.egg-info\SOURCES.txt'
        adding license file 'LICENSE.md'
        writing manifest file 'diff_gaussian_rasterization.egg-info\SOURCES.txt'
        running build_ext
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "C:\hayoung\work\GaussianObject\submodules\diff-gaussian-rasterization\setup.py", line 17, in <module>
            setup(
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\__init__.py", line 103, in setup
            return distutils.core.setup(**attrs)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
            return run_commands(dist)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
            dist.run_commands()
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
            self.run_command(cmd)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\dist.py", line 989, in run_command
            super().run_command(command)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
            cmd_obj.run()
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\develop.py", line 34, in run
            self.install_for_development()
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\develop.py", line 109, in install_for_development
            self.run_command('build_ext')
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
            self.distribution.run_command(command)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\dist.py", line 989, in run_command
            super().run_command(command)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
            cmd_obj.run()
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\build_ext.py", line 88, in run
            _build_ext.run(self)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
            self.build_extensions()
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py", line 499, in build_extensions
            _check_cuda_version(compiler_name, compiler_version)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py", line 383, in _check_cuda_version
            torch_cuda_version = packaging.version.parse(torch.version.cuda)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 52, in parse
            return Version(version)
          File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 196, in __init__
            match = self._regex.search(version)
        TypeError: expected string or bytes-like object
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [78 lines of output]
    No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
    running develop
    C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` and ``easy_install``.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://github.com/pypa/setuptools/issues/917 for details.
            ********************************************************************************

    !!
      easy_install.initialize_options(self)
    C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
    !!

            ********************************************************************************
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.

            See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
            ********************************************************************************

    !!
      self.initialize_options()
    running egg_info
    writing diff_gaussian_rasterization.egg-info\PKG-INFO
    writing dependency_links to diff_gaussian_rasterization.egg-info\dependency_links.txt
    writing top-level names to diff_gaussian_rasterization.egg-info\top_level.txt
    C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
      warnings.warn(msg.format('we could not find ninja.'))
    reading manifest file 'diff_gaussian_rasterization.egg-info\SOURCES.txt'
    adding license file 'LICENSE.md'
    writing manifest file 'diff_gaussian_rasterization.egg-info\SOURCES.txt'
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "C:\hayoung\work\GaussianObject\submodules\diff-gaussian-rasterization\setup.py", line 17, in <module>
        setup(
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\__init__.py", line 103, in setup
        return distutils.core.setup(**attrs)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
        return run_commands(dist)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
        dist.run_commands()
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
        self.run_command(cmd)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\dist.py", line 989, in run_command
        super().run_command(command)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
        cmd_obj.run()
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\develop.py", line 34, in run
        self.install_for_development()
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\develop.py", line 109, in install_for_development
        self.run_command('build_ext')
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
        self.distribution.run_command(command)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\dist.py", line 989, in run_command
        super().run_command(command)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
        cmd_obj.run()
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\build_ext.py", line 88, in run
        _build_ext.run(self)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
        self.build_extensions()
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py", line 499, in build_extensions
        _check_cuda_version(compiler_name, compiler_version)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py", line 383, in _check_cuda_version
        torch_cuda_version = packaging.version.parse(torch.version.cuda)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 52, in parse
        return Version(version)
      File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 196, in __init__
        match = self._regex.search(version)
    TypeError: expected string or bytes-like object
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

(go) C:\hayoung\work\GaussianObject>pip install ./submodules/diff-gaussian-rasterization/
Processing c:\hayoung\work\gaussianobject\submodules\diff-gaussian-rasterization
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: diff-gaussian-rasterization
  Building wheel for diff-gaussian-rasterization (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [57 lines of output]
      No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
      running bdist_wheel
      C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
        warnings.warn(msg.format('we could not find ninja.'))
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-310
      creating build\lib.win-amd64-cpython-310\diff_gaussian_rasterization
      copying diff_gaussian_rasterization\__init__.py -> build\lib.win-amd64-cpython-310\diff_gaussian_rasterization
      running build_ext
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\hayoung\work\GaussianObject\submodules\diff-gaussian-rasterization\setup.py", line 17, in <module>
          setup(
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\dist.py", line 989, in run_command
          super().run_command(command)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\wheel\bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\dist.py", line 989, in run_command
          super().run_command(command)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\dist.py", line 989, in run_command
          super().run_command(command)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\command\build_ext.py", line 88, in run
          _build_ext.run(self)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
          self.build_extensions()
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py", line 499, in build_extensions
          _check_cuda_version(compiler_name, compiler_version)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\torch\utils\cpp_extension.py", line 383, in _check_cuda_version
          torch_cuda_version = packaging.version.parse(torch.version.cuda)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 52, in parse
          return Version(version)
        File "C:\Users\jerem\anaconda3\envs\go\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 196, in __init__
          match = self._regex.search(version)
      TypeError: expected string or bytes-like object
      [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

Licensing request

Love the paper! I do work in what’s called community led AI and work like this is critically important for leveraging cutting edge spatial technologies in everyday settings. Please, if you can, consider licensing the code as MIT or Apache.

submodules

Hi~ Thanks for your excellent work

I wanna install the env, but I cannot find the submodule folder, which includes the necessary diff-gaussian-rasterization package.

Can you help me to solve it?

Time out

Hello, when I try train_repair.py, the process was timed out, even though I defined maxtime.

trainer = Trainer(
    callbacks=callbacks,
    logger=loggers,
    inference_mode=False,
    accelerator="gpu",
    devices=devices,
    max_time="00:12:00:00",
    **cfg.trainer,
)

trainer.fit(system, datamodule=dm, ckpt_path=cfg.resume)

========================================error ==================================
Traceback (most recent call last):
File "/cig/common06nb/deserizk/GaussianObject/train_repair.py", line 189, in
main(args, extras)
File "/cig/common06nb/deserizk/GaussianObject/train_repair.py", line 156, in main
trainer.fit(system, datamodule=dm, ckpt_path=cfg.resume)
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 545, in fit
call._call_and_handle_interrupt(
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/pytorch_lightning/trainer/call.py", line 43, in _call_and_handle_interrupt
return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 102, in launch
return function(*args, **kwargs)
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 581, in _fit_impl
self._run(model, ckpt_path=ckpt_path)
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/pytorch_lightning/trainer/trainer.py", line 948, in _run
self.strategy.setup_environment()
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/pytorch_lightning/strategies/ddp.py", line 146, in setup_environment
self.setup_distributed()
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/pytorch_lightning/strategies/ddp.py", line 197, in setup_distributed
_init_dist_connection(self.cluster_environment, self._process_group_backend, timeout=self._timeout)
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/lightning_fabric/utilities/distributed.py", line 290, in _init_dist_connection
torch.distributed.init_process_group(torch_distributed_backend, rank=global_rank, world_size=world_size, **kwargs)
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py", line 932, in init_process_group
_store_based_barrier(rank, store, timeout)
File "/cig/common05nb/deserizk/miniconda3/envs/gs-object/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py", line 469, in _store_based_barrier
raise RuntimeError(
RuntimeError: Timed out initializing process group in store based barrier on rank: 0, for key: store_based_barrier_key:1 (world_size=4, worker_count=1, timeout=0:30:00)

Requested ED25519 key fingerprint

Cannot download recursively it says publickey permission denied?

Thanks in advance for your strong work and strong commitment to the community!!!

About dataset

Thanks for your great work.
I would like to test GaussianObject with our own dataset. Can you provide a script to handle our own dataset?

font resource error

The train_lora gave me an error that cannot open resource in fucntion core.getfont in PIL/ImageFont.py, and it happend while Epoch=149. I want to konw the relation between font and this training program.

Query Regarding Sparse Dataset Reconstruction

Hello, thank you for your excellent work. I'm interested in using your model with my custom dataset. In my dataset, I have a sparse set of inputs along with their positions stored in a transform.json file. Your model also requires a folder named "sparse" containing certain files (cameras.bin, images.bin, and points3D.bin). I assume these files are generated from Colmap reconstruction. However, when I attempted reconstruction in Colmap with 8 images, I encountered a message stating "no image pairs found." I'm wondering if the steps I followed to generate the files in the "Sparse" folder are correct. If not, could you please provide guidance on how to generate these files correctly?

Thank you.

Can We Use MVDream MultiView diffusion model?

Hello and congratulations for the remarquable work. I was wondering if there are a way to feed your model with 4 images from MVDream automatically to have a kind of text to 3D generation? Maybe my question doesn't have any sense yeah because I'm beginner with research and this one is my first master internship project

visual_hull.py error

Hi there!

Thank you very much for this great work :)

I haven't managed to take advantage of the code for my own data yet, but I'm planning to =D

I end up with the following error code at the “visual_hull.py” command:

(GO) xsevenx@PC:~/GaussianObject$ python visual_hull.py --sparse_id 9 --data_dir "/home/xsevenx/segment-anything/data/Cascade_dense_02/" --not_vis
Using resized images in /home/xsevenx/segment-anything/data/Cascade_dense_02/images...
Reading camera 29/29
Generating ellipse path from 29 camera infos ...
theta[0] 0.0
the sparse id is 9, with 9 frames
the camera center is: tensor([ 0.1372, 0.0131, -0.0067], device='cuda:0')
Traceback (most recent call last):
File "/home/xsevenx/GaussianObject/visual_hull.py", line 223, in
pcd, bbox = get_visual_hull(args.voxel_num, init_bbox, scene_info, cam_center)
File "/home/xsevenx/GaussianObject/visual_hull.py", line 85, in get_visual_hull
new_masks.append(simple_resize_image(mask, img_size))
File "/home/xsevenx/GaussianObject/visual_hull.py", line 66, in simple_resize_image
return transforms.Resize(size, antialias=True)(img)
File "/home/xsevenx/anaconda3/envs/GO/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/xsevenx/anaconda3/envs/GO/lib/python3.10/site-packages/torchvision/transforms/transforms.py", line 361, in forward
return F.resize(img, self.size, self.interpolation, self.max_size, self.antialias)
File "/home/xsevenx/anaconda3/envs/GO/lib/python3.10/site-packages/torchvision/transforms/functional.py", line 476, in resize
_, image_height, image_width = get_dimensions(img)
File "/home/xsevenx/anaconda3/envs/GO/lib/python3.10/site-packages/torchvision/transforms/functional.py", line 78, in get_dimensions
return F_pil.get_dimensions(img)
File "/home/xsevenx/anaconda3/envs/GO/lib/python3.10/site-packages/torchvision/transforms/_functional_pil.py", line 31, in get_dimensions
raise TypeError(f"Unexpected type {type(img)}")
TypeError: Unexpected type <class 'NoneType'>

I don't know if this has anything to do with the “sparse_9.txt” I created manually?

I couldn't find a way to output this txt file in an optimized and automatic way :(
If it's coming from there, what's the most appropriate way to output these files?

Thank you very much for your help and your time

XSevenX

Problems training LORA

I put the .pth file and .ckpt file into the models folder in advance, but an error occurred when loading the .pth file. The following is the running log.

Traceback (most recent call last):
File "/home/yxiong/Gaussian Object/GaussianObject/train_lora.py", line 52, in
model.load_state_dict(load_state_dict(f'./models/{args.model_name}.pth', location='cpu'), strict=False)
File "/home/yxiong/Gaussian Object/GaussianObject/cldm/model.py", line 18, in load_state_dict
state_dict = get_state_dict(torch.load(ckpt_path, map_location=torch.device(location)))
File "/home/yxiong/anaconda3/envs/go/lib/python3.10/site-packages/torch/serialization.py", line 797, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/home/yxiong/anaconda3/envs/go/lib/python3.10/site-packages/torch/serialization.py", line 283, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted

own dataset

The article claims that a geometric shape (GS) can be generated with just four images, but in actual operation, to create a sparse point cloud, I only have photos from four perspectives. How can I use COLMAP to generate a .sparse file with such a limited number of images? Isn't this contradictory to the title of the article? The point clouds in the dataset are all generated from a multitude of photographs. I am hoping for some guidance on how to use this project with only a few images.

True runtime of GaussianObject

Thank you for the awesome work!

The paper makes the following statement:

The whole process of GaussianObject takes about 30 minutes on a GeForce RTX 3090 GPU 
for 4 input images at a 779 × 520 resolution.

I have the following questions:

  1. Does the quote above include the Segmentation time and the depth estimation time? If not, how long do these processes take?
  2. "Segment Any 3D GAussians" preprocessing requires COLMAP. How can this approach work using COLMAP, since COLMAP usually requires more than 4 images to extract poses. How did the authors extract the poses without using the full dataset?
  3. If COLMAP is a dependency, how can this approach work on new sparse datasets where COLMAP fails to extract poses?

Thank you in advance for your reply and for releasing the code.

Data set processing

(gaussianobject) xzj@ecs01-20240428-0001:~/project/GaussianObject$ python pred_monodepth.py -s /home/xzj/project/GaussianObject/data/mip360/bonsai/images
Using cache found in /home/xzj/.cache/torch/hub/intel-isl_MiDaS_master
Using cache found in /home/xzj/.cache/torch/hub/isl-org_ZoeDepth_main
img_size [384, 512]
Using cache found in /home/xzj/.cache/torch/hub/intel-isl_MiDaS_master
Params passed to Resize transform:
width: 512
height: 384
resize_target: True
keep_aspect_ratio: True
ensure_multiple_of: 32
resize_method: minimal
0it [00:00, ?it/s]

image

When I process my dataset to get the depth maps and colored depth maps, why do I end up with empty "zoe_depth_colored" and "zoe_depth" folder contents?

Doubts about static and dynamic collection

Hello author, thank you for your work. I would like to ask a question. Is it necessary to ensure that the item is static in the scene during the image collection process, and can the item be moved?

error when Coarse 3DGS step, return ValueError: not enough values to unpack (expected 4, got 2)

full log

Optimizing output/gs_init/kitchen
Listening on 127.0.0.1:6009 [30/05 12:20:34]
Output folder: output/gs_init/kitchen [30/05 12:20:34]
Using resized images in C:\_Dev\Repository\GaussianObject\data\mip360\kitchen\images_4... [30/05 12:20:35]
Reading camera 279/279 [30/05 12:20:41]
Generating ellipse path from 279 camera infos ... [30/05 12:20:41]
theta[0] 0.0 [30/05 12:20:41]
Sparse view, only 4 images are used for training, others are used for eval. [30/05 12:20:41]
Loading training cameras with 0.9519944190979004s [30/05 12:20:42]
Loading test cameras with 0.48201775550842285s [30/05 12:20:43]
Loading render cameras with 0.4770045280456543s [30/05 12:20:43]
Number of points at initialisation :  8616 [30/05 12:20:43]
Training progress:   0%|                                                                                                                                     | 0/10000 [00:00<?, ?it/s]Traceback (most recent call last):
  File "C:\_Dev\Repository\GaussianObject\train_gs.py", line 286, in <module>
    training(args, lp.extract(args), op.extract(args), pp.extract(args), args.test_iterations,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\_Dev\Repository\GaussianObject\train_gs.py", line 86, in training
    render_pkg = render(viewpoint_cam, gaussians, pipe, bg)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\_Dev\Repository\GaussianObject\gaussian_renderer\__init__.py", line 85, in render
    rendered_image, radii, rendered_depth, rendered_alpha = rasterizer(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 4, got 2)
Training progress:   0%|

Issues during environment setting

In the Readme, I see the code like

setup submodules

pip install -e submodules/diff-gaussian-rasterization
pip install -e submodules/simple-knn
pip install -e submodules/pytorch3d
pip install -e submodules/minLoRA
pip install -e submodules/CLIP
However, I can't find a folder named “submodules” in the main branch, it may be a stupid question but I'm very confused.
wrong

test

hello, this is a very beautiful work, I have the isssue following: Given any four images, how to test the model and output corresponding reconstructed 3D results?
I'm glad to hear that you're looking forward to my response

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.