This repo provides the trained denoising model and testing code for low dose CT denoising as described in our paper. Here are some randomly picked denoised results on low dose CTs from this kaggle challenge.
To better use this repo, please make sure the dose level of the LDCTs are larger than 0.71 mSv.
- Linux or OSX
- NVIDIA GPU
- Install torch7
- Install torch packages nngraph and hdf5
luarocks install nngraph
luarocks install hdf5
- Clone this repo:
git clone [email protected]:xinario/SAGAN.git
cd SAGAN
-
Download the pretrained denoising model from here and put it into the "checkpoints/SAGAN" folder
-
Prepare your test set with the provided python script
#make a directory inside the root SAGAN folder to store your raw dicoms, e.g. ./dicoms
mkdir dicoms
#then put all your low dose CT images of dicom format into this folder and run
python pre_process.py -s 1 -i ./dicoms -o ./datasets/experiment/test
#all your test images would now be saved as uint16 png format inside folder ./datasets/experiment/test. Arguement `-s 1` is to ensure the output images are stored in sequence.
#note: in order to use the python script, make sure you have the follwing packages installed
#opencv, pydicom, numpy, h5py
- Test the model:
DATA_ROOT=./datasets/experiment name=SAGAN which_direction=AtoB phase=test th test.lua
#the results are saved in result/SAGAN/latest_net_G_test/result.h5
- Display the result with a specific window, e.g. abdomen. Window type can be changed to 'abdomen', 'bone' or 'none'
python post_process.py -w 'lung'
Now you can view the result by open the html file:result/SAGAN/latest_net_G_test/index.html
If you find it useful and are using the code/model provoided here in a publication, please cite our paper:
@article{yi2017sharpness,
title={Sharpness-aware Low dose CT denoising using conditional generative adversarial network},
author={Yi, Xin and Babyn, Paul},
journal={arXiv preprint arXiv:1708.06453},
year={2017}
}
Code borrows heavily from pix2pix