This repository contains the associated code for the paper titled
Accurate Differential Operators for Hybrid Neural Fields. Aditya Chetan, Guandao Yang, Zichen Wang, Steve Marschner, Bharath Hariharan.
accepted to CVPR 2025.
- [2023/12/22] Initial code release.
- [2023/12/10] Code release coming soon!
For setting up the environments required for training the models and running the rendering demo, please follow the steps given in setup
.
For training your own models:
- First activate the conda environment for training using:
conda activate hnf-train
- First place your mesh that is normalized such that it lies within the
$[-1, 1]^3$ hypercube in thedata
folder. - Then, create a config using one of the examples shared in the
configs
folder. In most cases, it should be as simple as replacing the path to the mesh with your own. - Then, run the following command:
python3 train.py configs/<your_config>.yaml
- If you want to make any changes to any other hyperparameters from the command line, here is an example of how to do it, shown using the learning rate:
python3 train.py configs/<your_config>.yaml --hparams trainer.opt.lr=0.001
- For fine-tuning, follow the same commands as training, except that you need to specify the path to the checkpoint you want to fine-tune from:
python3 train.py configs/<your_config>.yaml --resume --pretrained <path_to_checkpoint>
In order to view rendering results:
- First activate the conda environment for rendering using:
conda activate hnf-render
- Now open the notebook
rendering.ipynb
and set the kernel tohnf-render
. - Select the shape you want in the dropdown and run the cells in order.
- Feel free to add your own shapes by training models as described above and adding settings for the shape in the
settings_dict
variable in the notebook.
If you found the code in this repository useful, please consider citing our paper:
@InProceedings{Chetan_2025_CVPR,
author = {Chetan, Aditya and Yang, Guandao and Wang, Zichen and Marschner, Steve and Hariharan, Bharath},
title = {Accurate Differential Operators for Hybrid Neural Fields},
booktitle = {Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR)},
month = {June},
year = {2025},
pages = {530-539}
}
We thank the authors of torch-ngp, ldif, tiny-cuda-nn for making their code publicly available.