/CTformer

This repository includes implementation of CTformer on Low-dose CT Denoising

Primary LanguagePythonMIT LicenseMIT

CTformer

Try In Colab

ArXiv(extension) | ArXiv(conference)

This repository includes implementation of CTformer: Convolution-free Token2Token Dilated Vision Transformer for Low-dose CT Denoising in https://arxiv.org/abs/2202.13517 and TED-Net: https://arxiv.org/abs/2106.04650. This respository is originated from https://github.com/SSinyu/RED-CNN and https://github.com/yitu-opensource/T2T-ViT.

Fig. 1: The architecture of the CTformer.

Fig. 2: The micro structures of the CTformer.

Data Preparation:

The 2016 NIH-AAPM-Mayo Clinic Low Dose CT Grand Challenge by Mayo Clinic https://www.aapm.org/GrandChallenge/LowDoseCT/, please refer to https://github.com/SSinyu/RED-CNN for more detailed data preparation.

The path of .npy files for training and testing can set in 'main.py --save_path ['../aapm_all_npy_3mm/']'

Model Training and Testing:

>> python main.py  ## train CTformer. 
>> python main.py --mode test --test_iters [set iters]  ## run test.

Usage Demo

from CTformer import CTformer
import torch

x = torch.randn(1,1,64,64)
CT_former = CTformer(img_size=64,tokens_type='performer', embed_dim=64, depth=1, num_heads=8, kernel=4, stride=4, mlp_ratio=2., token_dim=64)
y = CT_former(x)
print(y.shape)

Experiment Results:

Tab. 1: Quantitative results.

Fig. 3: (a) LDCT, (b) RED-CNN, (c) WGAN-VGG, (d) MAP-NN, (e) AD-NET, (f) the proposed CTformer, and (g) NDCT.

Visual Interpretation:

Fig. 4: The attention maps of the CTformer.