A general NeRF acceleration toolbox that provides efficient occupancy grid-based ray marching and sampling for neural radiance fields. Current version 0.5.3, with rapid development and breaking changes between minor versions.
pip install nerfaccNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize a multi-level occupancy grid and perform ray marching on a dummy grid.
Use OccGridEstimator with levels parameter; replace ContractionType imports from nerfacc.grid with nerfacc.ContractionType.
Remove contraction argument; for unbounded scenes use multi-level grid or ProposalNetworkEstimator instead.
Install compatible PyTorch + CUDA toolkit. Ensure torch.cuda.is_available() returns True.
Use estimator.binaries = occ.unsqueeze(0).unsqueeze(0) for single-level or initialize with levels=1.
Use 'from nerfacc import OccGridEstimator' instead of 'from nerfacc.estimators import OccGridEstimator'.
Use 'from nerfacc import ContractionType' (v0.5.0+) or 'from nerfacc.grid import ContractionType' (older versions).
Move estimator and rays to same device: estimator.to(device); rays_o = rays_o.to(device).