English | 中文文档
A clean and understandable 3D Gaussian Splatting inference implementation
This is a CuPy-based inference implementation of 3D Gaussian Splatting, designed to provide a clean and easy-to-understand codebase that helps developers deeply understand the core rendering principles of 3DGS.
Rendering result: Train scene rendered using this project
| Feature | This Implementation | Original CUDA Implementation |
|---|---|---|
| Language | Python + CuPy | C++ + CUDA |
| Functionality | Inference only | Training + Inference |
| Code Size | ~800 lines | ~5000+ lines |
| Dependencies | cupy, numpy, opencv-python, plyfile | Complex compilation environment |
| Test Cases | 6 progressive test scenes | No unit tests |
| Readability | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
| Use Case | Learning & understanding algorithms | Production & model training |
pip install -r requirements.txtDownload the pre-trained train scene (including trained PLY file) from the official 3DGS project:
# Download pre-trained models (~14GB)
wget https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/datasets/pretrained/models.zip
unzip models.zip
# After extraction, find the train scene point cloud file:
# train/point_cloud/iteration_30000/point_cloud.ply
# Place it in the project's data/train/point_cloud/iteration_30000/ directorycd test
python 06_generate_train_scene_test.pypython pipeline.pyAfter rendering completes, output.png will be generated in the project root directory.
This implementation is based on the following paper and code:
- 3D Gaussian Splatting for Real-Time Radiance Field Rendering
- Official GitHub Implementation
- Official CUDA Rasterization Implementation
Issues and Pull Requests are welcome! Especially:
- Performance optimization suggestions
- More test scenes
- Documentation improvements
This project is licensed under the MIT License.
If this project helped you understand 3D Gaussian Splatting, please give it a ⭐️ Star!