This repository contains our approach to manipulate and visualize 3D gaussian splats, with scene navigation and gaussians labeling functionalities.
The codebase has 4 main components:
gaussians_selection.jsthat contains the implementation of the viewer with all gaussians manipulation functionalitiesindex.htmlthat initializes the pagedeep_learning_segmentation.pythat assigns labels to gaussians by applying our "Majority Vote" mechanism on segmented images3D_clustering/k_means.pythat assigns labels to gaussians using our KMEANS clustering algorithm
- Conda (recommended for easy setup)
- Requirements are specified in
environment.yml - WebGL 1.0 or later
You can start a simple web server in the relevant directory:
Using Python:
cd your_directory/; python3 -m http.server [portNumber]Then access it from http://localhost:portNumber/
Alternatively, you can use Live Server if you edit your code with Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer
If you already have a PLY file labeled by one of our labelisation programs (deep_learning_segmentation.py or
k_means.py), you can simply drag and drop that file into viewer's page.
To assign labels to gaussians you can use either of our labelisation programs:
To run deep_learning_segmentation.py, you need the following files:
- ply_file: Input file with gaussians PLY file
- camera_file: JSON file with camera data of the scene you'd like to generate labels for
- input_dir: Directory containing input images of the scene
Then run (set the model parameter to either mask2former, segformer, or yolo):
python deep_learning_segmentation.py \
--ply_file "path/to/point_cloud.ply" \
--camera_file "path/to/cameras.json" \
--input_dir "path/to/input/images" \
--output_dir "path/to/output/dir" \
--output_file "path/to/output/file.ply" \
--model mask2formerFor k_means.py, you only need the input PLY file. Run:
python kmeans.py --file_path "path/to/point_cloud.ply" --save_path "path/to/save/file.ply"- ESC - toggle selection mode
- Click - select object
- H/K - move left/right
- U/J - move up/down
- Del - delete an object
- R - reset all movements
- Shift+R - reset all objects
- Left/right arrow keys to strafe side to side
- Up/down arrow keys to move forward/back
spaceto jump
a/dto turn camera left/rightw/sto tilt camera up/downq/eto roll camera counterclockwise/clockwisei/kandj/lto orbit
- Scroll up/down to orbit down
- Scroll left/right to orbit left/right
- Pinch to move forward/back
- Ctrl key + scroll up/down to move forward/back
- Shift + scroll up/down to move up/down
- Shift + scroll left/right to strafe side to side
- Click and drag to orbit
- Right click (or ctrl/cmd key) and drag up/down to move forward/back
- Right click (or ctrl/cmd key) and drag left/right to strafe side to side
- One finger to orbit
- Two finger pinch to move forward/back
- Two finger rotate to rotate camera clockwise/counterclockwise
- Two finger pan to move side-to-side and up-down
- Press 0-9 to switch to one of the pre-loaded camera views
- Press '-' or '+' key to cycle loaded cameras
- Press
pto resume default animation - Drag and drop .ply file to convert to .splat
- Drag and drop cameras.json to load cameras I'll add an "Authors" section at the end of the README, following standard practices for academic/project documentation.
- Gloire LINVANI - École Polytechnique, Télécom Paris, France
- Onur BASCI
- Dimah BASSAL
We cloned the base version of the viewer from: https://github.com/antimatter15/splat.git