|
Ziyu Zhao University of Rochester |
Zhen Zhang University of Rochester |
Yinhao Qian Tencent Lab |
Xiaocheng Ma University of Illinois Urbana-Champaign |
Wuming Zheng Cornell University |
![]() Generated by Cheaper NeRF |
![]() Generated by NeRF |
Cheaper-NeRF is a modified Neural Radiance Fields architecture that achieves ~40% faster training and ~60% memory reduction while maintaining comparable visual quality. By implementing strategic data reduction techniques and optimizing the sampling process, we make NeRF technology accessible for real-time applications and resource-constrained environments.
TL;DR: Train NeRF models 40% faster with minimal quality loss through intelligent sampling and zero-density filtering.
| Metric | Original NeRF | Cheaper-NeRF | Improvement |
|---|---|---|---|
| Training Time | 10 hours | 6 hours | 40% faster โก |
| Memory Usage | 16GB | 6.4GB | 60% less ๐พ |
| Samples/Ray | 192 | 48 (effective: 24) | 87.5% reduction ๐ |
| PSNR | 34 dB | 32 dB | -2 dB (acceptable) โ |
| SSIM | 0.95 | 0.94 | Maintained ๐ |
Combines every 4 sampled points through averaging, reducing network evaluations by 75%:
p_combined = (1/4) ร ฮฃ(p_i) for i=1 to 4Intelligently removes points with ฯ โ 0 that don't contribute to the final image
- Original: 8 layers ร 256 channels
- Cheaper-NeRF: 6 layers ร 128 channels
- Result: 75% parameter reduction
# Clone the repository
git clone https://github.com/yourusername/cheaper-nerf.git
cd cheaper-nerf
# Create conda environment
conda env create -f environment.yml
conda activate cheaper_nerf
# Download example data
bash scripts/download_example_data.sh
# Run training with Cheaper-NeRF optimizations
python scripts/train.py --config configs/config_cheaper.yaml# Quick demo with pre-trained model
python scripts/demo.py --scene lego --model_path pretrained/lego_cheaper.ckptCheaper-NeRF employs a sophisticated optimization pipeline:
- Coarse Sampling - 32 initial samples (reduced from 64)
- Mean Reduction - Combine 4 points โ 1 effective point
- Zero Filtering - Remove non-contributive samples
- Hierarchical Sampling - Focus computation on surfaces
- Optimized Networks - Smaller, faster MLPs
- Volume Rendering - With sparse optimization
- GPU: NVIDIA RTX 3060 (12GB VRAM)
- RAM: 16GB
- Storage: 10GB free space
- OS: Ubuntu 20.04 / Windows 10
- GPU: NVIDIA RTX 4090 (24GB VRAM)
- RAM: 32GB
- Storage: 50GB SSD
- OS: Ubuntu 22.04
cheaper-nerf/
โ
โโโ ๐ cheaper_nerf/ # Core implementation
โ โโโ encoding.py # Positional encoding with caching
โ โโโ network.py # Optimized neural networks
โ โโโ sampling.py # KEY: Mean sampling & filtering
โ โโโ rendering.py # Volume rendering optimizations
โ โโโ trainer.py # Training pipeline
โ
โโโ ๐ scripts/ # Executable scripts
โ โโโ train.py # Main training script
โ โโโ evaluate.py # Evaluation metrics
โ โโโ benchmark.py # Performance comparison
โ
โโโ ๐ configs/ # Configuration files
โ โโโ config_cheaper.yaml # Cheaper-NeRF settings
โ โโโ config_baseline.yaml # Original NeRF settings
โ
โโโ ๐ notebooks/ # Interactive demos
โโโ demo.ipynb # Colab-ready demonstration
# Train on synthetic Lego scene
python scripts/train.py \
--datadir data/nerf_synthetic/lego \
--expname cheaper_lego \
--N_iters 200000# Compare performance against vanilla NeRF
python scripts/benchmark.py --scene lego --compare_baseline# Fine-tune optimization parameters
python scripts/train.py \
--sampling_reduction 4 \ # Combine 4 points
--density_threshold 1e-10 \ # Filter threshold
--netdepth 6 --netwidth 128 \ # Network size
--N_samples 32 --N_importance 64 # Sampling counts| Scene | Original NeRF | Cheaper-NeRF | Time Saved |
| Lego | ![]() |
![]() |
4 hours |
| Fern | ![]() |
![]() |
6 hours |
def mean_sample_reduction(pts, reduction_factor=4):
"""
Reduces sampling density by combining neighboring points.
Mathematical: p_combined = (1/N) * ฮฃ p_i
"""
N = pts.shape[-2]
pts_grouped = pts.reshape([..., N//reduction_factor, reduction_factor, 3])
return pts_grouped.mean(axis=-2)def filter_zero_density(pts, sigma, threshold=1e-10):
"""
Removes points that don't contribute to final image.
Points with ฯ โ 0 have no visual impact.
"""
mask = sigma > threshold
return pts[mask], sigma[mask]# Use lightweight model variant
python scripts/train.py --model_type lightweight --netwidth 64# Docker deployment
docker build -t cheaper-nerf .
docker run -p 8080:8080 cheaper-nerf- Adaptive Sampling: Dynamically adjusts reduction based on scene complexity
- Gradient-Aware Filtering: Preserves high-frequency details
- Multi-GPU Support: Scale to multiple GPUs for faster training
- Model Quantization: Further reduce memory for edge deployment
We welcome contributions! See CONTRIBUTING.md for guidelines.
# Development setup
git clone https://github.com/yourusername/cheaper-nerf.git
cd cheaper-nerf
pip install -e ".[dev]"
pre-commit installIf you find Cheaper-NeRF useful in your research, please cite:
@inproceedings{zhang2024cheapernerf,
title={Cheaper-NeRF: A Cost-Efficient Approach for Novel-View Synthesis},
author={Zhang, Zhen and Zhao, Ziyu},
institution={University of Rochester},
year={2024}
}This work builds upon the original NeRF by Mildenhall et al. We thank:
- The original NeRF authors for their groundbreaking work
- The PyTorch NeRF community for inspiration
- NVIDIA for GPU support through academic programs
| Method | Training Time | Memory | PSNR | Year |
|---|---|---|---|---|
| NeRF | 10h | 16GB | 34.0 | 2020 |
| FastNeRF | 8h | 14GB | 33.5 | 2021 |
| InstantNGP | 0.1h | 12GB | 33.0 | 2022 |
| Cheaper-NeRF | 6h | 6.4GB | 32.0 | 2024 |
- Email: zzh131@u.rochester.edu, zzhao57@u.rochester.edu
- Issues: GitHub Issues
- Discussions: GitHub Discussions
This project is licensed under the MIT License - see the LICENSE file for details.
Making NeRF accessible to everyone, one optimization at a time ๐
Built with โค๏ธ at University of Rochester








