Skip to content

daikiad/mlx-splat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mlx-splat: 3D Gaussian Splatting Renderer for Apple Silicon

A minimal, render-only implementation of 3D Gaussian Splatting using MLX + Metal. This is a personal experimental project for learning and exploration.

Note: This is a rendering-focused implementation. Training and optimization code has been removed.

Acknowledgments

This project is inspired by and builds upon excellent work in the 3D Gaussian Splatting community:

This implementation explores 3DGS rendering on Apple Silicon using MLX and Metal, while maintaining compatibility with standard PLY file formats from the above projects.

Installation

uv sync
source .venv/bin/activate  # if needed

Usage

CLI Renderer

uv run splat-render \
  --ply data/your_scene.ply \
  --cameras data/cameras.json \
  --camera_id 0 \
  --output outputs/render.png

Main options: --algorithm (rasterization), --tile_algorithm, --tile_size, --sigma_cut, --max_gaussians_per_tile, etc.

Interactive Viewer

uv run splat-viewer \
  --ply data/your_scene.ply \
  --cameras data/cameras.json

Orbit controls with mouse, keyboard navigation, and real-time parameter adjustment.

Python API (Minimal Example)

import mlx_splat

gaussians = mlx_splat.load_ply("data/your_scene.ply")
cameras = mlx_splat.load_cameras("data/cameras.json")
camera = cameras[0]

image = mlx_splat.render_gaussians(
    gaussians,
    camera,
    background=(0.0, 0.0, 0.0),
    raster_algorithm="metal",
    tile_algorithm="global",
    tile_size=(16, 16),
)

Project Structure

  • src/mlx_splat/ Rendering core (core.py, io_utils.py, projection.py, tile_binning.py, rasterization*.py, renderer.py)
  • examples/ Example scripts and interactive viewer
  • tests/ Unit and integration tests

Testing

uv run pytest tests/ -v

Features

  • MLX/Metal implementation - Runs on Apple Silicon GPUs
  • Multiple rasterization backends - Metal and reference implementations
  • Flexible tile binning - Global and local strategies for different scene sizes
  • Standard PLY format - Compatible with models from 3DGS, gsplat, OpenSplat
  • Interactive viewer - Real-time orbit controls with DearPyGUI
  • Comprehensive tests - Unit, integration, and property-based testing

Limitations

  • Rendering only - No training or optimization (use OpenSplat or original 3DGS for that)
  • Apple Silicon only - Requires Metal-capable Mac (M1/M2/M3/M4)
  • Experimental - API may change in future versions

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

MIT License - see LICENSE file for details.

About

3D Gaussian Splatting renderer for Apple Silicon using MLX and Metal

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages