RepositoryPythonAUAustralia
Ruyi-Zha

Ruyi-Zha/naf_cbct

"Neural Attenuation Fields for Sparse-View CBCT Reconstruction" (MICCAI 2022 Oral)

186stars
33forks
7issues
2views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: ct-reconstruction

#1 Repository of the month

1
TINIX TRENDING·Topic: instant-ngp

#1 Repository of the month

1
TINIX TRENDING·Topic: nerf

#1 Repository of the month

NAF: Neural Attenuation Fields for Sparse-View CBCT Reconstruction

Code for MICCAI 2022 Oral paper NAF: Neural Attenuation Fields for Sparse-View CBCT Reconstruction by Ruyi Zha, Yanhao Zhang and Hongdong Li.

A neural-field-based method for CBCT reconstruction.

[paper][dataset]

NAF framework

Setup

We recommend using Conda to set up an environment.

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

# Install pytorch (hash encoder requires CUDA v11.3)
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113

# Install other packages
pip install -r requirements.txt

Training and evaluation

Download four CT datasets from here. Put them into the ./data folder.

Experiments settings are stored in ./config folder.

For example, train NAF with chest_50 dataset:

python train.py --config ./config/chest_50.yaml

Note: It may take minutes to compile the hash encoder module for the first time.

The evaluation outputs will be saved in ./logs/eval/epoch_* folder.

Customized dataset

You can make your own simulation dataset with TIGRE toolbox. Please first install TIGRE.

# Install TIGRE
wget https://github.com/CERN/TIGRE/archive/refs/tags/v2.3.zip
unzip v2.3.zip
cd TIGRE-2.3/Python
pip install . --no-build-isolation
cd ../../

Put your CT data in the format as follows. Examples can be seen in here.

├── raw                                                                                                       
│   ├── XXX (your CT name)
│   │   └── img.mat (CT data)
│   │   └── config.yml (Information about CT data and the geometry setting of CT scanner)

Then use TIGRE to generate simulated X-ray projections.

python dataGenerator/generateData.py --ctName XXX --outputName XXX_50

Coordinate system

Our coordinate system is similar to that in TIGRE toolbox, except for the detector plane which follows OpenCV standards.

NAF coordinate systen

Citation

Cite as below if you find this repository is helpful to your project.

@inproceedings{zha2022naf,
  title={NAF: Neural Attenuation Fields for Sparse-View CBCT Reconstruction},
  author={Zha, Ruyi and Zhang, Yanhao and Li, Hongdong},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={442--452},
  year={2022},
  organization={Springer}
}

Acknowledgement

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
caiyuanhao1998/SAX-NeRF

"Structure-Aware Sparse-View X-ray 3D Reconstruction" (CVPR 2024) - A Toolbox for CT reconstruction and X-ray Novel View Synthesis

815
Nov 18, 2026
RepositoryPython
nerfstudio-project/nerfstudio

A collaboration friendly studio for NeRFs

12.3k
Jul 29, 2025
RepositoryPython
dunbar12138/DSNeRF

Code release for DS-NeRF (Depth-supervised Neural Radiance Fields)

784
Oct 22, 2024
RepositoryPython
astra-vision/SceneRF

[ICCV 2023] Official implementation of "SceneRF: Self-Supervised Monocular 3D Scene Reconstruction with Radiance Fields"

380
Mar 25, 2026
RepositoryPython
cvg/nerf-on-the-go

[CVPR'24] NeRF On-the-go: Exploiting Uncertainty for Distractor-free NeRFs in the Wild

198
Jun 1, 2025
RepositoryPython
zubair-irshad/NeRF-MAE

[ECCV 2024] Pytorch code for our ECCV'24 paper NeRF-MAE: Masked AutoEncoders for Self-Supervised 3D Representation Learning for Neural Radiance Fields

106
Mar 20, 2025
RepositoryC++
hku-mars/FAST-LIVO2

FAST-LIVO2: Fast, Direct LiDAR-Inertial-Visual Odometry

4.9k
Mar 8, 2026
RepositoryJupyter Notebook
GAP-LAB-CUHK-SZ/gaustudio

A Modular Framework for 3D Gaussian Splatting and Beyond

1.8k
Nov 5, 2025
RepositoryC#
julienkay/MobileNeRF-Unity-Viewer

An unofficial Unity port of the MobileNeRF viewer

405
Sep 1, 2023