Skip to main content

Quickstart

Install​

You need pixi and an NVIDIA GPU or an Apple silicon Mac. The code also compiles for AMD GPUs, but that has not been tested yet. There is no CUDA toolkit, compiler or Python to install: pixi puts Mojo in the project folder the first time you run something.

git clone https://github.com/bertaveira/mojosplat.git
cd mojosplat

On a Mac, Mojo compiles kernels with Xcode's Metal toolchain. Check for it with xcrun metal --version. If it is missing, install it:

xcodebuild -downloadComponent MetalToolchain

Train a scene​

A scene is a COLMAP folder containing sparse/0/ and an image folder (images_4/ by default), for example from Mip-NeRF 360.

pixi run train path/to/scene --viewer # watch it train at http://localhost:8080

The model is written to output/<scene name>/point_cloud.ply, in the standard 3DGS layout. Every 8th image is held out for testing. Next to the model, run.json records the method, scene, commit, GPU, settings and results.

Every setting is a command-line flag. pixi run train --help lists them all. The ones you are most likely to use:

FlagMeaningDefault
--imagesImage folder inside the sceneimages_4
-o, --outOutput directoryoutput/<scene name>
--test-everyHold out every N-th image (0 trains on all)8
--iterationsTraining iterations30000
--viewerServe the live web viewer while trainingoff
--methodReconstruction method: faster-gs, beta-splatting, 3dgs-mcmc, spherical-voronoi or 3dgut (Methods and results)faster-gs
--no-densifyTurn densification offdensification on
--seedRandom seed0
--portViewer port8080
--hostAddress the viewer listens on0.0.0.0

Evaluate, view and render​

pixi run eval path/to/scene output/scene/point_cloud.ply
pixi run view output/scene/point_cloud.ply
pixi run render output/scene/point_cloud.ply -o render.png # also renders .splat files

eval reports PSNR on the held-out views, and with --save <dir> writes the renders and ground truth as PNGs.