{"id":15039247,"url":"https://github.com/florian-barthel/splatviz","last_synced_at":"2025-05-14T19:10:06.198Z","repository":{"id":223298190,"uuid":"759851892","full_name":"Florian-Barthel/splatviz","owner":"Florian-Barthel","description":"Full python interactive 3D Gaussian Splatting viewer for real-time editing and analyzing.","archived":false,"fork":false,"pushed_at":"2025-05-12T09:50:42.000Z","size":69402,"stargazers_count":1312,"open_issues_count":7,"forks_count":85,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-05-14T19:09:53.654Z","etag":null,"topics":["3d-gaussian-splatting","3dgs","analyzing","imgui","interactive","python","real-time-editing","viewer"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Florian-Barthel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-19T13:10:12.000Z","updated_at":"2025-05-14T15:30:27.000Z","dependencies_parsed_at":"2024-04-09T15:10:11.660Z","dependency_job_id":"efbc903e-a2b9-4a18-aa54-c4d1be966bbf","html_url":"https://github.com/Florian-Barthel/splatviz","commit_stats":{"total_commits":172,"total_committers":4,"mean_commits":43.0,"dds":"0.046511627906976716","last_synced_commit":"2652913388e20a9de4057a606cf26f2ed2314a57"},"previous_names":["florian-barthel/gaussian_viewer","florian-barthel/splatviz"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Florian-Barthel%2Fsplatviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Florian-Barthel%2Fsplatviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Florian-Barthel%2Fsplatviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Florian-Barthel%2Fsplatviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Florian-Barthel","download_url":"https://codeload.github.com/Florian-Barthel/splatviz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254209859,"owners_count":22032897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-gaussian-splatting","3dgs","analyzing","imgui","interactive","python","real-time-editing","viewer"],"created_at":"2024-09-24T20:42:05.010Z","updated_at":"2025-05-14T19:09:59.412Z","avatar_url":"https://github.com/Florian-Barthel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003ch1\u003e\u003cimg src=\"resources/images/icon.png\" width=\"35\"\u003e splatviz\u003c/h1\u003e\n\n![GitHub top language](https://img.shields.io/github/languages/top/Florian-barthel/splatviz) ![GitHub Release](https://img.shields.io/github/v/release/Florian-Barthel/splatviz) ![GitHub last commit](https://img.shields.io/github/last-commit/Florian-Barthel/splatviz) ![Static Badge](https://img.shields.io/badge/Platform-Linux-green) ![Static Badge](https://img.shields.io/badge/Platform-Windows-green)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"justify\"\u003e \nThis interactive viewer allows you to display and edit 3D Gaussian Splatting scenes in real time. By using the python GUI \nlibrary (\u003ca href=\"https://pyimgui.readthedocs.io/en/latest/guide/first-steps.html\"\u003epyimgui\u003c/a\u003e) we can directly manipulate\nthe Gaussian python object just before rendering it. This enables endless editing and visualization possibilities. \nYou can also evaluate python expressions just after the \nrendering, allowing you to access and debug the 3D scene just in time. Additionally, you can visualize multiple scenes\nat the same time by comparing them side by side or in a splitscreen view. Lastly, you can also save renderings, ply files\nof the current scene and even videos of a 360° rotation around the scene.\n\nSee some example editings in this  \u003ca href=\"https://www.youtube.com/watch?v=AJGSa_wnZS8\u0026ab_channel=FlorianBarthel\"\u003e\nvideo\u003c/a\u003e.\n\n**NEW UPDATE:** splatviz now supports live tracking of a running 3DGS training: \u003ca href=\"https://www.youtube.com/watch?v=lnMB83wnfvE\"\u003e\nvideo\u003c/a\u003e.\n\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"resources/images/teaser.png\" width=\"650\"\u003e\n\u003c/div\u003e\n\n## Install\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003e\n1. Download\n\u003c/th\u003e\n\u003ctd colspan=\"2\"\u003e\nClone repository recursively in order to install glm from the diff_gaussian_rasterization package.\n\n```bash\ngit clone https://github.com/Florian-Barthel/splatviz.git --recursive\n```\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003cth\u003e\n2. Install\n\u003c/th\u003e\n\u003ctd\u003e\nCreate conda environment with \u003cb\u003econda\u003c/b\u003e:\n\n```bash\nconda env create \\\n-f environment.yml\n\nconda activate gs-view\n```\n\u003c/td\u003e\n\u003ctd\u003e\nAlternatively, create the environment with \u003cb\u003emicromamba\u003c/b\u003e:\n\n```bash\nmicromamba env create \\\n--file environment.yml \\\n--channel-priority flexible -y\n\nmicromamba activate gs-view\n```\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Launch\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003eMode\u003c/th\u003e\u003cth\u003eDescription\u003c/th\u003e\u003cth\u003eCommand\u003c/th\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eDefault Mode\u003c/td\u003e\n\u003ctd\u003eThe default mode loads and renders standard 3DGS scenes stored in ply files or compressed yml files.\u003c/td\u003e\n\u003ctd\u003e\n\n```bash\npython run_main.py\n```\n\nor launch with a specified path to look for .ply or .yml files:\n\n```bash\npython run_main.py --data_path=path/with/ply/files\n```\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eAttach to Training\u003c/td\u003e\n\u003ctd\u003eThe _attach_ mode allows you to view and edit a running 3DGS training. This works with the default implementation of\n3DGS.\nIn order to edit the scene during the training and to view some extra information, follow the simple steps\ndescribed here: https://github.com/Florian-Barthel/splatviz_network.\u003c/td\u003e\n\u003ctd\u003e\n\n```bash\npython run_main.py --mode=attach\n```\n\u003c/td\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003eDecoder Mode\u003c/td\u003e\n\u003ctd\u003eThe decoder mode renders human heads generated by 3D GANs from\nthis \u003ca href=\"https://github.com/fraunhoferhhi/gaussian_gan_decoder\"\u003epaper\u003c/a\u003e.\u003c/td\u003e\n\u003ctd\u003e\n\n```bash\npython run_main.py \\\n--mode=decoder \\\n--data_path=path/with/pkl/files \\\n--ggd_path=path/to/gaussian_gan_decoder/project\n```\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\nIn some cases you will have to add this variable so that opengl uses the correct version:\n`export MESA_GL_VERSION_OVERRIDE=3.3`\n\n## Widgets\n\n\u003cdiv align=\"justify\"\u003e \n\n\u003cdetails close\u003e\n\n\u003csummary\u003e\u003ch3\u003e🗃️ Load Widget\u003c/h3\u003e\u003c/summary\u003e\n\nOnce you run the `run_main.py` file, the viewer will directly load the first scene that is found in the data\ndirectory you have specified. You can change the scene by clicking the **Browse** button. You will be displayed a list\nof available _.ply_ files (or _.yml_ files that correspond to compressed gaussian scenes using\n\u003ca href=\"https://fraunhoferhhi.github.io/Self-Organizing-Gaussians/\"\u003ethis\u003c/a\u003e compression method). If you have a lot of\nscenes to chose from, you can also use the **Filter** textfield providing comma separated keywords (eg.\n_lego,30000,baseline_).\nYou will then only see those scenes that contain all keywords.\n\nAdditionally, you can also view multiple 3D scenes at once. Simply click **Add Scene**, which loads the same scene as\nbefore and then change the respective scene to another .ply file using the new browse button. The scenes are either\nrendered next to each other or in a split screen mode when activating the **Splitscreen** checkbox.\n\nYou can download some example\nscenes [here](https://drive.google.com/drive/folders/1RNMis5ibSrl2a87ZX614ZPsHKaY6ams6?usp=sharing).\nThey were created using the gaussian splatting compression method\nfrom: https://fraunhoferhhi.github.io/Self-Organizing-Gaussians.\n\n\u003cimg src=\"resources/images/load.png\"\u003e\n\u003c/details\u003e\n\n\n\u003cdetails close\u003e\n\n\u003csummary\u003e\u003ch3\u003e🛠️ Edit Widget\u003c/h3\u003e\u003c/summary\u003e\n\nThe edit widget is the core functionality of this 3D viewer. It allows for real time editing of the gaussian\npython object during runtime. The code that you type in this text area will be executed just before the gaussian object\nis\nforwarded to the cuda renderer. This means, the editing capabilities are unlimited. As long as the provided code\nis executable, you can type any kind of python code and also import new libraries. An example could look like this,\nwhere\nall scales are set to -8 (before activating with _exp()_) and all opacity values are set to 10 (before activating with\n_sigmoid()_), while also the background is set to 1, which corresponds to white.\n\n```python\ngaussian._scaling = gaussian._scaling * 0 - 8\ngaussian._opacity = gaussian._opacity * 0 + 10\nself.bg_color[:] = 1\n```\n\nTo enable smooth editing transitions, you can create sliders (press **Add Slider**) which you can access in the\neditor text by typing slider.name (eg. slider.x). An example could look as follows. Here, we create a boolean mask\nthat filters all gaussians that are smaller than the value stored in **slider.x**.\n\n```python\nmask = torch.linalg.norm(gaussian._scaling, dim=-1) \u003c slider.x\n\ngaussian._xyz = gaussian._xyz[mask]\ngaussian._rotation = gaussian._rotation[mask]\ngaussian._scaling = gaussian._scaling[mask]\ngaussian._opacity = gaussian._opacity[mask]\ngaussian._features_dc = gaussian._features_dc[mask]\ngaussian._features_rest = gaussian._features_rest[mask]\n```\n\nLastly, you can save and load presets of code snippets so that you don't have to type the same code again after\nclosing the application. Those presets are stored in a .json file (presets.json).\n\n\u003cimg src=\"resources/images/edit.png\"\u003e\n\u003c/details\u003e\n\n\u003cdetails close\u003e\n\u003csummary\u003e\u003ch3\u003e🔍 Eval Widget\u003c/h3\u003e\u003c/summary\u003e\n\nThe evaluate widget can be used to debug the gaussian splatting object. By typing\npython code, which is executed after the rendering, you can access any variable\nfrom the rendering context and visualize them in a histogram. Some useful variables might be:\n\n- gaussian\n- render\u003c/li\u003e\n- render_cam\n- self\n\nYou can also access variables that you have defined in the editor of the Edit Widget.\n\n\u003cimg src=\"resources/images/eval.png\"\u003e\n\u003c/details\u003e\n\n\n\u003cdetails close\u003e\n\u003csummary\u003e\u003ch3\u003e🎥 Camera Widget\u003c/h3\u003e\u003c/summary\u003e\n\nIn the camera widget you can define the type and parameters of the camera. Most importantly, you can choose between the\ntwo modes **Orbit** and **WASD**.\n\nIn **Orbit** mode, the camera is looking at a specific point in 3D space, and you control the pitch and yaw of the\ncamera\nrotating on a sphere around that point by dragging with the mouse over the rendered view.\n\nIn **WASD** mode, you fly through the scene using the mouse and the WASD keys similar to the camera controls in Unity.\n\n**Important**: If the loaded scene is rotated incorrectly, you can adjust that by steering the camera so that it is\nlooking straight up or down. Then set the up-vector to the current viewing direction by pressing **Set Current Direction\n**.\nIf you were looking down, you will have to press the **Flip** button, since the scene is now upside down.\n\n\u003cimg src=\"resources/images/camera.png\"\u003e\n\u003c/details\u003e\n\n\n\u003cdetails close\u003e\n\u003csummary\u003e\u003ch3\u003e🎞️ Video Widget\u003c/h3\u003e\u003c/summary\u003e\n\nThe video widget creates a video sequence of a full rotation around the current object.\nSimply define the height of the camera and the rendering resolution. While the video is\nrendering, the UI is frozen. A loading screen is shown in the terminal output.\n\n🚧This feature is still under construction 🚧. Currently, it is not very intuitive to generate videos, as the camera\nposition is only defined by the \u003cb\u003eCamera Height\u003c/b\u003e parameter. This will be changed in the future.\n\n\u003cimg src=\"resources/images/video.png\"\u003e\n\u003c/details\u003e\n\n\n\u003cdetails close\u003e\n\u003csummary\u003e\u003ch3\u003e📈 Performance Widget\u003c/h3\u003e\u003c/summary\u003e\nIn the performance widget, you can track the FPS of the viewer and the FPS of the renderer. You can also specify \nlimits for FPS and enable vertical synchronisation. In the future, there will also be a performance mode which \nskips some editing and evaluation calculations.\n\n\u003cimg src=\"resources/images/performance.png\"\u003e\n\u003c/details\u003e\n\n\n\u003cdetails close\u003e\n\u003csummary\u003e\u003ch3\u003e🖥️ Render Widget\u003c/h3\u003e\u003c/summary\u003e\n\nIn the render tab, you can specify the rendering resolution (at the moment only squared resolutions) and the rendering\nmode.\nNext to RGB, you can also render the image 3D depth and the alpha values.\n\n\u003cimg src=\"resources/images/render.png\"\u003e\n\u003c/details\u003e\n\n\n\u003cdetails close\u003e\n\u003csummary\u003e\u003ch3\u003e💾 Save Widget\u003c/h3\u003e\u003c/summary\u003e\n\nTo save the .ply file or a rendering of the current (edited) 3D scene press the respective button in the\nsave widget. Those files will be saved under _screenshots or _ply_files. The viewer might be frozen for a short\nwhile, after saving a ply file.\n\n\u003cimg src=\"resources/images/save.png\"\u003e\n\u003c/details\u003e\n\u003c/div\u003e\n\n## ⭐ Recent Features\n\n**_Version 1.1.0_**\n\n- 2024-08-12: Added a new Training Widget to inspect live training stats and to pause training\n- 2024-08-11: Attach to a running 3DGS training\n- 2024-08-10: Refactor rendering class for easier addition of new renderer\n- 2024-08-07: Better Mouse Control (translate with middle mouse button)\n- 2024-08-05: Allow editing of existing sliders\n- 2024-07-30: Store slider values in presets\n- 2024-07-28: New Performance Widget\n- 2024-07-28: Editor now highlights special variables (gs, self, slider) and gives tooltips\n\n**_Version 1.0.0_**\n\n- 2024-07-12: Rebuild the whole application with imgui_bundle\n- 2024-07-05: Compare two or more Gaussian Splatting scenes side by side\n\n## 🔭 Future Plans\n\n- Test other 3DGS render for OSX support\n- Improve the Video Widget\n- Tutorial for coding new widgets or renderer\n\n## Contribute\n\nYou are more than welcome to add further functionality or a better design to this interactive viewer!\nThe main goal is to create an easy-to-use tool that can be applied for debugging and for understanding\n3D Gaussian Splatting objects.\nFor reformating code please use [black](https://github.com/psf/black) with --line-length 120.\n\n## Citation\n\nIf you find this viewer useful, please consider citing our work:\n\n```\n@misc{barthel2024gaussian,\n    title={Gaussian Splatting Decoder for 3D-aware Generative Adversarial Networks}, \n    author={Florian Barthel and Arian Beckmann and Wieland Morgenstern and Anna Hilsmann and Peter Eisert},\n    year={2024},\n    eprint={2404.10625},\n    archivePrefix={arXiv},\n    primaryClass={cs.CV}\n}\n```\n\n## References\n\nThis viewer is inspired by the visualizer from Efficient Geometry-aware 3D Generative Adversarial\nNetworks (EG3D).\n\n- GUI: \u003ca href=\"https://pyimgui.readthedocs.io/en/latest/guide/first-steps.html\"\u003epyimgui\u003c/a\u003e and\n\u003ca href=\"https://github.com/pthom/imgui_bundle\"\u003eimgui_bundle\u003c/a\u003e which are python wrappers for the c++ library\n\u003ca href=\"https://github.com/ocornut/imgui\"\u003eImGUI\u003c/a\u003e\n- Original code base: \u003ca href=\"https://github.com/NVlabs/eg3d\"\u003eEG3D\u003c/a\u003e\n- 3DGS: \u003ca href=\"https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/\"\u003e 3D Gaussian Splatting\u003c/a\u003e\n- Compressing 3DGS scenes: \u003ca href=\"https://fraunhoferhhi.github.io/Self-Organizing-Gaussians/\"\u003eCompact 3D Scene\nRepresentation via Self-Organizing Gaussian Grids\u003c/a\u003e\n- 3DGS Rasterizer with depth and alpha: \u003ca href=\"https://github.com/slothfulxtx/diff-gaussian-rasterization\"\u003eDiff\nrasterizer with depth and alpha\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorian-barthel%2Fsplatviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorian-barthel%2Fsplatviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorian-barthel%2Fsplatviz/lists"}