Home

Awesome

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