DDnet is a convolutional neural network that is used for computed tomography image enhancement. The network uses DenseNet blocks for building feature maps and Deconvolution for image reconstruction. DDnet shows superior performance compared to state-of-the-art CT image reconstruction/enhancement algorithms.
Following sizes of CT scans can be enhanced using the given code.
- 512x512x32 (Folder: enhance512x512x32): The enhancement requires atleast 24 GBs GPU memory during training.
- 512x512x64 (Folder: enhance512x512x64_tiled): The enhancement requires atleast 8 GBs GPU memory during training. The memory requirement of enhancement is minimized by dividing the input CT scan into four volumes of equal size ("tiling"), before then feeding to the network.
We developed the framework on the platform shown below:
LSB Version: :core-4.1-noarch:core-4.1-ppc64le
Distributor ID: CentOS
Description: CentOS Linux release 7.6.1810 (AltArch)
Release: 7.6.1810
Codename: AltArch
The code can run without GPU. Running code with GPU could increase training and inference speed. PyTorch requires Nvidia GPUs with compute capability 6.0 or higher, i.e. any GPU from Pascal, Volta, Turing, Ampere series will work. Our code was tested on Nvidia V100, P100, T4 GPUs.
The Enhancement AI has been tested on Conda (version: conda 4.6.11), Python (version: 3.6.8), PyTorch (version: 1.0.1), Scikit-image (version: 0.13.1), PIL (version: 5.3.0), Matplotlib (version: 3.0.3), Nibabel (version: 3.2.1), and Cuda compilation tools (release 10.1, V10.1.105)
Install Python with anaconda here.
After installing Python, use the package manager conda or pip to install required packages.
Conda:
conda install numpy
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
conda install scikit-image
conda install -c conda-forge pillow
conda install -c conda-forge matplotlib
conda install -c conda-forge nibabel
Pip:
pip install numpy
pip3 install torch torchvision torchaudio
pip install -U scikit-image
pip install --upgrade Pillow
pip install matplotlib
pip install nibabel
The Cuda compilation tools could be download here. Install the Cuda compilation tool for your platform.
Go to the respective sub-folder, on the basis of the size of CT scan, and follow steps given below.
- Following the Pre-processing Instruction, convert all CT scans to TIFF format (TIFF images must be represented in Hounds Field (HF) unit), and put all CT scans in ../2D-DECT/Images/original_data/. Each scan should be in separate folders.
The folder structure should like shown in below:
/3D-DECT
/Images
/original_data
/scan1
image1.tif
image2.tif
...
/scan2
image1.tif
image2.tif
...
...
- Run following command to start inference using DDnet.
./job_batch.sh
Following folders are produced as output from enhancement AI.
- reconstructed_images/test: This folder contains enhanced images generated as output from AI. Each scan is put in seperate folders. Each folder contains TIFF images.
- visualize/test/diff_target_out: This folder contains the absolute difference maps between high-quality CT scans and enhanced CT scans in separated folders. Each folder contains TIFF images.
- visualize/test/diff_target_in: This folder contains the absolute difference maps between high-quality CT scans and low-quality CT scans in separated folders. Each folder contains TIFF images.