/NeAT

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Install Instructions

  • Prepare Host System (Ubuntu)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt install g++-9
g++-9 --version # Should Print Version 9.4.0 or higher
  • Create Conda Environment
./create_env.sh
  • Install dependencies
apt install unzip
apt install pkg-config libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
conda install -c conda-forge gcc=12.1.0     # to solve: version `GLIBCXX_3.4.30' not found
  • Install Pytorch
./install_pytorch_precompiled.sh
  • Compile NeAT
conda activate neat

export CONDA=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
export CC=gcc-9
export CXX=g++-9
export CUDAHOSTCXX=g++-9

mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="${CONDA}/lib/python3.8/site-packages/torch/;${CONDA}" ..
make -j$(grep -c ^processor /proc/cpuinfo)

Run Instructions

  • Run dataset conversion script:
python dataConversion.py \
    --name <name> \
    --ds-path <path-to-dataset> \
    [--ct-path <path-to-dicom/path-to-old-npz>] \
    [--half-range]
  • Run reconstruction
export LD_LIBRARY_PATH=~/miniconda3/envs/neat/lib
./build/bin/nikon2neat <name>
./build/bin/reconstruct configs/exp/<...>.ini
  • The result will be written to NeAT/Experiments
  • Evaluation
python eval.py --exp Experiments/<output_dir> --ds <cbctrec_dataset.npz>
  • The result will be written to NeAT/Experiments/<exp_dir>/eval