Giter Site home page Giter Site logo

neurbf's Introduction

NeuRBF: A Neural Fields Representation with Adaptive Radial Basis Functions

ICCV 2023 (Oral)

Zhang Chen1, Zhong Li1, Liangchen Song2, Lele Chen1, Jingyi Yu3, Junsong Yuan2, Yi Xu1
1OPPO US Research Center, 2University at Buffalo, 3ShanghaiTech University

This repo is an official PyTorch implementation for the ICCV 2023 paper "NeuRBF: A Neural Fields Representation with Adaptive Radial Basis Functions". Our work presents a novel type of neural fields with high representation accuracy and model compactness. The repo contains the codes for image fitting, SDF fitting and neural radiance fields.

Install

Clone repository

git clone https://github.com/oppo-us-research/NeuRBF.git
cd NeuRBF

Install conda environment

# Create conda environment
conda create -n neurbf python=3.9 -y
conda activate neurbf

# Install CuPy
pip install cupy-cuda11x
python -m cupyx.tools.install_library --cuda 11.x --library cutensor
python -m cupyx.tools.install_library --cuda 11.x --library cudnn
python -m cupyx.tools.install_library --cuda 11.x --library nccl

# Install PyTorch
pip install torch==2.0.1+cu117 torchvision==0.15.2+cu117 --index-url https://download.pytorch.org/whl/cu117

# For image/SDF fitting and NeRF task on Synthetic NeRF dataset
pip install einops matplotlib kornia imageio imageio-ffmpeg opencv-python pysdf PyMCubes trimesh plotly scipy GPUtil scikit-image scikit-learn pykdtree commentjson tqdm configargparse lpips tensorboard torch-ema ninja tensorboardX numpy pandas rich packaging scipy torchmetrics jax pillow plyfile omegaconf

# For NeRF task on LLFF dataset
pip install jax tqdm pillow opencv-python pandas lpips imageio torchmetrics scikit-image tensorboard matplotlib
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

Build torch-ngp extension (for image/SDF fitting)

cd thirdparty/torch_ngp/gridencoder
pip install .
cd ../../../

Tested environments

  • Ubuntu 18.04 with PyTorch 1.13.0 & CUDA 11.6 on RTX A6000.
  • Ubuntu 18.04 with PyTorch 2.0.1 & CUDA 11.7 on RTX A6000.
  • Ubuntu 18.04 with PyTorch 2.0.1 & CUDA 11.7 on RTX 3090.
  • Windows 11 with PyTorch 2.0.1 & CUDA 11.7 on RTX 3080 Ti 16G.

Usage

Image fitting

Fit one image

Download an example pluto image. Put it in data/img and rename to pluto.png. Then run

python main.py --config configs/img.py --path ./data/img/pluto.png --alias pluto

The result and tensorboard log will be located in log/img. To adjust model size, you can specify the value of --log2_hashmap_size_ref argument.

NOTE: To reduce GPU memory usage, you can add --ds_device cpu to the above command. This will put some data on CPU instead of GPU, but will also make training slower.

Fit all images in the DIV2K dataset

Download the validation set of the DIV2K dataset and put it in data/img/div2k. The path to each image should be data/img/div2k/DIV2K_valid_HR/xxxx.png. Then run

python main_img_div2k.py

The script will fit each image separately and the results will be stored in log/img_div2k.

SDF fitting

Download an example armadillo mesh of the Stanford 3D Scanning Repository. Unzip it, put it in data/sdf, and rename to armadillo.ply.

Run the following preprocessing script, which normalizes the mesh and sample additional evaluation points.

python preproc_mesh.py --path ./data/sdf/armadillo.ply

Then run

python main.py --config configs/sdf.py --path ./data/sdf/armadillo_nrml.obj --alias armadillo

The result and tensorboard log will be located in log/sdf. To adjust model size, you can specify the value of --log2_hashmap_size_ref argument.

NOTE: To reduce GPU memory usage, you can similarly add --ds_device cpu to the above command.

NeRF

Dataset

Run on Synthetic NeRF Dataset

Download the dataset and unzip to data. For example, the path to the lego scene should be data/nerf_synthetic/lego.

For training, use the following command

python main_nerf.py --config_init configs/nerf_tensorf/nerf_synthetic_init.py --config configs/nerf_tensorf/nerf_synthetic.py --data_name lego

It will first distill scene information to initialize RBF position and shape parameters, and then train the full model. The result and tensorboard log will be located in log/nerf_synthetic. Change --data_name to run on other scenes.

NOTE: To reduce GPU memory usage, you can add --batch_size_init 2048 (tested working on RTX 3090 24G). The number 2048 can be further lowered if needed.

To render images using a trained model, run

python main_nerf.py --config configs/nerf_tensorf/nerf_synthetic.py --data_name lego --ckpt [path_to_checkpoint] --render_only 1 --[what_to_render] 1

where [path_to_checkpoint] is the path to the checkpoint file and [what_to_render] can be render_test or render_train. Note that the training command already conducts render_test at the end of training.

To extract mesh from a trained model, run

python main_nerf.py --config configs/nerf_tensorf/nerf_synthetic.py --data_name lego --ckpt [path_to_checkpoint] --export_mesh 1

Run on LLFF Dataset

Download the dataset and unzip to data. For example, the path to the room scene should be data/nerf_llff_data/room.

For training, use the following command

python main_nerf_kplanes.py --config_init configs/nerf_kplanes/llff_init.py --config configs/nerf_kplanes/llff.py --data_name room

It will first distill scene information to initialize RBF position and shape parameters, and then train the full model. The result and tensorboard log will be located in log/llff. Change --data_name to run on other scenes.

To render a spiral-path video using a trained model, run

python main_nerf_kplanes.py --config configs/nerf_kplanes/llff.py --log-dir [model_folder] --render-only

where [model_folder] is the path to the folder that contains the trained model.

Acknowledgement

We sincerely thank the authors of the following repos, whose work has been referenced in our released codes: torch-ngp, TensoRF, nrff, K-Planes, MINER_pl, and siren.

Citation

If you find our work useful, please consider citing:

@inproceedings{chen2023neurbf,
    author    = {Chen, Zhang and Li, Zhong and Song, Liangchen and Chen, Lele and Yu, Jingyi and Yuan, Junsong and Xu, Yi},
    title     = {NeuRBF: A Neural Fields Representation with Adaptive Radial Basis Functions},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2023},
    pages     = {4182-4194}
}

neurbf's People

Contributors

ingra14m avatar lansburych avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neurbf's Issues

pip install .时出现问题

你好,我使用的是Ubuntu22.03,cuda版本是11.8 安装流程按readme执行 g++版本是11.3.0 torch版本是2.1.0+cu118 (按cu117安装会报错显示安装的torch版本匹配cuda12.0),但是在装第三方库的时候出现错误。报错信息如下所示

pip install .
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: gridencoder
  Building wheel for gridencoder (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [834 lines of output]
      running bdist_wheel
      running build
      running build_ext
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py:424: UserWarning: There are no g++ version bounds defined for CUDA version 11.8
        warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
      building '_gridencoder' extension
      Emitting ninja build file /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      [1/2] /usr/local/cuda-11.8/bin/nvcc  -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/TH -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/wangcf/anaconda3/envs/neurbf/include/python3.9 -c -c /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu -o /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin gcc
      FAILED: /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.o
      /usr/local/cuda-11.8/bin/nvcc  -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/TH -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/wangcf/anaconda3/envs/neurbf/include/python3.9 -c -c /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu -o /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin gcc
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/string_view.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/StringUtil.h:6,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/Exception.h:5,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/Generator.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/CPUGeneratorImpl.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Context.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/cuda/CUDAContext.h:18,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu:5:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch
         27 | #error You need C++17 to compile PyTorch
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu:6:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++17 or later compatible compiler is required to use PyTorch.
          4 | #error C++17 or later compatible compiler is required to use PyTorch.
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:9,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/gridencoder.cu:6:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/ATen.h:4:2: error: #error C++17 or later compatible compiler is required to use ATen.
          4 | #error C++17 or later compatible compiler is required to use ATen.
            |  ^~~~~
      [2/2] g++ -MMD -MF /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o.d -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/wangcf/anaconda3/envs/neurbf/include -I/home/wangcf/anaconda3/envs/neurbf/include -fPIC -O2 -isystem /home/wangcf/anaconda3/envs/neurbf/include -fPIC -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/TH -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/wangcf/anaconda3/envs/neurbf/include/python3.9 -c -c /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp -o /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o
      g++ -MMD -MF /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o.d -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/wangcf/anaconda3/envs/neurbf/include -I/home/wangcf/anaconda3/envs/neurbf/include -fPIC -O2 -isystem /home/wangcf/anaconda3/envs/neurbf/include -fPIC -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/TH -I/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda-11.8/include -I/home/wangcf/anaconda3/envs/neurbf/include/python3.9 -c -c /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp -o /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/build/temp.linux-x86_64-cpython-39/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_gridencoder -D_GLIBCXX_USE_CXX11_ABI=0
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4:2: error: #error C++17 or later compatible compiler is required to use PyTorch.
          4 | #error C++17 or later compatible compiler is required to use PyTorch.
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/string_view.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/StringUtil.h:6,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/Exception.h:5,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/core/Device.h:5,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/Tensor.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Tensor.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/C++17.h:27:2: error: #error You need C++17 to compile PyTorch
         27 | #error You need C++17 to compile PyTorch
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:9,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/ATen.h:4:2: error: #error C++17 or later compatible compiler is required to use ATen.
          4 | #error C++17 or later compatible compiler is required to use ATen.
            |  ^~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/typeid.h:17,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/core/ScalarTypeToTypeMeta.h:5,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:18,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/Tensor.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Tensor.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/function_hook.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/cpp_hook.h:2,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/variable.h:6,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/irange.h: In member function ‘bool c10::detail::integer_iterator<I, one_sided, <anonymous> >::operator==(const c10::detail::integer_iterator<I, one_sided, <anonymous> >&) const’:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/c10/util/irange.h:50:8: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
         50 |     if constexpr (one_sided) {
            |        ^~~~~~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue.h:1499,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/List_inl.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/List.h:490,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/IListRef_inl.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/IListRef.h:632,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/WrapDimUtils.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/TensorNames.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/NamedTensorUtils.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/variable.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h: In lambda function:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:12: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |            ^~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:30: error: ‘is_convertible_v’ is not a member of ‘std’; did you mean ‘is_convertible’?
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |                              ^~~~~~~~~~~~~~~~
            |                              is_convertible
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:91: error: expected ‘(’ before ‘,’ token
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |                                                                                           ^
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:111: error: expected primary-expression before ‘>’ token
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |
    ^
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1061:112: error: expected primary-expression before ‘)’ token
       1061 |         if constexpr (::std::is_convertible_v<typename c10::invoke_result_t<T &&, Future&>, IValueWithStorages>) {
            |
     ^
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/ivalue_inl.h:1062:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
       1062 |           auto [ivalue, storages] = cb(parentFut);
            |                ^
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/boxing/KernelFunction_impl.h:1,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/boxing/KernelFunction.h:251,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/op_registration/op_registration.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/library.h:68,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/autograd/autograd_not_implemented_fallback.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/boxing/impl/boxing.h: In static member function ‘static Result c10::impl::BoxedKernelWrapper<Result(Args ...), typename std::enable_if<((c10::guts::conjunction<c10::guts::disjunction<std::is_constructible<c10::IValue, typename std::decay<Args>::type>, std::is_same<c10::TensorOptions, typename std::decay<Args>::type> >...>::value && c10::guts::conjunction<c10::guts::disjunction<c10::impl::has_ivalue_to<T, void>, std::is_same<void, ReturnType> >, c10::guts::negation<std::is_lvalue_reference<_Tp> > >::value) && (! c10::impl::is_tuple_of_mutable_tensor_refs<Result>::value)), void>::type>::call(const c10::BoxedKernel&, const c10::OperatorHandle&, c10::DispatchKeySet, Args ...)’:
      )
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:517:3: note: in expansion of macro ‘AT_DISPATCH_CASE’
        517 |   AT_DISPATCH_CASE(SCALARTYPE3, __VA_ARGS__)
            |   ^~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:524:7: note: in expansion of macro ‘AT_DISPATCH_CASE_ALL_TYPES_AND3’
        524 |       AT_DISPATCH_CASE_ALL_TYPES_AND3(                      \
            |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/detail/TensorDataContainer.h:307:9: note: in expansion of macro ‘AT_DISPATCH_ALL_TYPES_AND3’
        307 |         AT_DISPATCH_ALL_TYPES_AND3(
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:12,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:9,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h: In static member function ‘static Return c10::Dispatcher::callWithDispatchKeySlowPath(const c10::TypedOperatorHandle<Return(Args ...)>&, at::StepCallbacks&, c10::DispatchKeySet, const c10::KernelFunction&, Args ...)’:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/core/dispatch/Dispatcher.h:597:6: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
        597 |   if constexpr (num_boxed_args != 0) {
            |      ^~~~~~~~~
      In file included from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/ATen.h:11,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:4,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/all.h:9,
                       from /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/extension.h:5,
                       from /home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/src/bindings.cpp:1:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/activation.h: In lambda function:
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:56:8: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
         56 |     if constexpr (!at::should_include_kernel_dtype(   \
            |        ^~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:221:7: note: in definition of macro ‘AT_DISPATCH_SWITCH’
        221 |       __VA_ARGS__                                                           \
            |       ^~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:68:5: note: in expansion of macro ‘AT_PRIVATE_CHECK_SELECTIVE_BUILD’
         68 |     AT_PRIVATE_CHECK_SELECTIVE_BUILD(enum_type);                        \
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:74:3: note: in expansion of macro ‘AT_PRIVATE_CASE_TYPE_USING_HINT’
         74 |   AT_PRIVATE_CASE_TYPE_USING_HINT(enum_type, scalar_t, __VA_ARGS__)
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:233:3: note: in expansion of macro ‘AT_DISPATCH_CASE’
        233 |   AT_DISPATCH_CASE(at::ScalarType::Double, __VA_ARGS__) \
            |   ^~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:237:34: note: in expansion of macro ‘AT_DISPATCH_CASE_FLOATING_TYPES’
        237 |   AT_DISPATCH_SWITCH(TYPE, NAME, AT_DISPATCH_CASE_FLOATING_TYPES(__VA_ARGS__))
            |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/activation.h:895:27: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’
        895 |     attn_output_weights = AT_DISPATCH_FLOATING_TYPES(
            |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:56:8: warning: ‘if constexpr’ only available with ‘-std=c++17’ or ‘-std=gnu++17’
         56 |     if constexpr (!at::should_include_kernel_dtype(   \
            |        ^~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:221:7: note: in definition of macro ‘AT_DISPATCH_SWITCH’
        221 |       __VA_ARGS__                                                           \
            |       ^~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:68:5: note: in expansion of macro ‘AT_PRIVATE_CHECK_SELECTIVE_BUILD’
         68 |     AT_PRIVATE_CHECK_SELECTIVE_BUILD(enum_type);                        \
            |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:74:3: note: in expansion of macro ‘AT_PRIVATE_CASE_TYPE_USING_HINT’
         74 |   AT_PRIVATE_CASE_TYPE_USING_HINT(enum_type, scalar_t, __VA_ARGS__)
            |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:234:3: note: in expansion of macro ‘AT_DISPATCH_CASE’
        234 |   AT_DISPATCH_CASE(at::ScalarType::Float, __VA_ARGS__)
            |   ^~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/ATen/Dispatch.h:237:34: note: in expansion of macro ‘AT_DISPATCH_CASE_FLOATING_TYPES’
        237 |   AT_DISPATCH_SWITCH(TYPE, NAME, AT_DISPATCH_CASE_FLOATING_TYPES(__VA_ARGS__))
            |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/nn/functional/activation.h:895:27: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES’
        895 |     attn_output_weights = AT_DISPATCH_FLOATING_TYPES(
            |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build
          subprocess.run(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/subprocess.py", line 528, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/wangcf/github/NeuRBF/thirdparty/torch_ngp/gridencoder/setup.py", line 32, in <module>
          setup(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 873, in build_extensions
          build_ext.build_extensions(self)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
          self._build_extensions_serial()
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
          self.build_extension(ext)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
          _build_ext.build_extension(self, ext)
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension
          objects = self.compiler.compile(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 686, in unix_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1774, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/home/wangcf/anaconda3/envs/neurbf/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 2116, in _run_ninja_build
          raise RuntimeError(message) from e
      RuntimeError: Error compiling objects for extension
      [end of output]



  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for gridencoder
  Running setup.py clean for gridencoder
Failed to build gridencoder
ERROR: Could not build wheels for gridencoder, which is required to install pyproject.toml-based projects

请问能否提供一个可行的解决方案?

PerformanceWarning: Using synchronous transfer as pinned memory could not be allocated

PC   : memory=128GB
GPU  : 4070TI  memory=12GB

wsl2  cuda-11.8  : can use PC's memory = 100GB

python main_nerf_kplanes.py \
        --config_init configs/nerf_kplanes/llff_init.py \
	--config      configs/nerf_kplanes/llff.py \
	--data_name   trex
	
n_kernel: 31457
Generate grid points: 0.28667783737182617
Initializing kc0...

/opt/conda/envs/cuda118/lib/python3.9/site-packages/cupy/_creation/from_data.py:76: 
PerformanceWarning: Using synchronous transfer as pinned memory (1154404152 bytes) could not be allocated. 
This generally occurs because of insufficient host memory. 
The original error was: cudaErrorMemoryAllocation: out of memory

视频生成请教

非常有趣的项目,请问,您项目页中的如下视频是如何生成的?

img_pluto.mp4

我安装环境并运行如下命令
python main.py --config configs/img.py --path ./data/img/pluto.png --alias pluto
只在result下得到一张重构的图片,请问,视频是怎么生成的?需要使用什么工具或者脚本 ?
期待您的回复

Error Map for NeRF?

Excellent work! Great Contribution!

Do you have any comparison on view synthesis compared with e.g. Instant-NGP? as Error map has been made to compare with INGP on 2D image fitting.

Best Regards

坐标系问题

你好,感谢开源这么棒的工作,有个问题想请教一下,咱们code里的坐标系是不是opencv坐标系,我看和nerf里的不太一样

Errors in reloading ckpt.th

During the mesh export phase, a reload issue arises, with errors occurring at L66 I believe this is due to a discrepancy between the imported parameters and the stored parameters.

CPU memory crash

while initializing kc0, it takes up all CPU memory(125G),and the program will crash. Are there any suggestions to resolve this issue?
image

代码读不懂

代码读的很困难,与文章中的公式对应不上,请教下面代码与文章对应的公式?
def forward(self, x_g, point_idx, **kwargs):
kernel_idx = self.forward_kernel_idx(x_g, point_idx, '0')
rbf_out = self.forward_rbf(x_g, kernel_idx, '0')
rbf_out = rbf_out / (rbf_out.detach().sum(-1, keepdim=True) + 1e-8)
rbf_out = rbf_out[..., None] # [p k_topk 1]
rbf_out= torch.sin(rbf_out * self.pe_lc0_rbf_freqs[None, None]) #这是对应的公式几?
out = (self.lc0(kernel_idx) * rbf_out).sum(1) #这是对应的公式几?
out_hg = self.hg0(x_g / self.cmax_gpu.flip(-1)[None])
out = torch.cat([out_hg, out], -1) + self.lcb0[None]#这是对应的公式5吗?
h = F.relu(out, inplace=True)
for l in range(self.num_layers):
h = self.backbonel
if l == 0:
h = torch.sin(h * self.pe_lc0_freqs[None]) + h #公式(7)
elif l != self.num_layers - 1:
h = F.relu(h, inplace=True)
return h

请教代码中的lc0,lcb0, hg0分别表示什么意思,对应文章中的变量是什么?

感谢作者,读您的文章和代码收益很多,恳请赐教

Is that possible using this non-grid-based method for angular space?

Hi

Thanks for your impressive work.

I have some questions about the method.

As the non-grid-based method, is that possible to use this method in the angular space? Since this space is hard to design a suitable grid.

For example, is that possible to encode the ray dir. of NeRF rather than using SH encoding?

Looking forward to your reply.

Question about ASG

Hi, thank you for your outstanding job.

I was very surprised that the author used ASG, as it is a structure that I have been trying to use unsuccessfully. I would like to ask about the actual impact of ASG, because when I tried replacing SGRender with ASGRender in TensoRF, the results rendered directly through ASG tended to produce some strange colors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.