Florian-Barthel / splatviz

Full python interactive 3D Gaussian Splatting viewer for real-time editing and analyzing.
MIT License
1.04k stars 69 forks source link

Several error #1

Closed Lee-JaeWon closed 6 months ago

Lee-JaeWon commented 6 months ago

Thank you for your work.

To test your good work, I tried to follow the instructions given in the README.md.

I have two problems

In environment.yml, it seems to be gaussian-splatting/submodules/diff-gaussian-rasterization-custom and not gaussian-splatting/submodules/diff-gaussian-rasterization.

I git cloned it with --recursive but just diff-gaussian-rasterization is empty.

The second issue is that in ./widgets/video_widge.py, the from scene.cameras import CustomCam is not working. It looks like vanila gs is not importing well.

What should I do?

I'd like to contribute to your work after I've tested it enough.

And FYI, it doesn't seem to work on CUDA 11.7 or lower.

Thank you.

Florian-Barthel commented 6 months ago

Hey, thanks for participating!

I have updated the submodules so that they are no longer hardcoded but instead linked to the respective repository. I hope this resolves the first issue. You might have to clone the repository again, to make it work.

The second issue can hopefully be resolved by adding the "gaussian-splatting" folder to the python path. I have added the line sys.path.append("./gaussian-splatting") to main.py. Let me know if this works.

Do you have an idea, why CUDA 11.7 is not working properly?

Lee-JaeWon commented 6 months ago

Thank you for your quick response.

I cloned it again and the UI is working.

However, I'm facing a new problem

I set the training result of vanilla gaussian splatting to the --data_path.

I think I missed something in this, could you please tell me?

The error is as below.

~/workspace/src# python main.py --data_path="/root/workspace/src/output/8467a616-9/"

Traceback (most recent call last):
  File "/root/workspace/src/viz/renderer.py", line 47, in render
    self._render_impl(res, **args)
  File "/root/workspace/src/viz/renderer.py", line 102, in _render_impl
    self.gaussian_model.load_ply(ply_file_path)
  File "/root/workspace/src/./gaussian-splatting/scene/gaussian_model.py", line 258, in load_ply
    opacities = np.asarray(plydata.elements[0]["opacity"])[..., np.newaxis]
  File "/opt/conda/envs/gs-view/lib/python3.10/site-packages/plyfile.py", line 715, in __getitem__
    return self.data[key]
  File "/opt/conda/envs/gs-view/lib/python3.10/site-packages/numpy/core/memmap.py", line 334, in __getitem__
    res = super().__getitem__(index)
ValueError: no field of name opacity
Lee-JaeWon commented 6 months ago

Never mind the last issue. The path was invalid.

When I set the path correctly, I see an array for _xyz or _opacity. But all I see is a black window.

What am I missing?

Screenshot from 2024-03-05 20-27-21

Florian-Barthel commented 6 months ago

On the left, you have selected "Render depth", which returns a black and white image showing the depth of the 3d object. Is it still black, when you disable this option?

It also looks like the xyz values are quite high. Maybe the the object is not near the center. You can also try and modify the xyz positions in the editor textfield.

Another test, would be to set the self.bg_color[:] = 1. If the image is white, then the renderer is working at least.

I hope any of this works out

Lee-JaeWon commented 6 months ago

The renderer seems to be working fine.

However, the Gaussians that I have are different coordinate system and have large values, which I think is why they don't show up.

Florian-Barthel commented 6 months ago

Okay, thats good news that the renderer is working properly. With the mouse wheel, you can zoom out further that with the UI. Maybe, that helps rendering very large scenes. I will look into building a feature that autodetects the center of the scene and also adjusts the zoom to the size of the scene

Florian-Barthel commented 6 months ago

I have just pushed a new feature that autodetects the center of the scene and adjusts the radius. The new buttons can be found in the camera widget. I hope this helps to properly render the scene. It uses the mean xyz as center and stddev of xyz as radius

If there are no more questions, I will close this issue